Merge "Replace default glance endpoint type"
This commit is contained in:
commit
5f179609d0
@ -26,10 +26,10 @@ GLANCE_CLIENT_OPTS = [
|
||||
default='2',
|
||||
help='Version of Glance API to use in glanceclient.'),
|
||||
cfg.StrOpt('endpoint_type',
|
||||
default='internalURL',
|
||||
default='publicURL',
|
||||
help='Type of endpoint to use in glanceclient.'
|
||||
'Supported values: internalURL, publicURL, adminURL'
|
||||
'The default is internalURL.')]
|
||||
'The default is publicURL.')]
|
||||
|
||||
|
||||
def register_opts(conf):
|
||||
|
@ -167,11 +167,12 @@ class TestClients(base.TestCase):
|
||||
|
||||
@mock.patch.object(clients.OpenStackClients, 'session')
|
||||
def test_clients_glance_diff_endpoint(self, mock_session):
|
||||
CONF.set_override('endpoint_type', 'publicURL', group='glance_client')
|
||||
CONF.set_override('endpoint_type',
|
||||
'internalURL', group='glance_client')
|
||||
osc = clients.OpenStackClients()
|
||||
osc._glance = None
|
||||
osc.glance()
|
||||
self.assertEqual('publicURL', osc.glance().http_client.interface)
|
||||
self.assertEqual('internalURL', osc.glance().http_client.interface)
|
||||
|
||||
@mock.patch.object(clients.OpenStackClients, 'session')
|
||||
def test_clients_glance_cached(self, mock_session):
|
||||
|
Loading…
Reference in New Issue
Block a user