]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Add updated_at into response of listing detail
authorwanghao <wanghao749@huawei.com>
Wed, 15 Jul 2015 10:09:36 +0000 (18:09 +0800)
committerwanghao <wanghao749@huawei.com>
Sun, 6 Sep 2015 06:25:14 +0000 (14:25 +0800)
commit9fe92e1474765b31d4ac76a218ddf1e11cddd0ea
treee9b00286c9336f5dd344242d8f26e3441e88a0ea
parent31ff5b05879fcec5124291816077660aa46f30f5
Add updated_at into response of listing detail

Now when query cinder resource(volume/snapshot/backup) detail, the
response of this resource just show created_at to end user, and do not
contain the updated_at property.

The updated_at time is an important information to end user, for example,
they can delete the useless volumes by checking if the volumes have been
updated in a period time. Also users can filter resources by using
changes_since for all projects in future. Although cinder haven't yet,
this is first step to let users know the time of update.

On the other hand, if volume is 'in-use', attached_at time should also be
returned.

APIImpact
Add "updated_at: XXX" into response body of querying resource detail.
Add "attached_at: XXX" into attachments with response of querying resource
detail.

Change-Id: I8353e95f5a962f3b89132a65c31999218cbe79dc
Implements: blueprint improve-timestamp-in-response-when-querying-cinder-resources
cinder/api/v2/views/volumes.py
cinder/api/views/backups.py
cinder/api/views/snapshots.py
cinder/tests/unit/api/contrib/test_backups.py
cinder/tests/unit/api/v2/test_snapshots.py
cinder/tests/unit/api/v2/test_volumes.py