change neutron client's endpoint
Change the parameter endpoint_url to endpoint_overide in Neutron.create_client() function Change-Id: Ife16737f634424106dac380d607b7d7df01ecf78
This commit is contained in:
parent
f523285dd0
commit
a9b685256d
@ -358,10 +358,11 @@ class Neutron(OSClient):
|
||||
if self.credential.endpoint_type:
|
||||
kw_args["endpoint_type"] = self.credential.endpoint_type
|
||||
|
||||
client = neutron.Client(self.choose_version(version),
|
||||
session=self.keystone.get_session()[0],
|
||||
endpoint_url=self._get_endpoint(service_type),
|
||||
**kw_args)
|
||||
client = neutron.Client(
|
||||
self.choose_version(version),
|
||||
session=self.keystone.get_session()[0],
|
||||
endpoint_override=self._get_endpoint(service_type),
|
||||
**kw_args)
|
||||
return client
|
||||
|
||||
|
||||
|
@ -365,7 +365,7 @@ class OSClientsTestCase(test.TestCase):
|
||||
self.assertEqual(fake_neutron, client)
|
||||
kw = {
|
||||
"session": mock_keystoneauth1.session.Session(),
|
||||
"endpoint_url": mock_neutron__get_endpoint.return_value}
|
||||
"endpoint_override": mock_neutron__get_endpoint.return_value}
|
||||
mock_neutron.client.Client.assert_called_once_with("2.0", **kw)
|
||||
self.assertEqual(fake_neutron, self.clients.cache["neutron"])
|
||||
|
||||
@ -385,7 +385,7 @@ class OSClientsTestCase(test.TestCase):
|
||||
self.assertEqual(fake_neutron, client)
|
||||
kw = {
|
||||
"session": mock_keystoneauth1.session.Session(),
|
||||
"endpoint_url": mock_neutron__get_endpoint.return_value,
|
||||
"endpoint_override": mock_neutron__get_endpoint.return_value,
|
||||
"endpoint_type": "internal"}
|
||||
mock_neutron.client.Client.assert_called_once_with("2.0", **kw)
|
||||
self.assertEqual(fake_neutron, self.clients.cache["neutron"])
|
||||
|
Loading…
Reference in New Issue
Block a user