diff --git a/rally/plugins/openstack/cfg/cleanup.py b/rally/plugins/openstack/cfg/cleanup.py index 05ef75c5..02c60298 100644 --- a/rally/plugins/openstack/cfg/cleanup.py +++ b/rally/plugins/openstack/cfg/cleanup.py @@ -15,9 +15,13 @@ from oslo_config import cfg -OPTS = {"cleanup": [ - cfg.IntOpt("resource_deletion_timeout", default=600, +OPTS = {"openstack": [ + cfg.IntOpt("resource_deletion_timeout", + default=600, + deprecated_group="cleanup", help="A timeout in seconds for deleting resources"), - cfg.IntOpt("cleanup_threads", default=20, + cfg.IntOpt("cleanup_threads", + default=20, + deprecated_group="cleanup", help="Number of cleanup threads to run") ]} diff --git a/rally/plugins/openstack/cfg/keystone_roles.py b/rally/plugins/openstack/cfg/keystone_roles.py index 857b4ff3..785dbdc8 100644 --- a/rally/plugins/openstack/cfg/keystone_roles.py +++ b/rally/plugins/openstack/cfg/keystone_roles.py @@ -15,9 +15,11 @@ from oslo_config import cfg -OPTS = {"roles_context": [ - cfg.IntOpt("resource_management_workers", +OPTS = {"openstack": [ + cfg.IntOpt("roles_context_resource_management_workers", default=30, + deprecated_name="resource_management_workers", + deprecated_group="roles_context", help="How many concurrent threads to use for serving roles " "context"), ]} diff --git a/rally/plugins/openstack/cfg/keystone_users.py b/rally/plugins/openstack/cfg/keystone_users.py index d69eed35..5a67ff73 100644 --- a/rally/plugins/openstack/cfg/keystone_users.py +++ b/rally/plugins/openstack/cfg/keystone_users.py @@ -15,23 +15,25 @@ from oslo_config import cfg -RESOURCE_MANAGEMENT_WORKERS_DESCR = ("The number of concurrent threads to use " - "for serving users context.") -PROJECT_DOMAIN_DESCR = "ID of domain in which projects will be created." -USER_DOMAIN_DESCR = "ID of domain in which users will be created." -OPTS = {"users_context": [ - cfg.IntOpt("resource_management_workers", +OPTS = {"openstack": [ + cfg.IntOpt("users_context_resource_management_workers", default=20, - help=RESOURCE_MANAGEMENT_WORKERS_DESCR), + deprecated_name="resource_management_workers", + deprecated_group="users_context", + help="The number of concurrent threads to use for serving " + "users context."), cfg.StrOpt("project_domain", default="default", - help=PROJECT_DOMAIN_DESCR), + deprecated_group="users_context", + help="ID of domain in which projects will be created."), cfg.StrOpt("user_domain", default="default", - help=USER_DOMAIN_DESCR), + deprecated_group="users_context", + help="ID of domain in which users will be created."), cfg.StrOpt("keystone_default_role", default="member", + deprecated_group="users_context", help="The default role name of the keystone to assign to " - "users."), + "users.") ]} diff --git a/rally/plugins/openstack/cleanup/base.py b/rally/plugins/openstack/cleanup/base.py index 173f185b..0bb3a946 100644 --- a/rally/plugins/openstack/cleanup/base.py +++ b/rally/plugins/openstack/cleanup/base.py @@ -41,8 +41,8 @@ class NoName(object): def resource(service, resource, order=0, admin_required=False, perform_for_admin_only=False, tenant_resource=False, - max_attempts=3, timeout=CONF.cleanup.resource_deletion_timeout, - interval=1, threads=CONF.cleanup.cleanup_threads): + max_attempts=3, timeout=CONF.openstack.resource_deletion_timeout, + interval=1, threads=CONF.openstack.cleanup_threads): """Decorator that overrides resource specification. Just put it on top of your resource class and specify arguments that you diff --git a/rally/plugins/openstack/context/keystone/roles.py b/rally/plugins/openstack/context/keystone/roles.py index 1e4eb90b..5f1a6009 100644 --- a/rally/plugins/openstack/context/keystone/roles.py +++ b/rally/plugins/openstack/context/keystone/roles.py @@ -47,7 +47,8 @@ class RoleGenerator(context.Context): def __init__(self, ctx): super(RoleGenerator, self).__init__(ctx) self.credential = self.context["admin"]["credential"] - self.workers = cfg.CONF.roles_context.resource_management_workers + self.workers = ( + cfg.CONF.openstack.roles_context_resource_management_workers) def _get_role_object(self, context_role): """Check if role exists. diff --git a/rally/plugins/openstack/context/keystone/users.py b/rally/plugins/openstack/context/keystone/users.py index 7bb1756d..a1460803 100644 --- a/rally/plugins/openstack/context/keystone/users.py +++ b/rally/plugins/openstack/context/keystone/users.py @@ -99,7 +99,7 @@ class UserGenerator(context.Context): "tenants": 1, "users_per_tenant": 1, "resource_management_workers": - cfg.CONF.users_context.resource_management_workers, + cfg.CONF.openstack.users_context_resource_management_workers, } def __init__(self, context): @@ -116,9 +116,9 @@ class UserGenerator(context.Context): self.existing_users = [] self.credential = context["admin"]["credential"] project_domain = (self.credential.project_domain_name or - cfg.CONF.users_context.project_domain) + cfg.CONF.openstack.project_domain) user_domain = (self.credential.user_domain_name or - cfg.CONF.users_context.user_domain) + cfg.CONF.openstack.user_domain) self.DEFAULT_FOR_NEW_USERS["project_domain"] = project_domain self.DEFAULT_FOR_NEW_USERS["user_domain"] = user_domain with self.config.unlocked(): @@ -181,7 +181,7 @@ class UserGenerator(context.Context): # NOTE(msdubov): This should be called after _create_tenants(). threads = self.config["resource_management_workers"] users_per_tenant = self.config["users_per_tenant"] - default_role = cfg.CONF.users_context.keystone_default_role + default_role = cfg.CONF.openstack.keystone_default_role users = collections.deque()