diff --git a/config_tempest/constants.py b/config_tempest/constants.py index f361cbae..b2e63c76 100644 --- a/config_tempest/constants.py +++ b/config_tempest/constants.py @@ -50,6 +50,12 @@ SERVICE_NAMES = { # depending on whether they get discovered as supported. Services with only one # version don't need to be here, neither do service versions that are not # configurable in tempest.conf +# TODO(mkopec) since Queens, there are only image v2, identity v3 and +# volume v3 versions, however, for backward compatibility let's keep +# all versions here +# TODO(mkopec) Move this information about supported versions somewhere else, +# so that we don't have to have this global object, for example move the +# information to service classes SERVICE_VERSIONS = { 'image': {'supported_versions': ['v1', 'v2'], 'catalog': 'image'}, 'identity': {'supported_versions': ['v2', 'v3'], 'catalog': 'identity'}, diff --git a/config_tempest/services/base.py b/config_tempest/services/base.py index ff130c0f..550da909 100644 --- a/config_tempest/services/base.py +++ b/config_tempest/services/base.py @@ -83,7 +83,11 @@ class VersionedService(Service): self.versions = self.deserialize_versions(body) def deserialize_versions(self, body): - return map(lambda x: x['id'], body['versions']) + versions = [] + for version in body['versions']: + if version['status'] != "DEPRECATED": + versions.append(version) + return map(lambda x: x['id'], versions) def no_port_cut_url(self): # if there is no port defined, cut the url from version to the end diff --git a/config_tempest/tests/base.py b/config_tempest/tests/base.py index eefb7b72..19e9aa48 100644 --- a/config_tempest/tests/base.py +++ b/config_tempest/tests/base.py @@ -116,6 +116,19 @@ class BaseServiceTest(base.BaseTestCase): "values": [ {"id": 'v2.0'} ] + }, { + "status": "DEPRECATED", + "updated": "2013-07-23T11:33:21Z", + "links": [{ + "href": "http://10.200.16.10:8774/v1/", + "rel": "self" + }], + "min_version": "1.0", + "version": "1.0", + "id": "v1.0", + "values": [ + {"id": 'v1.0'} + ] }] } )