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

View File

@@ -139,3 +139,17 @@ class ServerActionsV262SampleJsonTest(ServerActionsV258SampleJsonTest):
class ServerActionsV262NonAdminSampleJsonTest(ServerActionsV262SampleJsonTest):
ADMIN_API = False
class ServerActionsV266SampleJsonTest(ServerActionsV262SampleJsonTest):
microversion = '2.66'
scenarios = [('v2_66', {'api_major_version': 'v2.1'})]
def test_instance_actions_with_changes_before(self):
stop_action_time = self.action_stop['updated_at']
response = self._do_get(
'servers/%s/os-instance-actions'
'?changes-before=%s' % (self.uuid, stop_action_time))
self._verify_response(
'instance-actions-list-with-changes-before',
self._get_subs(), response, 200)