From ef0e2912ed66d39d90c394b8a30b06ea73f7723b Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Tue, 29 Dec 2020 15:22:33 -0600 Subject: [PATCH] Finally remove the old data-utils All active plugins now switched to new location of data-utils and we are good to remove the old data-utils. - http://lists.openstack.org/pipermail/openstack-dev/2017-July/120086.html One active plugin is left to merge which gate is already broken and patch can be merged once they fix the gate. - https://review.opendev.org/c/x/ranger-tempest-plugin/+/768760 Change-Id: Iaf783000f7aa273446c02d390f508bc535224543 --- ...emove-old-data-utils-e0966f882f7fe23a.yaml | 6 ++++++ tempest/api/network/test_floating_ips.py | 2 +- tempest/common/utils/__init__.py | 20 ------------------- 3 files changed, 7 insertions(+), 21 deletions(-) create mode 100644 releasenotes/notes/remove-old-data-utils-e0966f882f7fe23a.yaml diff --git a/releasenotes/notes/remove-old-data-utils-e0966f882f7fe23a.yaml b/releasenotes/notes/remove-old-data-utils-e0966f882f7fe23a.yaml new file mode 100644 index 0000000000..ac2034044e --- /dev/null +++ b/releasenotes/notes/remove-old-data-utils-e0966f882f7fe23a.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + The old deprecated ``data-ultis`` from ``tempest.common.utils`` has been + removed. If you are still using this, use the stable version + of ``data-utils`` from new location ``tempest.lib.common.utils``. diff --git a/tempest/api/network/test_floating_ips.py b/tempest/api/network/test_floating_ips.py index eb31d244d8..64f6e8035f 100644 --- a/tempest/api/network/test_floating_ips.py +++ b/tempest/api/network/test_floating_ips.py @@ -15,9 +15,9 @@ from tempest.api.network import base from tempest.common import utils -from tempest.common.utils import data_utils from tempest.common.utils import net_utils from tempest import config +from tempest.lib.common.utils import data_utils from tempest.lib.common.utils import test_utils from tempest.lib import decorators diff --git a/tempest/common/utils/__init__.py b/tempest/common/utils/__init__.py index 38881ee2d0..88a16b7e2f 100644 --- a/tempest/common/utils/__init__.py +++ b/tempest/common/utils/__init__.py @@ -13,37 +13,17 @@ # under the License. import functools -from functools import partial import testtools from tempest import config from tempest.exceptions import InvalidServiceTag -from tempest.lib.common.utils import data_utils as lib_data_utils from tempest.lib import decorators CONF = config.CONF -class DataUtils(object): - def __getattr__(self, attr): - - if attr == 'rand_name': - # NOTE(flwang): This is a proxy to generate a random name that - # includes a random number and a prefix 'tempest' - attr_obj = partial(lib_data_utils.rand_name, - prefix='tempest') - else: - attr_obj = getattr(lib_data_utils, attr) - - self.__dict__[attr] = attr_obj - return attr_obj - - -data_utils = DataUtils() - - def get_service_list(): service_list = { 'compute': CONF.service_available.nova,