Verify get_instance_action attributes of Nova API
This patch adds the JSON schema for Nova V2 & V3 get_instance_actions
API response and validate the response with added JSON schema
to block the backward incompatibility change in the future.
The response body of get_instance_actions V2 API is below:
{
"instanceAction": {
"action": "reboot",
"instance_uuid": "b48316c5-71e8-45e4-9884-6c78055b9b13",
"request_id": "req-3293a3f1-b44c-4609-b8d2-d81b105636b8",
"user_id": "789",
"project_id": "147",
"start_time": "2012-12-05 00:00:00.000000",
"message": "",
"events": [
{
"event": "schedule",
"start_time": "2012-12-05 01:00:02.000000",
"finish_time": "2012-12-05 01:02:00.000000",
"result": "Success",
"traceback": ""
},
{
"event": "compute_create",
"start_time": "2012-12-05 01:03:00.000000",
"finish_time": "2012-12-05 01:04:00.000000",
"result": "Success",
"traceback": ""
}
]
}
}
The response body of get_instance_actions V3 API is below:
{
"server_action": {
"action": "reboot",
"server_uuid": "b48316c5-71e8-45e4-9884-6c78055b9b13",
"request_id": "req-3293a3f1-b44c-4609-b8d2-d81b105636b8",
"user_id": "789",
"project_id": "147",
"start_time": "2012-12-05T00:00:00.000000",
"message": "",
"events": [
{
"event": "schedule",
"start_time": "2012-12-05T01:00:02.000000",
"finish_time": "2012-12-05T01:02:00.000000",
"result": "Success",
"traceback": ""
},
{
"event": "compute_create",
"start_time": "2012-12-05T01:03:00.000000",
"finish_time": "2012-12-05T01:04:00.000000",
"result": "Success",
"traceback": ""
}
]
}
}
Partially implements blueprint nova-api-attribute-test
Change-Id: I7b0d64b1db19359e5ff81b7cbbebef0b11946a1b
5 files changed