Split override-url in functional test config file
BarbicanClient() needs to be able to build a base URL that can either include or exclude the version string. This commit splits these to components in dev_tempest.conf to allow for this support. Change-Id: If08ad992c0706219f73c3769f4ab68e4bf9c51ae Closes-bug: 1424393
This commit is contained in:
parent
ae8d47ebd1
commit
e4161ae87d
@ -28,4 +28,5 @@ admin_domain_name=Default
|
||||
# specified in the service catalog. To use what is
|
||||
# in the service catalog, just comment this out
|
||||
# or leave it blank.
|
||||
#override_url=http://localhost:9311/v1
|
||||
#override_url=http://localhost:9311/
|
||||
#override_url_version=v1
|
||||
|
@ -27,3 +27,4 @@ if os.path.exists('./etc/dev_tempest.conf'):
|
||||
|
||||
CONF.register_group(cfg.OptGroup('keymanager'))
|
||||
CONF.register_opt(cfg.StrOpt('override-url'), group='keymanager')
|
||||
CONF.register_opt(cfg.StrOpt('override-url-version'), group='keymanager')
|
||||
|
@ -128,7 +128,11 @@ class BarbicanClient(object):
|
||||
|
||||
def get_base_url(self, include_version=True):
|
||||
if CONF.keymanager.override_url:
|
||||
return CONF.keymanager.override_url
|
||||
if include_version:
|
||||
return os.path.join(CONF.keymanager.override_url,
|
||||
CONF.keymanager.override_url_version)
|
||||
else:
|
||||
return CONF.keymanager.override_url
|
||||
filters = {
|
||||
'service': 'key-manager',
|
||||
'region': self.region,
|
||||
|
Loading…
x
Reference in New Issue
Block a user