Deduplicate notification samples Rocky - 1

This patch refactors the sample files of:

* instance-rebuild-start
* instance-rebuild-end
* instance-rebuild-error
* instance-restore-start
* instance-resotre-end
* instance-resume-start
* instance-resume-end

notifications to use a common InstanceActionPayload sample data.

Change-Id: I459c39a5dcb928ec3bb03fe144afa0f1ea82f95b
This commit is contained in:
Kevin_Zheng 2018-04-11 15:17:54 +08:00
parent 35e9c2bccf
commit 414f5d4d67
7 changed files with 25 additions and 576 deletions

View File

@ -2,89 +2,11 @@
"event_type": "instance.rebuild.end",
"publisher_id": "nova-compute:compute",
"payload": {
"nova_object.namespace": "nova",
"nova_object.version": "1.5",
"$ref":"common_payloads/InstanceActionPayload.json#",
"nova_object.data": {
"node": "fake-mini",
"fault": null,
"host_name": "some-server",
"power_state": "running",
"image_uuid": "a2459075-d96c-40d5-893e-577ff92e721c",
"display_name": "some-server",
"display_description": "some-server",
"auto_disk_config":"MANUAL",
"tenant_id": "6f70656e737461636b20342065766572",
"key_name": "my-key",
"kernel_id": "",
"created_at": "2012-10-29T13:42:11Z",
"host": "compute",
"reservation_id": "r-wczvhcla",
"flavor": {
"nova_object.namespace": "nova",
"nova_object.version": "1.4",
"nova_object.data": {
"disabled": false,
"ephemeral_gb": 0,
"extra_specs": {"hw:watchdog_action": "disabled"},
"flavorid": "a22d5517-147c-4147-a0d1-e698df5cd4e3",
"is_public": true,
"memory_mb": 512,
"name": "test_flavor",
"projects": null,
"root_gb": 1,
"rxtx_factor": 1.0,
"swap": 0,
"vcpu_weight": 0,
"vcpus": 1,
"description":null
},
"nova_object.name": "FlavorPayload"
},
"user_id": "fake",
"terminated_at": null,
"ip_addresses": [
{
"nova_object.namespace": "nova",
"nova_object.version": "1.0",
"nova_object.data": {
"port_uuid": "ce531f90-199f-48c0-816c-13e38010b442",
"version": 4,
"label": "private-network",
"address": "192.168.1.3",
"meta": {},
"mac": "fa:16:3e:4c:2c:30",
"device_name": "tapce531f90-19"
},
"nova_object.name": "IpPayload"
}
],
"state": "active",
"launched_at": "2012-10-29T13:42:11Z",
"metadata": {},
"deleted_at": null,
"os_type": null,
"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,
"task_state": null,
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name": "InstanceActionPayload"
"image_uuid": "a2459075-d96c-40d5-893e-577ff92e721c"
}
},
"priority": "INFO"
}

View File

