Merge "Reuse already existing groups in tempest plugin"
Jenkins authored 9 years ago
Gerrit Code Review committed 9 years ago
| 37 | 37 |
@classmethod
|
| 38 | 38 |
def skip_checks(cls):
|
| 39 | 39 |
super(ConsistencyGroupsV2Test, cls).skip_checks()
|
| 40 | |
if not CONF.cinder.consistency_group:
|
|
40 |
if not CONF.volume_feature_enabled.consistency_group:
|
| 41 | 41 |
raise cls.skipException("Cinder consistency group "
|
| 42 | 42 |
"feature disabled")
|
| 43 | 43 |
|
| 14 | 14 |
|
| 15 | 15 |
from oslo_config import cfg
|
| 16 | 16 |
|
| 17 | |
service_available_group = cfg.OptGroup(name="service_available",
|
| 18 | |
title="Available OpenStack Services")
|
| 19 | |
|
| 20 | |
|
| 21 | |
ServiceAvailableGroup = [
|
| 22 | |
cfg.BoolOpt("cinder",
|
| 23 | |
default=True,
|
| 24 | |
help="Whether or not cinder is expected to be available"),
|
| 25 | |
]
|
| 26 | |
|
| 27 | |
# Use a new config group specific to the cinder in-tree tests to avoid
|
| 28 | |
# any naming confusion with the upstream tempest config options.
|
| 29 | |
cinder_group = cfg.OptGroup(name='cinder',
|
| 30 | |
title='Cinder Tempest Config Options')
|
| 31 | |
|
| 32 | |
CinderGroup = [
|
|
17 |
cinder_option = [
|
| 33 | 18 |
cfg.BoolOpt('consistency_group',
|
| 34 | 19 |
default=False,
|
| 35 | 20 |
help='Enable to run Cinder volume consistency group tests'),
|
| 31 | 31 |
|
| 32 | 32 |
def register_opts(self, conf):
|
| 33 | 33 |
config.register_opt_group(
|
| 34 | |
conf, project_config.service_available_group,
|
| 35 | |
project_config.ServiceAvailableGroup)
|
| 36 | |
config.register_opt_group(
|
| 37 | |
conf, project_config.cinder_group,
|
| 38 | |
project_config.CinderGroup
|
|
34 |
conf, config.volume_feature_group,
|
|
35 |
project_config.cinder_option
|
| 39 | 36 |
)
|
| 40 | 37 |
|
| 41 | 38 |
def get_opt_lists(self):
|
| 42 | 39 |
return [
|
| 43 | |
(project_config.service_available_group.name,
|
| 44 | |
project_config.ServiceAvailableGroup),
|
| 45 | |
(project_config.cinder_group.name,
|
| 46 | |
project_config.CinderGroup),
|
|
40 |
(config.volume_feature_group.name,
|
|
41 |
project_config.cinder_option),
|
| 47 | 42 |
]
|