Can not create Gnocchi client due to deprecated session options
With Gnocchiclient 4.0.0 session options have been deprecated. Thus passing service_type into the client will cause an exception. We can pass in adapter_options with the service_type specified though. See this Gnocchi client change: https://github.com/gnocchixyz/python-gnocchiclient/pull/23 Change-Id: Ib697bc115aee9c61ae30a5449a561178f3a65663
This commit is contained in:
parent
5e47b8006c
commit
dfcbcafdd3
@ -512,8 +512,9 @@ class Gnocchi(OSClient):
|
||||
|
||||
service_type = self.choose_service_type(service_type)
|
||||
sess = self.keystone.get_session()[0]
|
||||
gclient = gnocchi.Client(version=self.choose_version(
|
||||
version), session=sess, service_type=service_type)
|
||||
gclient = gnocchi.Client(
|
||||
version=self.choose_version(version), session=sess,
|
||||
adapter_options={"service_type": service_type})
|
||||
return gclient
|
||||
|
||||
|
||||
|
@ -618,7 +618,7 @@ class OSClientsTestCase(test.TestCase):
|
||||
self.assertEqual(fake_gnocchi, client)
|
||||
kw = {"version": "1",
|
||||
"session": mock_keystoneauth1.session.Session(),
|
||||
"service_type": "metric"}
|
||||
"adapter_options": {"service_type": "metric"}}
|
||||
mock_gnocchi.client.Client.assert_called_once_with(**kw)
|
||||
self.assertEqual(fake_gnocchi, self.clients.cache["gnocchi"])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user