From 24554b0e107653174b533f66f2fb5515be92a54e Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Tue, 7 Dec 2021 19:57:41 -0600 Subject: [PATCH] Deprecate the old API microversion fixture We have moved the API microversion fixture to tempest.lib.common.api_microversion_fixture location. This commit deprecates the old fixture so that we can remove them in Z cycle. Change-Id: If38aa21a4cd99d2a5fe4a5c3b41214cd54f97f8d --- ...te-old-api-microversion-fixture-a471aac985c0f3fb.yaml | 7 +++++++ tempest/api/compute/api_microversion_fixture.py | 9 +++++++++ tempest/api/volume/api_microversion_fixture.py | 9 +++++++++ 3 files changed, 25 insertions(+) create mode 100644 releasenotes/notes/deprecate-old-api-microversion-fixture-a471aac985c0f3fb.yaml diff --git a/releasenotes/notes/deprecate-old-api-microversion-fixture-a471aac985c0f3fb.yaml b/releasenotes/notes/deprecate-old-api-microversion-fixture-a471aac985c0f3fb.yaml new file mode 100644 index 0000000000..652f7fa001 --- /dev/null +++ b/releasenotes/notes/deprecate-old-api-microversion-fixture-a471aac985c0f3fb.yaml @@ -0,0 +1,7 @@ +--- +deprecations: + - | + Old APIMicroversionFixture classes ``tempest.api.compute.api_microversion_fixture.APIMicroversionFixture`` + and ``tempest.api.volume.api_microversion_fixture.APIMicroversionFixture`` + has been deprecated for removal in favor of new location + ``tempest.lib.common.api_microversion_fixture.APIMicroversionFixture`` diff --git a/tempest/api/compute/api_microversion_fixture.py b/tempest/api/compute/api_microversion_fixture.py index 695af52003..1f55a6512a 100644 --- a/tempest/api/compute/api_microversion_fixture.py +++ b/tempest/api/compute/api_microversion_fixture.py @@ -13,14 +13,23 @@ # under the License. import fixtures +from oslo_log import log as logging from tempest.lib.services.compute import base_compute_client +LOG = logging.getLogger(__name__) + class APIMicroversionFixture(fixtures.Fixture): def __init__(self, compute_microversion): self.compute_microversion = compute_microversion + new_fixture = ( + 'tempest.lib.common.api_microversion_fixture.' + 'APIMicroversionFixture') + LOG.warning("%s class is deprecated and moved to %s. It" + " will be removed in Z cycle.", + self.__class__.__name__, new_fixture) def _setUp(self): super(APIMicroversionFixture, self)._setUp() diff --git a/tempest/api/volume/api_microversion_fixture.py b/tempest/api/volume/api_microversion_fixture.py index 7bbe67497d..219fde84b4 100644 --- a/tempest/api/volume/api_microversion_fixture.py +++ b/tempest/api/volume/api_microversion_fixture.py @@ -12,14 +12,23 @@ # under the License. import fixtures +from oslo_log import log as logging from tempest.lib.services.volume import base_client +LOG = logging.getLogger(__name__) + class APIMicroversionFixture(fixtures.Fixture): def __init__(self, volume_microversion): self.volume_microversion = volume_microversion + new_fixture = ( + 'tempest.lib.common.api_microversion_fixture.' + 'APIMicroversionFixture') + LOG.warning("%s class is deprecated and moved to %s. It" + " will be removed in Z cycle.", + self.__class__.__name__, new_fixture) def _setUp(self): super(APIMicroversionFixture, self)._setUp()