@ -1,84 +1,8 @@
{
"priority": "ERROR",
"payload": {
"nova_object.name": "InstanceActionPayload",
"$ref": "common_payloads/InstanceActionPayload.json#",
"nova_object.data": {
"state": "active",
"availability_zone": "nova",
"key_name": "my-key",
"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"
}],
"kernel_id": "",
"host_name": "some-server",
"progress": 0,
"task_state": "rebuilding",
"deleted_at": null,
"architecture": null,
"auto_disk_config":"MANUAL",
"ramdisk_id": "",
"locked": false,
"created_at": "2012-10-29T13:42:11Z",
"host": "compute",
"display_name": "some-server",
"os_type": null,
"metadata": {},
"ip_addresses": [
{
"nova_object.name": "IpPayload",
"nova_object.data": {
"device_name": "tapce531f90-19",
"port_uuid": "ce531f90-199f-48c0-816c-13e38010b442",
"address": "192.168.1.3",
"version": 4,
"meta": {},
"label": "private-network",
"mac": "fa:16:3e:4c:2c:30"
},
"nova_object.version": "1.0",
"nova_object.namespace": "nova"
}
],
"power_state": "running",
"display_description": "some-server",
"uuid": "5fafd989-4043-44b4-8acc-907e847f4b70",
"flavor": {
"nova_object.name": "FlavorPayload",
"nova_object.data": {
"disabled": false,
"ephemeral_gb": 0,
"extra_specs": {"hw:watchdog_action": "disabled"},
"flavorid": "a22d5517-147c-4147-a0d1-e698df5cd4e3",
"is_public": true,
"memory_mb": 512,
"name": "test_flavor",
"projects": null,
"root_gb": 1,
"rxtx_factor": 1.0,
"swap": 0,
"vcpu_weight": 0,
"vcpus": 1,
"description":null
},
"nova_object.version": "1.4",
"nova_object.namespace": "nova"
},
"reservation_id": "r-pfiic52h",
"terminated_at": null,
"tenant_id": "6f70656e737461636b20342065766572",
"node": "fake-mini",
"launched_at": "2012-10-29T13:42:11Z",
"user_id": "fake",
"image_uuid": "a2459075-d96c-40d5-893e-577ff92e721c",
"fault": {
"nova_object.name": "ExceptionPayload",
"nova_object.data": {
@ -90,10 +14,10 @@
"nova_object.version": "1.0",
"nova_object.namespace": "nova"
},
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.version": "1.5",
"nova_object.namespace": "nova"
"architecture": null,
"image_uuid": "a2459075-d96c-40d5-893e-577ff92e721c",
"task_state": "rebuilding"
}
},
"publisher_id": "nova-compute:compute",
"event_type": "instance.rebuild.error"

View File

@ -3,88 +3,11 @@
"event_type": "instance.rebuild.start",
"publisher_id": "nova-compute:compute",
"payload": {
"nova_object.name": "InstanceActionPayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.5",
"$ref":"common_payloads/InstanceActionPayload.json#",
"nova_object.data": {
"display_description": "some-server",
"reservation_id": "r-rqe0mlje",
"progress": 0,
"user_id": "fake",
"task_state": "rebuilding",
"auto_disk_config":"MANUAL",
"node": "fake-mini",
"created_at": "2012-10-29T13:42:11Z",
"key_name": "my-key",
"kernel_id": "",
"metadata": {},
"deleted_at": null,
"host_name": "some-server",
"uuid": "ff0ee97f-3f14-4259-a79c-83949f8493bd",
"os_type": null,
"display_name": "some-server",
"ramdisk_id": "",
"power_state": "running",
"locked": false,
"flavor": {
"nova_object.name": "FlavorPayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.4",
"nova_object.data": {
"disabled": false,
"ephemeral_gb": 0,
"extra_specs": {"hw:watchdog_action": "disabled"},
"flavorid": "a22d5517-147c-4147-a0d1-e698df5cd4e3",
"is_public": true,
"memory_mb": 512,
"name": "test_flavor",
"projects": null,
"root_gb": 1,
"rxtx_factor": 1.0,
"swap": 0,
"vcpu_weight": 0,
"vcpus": 1,
"description":null
}
},
"terminated_at": null,
"architecture": null,
"launched_at": "2012-10-29T13:42:11Z",
"ip_addresses": [
{
"nova_object.name": "IpPayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.0",
"nova_object.data": {
"meta": {},
"mac": "fa:16:3e:4c:2c:30",
"label": "private-network",
"port_uuid": "ce531f90-199f-48c0-816c-13e38010b442",
"version": 4,
"device_name": "tapce531f90-19",
"address": "192.168.1.3"
}
}
],
"tenant_id": "6f70656e737461636b20342065766572",
"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"
}],
"host": "compute",
"image_uuid": "a2459075-d96c-40d5-893e-577ff92e721c",
"state": "active",
"fault": null,
"updated_at": "2012-10-29T13:42:11Z"
"task_state": "rebuilding"
}
}
}

View File

