summaryrefslogtreecommitdiff
path: root/api-ref
diff options
context:
space:
mode:
authorKota Tsuyuzaki <tsuyuzaki.kota@lab.ntt.co.jp>2014-12-15 20:45:41 -0800
committerAlistair Coles <alistair.coles@hpe.com>2017-01-12 18:03:10 +0000
commit652276fea60089c8f62cf9495dc873b932652487 (patch)
tree897ee8cabab1cc512b6e686c95760170fd5365d3 /api-ref
parent436374e66c21b1ea7974d5c10527e72eca47a738 (diff)
downloadswift-652276fea60089c8f62cf9495dc873b932652487.tar.gz
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
Diffstat (limited to 'api-ref')
-rw-r--r--api-ref/source/samples/account-containers-list-response.json6
-rw-r--r--api-ref/source/samples/account-containers-list-response.xml2
2 files changed, 6 insertions, 2 deletions
diff --git a/api-ref/source/samples/account-containers-list-response.json b/api-ref/source/samples/account-containers-list-response.json
index 4ae34aa4c..d9864aa24 100644
--- a/api-ref/source/samples/account-containers-list-response.json
+++ b/api-ref/source/samples/account-containers-list-response.json
@@ -2,11 +2,13 @@
{
"count": 0,
"bytes": 0,
- "name": "janeausten"
+ "name": "janeausten",
+ "last_modified": "2013-11-19T20:08:13.283452"
},
{
"count": 1,
"bytes": 14,
- "name": "marktwain"
+ "name": "marktwain",
+ "last_modified": "2016-04-29T16:23:50.460230"
}
]
diff --git a/api-ref/source/samples/account-containers-list-response.xml b/api-ref/source/samples/account-containers-list-response.xml
index d8f51cfa0..6e194aebc 100644
--- a/api-ref/source/samples/account-containers-list-response.xml
+++ b/api-ref/source/samples/account-containers-list-response.xml
@@ -4,10 +4,12 @@
<name>janeausten</name>
<count>0</count>
<bytes>0</bytes>
+ <last_modified>2013-11-19T20:08:13.283452</last_modified>
</container>
<container>
<name>marktwain</name>
<count>1</count>
<bytes>14</bytes>
+ <last_modified>2016-04-29T16:23:50.460230</last_modified>
</container>
</account>