Merge "Can not create Gnocchi client due to deprecated session options"
This commit is contained in:
commit
3d49746d74
@ -512,8 +512,9 @@ class Gnocchi(OSClient):
|
|||||||
|
|
||||||
service_type = self.choose_service_type(service_type)
|
service_type = self.choose_service_type(service_type)
|
||||||
sess = self.keystone.get_session()[0]
|
sess = self.keystone.get_session()[0]
|
||||||
gclient = gnocchi.Client(version=self.choose_version(
|
gclient = gnocchi.Client(
|
||||||
version), session=sess, service_type=service_type)
|
version=self.choose_version(version), session=sess,
|
||||||
|
adapter_options={"service_type": service_type})
|
||||||
return gclient
|
return gclient
|
||||||
|
|
||||||
|
|
||||||
|
@ -618,7 +618,7 @@ class OSClientsTestCase(test.TestCase):
|
|||||||
self.assertEqual(fake_gnocchi, client)
|
self.assertEqual(fake_gnocchi, client)
|
||||||
kw = {"version": "1",
|
kw = {"version": "1",
|
||||||
"session": mock_keystoneauth1.session.Session(),
|
"session": mock_keystoneauth1.session.Session(),
|
||||||
"service_type": "metric"}
|
"adapter_options": {"service_type": "metric"}}
|
||||||
mock_gnocchi.client.Client.assert_called_once_with(**kw)
|
mock_gnocchi.client.Client.assert_called_once_with(**kw)
|
||||||
self.assertEqual(fake_gnocchi, self.clients.cache["gnocchi"])
|
self.assertEqual(fake_gnocchi, self.clients.cache["gnocchi"])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user