Resource retrieving: add changes-before filter

This adds the changes-before filter to the servers,
os-instance-actions and os-migrations APIs for
filtering resources which were last updated before
or equal to the given time. The changes-before filter,
like the changes-since filter, will return deleted
server resources.

Part of bp support-to-query-nova-resources-filter-by-changes-before
Change-Id: If91c179e3823c8b0da744a9363906b0f7b05c326
This commit is contained in:
zhangbailin
2018-09-03 10:55:05 +08:00
committed by Matt Riedemann
parent 82270cc261
commit 28c1075b59
61 changed files with 2426 additions and 54 deletions
@@ -0,0 +1,21 @@
{
"instanceAction": {
"action": "stop",
"events": [
{
"event": "compute_stop_instance",
"finish_time": "2018-04-25T01:26:34.784165",
"hostId": "2091634baaccdc4c5a1d57069c833e402921df696b7f970791b12ec6",
"result": "Success",
"start_time": "2018-04-25T01:26:34.612020"
}
],
"instance_uuid": "79edaa44-ad4f-4af7-b994-154518c2b927",
"message": null,
"project_id": "6f70656e737461636b20342065766572",
"request_id": "req-8eb28d4a-db6c-4337-bab8-ce154e9c620e",
"start_time": "2018-04-25T01:26:34.388280",
"updated_at": "2018-04-25T01:26:34.784165",
"user_id": "fake"
}
}
@@ -0,0 +1,23 @@
{
"instanceAction": {
"action": "stop",
"events": [
{
"event": "compute_stop_instance",
"finish_time": "2018-04-25T01:26:36.790544",
"host": "compute",
"hostId": "2091634baaccdc4c5a1d57069c833e402921df696b7f970791b12ec6",
"result": "Success",
"start_time": "2018-04-25T01:26:36.539271",
"traceback": null
}
],
"instance_uuid": "4bf3473b-d550-4b65-9409-292d44ab14a2",
"message": null,
"project_id": "6f70656e737461636b20342065766572",
"request_id": "req-0d819d5c-1527-4669-bdf0-ffad31b5105b",
"start_time": "2018-04-25T01:26:36.341290",
"updated_at": "2018-04-25T01:26:36.790544",
"user_id": "admin"
}
}
@@ -0,0 +1,24 @@
{
"instanceActions": [
{
"action": "stop",
"instance_uuid": "15835b6f-1e14-4cfa-9f66-1abea1a1c0d5",
"message": null,
"project_id": "6f70656e737461636b20342065766572",
"request_id": "req-f04d4b92-6241-42da-b82d-2cedb225c58d",
"start_time": "2018-04-25T01:26:36.036697",
"updated_at": "2018-04-25T01:26:36.525308",
"user_id": "admin"
},
{
"action": "create",
"instance_uuid": "15835b6f-1e14-4cfa-9f66-1abea1a1c0d5",
"message": null,
"project_id": "6f70656e737461636b20342065766572",
"request_id": "req-d8790618-9bbf-4df0-8af8-fc9e24de29c0",
"start_time": "2018-04-25T01:26:33.692125",
"updated_at": "2018-04-25T01:26:35.993821",
"user_id": "admin"
}
]
}
@@ -0,0 +1,24 @@
{
"instanceActions": [
{
"action": "stop",
"instance_uuid": "2150964c-30fe-4214-9547-8822375aa7d0",
"message": null,
"project_id": "6f70656e737461636b20342065766572",
"request_id": "req-0c3b2079-0a44-474d-a5b2-7466d4b4c642",
"start_time": "2018-04-25T01:26:29.594237",
"updated_at": "2018-04-25T01:26:30.065061",
"user_id": "admin"
},
{
"action": "create",
"instance_uuid": "15835b6f-1e14-4cfa-9f66-1abea1a1c0d5",
"message": null,
"project_id": "6f70656e737461636b20342065766572",
"request_id": "req-d8790618-9bbf-4df0-8af8-fc9e24de29c0",
"start_time": "2018-04-25T01:26:33.692125",
"updated_at": "2018-04-25T01:26:35.993821",
"user_id": "admin"
}
]
}
@@ -0,0 +1,14 @@
{
"instanceActions": [
{
"action": "stop",
"instance_uuid": "2150964c-30fe-4214-9547-8822375aa7d0",
"message": null,
"project_id": "6f70656e737461636b20342065766572",
"request_id": "req-0c3b2079-0a44-474d-a5b2-7466d4b4c642",
"start_time": "2018-04-25T01:26:29.594237",
"updated_at": "2018-04-25T01:26:30.065061",
"user_id": "admin"
}
]
}
@@ -0,0 +1,20 @@
{
"instanceActions": [
{
"action": "stop",
"instance_uuid": "ca3d3be5-1a40-427f-9515-f5e181f479d0",
"message": null,
"project_id": "6f70656e737461636b20342065766572",
"request_id": "req-4dbefbb7-d743-4d42-b0a1-a79cbe256138",
"start_time": "2018-04-25T01:26:28.909887",
"updated_at": "2018-04-25T01:26:29.400606",
"user_id": "admin"
}
],
"links": [
{
"href": "http://openstack.example.com/v2.1/6f70656e737461636b20342065766572/servers/ca3d3be5-1a40-427f-9515-f5e181f479d0/os-instance-actions?limit=1&marker=req-4dbefbb7-d743-4d42-b0a1-a79cbe256138",
"rel": "next"
}
]
}
@@ -0,0 +1,14 @@
{
"instanceActions": [
{
"action": "create",
"instance_uuid": "9bde1fd5-8435-45c5-afc1-bedd0605275b",
"message": null,
"project_id": "6f70656e737461636b20342065766572",
"request_id": "req-4510fb10-447f-4572-a64d-c2324547d86c",
"start_time": "2018-04-25T01:26:33.710291",
"updated_at": "2018-04-25T01:26:35.374936",
"user_id": "fake"
}
]
}