From 3ac2b04f95d4781ae87a54e87f475db94a53e98a Mon Sep 17 00:00:00 2001 From: Chandan Kumar Date: Mon, 10 Apr 2017 11:12:13 +0000 Subject: [PATCH] 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 --- octavia/tests/tempest/config.py | 2 +- octavia/tests/tempest/plugin.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/octavia/tests/tempest/config.py b/octavia/tests/tempest/config.py index 8b36bc5def..b7a6c1762c 100644 --- a/octavia/tests/tempest/config.py +++ b/octavia/tests/tempest/config.py @@ -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') diff --git a/octavia/tests/tempest/plugin.py b/octavia/tests/tempest/plugin.py index 1d1afd0cd1..878ce9302a 100644 --- a/octavia/tests/tempest/plugin.py +++ b/octavia/tests/tempest/plugin.py @@ -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),