Merge "Fill update, rebuild, list API response schema for 2.47"
This commit is contained in:
commit
9c628189e7
@ -306,10 +306,18 @@ Microversion tests implemented in Tempest
|
||||
|
||||
.. _2.6: https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id5
|
||||
|
||||
* `2.9`_
|
||||
|
||||
.. _2.9: https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id8
|
||||
|
||||
* `2.10`_
|
||||
|
||||
.. _2.10: https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id9
|
||||
|
||||
* `2.19`_
|
||||
|
||||
.. _2.19: https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id17
|
||||
|
||||
* `2.20`_
|
||||
|
||||
.. _2.20: https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id18
|
||||
@ -322,6 +330,10 @@ Microversion tests implemented in Tempest
|
||||
|
||||
.. _2.25: https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#maximum-in-mitaka
|
||||
|
||||
* `2.26`_
|
||||
|
||||
.. _2.26: https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id23
|
||||
|
||||
* `2.32`_
|
||||
|
||||
.. _2.32: https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id29
|
||||
|
@ -184,8 +184,28 @@ class ServerShowV247Test(base.BaseV2ComputeTest):
|
||||
min_microversion = '2.47'
|
||||
max_microversion = 'latest'
|
||||
|
||||
# NOTE(gmann): This test tests the server APIs response schema
|
||||
# Along with 2.47 microversion schema this test class tests the
|
||||
# other microversions 2.9, 2.19 and 2.26 server APIs response schema
|
||||
# also. 2.47 APIs schema are on top of 2.9->2.19->2.26 schema so
|
||||
# below tests cover all of the schema.
|
||||
|
||||
@decorators.idempotent_id('88b0bdb2-494c-11e7-a919-92ebcb67fe33')
|
||||
def test_show_server(self):
|
||||
server = self.create_test_server()
|
||||
# All fields will be checked by API schema
|
||||
self.servers_client.show_server(server['id'])
|
||||
|
||||
@decorators.idempotent_id('8de397c2-57d0-4b90-aa30-e5d668f21a8b')
|
||||
def test_update_rebuild_list_server(self):
|
||||
server = self.create_test_server()
|
||||
# Checking update API response schema
|
||||
self.servers_client.update_server(server['id'])
|
||||
waiters.wait_for_server_status(self.servers_client, server['id'],
|
||||
'ACTIVE')
|
||||
# Checking rebuild API response schema
|
||||
self.servers_client.rebuild_server(server['id'], self.image_ref_alt)
|
||||
waiters.wait_for_server_status(self.servers_client,
|
||||
server['id'], 'ACTIVE')
|
||||
# Checking list details API response schema
|
||||
self.servers_client.list_servers(detail=True)
|
||||
|
@ -37,3 +37,19 @@ flavor = {
|
||||
get_server = copy.deepcopy(servers226.get_server)
|
||||
get_server['response_body']['properties']['server'][
|
||||
'properties'].update({'flavor': flavor})
|
||||
list_servers_detail = copy.deepcopy(servers226.list_servers_detail)
|
||||
list_servers_detail['response_body']['properties']['servers']['items'][
|
||||
'properties'].update({'flavor': flavor})
|
||||
|
||||
update_server = copy.deepcopy(servers226.update_server)
|
||||
update_server['response_body']['properties']['server'][
|
||||
'properties'].update({'flavor': flavor})
|
||||
|
||||
rebuild_server = copy.deepcopy(servers226.rebuild_server)
|
||||
rebuild_server['response_body']['properties']['server'][
|
||||
'properties'].update({'flavor': flavor})
|
||||
|
||||
rebuild_server_with_admin_pass = copy.deepcopy(
|
||||
servers226.rebuild_server_with_admin_pass)
|
||||
rebuild_server_with_admin_pass['response_body']['properties']['server'][
|
||||
'properties'].update({'flavor': flavor})
|
||||
|
@ -156,11 +156,11 @@ class ServersClient(base_compute_client.BaseComputeClient):
|
||||
|
||||
url = 'servers'
|
||||
schema = self.get_schema(self.schema_versions_info)
|
||||
_schema = schema.list_servers
|
||||
|
||||
if detail:
|
||||
url += '/detail'
|
||||
_schema = schema.list_servers_detail
|
||||
else:
|
||||
_schema = schema.list_servers
|
||||
if params:
|
||||
url += '?%s' % urllib.urlencode(params)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user