diff --git a/novaclient/api_versions.py b/novaclient/api_versions.py index 796beadc4..b0c41b023 100644 --- a/novaclient/api_versions.py +++ b/novaclient/api_versions.py @@ -33,8 +33,6 @@ if not LOG.handlers: LEGACY_HEADER_NAME = "X-OpenStack-Nova-API-Version" HEADER_NAME = "OpenStack-API-Version" SERVICE_TYPE = "compute" -# key is a deprecated version and value is an alternative version. -DEPRECATED_VERSIONS = {"1.1": "2"} _SUBSTITUTIONS = {} @@ -232,13 +230,6 @@ def check_major_version(api_version): def get_api_version(version_string): """Returns checked APIVersion object""" version_string = str(version_string) - if version_string in DEPRECATED_VERSIONS: - LOG.warning( - _("Version %(deprecated_version)s is deprecated, using " - "alternative version %(alternative)s instead."), - {"deprecated_version": version_string, - "alternative": DEPRECATED_VERSIONS[version_string]}) - version_string = DEPRECATED_VERSIONS[version_string] if strutils.is_int_like(version_string): version_string = "%s.0" % version_string diff --git a/novaclient/tests/unit/test_client.py b/novaclient/tests/unit/test_client.py index 81d6d56e8..5f7272803 100644 --- a/novaclient/tests/unit/test_client.py +++ b/novaclient/tests/unit/test_client.py @@ -34,10 +34,6 @@ class ClientTest(utils.TestCase): output = novaclient.client.get_client_class(2) self.assertEqual(output, novaclient.v2.client.Client) - def test_get_client_class_v1_1(self): - output = novaclient.client.get_client_class('1.1') - self.assertEqual(output, novaclient.v2.client.Client) - def test_get_client_class_unknown(self): self.assertRaises(novaclient.exceptions.UnsupportedVersion, novaclient.client.get_client_class, '0') diff --git a/novaclient/tests/unit/test_shell.py b/novaclient/tests/unit/test_shell.py index a6b41ae8b..bb515bfc2 100644 --- a/novaclient/tests/unit/test_shell.py +++ b/novaclient/tests/unit/test_shell.py @@ -608,10 +608,6 @@ class ShellTest(utils.TestCase): def test_default_service_type(self, mock_client): self._test_service_type(None, 'compute', mock_client) - @mock.patch('novaclient.client.Client') - def test_v1_1_service_type(self, mock_client): - self._test_service_type('1.1', 'compute', mock_client) - @mock.patch('novaclient.client.Client') def test_v2_service_type(self, mock_client): self._test_service_type('2', 'compute', mock_client) diff --git a/releasenotes/notes/remove_api_v_1_1-88b3f18ce1423b46.yaml b/releasenotes/notes/remove_api_v_1_1-88b3f18ce1423b46.yaml new file mode 100644 index 000000000..5748c5e67 --- /dev/null +++ b/releasenotes/notes/remove_api_v_1_1-88b3f18ce1423b46.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - remove version 1.1 API support as we only support v2 and v2.1 + API in nova side now. +