Add support for updated_at field for volume objects
Change-Id: Ifbdf335a7206d5f27bfc7fe83d6e51f3a41feddb
This commit is contained in:
parent
45f400dc0d
commit
9564085691
@ -39,6 +39,8 @@ class Volume(resource.Resource, metadata.MetadataMixin):
|
||||
consistency_group_id = resource.Body("consistencygroup_id")
|
||||
#: The timestamp of this volume creation.
|
||||
created_at = resource.Body("created_at")
|
||||
#: The date and time when the resource was updated.
|
||||
updated_at = resource.Body("updated_at")
|
||||
#: The volume description.
|
||||
description = resource.Body("description")
|
||||
#: Extended replication status on this volume.
|
||||
|
@ -42,6 +42,8 @@ class Volume(resource.Resource, metadata.MetadataMixin):
|
||||
consistency_group_id = resource.Body("consistencygroup_id")
|
||||
#: The timestamp of this volume creation.
|
||||
created_at = resource.Body("created_at")
|
||||
#: The date and time when the resource was updated.
|
||||
updated_at = resource.Body("updated_at")
|
||||
#: The volume description.
|
||||
description = resource.Body("description")
|
||||
#: Extended replication status on this volume.
|
||||
|
@ -360,6 +360,7 @@ class FakeVolume:
|
||||
self.volume_type = 'type:volume'
|
||||
self.availability_zone = 'az1'
|
||||
self.created_at = '1900-01-01 12:34:56'
|
||||
self.updated_at = None
|
||||
self.source_volid = '12345'
|
||||
self.metadata = {}
|
||||
|
||||
|
@ -34,6 +34,7 @@ VOLUME = {
|
||||
"availability_zone": "nova",
|
||||
"bootable": "false",
|
||||
"created_at": "2015-03-09T12:14:57.233772",
|
||||
"updated_at": None,
|
||||
"description": "something",
|
||||
"volume_type": "some_type",
|
||||
"snapshot_id": "93c2e2aa-7744-4fd6-a31a-80c4726b08d7",
|
||||
@ -91,6 +92,7 @@ class TestVolume(base.TestCase):
|
||||
self.assertEqual(VOLUME["availability_zone"], sot.availability_zone)
|
||||
self.assertFalse(sot.is_bootable)
|
||||
self.assertEqual(VOLUME["created_at"], sot.created_at)
|
||||
self.assertEqual(VOLUME["updated_at"], sot.updated_at)
|
||||
self.assertEqual(VOLUME["description"], sot.description)
|
||||
self.assertEqual(VOLUME["volume_type"], sot.volume_type)
|
||||
self.assertEqual(VOLUME["snapshot_id"], sot.snapshot_id)
|
||||
|
@ -35,6 +35,7 @@ VOLUME = {
|
||||
"availability_zone": "nova",
|
||||
"bootable": "false",
|
||||
"created_at": "2015-03-09T12:14:57.233772",
|
||||
"updated_at": None,
|
||||
"description": "something",
|
||||
"volume_type": "some_type",
|
||||
"snapshot_id": "93c2e2aa-7744-4fd6-a31a-80c4726b08d7",
|
||||
@ -94,6 +95,7 @@ class TestVolume(base.TestCase):
|
||||
self.assertEqual(VOLUME["availability_zone"], sot.availability_zone)
|
||||
self.assertFalse(sot.is_bootable)
|
||||
self.assertEqual(VOLUME["created_at"], sot.created_at)
|
||||
self.assertEqual(VOLUME["updated_at"], sot.updated_at)
|
||||
self.assertEqual(VOLUME["description"], sot.description)
|
||||
self.assertEqual(VOLUME["volume_type"], sot.volume_type)
|
||||
self.assertEqual(VOLUME["snapshot_id"], sot.snapshot_id)
|
||||
|
3
releasenotes/notes/vol-updated_at-274c3a2bb94c8939.yaml
Normal file
3
releasenotes/notes/vol-updated_at-274c3a2bb94c8939.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
features:
|
||||
- Added support for the updated_at attribute for volume objects.
|
Loading…
Reference in New Issue
Block a user