Update default ironic endpoint type
The default ironic endpoint type is publicURL in ironicclient. Change-Id: Ief78c085adafb08abb09c77af7429fbe6c3d7405
This commit is contained in:
parent
728acc091b
commit
8521608e19
|
@ -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