Deduplicate instance.interface_attach samples

This patch refactors the sample files of instance.interface_attach and
interface_detach notifications to use the previously introduced common
sample data.

Change-Id: I74396b680f35290e32f667d2ddba227e1cbbab2f
This commit is contained in:
Balazs Gibizer 2017-10-27 17:18:42 +02:00
parent 10d3e240c2
commit da0e385c4b
5 changed files with 21 additions and 411 deletions

View File

@ -3,21 +3,8 @@
"event_type": "instance.interface_attach.end",
"priority": "INFO",
"payload": {
"nova_object.data": {
"fault": null,
"ramdisk_id": "",
"kernel_id": "",
"progress": 0,
"deleted_at": null,
"reservation_id": "r-xweiyxxa",
"created_at": "2012-10-29T13:42:11Z",
"uuid": "cb968404-7797-4896-9164-bbb1a1f9530b",
"display_description": "some-server",
"node": "fake-mini",
"os_type": null,
"host_name": "some-server",
"locked": false,
"user_id": "fake",
"$ref":"common_payloads/InstanceActionPayload.json#",
"nova_object.data":{
"ip_addresses": [
{
"nova_object.data": {
@ -47,61 +34,7 @@
"nova_object.namespace": "nova",
"nova_object.version": "1.0"
}
],
"architecture": "x86_64",
"display_name": "some-server",
"launched_at": "2012-10-29T13:42:11Z",
"updated_at": "2012-10-29T13:42:11Z",
"key_name": "my-key",
"auto_disk_config": "MANUAL",
"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"
}
],
"flavor": {
"nova_object.data": {
"swap": 0,
"rxtx_factor": 1.0,
"memory_mb": 512,
"name": "test_flavor",
"vcpu_weight": 0,
"root_gb": 1,
"vcpus": 1,
"is_public": true,
"ephemeral_gb": 0,
"extra_specs": {
"hw:watchdog_action": "disabled"
},
"disabled": false,
"projects": null,
"flavorid": "a22d5517-147c-4147-a0d1-e698df5cd4e3"
},
"nova_object.name": "FlavorPayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.3"
},
"image_uuid": "155d900f-4e14-4e4c-a73d-069cbf4541e6",
"power_state": "running",
"metadata": {},
"tenant_id": "6f70656e737461636b20342065766572",
"terminated_at": null,
"task_state": null,
"host": "compute",
"state": "active",
"availability_zone": "nova"
},
"nova_object.name": "InstanceActionPayload",
"nova_object.namespace": "nova",
"nova_object.version": "1.5"
]
}
}
}

View File

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

View File

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

View File

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

View File

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