Merge "Update default ironic endpoint type"
This commit is contained in:
commit
ea9ab8d6e5
@ -26,10 +26,10 @@ IRONIC_CLIENT_OPTS = [
|
||||
default=1,
|
||||
help='Version of Ironic API to use in ironicclient.'),
|
||||
cfg.StrOpt('endpoint_type',
|
||||
default='internalURL',
|
||||
default='publicURL',
|
||||
help='Type of endpoint to use in ironicclient.'
|
||||
'Supported values: internalURL, publicURL, adminURL'
|
||||
'The default is internalURL.')]
|
||||
'The default is publicURL.')]
|
||||
|
||||
|
||||
def register_opts(conf):
|
||||
|
@ -416,11 +416,12 @@ class TestClients(base.TestCase):
|
||||
|
||||
@mock.patch.object(clients.OpenStackClients, 'session')
|
||||
def test_clients_ironic_diff_endpoint(self, mock_session):
|
||||
CONF.set_override('endpoint_type', 'publicURL', group='ironic_client')
|
||||
CONF.set_override('endpoint_type', 'internalURL',
|
||||
group='ironic_client')
|
||||
osc = clients.OpenStackClients()
|
||||
osc._ironic = None
|
||||
osc.ironic()
|
||||
self.assertEqual('publicURL', osc.ironic().http_client.endpoint)
|
||||
self.assertEqual('internalURL', osc.ironic().http_client.endpoint)
|
||||
|
||||
@mock.patch.object(clients.OpenStackClients, 'session')
|
||||
def test_clients_ironic_cached(self, mock_session):
|
||||
|
Loading…
Reference in New Issue
Block a user