@ -1,90 +1,8 @@
{
"event_type":"instance.restore.end",
"payload":{
"nova_object.data":{
"architecture":"x86_64",
"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"
}],
"created_at":"2012-10-29T13:42:11Z",
"deleted_at":null,
"display_name":"some-server",
"display_description":"some-server",
"fault":null,
"host":"compute",
"host_name":"some-server",
"ip_addresses": [{
"nova_object.name": "IpPayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.0",
"nova_object.data": {
"mac": "fa:16:3e:4c:2c:30",
"address": "192.168.1.3",
"port_uuid": "ce531f90-199f-48c0-816c-13e38010b442",
"meta": {},
"version": 4,
"label": "private-network",
"device_name": "tapce531f90-19"
}
}],
"key_name": "my-key",
"kernel_id":"",
"launched_at":"2012-10-29T13:42:11Z",
"image_uuid": "155d900f-4e14-4e4c-a73d-069cbf4541e6",
"metadata":{},
"locked":false,
"node":"fake-mini",
"os_type":null,
"progress":0,
"ramdisk_id":"",
"reservation_id":"r-npxv0e40",
"state":"active",
"task_state":null,
"power_state":"running",
"tenant_id":"6f70656e737461636b20342065766572",
"terminated_at":null,
"auto_disk_config":"MANUAL",
"flavor": {
"nova_object.name": "FlavorPayload",
"nova_object.data": {
"flavorid": "a22d5517-147c-4147-a0d1-e698df5cd4e3",
"name": "test_flavor",
"root_gb": 1,
"vcpus": 1,
"ephemeral_gb": 0,
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"projects": null,
"swap": 0,
"is_public": true,
"vcpu_weight": 0,
"description":null
},
"nova_object.version": "1.4",
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.5"
"$ref":"common_payloads/InstanceActionPayload.json#"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"
}
}

View File

