Remove surplus function for getting lb client.

In this patch we removing function which can be replaced by directly
getting openstacksdk client from cached clients, instead of calling a
function which would fetch it for us.

Change-Id: I4e8aba09b40b1b6070632c9e4f9077159c756b96
This commit is contained in:
Roman Dobosz 2021-12-16 12:21:44 +01:00
parent b36d09284c
commit f25ab8fb11
2 changed files with 1 additions and 6 deletions

View File

@ -42,12 +42,8 @@ def get_network_client():
return _clients[_OPENSTACKSDK].network
def get_openstacksdk():
return _clients[_OPENSTACKSDK]
def get_loadbalancer_client():
return get_openstacksdk().load_balancer
return _clients[_OPENSTACKSDK].load_balancer
def get_kubernetes_client() -> k8s_client.K8sClient:

View File

@ -44,7 +44,6 @@ class TestK8sClient(test_base.TestCase):
m_k8s.assert_called_with(k8s_api_root)
self.assertIs(k8s_dummy, clients.get_kubernetes_client())
self.assertIs(openstacksdk_mock, clients.get_openstacksdk())
self.assertIs(openstacksdk_mock.load_balancer,
clients.get_loadbalancer_client())
self.assertIs(openstacksdk_mock.network,