Replace default neutron endpoint type

The default neutron endpoint type is publicURL in neutronclient.
This patch replaces default neutron endpoint type from
internalURL to publicURL.

Change-Id: I8162b6178051df5f086488ecfb5d0bdc569ef9cd
Related-Bug: #1686298
This commit is contained in:
Hidekazu Nakamura 2017-07-01 19:51:06 +09:00
parent 5f179609d0
commit 12bdfca0d9
2 changed files with 4 additions and 4 deletions

View File

@ -26,10 +26,10 @@ NEUTRON_CLIENT_OPTS = [
default='2.0',
help='Version of Neutron API to use in neutronclient.'),
cfg.StrOpt('endpoint_type',
default='internalURL',
default='publicURL',
help='Type of endpoint to use in neutronclient.'
'Supported values: internalURL, publicURL, adminURL'
'The default is internalURL.')]
'The default is publicURL.')]
def register_opts(conf):

View File

@ -329,12 +329,12 @@ class TestClients(base.TestCase):
@mock.patch.object(clients.OpenStackClients, 'session')
def test_clients_neutron_diff_endpoint(self, mock_session):
'''neutronclient currently only has one version (v2)'''
CONF.set_override('endpoint_type', 'publicURL',
CONF.set_override('endpoint_type', 'internalURL',
group='neutron_client')
osc = clients.OpenStackClients()
osc._neutron = None
osc.neutron()
self.assertEqual('publicURL', osc.neutron().httpclient.interface)
self.assertEqual('internalURL', osc.neutron().httpclient.interface)
@mock.patch.object(clients.OpenStackClients, 'session')
def test_clients_neutron_cached(self, mock_session):