From 8521608e19000e959d767a747b126409dc5ead44 Mon Sep 17 00:00:00 2001 From: licanwei Date: Wed, 19 Jul 2017 11:04:12 +0800 Subject: [PATCH] Update default ironic endpoint type The default ironic endpoint type is publicURL in ironicclient. Change-Id: Ief78c085adafb08abb09c77af7429fbe6c3d7405 --- watcher/conf/ironic_client.py | 4 ++-- watcher/tests/common/test_clients.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/watcher/conf/ironic_client.py b/watcher/conf/ironic_client.py index a241cf2..fc4940e 100755 --- a/watcher/conf/ironic_client.py +++ b/watcher/conf/ironic_client.py @@ -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): diff --git a/watcher/tests/common/test_clients.py b/watcher/tests/common/test_clients.py index 174a853..32ab071 100755 --- a/watcher/tests/common/test_clients.py +++ b/watcher/tests/common/test_clients.py @@ -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):