Make keystone endpoint interface configurable
By default, admin interface is used. In case of podified setups, this is not valid. With this patch, a value can be configured. Change-Id: I97582a76fdaf2d60682ab27b6668c19db3ef53c1
This commit is contained in:
@@ -33,7 +33,13 @@ LOG = log.getLogger(__name__)
|
|||||||
class KeystoneClientFixture(_client.OpenstackClientFixture):
|
class KeystoneClientFixture(_client.OpenstackClientFixture):
|
||||||
|
|
||||||
def init_client(self, session):
|
def init_client(self, session):
|
||||||
return keystoneclient.Client(session=session)
|
from tobiko import config
|
||||||
|
if config.CONF.tobiko.keystone.interface is None:
|
||||||
|
return keystoneclient.Client(session=session)
|
||||||
|
else:
|
||||||
|
return keystoneclient.Client(
|
||||||
|
session=session,
|
||||||
|
interface=config.CONF.tobiko.keystone.interface)
|
||||||
|
|
||||||
|
|
||||||
class KeystoneClientManager(_client.OpenstackClientManager):
|
class KeystoneClientManager(_client.OpenstackClientManager):
|
||||||
|
|||||||
@@ -62,7 +62,10 @@ OPTIONS = [
|
|||||||
help="Directories where to look for clouds files"),
|
help="Directories where to look for clouds files"),
|
||||||
cfg.ListOpt('clouds_file_names',
|
cfg.ListOpt('clouds_file_names',
|
||||||
default=['clouds.yaml', 'clouds.yml', 'clouds.json'],
|
default=['clouds.yaml', 'clouds.yml', 'clouds.json'],
|
||||||
help="Clouds file names")]
|
help="Clouds file names"),
|
||||||
|
cfg.StrOpt('interface',
|
||||||
|
default=None,
|
||||||
|
help="default value in case keystone interface is needed")]
|
||||||
|
|
||||||
|
|
||||||
def register_tobiko_options(conf):
|
def register_tobiko_options(conf):
|
||||||
|
|||||||
Reference in New Issue
Block a user