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 from oslo_config import cfg
compute_private_group = cfg.OptGroup(name="compute_private_config",
title="Compute private config options")
ComputePrivateGroup = [ group = cfg.OptGroup(
cfg.StrOpt("target_controller", name='compute_private_config',
help="Address of a controller node."), title='Compute private config options')
cfg.StrOpt("target_ssh_user",
help="Username of the ssh connection."), opts = [
cfg.StrOpt("target_private_key_path", cfg.StrOpt(
help="Path to the private key."), 'target_controller',
cfg.BoolOpt("containers", help='Address of a controller node.'),
default=False, cfg.StrOpt(
help="True if controller is containerized"), '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 import config
from tempest.test_discover import plugins 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): class WhiteboxTempestPlugin(plugins.TempestPlugin):
@ -32,8 +32,8 @@ class WhiteboxTempestPlugin(plugins.TempestPlugin):
return full_test_dir, base_path return full_test_dir, base_path
def register_opts(self, conf): def register_opts(self, conf):
config.register_opt_group(conf, project_config.compute_private_group, config.register_opt_group(conf, plugin_config.group,
project_config.ComputePrivateGroup) plugin_config.opts)
def get_opt_lists(self): def get_opt_lists(self):
pass return [(plugin_config.group.name, plugin_config.opts)]