diff options
author | Takashi NATSUME <natsume.takashi@lab.ntt.co.jp> | 2017-06-19 13:49:25 +0900 |
---|---|---|
committer | Balazs Gibizer <balazs.gibizer@ericsson.com> | 2017-07-25 19:31:21 +0200 |
commit | bf17be9e8ffc393a3af1dbd88b0c0623658b0979 (patch) | |
tree | c3045791ee3eb0e9e7e259c081dc7931683c7b4e /nova/notifications/objects/instance.py | |
parent | 7234e6e4744312d7fc1d5d4e7659d9c12a67a35a (diff) | |
download | nova-bf17be9e8ffc393a3af1dbd88b0c0623658b0979.tar.gz |
Add 'updated_at' field to InstancePayload in notifications
Change-Id: Iddc5ec3b5053ddf5dce73c86edca26c4552d451b
Implements: bp versioned-notification-transformation-pike
Closes-Bug: #1684860
Diffstat (limited to 'nova/notifications/objects/instance.py')
-rw-r--r-- | nova/notifications/objects/instance.py | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/nova/notifications/objects/instance.py b/nova/notifications/objects/instance.py index 9fe72d2ccd..2faa786a59 100644 --- a/nova/notifications/objects/instance.py +++ b/nova/notifications/objects/instance.py @@ -48,6 +48,7 @@ class InstancePayload(base.NotificationPayloadBase): 'launched_at': ('instance', 'launched_at'), 'terminated_at': ('instance', 'terminated_at'), 'deleted_at': ('instance', 'deleted_at'), + 'updated_at': ('instance', 'updated_at'), 'state': ('instance', 'vm_state'), 'power_state': ('instance', 'power_state'), @@ -63,7 +64,8 @@ class InstancePayload(base.NotificationPayloadBase): # Version 1.2: Add auto_disk_config field # Version 1.3: Add key_name field # Version 1.4: Add BDM related data - VERSION = '1.4' + # Version 1.5: Add updated_at field + VERSION = '1.5' fields = { 'uuid': fields.UUIDField(), 'user_id': fields.StringField(nullable=True), @@ -90,6 +92,7 @@ class InstancePayload(base.NotificationPayloadBase): 'launched_at': fields.DateTimeField(nullable=True), 'terminated_at': fields.DateTimeField(nullable=True), 'deleted_at': fields.DateTimeField(nullable=True), + 'updated_at': fields.DateTimeField(nullable=True), 'state': fields.InstanceStateField(nullable=True), 'power_state': fields.InstancePowerStateField(nullable=True), @@ -125,7 +128,8 @@ class InstanceActionPayload(InstancePayload): # Version 1.2: Added auto_disk_config field to InstancePayload # Version 1.3: Added key_name field to InstancePayload # Version 1.4: Add BDM related data - VERSION = '1.4' + # Version 1.5: Added updated_at field to InstancePayload + VERSION = '1.5' fields = { 'fault': fields.ObjectField('ExceptionPayload', nullable=True), } @@ -138,10 +142,11 @@ class InstanceActionPayload(InstancePayload): @nova_base.NovaObjectRegistry.register_notification class InstanceActionVolumePayload(InstanceActionPayload): # Version 1.0: Initial version - # 1.1: Added key_name field to InstancePayload - # 1.2: Add BDM related data + # Version 1.1: Added key_name field to InstancePayload + # Version 1.2: Add BDM related data + # Version 1.3: Added updated_at field to InstancePayload - VERSION = '1.2' + VERSION = '1.3' fields = { 'volume_id': fields.UUIDField() } @@ -161,7 +166,8 @@ class InstanceActionVolumeSwapPayload(InstanceActionPayload): # Version 1.2: Added auto_disk_config field to InstancePayload # Version 1.3: Added key_name field to InstancePayload # Version 1.4: Add BDM related data - VERSION = '1.4' + # Version 1.5: Added updated_at field to InstancePayload + VERSION = '1.5' fields = { 'old_volume_id': fields.UUIDField(), 'new_volume_id': fields.UUIDField(), @@ -188,7 +194,8 @@ class InstanceCreatePayload(InstanceActionPayload): # 1.4: Add key_name field to InstancePayload # 1.5: Add BDM related data to InstancePayload # 1.6: Add tags field to InstanceCreatePayload - VERSION = '1.6' + # 1.7: Added updated_at field to InstancePayload + VERSION = '1.7' fields = { 'keypairs': fields.ListOfObjectsField('KeypairPayload'), @@ -213,7 +220,8 @@ class InstanceUpdatePayload(InstancePayload): # Version 1.3: Added auto_disk_config field to InstancePayload # Version 1.4: Added key_name field to InstancePayload # Version 1.5: Add BDM related data - VERSION = '1.5' + # Version 1.6: Added updated_at field to InstancePayload + VERSION = '1.6' fields = { 'state_update': fields.ObjectField('InstanceStateUpdatePayload'), 'audit_period': fields.ObjectField('AuditPeriodPayload'), |