4b783a206c
To remove duplicated data this patch introduce common json fragments for the instance related notifications and refactors the sample file of instance.delete.start and instance.delete.end. The common sample fragments define an active instance as that is the most common state in the instance action notifications. This way we can minimize the difference between the common sample and the generated notification. Still there will be differences. For example instance.delete.end notification will contain different instance status and some other deletion related fields are also set. To make sure the the sample matches with the generated notification we have to override some of the fields coming from the common sample fragment. Such overrides could be added in the test case directly to the _verify_notification() call as it is done in case of dynamic values like instance uuid. However the sample files not only used in the functional tests but also during the generation of the notification dev-ref. To have meaningful samples in the doc we have to do such overrides during the reference resolving and not directly in the test case. Change-Id: I0669a075c94ba2a435116791e3391d8d745bc639
16 lines
432 B
JSON
16 lines
432 B
JSON
{
|
|
"event_type":"instance.delete.end",
|
|
"payload":{
|
|
"$ref":"common_payloads/InstanceActionPayload.json#",
|
|
"nova_object.data":{
|
|
"deleted_at":"2012-10-29T13:42:11Z",
|
|
"ip_addresses":[],
|
|
"power_state":"pending",
|
|
"state":"deleted",
|
|
"terminated_at":"2012-10-29T13:42:11Z"
|
|
}
|
|
},
|
|
"priority":"INFO",
|
|
"publisher_id":"nova-compute:compute"
|
|
}
|