diff --git a/doc/notification_samples/aggregate-create-end.json b/doc/notification_samples/aggregate-create-end.json index ded886cab..ab48994fa 100644 --- a/doc/notification_samples/aggregate-create-end.json +++ b/doc/notification_samples/aggregate-create-end.json @@ -1,7 +1,7 @@ { "priority": "INFO", "payload": { - "nova_object.version": "1.0", + "nova_object.version": "1.1", "nova_object.namespace": "nova", "nova_object.name": "AggregatePayload", "nova_object.data": { diff --git a/doc/notification_samples/aggregate-create-start.json b/doc/notification_samples/aggregate-create-start.json index 9fc18d260..775feea7d 100644 --- a/doc/notification_samples/aggregate-create-start.json +++ b/doc/notification_samples/aggregate-create-start.json @@ -1,7 +1,7 @@ { "priority": "INFO", "payload": { - "nova_object.version": "1.0", + "nova_object.version": "1.1", "nova_object.namespace": "nova", "nova_object.name": "AggregatePayload", "nova_object.data": { @@ -9,6 +9,8 @@ "metadata": { "availability_zone": "nova" }, + "hosts": null, + "id": null, "uuid": "788608ec-ebdc-45c5-bc7f-e5f24ab92c80" } }, diff --git a/doc/notification_samples/aggregate-delete-end.json b/doc/notification_samples/aggregate-delete-end.json index 61dbaa1f7..058c3a9e5 100644 --- a/doc/notification_samples/aggregate-delete-end.json +++ b/doc/notification_samples/aggregate-delete-end.json @@ -1,7 +1,7 @@ { "priority": "INFO", "payload": { - "nova_object.version": "1.0", + "nova_object.version": "1.1", "nova_object.namespace": "nova", "nova_object.name": "AggregatePayload", "nova_object.data": { diff --git a/doc/notification_samples/aggregate-delete-start.json b/doc/notification_samples/aggregate-delete-start.json index 8bd25fe43..b4c75abbe 100644 --- a/doc/notification_samples/aggregate-delete-start.json +++ b/doc/notification_samples/aggregate-delete-start.json @@ -1,7 +1,7 @@ { "priority": "INFO", "payload": { - "nova_object.version": "1.0", + "nova_object.version": "1.1", "nova_object.namespace": "nova", "nova_object.name": "AggregatePayload", "nova_object.data": { diff --git a/nova/notifications/objects/aggregate.py b/nova/notifications/objects/aggregate.py index 677689827..88e617db5 100644 --- a/nova/notifications/objects/aggregate.py +++ b/nova/notifications/objects/aggregate.py @@ -25,9 +25,12 @@ class AggregatePayload(base.NotificationPayloadBase): 'metadata': ('aggregate', 'metadata'), } # Version 1.0: Initial version - VERSION = '1.0' + # 1.1: Making the id field nullable + VERSION = '1.1' fields = { - 'id': fields.IntegerField(), + # NOTE(gibi): id is nullable as aggregate.create.start is sent before + # the id is generated by the db + 'id': fields.IntegerField(nullable=True), 'uuid': fields.UUIDField(nullable=False), 'name': fields.StringField(), 'hosts': fields.ListOfStringsField(nullable=True),