Replace default glance endpoint type
The default glance endpoint type is publicURL in glanceclient. This patch replaces default glance endpoint type from internalURL to publicURL. Change-Id: I39451ba89f191693475a694bd5c9045bf3bf539a Related-Bug: #1686298
This commit is contained in:
parent
264b0fe9a1
commit
5eb1d91335
|
@ -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