From b20f7e62c60417b59a2b9fc5b4d976a11a122b08 Mon Sep 17 00:00:00 2001 From: ghanshyam Date: Sun, 10 Dec 2017 07:10:22 +0300 Subject: [PATCH] Remove deprecated config options 'resources_prefix' Config option 'resources_prefix' was deprecated. It is used by only manila plugin which fix has been commited. This commit removes this config option and hardcode the resource prefix as 'tempest' Change-Id: Idce7af97fe6647e3095b2b626fbacb3446694fbc Depends-On: I9c140b3a9efabeced7fc26cb1f169ebe6789d88b --- doc/source/library/credential_providers.rst | 2 +- ...al-deprecated-config-options-3db535b979fe3509.yaml | 1 + tempest/api/object_storage/test_account_services.py | 2 +- tempest/common/credentials_factory.py | 2 +- tempest/common/utils/__init__.py | 5 ++--- tempest/config.py | 11 ----------- 6 files changed, 6 insertions(+), 17 deletions(-) diff --git a/doc/source/library/credential_providers.rst b/doc/source/library/credential_providers.rst index d96c97a7b2..d25f85c674 100644 --- a/doc/source/library/credential_providers.rst +++ b/doc/source/library/credential_providers.rst @@ -49,7 +49,7 @@ on config:: public_network_id=CONF.network.public_network_id, create_networks=(CONF.auth.create_isolated_networks and not CONF.network.shared_physical_network), - resource_prefix=CONF.resources_prefix, + resource_prefix='tempest', credentials_domain=CONF.auth.default_credentials_domain_name, admin_role=CONF.identity.admin_role, identity_uri=CONF.identity.uri_v3, diff --git a/releasenotes/notes/removal-deprecated-config-options-3db535b979fe3509.yaml b/releasenotes/notes/removal-deprecated-config-options-3db535b979fe3509.yaml index 2b3bb3abb5..0b03e21b89 100644 --- a/releasenotes/notes/removal-deprecated-config-options-3db535b979fe3509.yaml +++ b/releasenotes/notes/removal-deprecated-config-options-3db535b979fe3509.yaml @@ -7,3 +7,4 @@ upgrade: * ``[identity-feature-enabled].forbid_global_implied_dsr`` * ``[image-feature-enabled].deactivate_image`` + * ``[default].resources_prefix`` diff --git a/tempest/api/object_storage/test_account_services.py b/tempest/api/object_storage/test_account_services.py index 3bbab11cbb..c5c30e3598 100644 --- a/tempest/api/object_storage/test_account_services.py +++ b/tempest/api/object_storage/test_account_services.py @@ -241,7 +241,7 @@ class AccountTest(base.BaseObjectTest): @decorators.idempotent_id('365e6fc7-1cfe-463b-a37c-8bd08d47b6aa') def test_list_containers_with_prefix(self): # list containers that have a name that starts with a prefix - prefix = '{0}-a'.format(CONF.resources_prefix) + prefix = 'tempest-a' params = {'prefix': prefix} resp, container_list = self.account_client.list_account_containers( params=params) diff --git a/tempest/common/credentials_factory.py b/tempest/common/credentials_factory.py index da349755d9..75db155693 100644 --- a/tempest/common/credentials_factory.py +++ b/tempest/common/credentials_factory.py @@ -86,7 +86,7 @@ def get_dynamic_provider_params(identity_version, admin_creds=None): ('public_network_id', CONF.network.public_network_id), ('create_networks', (CONF.auth.create_isolated_networks and not CONF.network.shared_physical_network)), - ('resource_prefix', CONF.resources_prefix), + ('resource_prefix', 'tempest'), ('identity_admin_endpoint_type', endpoint_type) ])) diff --git a/tempest/common/utils/__init__.py b/tempest/common/utils/__init__.py index aa8186435c..225a713ee2 100644 --- a/tempest/common/utils/__init__.py +++ b/tempest/common/utils/__init__.py @@ -31,10 +31,9 @@ class DataUtils(object): if attr == 'rand_name': # NOTE(flwang): This is a proxy to generate a random name that - # includes a random number and a prefix if one is configured in - # CONF.resources_prefix + # includes a random number and a prefix 'tempest' attr_obj = partial(lib_data_utils.rand_name, - prefix=CONF.resources_prefix) + prefix='tempest') else: attr_obj = getattr(lib_data_utils, attr) diff --git a/tempest/config.py b/tempest/config.py index 454487127a..bc585cb0b4 100644 --- a/tempest/config.py +++ b/tempest/config.py @@ -1064,17 +1064,6 @@ specify .* as the regex. ] DefaultGroup = [ - cfg.StrOpt('resources_prefix', - default='tempest', - help="Prefix to be added when generating the name for " - "test resources. It can be used to discover all " - "resources associated with a specific test run when " - "running tempest on a real-life cloud", - deprecated_for_removal=True, - deprecated_reason="It is enough to add 'tempest' as this " - "prefix to ideintify resources which are " - "created by Tempest and no projects set " - "this option on OpenStack dev community."), cfg.BoolOpt('pause_teardown', default=False, help="""Whether to pause a test in global teardown.