Fixed Octavia tempest plugin

* tempest init command calls oslo_config to generate sample tempest.conf
  which expects a list of tuples (group, [group_options]) provided by
  octavia plugin's get_opt_lists method. Due to comma at the end of
  service_option, oslo_config excepts one more tuple which was not there
  which causing failure to tempest init. Removing it fix the issue.

* use register_opt for service_available in config

Change-Id: I6af2c72dd83e5ef5fd3ae9a66ee774e3cbab8f67
Closes-bug: #1681405
This commit is contained in:
Chandan Kumar 2017-04-10 11:12:13 +00:00
parent b99e02793e
commit 3ac2b04f95
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ from oslo_config import cfg
service_option = cfg.BoolOpt('octavia',
default=False,
help="Whether or not Octavia is expected to be "
"available"),
"available")
octavia_group = cfg.OptGroup(name='octavia', title='Octavia Service')

View File

@ -34,8 +34,8 @@ class OctaviaTempestPlugin(plugins.TempestPlugin):
def register_opts(self, conf):
conf.register_group(octavia_config.octavia_group)
conf.register_opts(octavia_config.OctaviaGroup, group='octavia')
conf.register_opts(octavia_config.service_option,
group='service_available')
conf.register_opt(octavia_config.service_option,
group='service_available')
def get_opt_lists(self):
return [('octavia', octavia_config.OctaviaGroup),