@ -1,89 +1,11 @@
{
"event_type":"instance.restore.start",
"payload":{
"nova_object.data":{
"architecture":"x86_64",
"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"
}],
"created_at":"2012-10-29T13:42:11Z",
"deleted_at":null,
"display_name":"some-server",
"display_description":"some-server",
"fault":null,
"host":"compute",
"host_name":"some-server",
"ip_addresses": [{
"nova_object.name": "IpPayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.0",
"nova_object.data": {
"mac": "fa:16:3e:4c:2c:30",
"address": "192.168.1.3",
"port_uuid": "ce531f90-199f-48c0-816c-13e38010b442",
"meta": {},
"version": 4,
"label": "private-network",
"device_name": "tapce531f90-19"
}
}],
"key_name": "my-key",
"kernel_id":"",
"launched_at":"2012-10-29T13:42:11Z",
"image_uuid": "155d900f-4e14-4e4c-a73d-069cbf4541e6",
"metadata":{},
"locked":false,
"node":"fake-mini",
"os_type":null,
"progress":0,
"ramdisk_id":"",
"reservation_id":"r-npxv0e40",
"$ref":"common_payloads/InstanceActionPayload.json#",
"nova_object.data": {
"state":"soft-delete",
"task_state":"restoring",
"power_state":"running",
"tenant_id":"6f70656e737461636b20342065766572",
"terminated_at":null,
"auto_disk_config":"MANUAL",
"flavor": {
"nova_object.name": "FlavorPayload",
"nova_object.data": {
"flavorid": "a22d5517-147c-4147-a0d1-e698df5cd4e3",
"name": "test_flavor",
"root_gb": 1,
"vcpus": 1,
"ephemeral_gb": 0,
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"projects": null,
"swap": 0,
"is_public": true,
"vcpu_weight": 0,
"description":null
},
"nova_object.version": "1.4",
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.5"
"task_state":"restoring"
}
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"

View File

@ -1,89 +1,7 @@
{
"event_type":"instance.resume.end",
"payload":{
"nova_object.data":{
"architecture":"x86_64",
"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"
}],
"created_at":"2012-10-29T13:42:11Z",
"deleted_at":null,
"display_name":"some-server",
"display_description":"some-server",
"fault":null,
"host":"compute",
"host_name":"some-server",
"ip_addresses": [{
"nova_object.name": "IpPayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.0",
"nova_object.data": {
"mac": "fa:16:3e:4c:2c:30",
"address": "192.168.1.3",
"port_uuid": "ce531f90-199f-48c0-816c-13e38010b442",
"meta": {},
"version": 4,
"label": "private-network",
"device_name": "tapce531f90-19"
}
}],
"key_name": "my-key",
"kernel_id":"",
"launched_at":"2012-10-29T13:42:11Z",
"image_uuid": "155d900f-4e14-4e4c-a73d-069cbf4541e6",
"metadata":{},
"locked":false,
"node":"fake-mini",
"os_type":null,
"progress":0,
"ramdisk_id":"",
"reservation_id":"r-npxv0e40",
"state":"active",
"task_state":null,
"power_state":"running",
"tenant_id":"6f70656e737461636b20342065766572",
"terminated_at":null,
"auto_disk_config":"MANUAL",
"flavor": {
"nova_object.name": "FlavorPayload",
"nova_object.data": {
"flavorid": "a22d5517-147c-4147-a0d1-e698df5cd4e3",
"name": "test_flavor",
"root_gb": 1,
"vcpus": 1,
"ephemeral_gb": 0,
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"projects": null,
"swap": 0,
"is_public": true,
"vcpu_weight": 0,
"description":null
},
"nova_object.version": "1.4",
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.5"
"$ref":"common_payloads/InstanceActionPayload.json#"
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"

View File

@ -1,90 +1,12 @@
{
"event_type":"instance.resume.start",
"event_type": "instance.resume.start",
"payload":{
"nova_object.data":{
"architecture":"x86_64",
"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"
}],
"created_at":"2012-10-29T13:42:11Z",
"deleted_at":null,
"display_name":"some-server",
"display_description":"some-server",
"fault":null,
"host":"compute",
"host_name":"some-server",
"ip_addresses": [{
"nova_object.name": "IpPayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.0",
"nova_object.data": {
"mac": "fa:16:3e:4c:2c:30",
"address": "192.168.1.3",
"port_uuid": "ce531f90-199f-48c0-816c-13e38010b442",
"meta": {},
"version": 4,
"label": "private-network",
"device_name": "tapce531f90-19"
}
}],
"key_name": "my-key",
"kernel_id":"",
"launched_at":"2012-10-29T13:42:11Z",
"image_uuid": "155d900f-4e14-4e4c-a73d-069cbf4541e6",
"metadata":{},
"locked":false,
"node":"fake-mini",
"os_type":null,
"progress":0,
"ramdisk_id":"",
"reservation_id":"r-npxv0e40",
"state":"suspended",
"task_state":"resuming",
"power_state":"running",
"tenant_id":"6f70656e737461636b20342065766572",
"terminated_at":null,
"auto_disk_config":"MANUAL",
"flavor": {
"nova_object.name": "FlavorPayload",
"nova_object.data": {
"flavorid": "a22d5517-147c-4147-a0d1-e698df5cd4e3",
"name": "test_flavor",
"root_gb": 1,
"vcpus": 1,
"ephemeral_gb": 0,
"memory_mb": 512,
"disabled": false,
"rxtx_factor": 1.0,
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"projects": null,
"swap": 0,
"is_public": true,
"vcpu_weight": 0,
"description":null
},
"nova_object.version": "1.4",
"nova_object.namespace": "nova"
},
"user_id":"fake",
"uuid":"178b0921-8f85-4257-88b6-2e743b5a975c",
"updated_at": "2012-10-29T13:42:11Z"
},
"nova_object.name":"InstanceActionPayload",
"nova_object.namespace":"nova",
"nova_object.version":"1.5"
"$ref": "common_payloads/InstanceActionPayload.json#",
"nova_object.data": {
"state": "suspended",
"task_state": "resuming"
}
},
"priority":"INFO",
"publisher_id":"nova-compute:compute"
"priority": "INFO",
"publisher_id": "nova-compute:compute"
}