Transform aggregate.delete notification
The aggregate.delete.start and aggregate.delete.end notifications has been transformed to the versioned notification framework. Implements: bp versioned-notification-transformation-ocata Change-Id: I911e7aef813380291e6cf166eac91b53215a3726
This commit is contained in:
parent
5ba7ff63de
commit
99fffea9dc
19
doc/notification_samples/aggregate-delete-end.json
Normal file
19
doc/notification_samples/aggregate-delete-end.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"priority": "INFO",
|
||||||
|
"payload": {
|
||||||
|
"nova_object.version": "1.0",
|
||||||
|
"nova_object.namespace": "nova",
|
||||||
|
"nova_object.name": "AggregatePayload",
|
||||||
|
"nova_object.data": {
|
||||||
|
"name": "my-aggregate",
|
||||||
|
"metadata": {
|
||||||
|
"availability_zone": "nova"
|
||||||
|
},
|
||||||
|
"hosts": [],
|
||||||
|
"id": 1,
|
||||||
|
"uuid": "788608ec-ebdc-45c5-bc7f-e5f24ab92c80"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"event_type": "aggregate.delete.end",
|
||||||
|
"publisher_id": "nova-api:fake-mini"
|
||||||
|
}
|
19
doc/notification_samples/aggregate-delete-start.json
Normal file
19
doc/notification_samples/aggregate-delete-start.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"priority": "INFO",
|
||||||
|
"payload": {
|
||||||
|
"nova_object.version": "1.0",
|
||||||
|
"nova_object.namespace": "nova",
|
||||||
|
"nova_object.name": "AggregatePayload",
|
||||||
|
"nova_object.data": {
|
||||||
|
"name": "my-aggregate",
|
||||||
|
"metadata": {
|
||||||
|
"availability_zone": "nova"
|
||||||
|
},
|
||||||
|
"hosts": [],
|
||||||
|
"id": 1,
|
||||||
|
"uuid": "788608ec-ebdc-45c5-bc7f-e5f24ab92c80"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"event_type": "aggregate.delete.start",
|
||||||
|
"publisher_id": "nova-api:fake-mini"
|
||||||
|
}
|
@ -41,6 +41,8 @@ class AggregatePayload(base.NotificationPayloadBase):
|
|||||||
|
|
||||||
@base.notification_sample('aggregate-create-start.json')
|
@base.notification_sample('aggregate-create-start.json')
|
||||||
@base.notification_sample('aggregate-create-end.json')
|
@base.notification_sample('aggregate-create-end.json')
|
||||||
|
@base.notification_sample('aggregate-delete-start.json')
|
||||||
|
@base.notification_sample('aggregate-delete-end.json')
|
||||||
@nova_base.NovaObjectRegistry.register_notification
|
@nova_base.NovaObjectRegistry.register_notification
|
||||||
class AggregateNotification(base.NotificationBase):
|
class AggregateNotification(base.NotificationBase):
|
||||||
# Version 1.0: Initial version
|
# Version 1.0: Initial version
|
||||||
|
@ -38,3 +38,19 @@ class TestAggregateNotificationSample(
|
|||||||
'uuid': self.ANY,
|
'uuid': self.ANY,
|
||||||
'id': aggregate['id']},
|
'id': aggregate['id']},
|
||||||
actual=fake_notifier.VERSIONED_NOTIFICATIONS[1])
|
actual=fake_notifier.VERSIONED_NOTIFICATIONS[1])
|
||||||
|
|
||||||
|
self.admin_api.delete_aggregate(aggregate['id'])
|
||||||
|
|
||||||
|
self.assertEqual(4, len(fake_notifier.VERSIONED_NOTIFICATIONS))
|
||||||
|
self._verify_notification(
|
||||||
|
'aggregate-delete-start',
|
||||||
|
replacements={
|
||||||
|
'uuid': self.ANY,
|
||||||
|
'id': aggregate['id']},
|
||||||
|
actual=fake_notifier.VERSIONED_NOTIFICATIONS[2])
|
||||||
|
self._verify_notification(
|
||||||
|
'aggregate-delete-end',
|
||||||
|
replacements={
|
||||||
|
'uuid': self.ANY,
|
||||||
|
'id': aggregate['id']},
|
||||||
|
actual=fake_notifier.VERSIONED_NOTIFICATIONS[3])
|
||||||
|
Loading…
Reference in New Issue
Block a user