Add migration uuid API schema validation for 2.59
Microversion 2.59 [1] compute API added a "uuid" parameter to the body of the following migration responses: - GET /os-migrations - GET /servers/{server_id}/migrations/{migration_id} - GET /servers/{server_id}/migrations This commit adds the uuid to the response validation schema for list_migrations. [1] https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id55 Change-Id: Ic748f70d90446c79324df30147e4a270b72d710e
This commit is contained in:
parent
0c71fc29a1
commit
4bbe5b58ec
@ -394,6 +394,10 @@ Microversion tests implemented in Tempest
|
||||
|
||||
.. _2.57: https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id52
|
||||
|
||||
* `2.59`_
|
||||
|
||||
.. _2.59: https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id55
|
||||
|
||||
* `2.60`_
|
||||
|
||||
.. _2.60: https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#maximum-in-queens
|
||||
|
36
tempest/lib/api_schema/response/compute/v2_59/migrations.py
Normal file
36
tempest/lib/api_schema/response/compute/v2_59/migrations.py
Normal file
@ -0,0 +1,36 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
|
||||
from tempest.lib.api_schema.response.compute.v2_23 import migrations
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# 2.59:
|
||||
#
|
||||
# The uuid value is now returned in the response body in addition to the
|
||||
# migration id for the following API responses:
|
||||
#
|
||||
# - GET /os-migrations
|
||||
# - GET /servers/{server_id}/migrations/{migration_id}
|
||||
# - GET /servers/{server_id}/migrations
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
uuid = {'type': 'string', 'format': 'uuid'}
|
||||
|
||||
list_migrations = copy.deepcopy(migrations.list_migrations)
|
||||
list_migrations['response_body']['properties']['migrations']['items'][
|
||||
'properties'].update({'uuid': uuid})
|
||||
list_migrations['response_body']['properties']['migrations']['items'][
|
||||
'required'].append('uuid')
|
@ -18,6 +18,8 @@ from six.moves.urllib import parse as urllib
|
||||
from tempest.lib.api_schema.response.compute.v2_1 import migrations as schema
|
||||
from tempest.lib.api_schema.response.compute.v2_23 import migrations \
|
||||
as schemav223
|
||||
from tempest.lib.api_schema.response.compute.v2_59 import migrations \
|
||||
as schemav259
|
||||
from tempest.lib.common import rest_client
|
||||
from tempest.lib.services.compute import base_compute_client
|
||||
|
||||
@ -25,7 +27,8 @@ from tempest.lib.services.compute import base_compute_client
|
||||
class MigrationsClient(base_compute_client.BaseComputeClient):
|
||||
schema_versions_info = [
|
||||
{'min': None, 'max': '2.22', 'schema': schema},
|
||||
{'min': '2.23', 'max': None, 'schema': schemav223}]
|
||||
{'min': '2.23', 'max': '2.58', 'schema': schemav223},
|
||||
{'min': '2.59', 'max': None, 'schema': schemav259}]
|
||||
|
||||
def list_migrations(self, **params):
|
||||
"""List all migrations.
|
||||
|
Loading…
Reference in New Issue
Block a user