Merge "Reuse already existing groups in tempest plugin"

This commit is contained in:
Jenkins 2017-01-23 23:31:48 +00:00 committed by Gerrit Code Review
commit ae612d59c6
3 changed files with 6 additions and 26 deletions

View File

@ -38,7 +38,7 @@ class ConsistencyGroupsV2Test(base.BaseVolumeAdminTest):
@classmethod
def skip_checks(cls):
super(ConsistencyGroupsV2Test, cls).skip_checks()
if not CONF.cinder.consistency_group:
if not CONF.volume_feature_enabled.consistency_group:
raise cls.skipException("Cinder consistency group "
"feature disabled")

View File

@ -15,22 +15,7 @@
from oslo_config import cfg
service_available_group = cfg.OptGroup(name="service_available",
title="Available OpenStack Services")
ServiceAvailableGroup = [
cfg.BoolOpt("cinder",
default=True,
help="Whether or not cinder is expected to be available"),
]
# Use a new config group specific to the cinder in-tree tests to avoid
# any naming confusion with the upstream tempest config options.
cinder_group = cfg.OptGroup(name='cinder',
title='Cinder Tempest Config Options')
CinderGroup = [
cinder_option = [
cfg.BoolOpt('consistency_group',
default=False,
help='Enable to run Cinder volume consistency group tests'),

View File

@ -32,17 +32,12 @@ class CinderTempestPlugin(plugins.TempestPlugin):
def register_opts(self, conf):
config.register_opt_group(
conf, project_config.service_available_group,
project_config.ServiceAvailableGroup)
config.register_opt_group(
conf, project_config.cinder_group,
project_config.CinderGroup
conf, config.volume_feature_group,
project_config.cinder_option
)
def get_opt_lists(self):
return [
(project_config.service_available_group.name,
project_config.ServiceAvailableGroup),
(project_config.cinder_group.name,
project_config.CinderGroup),
(config.volume_feature_group.name,
project_config.cinder_option),
]