From 5eb1d9133592a716c1aff188b70898782eb0e2e6 Mon Sep 17 00:00:00 2001 From: Hidekazu Nakamura Date: Thu, 29 Jun 2017 16:42:39 +0900 Subject: [PATCH] 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 --- watcher/conf/glance_client.py | 4 ++-- watcher/tests/common/test_clients.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/watcher/conf/glance_client.py b/watcher/conf/glance_client.py index 4207b6aa7..015a09c87 100644 --- a/watcher/conf/glance_client.py +++ b/watcher/conf/glance_client.py @@ -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): diff --git a/watcher/tests/common/test_clients.py b/watcher/tests/common/test_clients.py index 1349779dc..3f55e7352 100755 --- a/watcher/tests/common/test_clients.py +++ b/watcher/tests/common/test_clients.py @@ -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):