trivial: Rework of options

Some general code cleanup stuff, like not using camelcase names.

Change-Id: I2d88d8a4b21c38b895d90de00abe2136464c47cb
This commit is contained in:
Stephen Finucane 2017-12-13 15:06:48 +00:00
parent d65f82208b
commit 56bd72c263
2 changed files with 22 additions and 16 deletions

View File

@ -15,17 +15,23 @@
from oslo_config import cfg
compute_private_group = cfg.OptGroup(name="compute_private_config",
title="Compute private config options")
ComputePrivateGroup = [
cfg.StrOpt("target_controller",
help="Address of a controller node."),
cfg.StrOpt("target_ssh_user",
help="Username of the ssh connection."),
cfg.StrOpt("target_private_key_path",
help="Path to the private key."),
cfg.BoolOpt("containers",
default=False,
help="True if controller is containerized"),
group = cfg.OptGroup(
name='compute_private_config',
title='Compute private config options')
opts = [
cfg.StrOpt(
'target_controller',
help='Address of a controller node.'),
cfg.StrOpt(
'target_ssh_user',
help='Username of the SSH connection.'),
cfg.StrOpt(
'target_private_key_path',
help='Path to the private key.'),
cfg.BoolOpt(
'containers',
default=False,
help='Deployment is containerized.'),
]

View File

@ -19,7 +19,7 @@ import os
from tempest import config
from tempest.test_discover import plugins
from whitebox_tempest_plugin import config as project_config
from whitebox_tempest_plugin import config as plugin_config
class WhiteboxTempestPlugin(plugins.TempestPlugin):
@ -32,8 +32,8 @@ class WhiteboxTempestPlugin(plugins.TempestPlugin):
return full_test_dir, base_path
def register_opts(self, conf):
config.register_opt_group(conf, project_config.compute_private_group,
project_config.ComputePrivateGroup)
config.register_opt_group(conf, plugin_config.group,
plugin_config.opts)
def get_opt_lists(self):
pass
return [(plugin_config.group.name, plugin_config.opts)]