Add BDM to InstancePayload

This patch adds bdm related data to InstancePayload. As loading BDM
can be expensive a new configuration flag 'bdms_in_notifications' is
introduced. If this is set to false (as by default) then the instance
notifications will contain 'null' value in block_devices field.
If this configuration flag is set to true then the block devices will
be loaded from the db and will be included in the notification payload.

Implements: bp additional-notification-fields-for-searchlight
Change-Id: I18e7483ec9a484a660e1d306fdc0986e1d5f952b
This commit is contained in:
Balazs Gibizer
2017-06-12 17:09:17 +02:00
parent 62e904bce5
commit 1928ec5606
60 changed files with 897 additions and 107 deletions
@@ -3,7 +3,7 @@
"publisher_id": "nova-compute:compute",
"payload": {
"nova_object.namespace": "nova",
"nova_object.version":"1.3",
"nova_object.version": "1.4",
"nova_object.data": {
"node": "fake-mini",
"fault": null,
@@ -65,6 +65,18 @@
"uuid": "b271fcb9-75c3-4c76-84eb-6ccad1150ece",
"locked": false,
"availability_zone": "nova",
"block_devices": [{
"nova_object.data": {
"boot_index": null,
"delete_on_termination": false,
"device_name": "/dev/sdb",
"tag": null,
"volume_id": "a07f71dc-8151-4e7d-a0cc-cd24a3f11113"
},
"nova_object.name": "BlockDevicePayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.0"
}],
"ramdisk_id": "",
"architecture": null,
"progress": 0,