masakari/doc/notification_samples/create-host-start.json
Shilpa 895899f11b Check if host belongs to a segment
If you query a host passing an existing failover segment but not
the one that is assigned to the host, it still returns the host
successfully. In this case, it should fail with 404 error.

This patch checks if the host belongs to the segment that is
present in the URI. If not, it will return 404 error.

Change-Id: I16256cc2a01696a1d54cb9326aed17b723b87727
Closes-Bug: #1854323
2020-05-20 11:25:35 +05:30

37 lines
1.4 KiB
JSON

{
"event_type": "host.create.start",
"timestamp": "2018-11-27 13:09:30.716747",
"payload": {
"masakari_object.name": "HostApiPayload",
"masakari_object.data": {
"reserved": false,
"name": "fake-mini",
"on_maintenance": false,
"control_attributes": "TEST",
"failover_segment": {
"masakari_object.name": "FailoverSegment",
"masakari_object.data": {
"uuid": "89597691-bebd-4860-a93e-1b6e9de34b9e",
"deleted": false,
"created_at": "2018-11-27T09:26:30Z",
"recovery_method": "auto",
"updated_at": "2018-11-27T09:54:50Z",
"name": "test",
"service_type": "compute",
"deleted_at": null,
"id": 877, "description": null
},
"masakari_object.version": "1.0",
"masakari_object.namespace": "masakari"
},
"fault": null,
"type": "COMPUTE",
"failover_segment_id": "89597691-bebd-4860-a93e-1b6e9de34b9e"
},
"masakari_object.version": "1.0",
"masakari_object.namespace": "masakari"
},
"priority": "INFO",
"publisher_id": "masakari-api:fake-mini",
"message_id": "0ed836cc-353a-40bc-b86b-d89e6632d838"
}