Merge "Enable loading of the tempest plugin configuration"
This commit is contained in:
commit
7b5e0f21b8
@ -15,19 +15,28 @@
|
||||
"""Configurations for Kingbird Tempest Plugin."""
|
||||
|
||||
from oslo_config import cfg
|
||||
from tempest import config # noqa
|
||||
|
||||
service_option = cfg.BoolOpt('kingbird',
|
||||
default=True,
|
||||
help="Whether or not kingbird is expected to be "
|
||||
"available")
|
||||
|
||||
kb_group = cfg.OptGroup(
|
||||
name="kingbird",
|
||||
title="kingbird configuration options")
|
||||
|
||||
KBGroup = [
|
||||
cfg.StrOpt('endpoint_type',
|
||||
cfg.StrOpt(name='endpoint_type',
|
||||
default='publicURL',
|
||||
help="Endpoint type of Kingbird service."),
|
||||
cfg.IntOpt('TIME_TO_SYNC',
|
||||
cfg.IntOpt(name='TIME_TO_SYNC',
|
||||
default=30,
|
||||
help="Maximum time to wait for a sync call to complete."),
|
||||
cfg.StrOpt('endpoint_url',
|
||||
cfg.StrOpt(name='endpoint_url',
|
||||
default='http://127.0.0.1:8118/',
|
||||
help="Endpoint URL of Kingbird service."),
|
||||
cfg.StrOpt('api_version',
|
||||
cfg.StrOpt(name='api_version',
|
||||
default='v1.0',
|
||||
help="Api version of Kingbird service.")
|
||||
]
|
||||
|
@ -18,7 +18,7 @@ import os
|
||||
|
||||
from tempest.test_discover import plugins
|
||||
|
||||
import kingbird.tests.tempest.scenario.config as kb_config
|
||||
from kingbird.tests.tempest.scenario import config as kb_config
|
||||
|
||||
|
||||
class KingbirdTempestPlugin(plugins.TempestPlugin):
|
||||
@ -31,8 +31,11 @@ class KingbirdTempestPlugin(plugins.TempestPlugin):
|
||||
|
||||
def register_opts(self, conf):
|
||||
# additional options for Kingbird
|
||||
conf.register_opts(kb_config.KBGroup,
|
||||
'kingbird')
|
||||
conf.register_group(kb_config.kb_group)
|
||||
conf.register_opts(kb_config.KBGroup, group='kingbird')
|
||||
conf.register_opt(kb_config.service_option,
|
||||
group='service_available')
|
||||
|
||||
def get_opt_lists(self):
|
||||
return [('kingbird', kb_config.KbGroup)]
|
||||
return [('kingbird', kb_config.KBGroup),
|
||||
('service_available', [kb_config.service_option])]
|
||||
|
@ -118,6 +118,7 @@ def get_urlstring_and_headers(token, api_url):
|
||||
}
|
||||
url_string = CONF.kingbird.endpoint_url + CONF.kingbird.api_version + \
|
||||
"/" + admin_tenant_id + api_url
|
||||
|
||||
return headers, url_string
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user