swift/api-ref/source/samples
Kota Tsuyuzaki 652276fea6 Support last modified on listing containers
For now, last modified timestamp is supported only on
object listing. (i.e. GET container)

For example:

GET container with json format results in like as:

[{"hash": "d41d8cd98f00b204e9800998ecf8427e", "last_modified":
"2015-06-10T04:58:23.460230", "bytes": 0, "name": "object",
"content_type": "application/octet-stream"}]

However, container listing (i.e. GET account) shows just a dict
consists of ("name", "bytes", "name") for each container.

For example:

GET accounts with json format result in like as:

[{"count": 0, "bytes": 0, "name": "container"}]

This patch is for supporting last_modified key in the container
listing results as well as object listing like as:

[{"count": 0, "bytes": 0, "name": "container", "last_modified":
"2015-06-10T04:58:23.460230"}]

This patch is changing just output for listing. The original
timestamp to show the last modified is already in container table
of account.db as a "put_timestamp" column.

Note that this patch *DOESN'T* change the put_timestamp semantics.
i.e. the last_modified timestamp will be changed only at both PUT
container and POST container.
(PUT object doesn't affect the timestamp)

Note that the tuple format of returning value from
swift.account.backend.AccountBroker.list_containers is now
(name, object_count, bytes_used, put_timestamp, 0)

* put_timestamp is added *

Original discussion was in working session at Vancouver Summit.
Etherpads are around here:

https://etherpad.openstack.org/p/liberty-swift-contributors-meetup
https://etherpad.openstack.org/p/liberty-container-listing-update

DocImpact

Change-Id: Iba0503916f1481a20c59ae9136436f40183e4c5b
2017-01-12 18:03:10 +00:00
..
account-containers-list-http-request-json.txt api-ref: clean up account listing examples 2016-09-19 09:46:06 +01:00
account-containers-list-http-request-xml.txt api-ref: clean up account listing examples 2016-09-19 09:46:06 +01:00
account-containers-list-http-response-json.txt Mirror X-Trans-Id to X-Openstack-Request-Id 2016-10-30 20:02:39 -07:00
account-containers-list-http-response-xml.txt Mirror X-Trans-Id to X-Openstack-Request-Id 2016-10-30 20:02:39 -07:00
account-containers-list-response.json Support last modified on listing containers 2017-01-12 18:03:10 +00:00
account-containers-list-response.xml Support last modified on listing containers 2017-01-12 18:03:10 +00:00
capabilities-list-response.json Corrections for the API specifications in api-ref 2016-09-14 10:10:20 +01:00
containers-list-http-request.txt Adds migrated API reference files 2016-06-21 19:14:22 +02:00
containers-list-http-response.txt Adds migrated API reference files 2016-06-21 19:14:22 +02:00
endpoints-list-response-headers.json Adds migrated API reference files 2016-06-21 19:14:22 +02:00
endpoints-list-response.json Adds migrated API reference files 2016-06-21 19:14:22 +02:00
goodbyeworld.txt Adds migrated API reference files 2016-06-21 19:14:22 +02:00
helloworld.txt Adds migrated API reference files 2016-06-21 19:14:22 +02:00
objects-list-http-response-json.txt Mirror X-Trans-Id to X-Openstack-Request-Id 2016-10-30 20:02:39 -07:00
objects-list-http-response-xml.txt Mirror X-Trans-Id to X-Openstack-Request-Id 2016-10-30 20:02:39 -07:00
objects-list-response.json Adds migrated API reference files 2016-06-21 19:14:22 +02:00
objects-list-response.xml Adds migrated API reference files 2016-06-21 19:14:22 +02:00