diff --git a/doc/source/microversion_testing.rst b/doc/source/microversion_testing.rst index 50fd4f2a74..5bc0eacdb0 100644 --- a/doc/source/microversion_testing.rst +++ b/doc/source/microversion_testing.rst @@ -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 diff --git a/tempest/lib/api_schema/response/compute/v2_59/__init__.py b/tempest/lib/api_schema/response/compute/v2_59/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tempest/lib/api_schema/response/compute/v2_59/migrations.py b/tempest/lib/api_schema/response/compute/v2_59/migrations.py new file mode 100644 index 0000000000..a37c0f17b1 --- /dev/null +++ b/tempest/lib/api_schema/response/compute/v2_59/migrations.py @@ -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') diff --git a/tempest/lib/services/compute/migrations_client.py b/tempest/lib/services/compute/migrations_client.py index 23de064570..812dc966e7 100644 --- a/tempest/lib/services/compute/migrations_client.py +++ b/tempest/lib/services/compute/migrations_client.py @@ -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.