Merge "Finally remove the old data-utils"

This commit is contained in:
Zuul 2021-03-11 18:27:26 +00:00 committed by Gerrit Code Review
commit 09b61a2e1b
3 changed files with 7 additions and 21 deletions

View File

@ -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``.

View File

@ -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

View File

@ -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,