New api for getting the LB virtual servers status

Change-Id: I71a56b87144aad743795ad1295ec636b17429035
(cherry picked from commit fad3c7b87c)
This commit is contained in:
Adit Sarfaty
2018-08-12 13:41:22 +03:00
parent 5d98a82265
commit 5f6ef40db2
2 changed files with 14 additions and 0 deletions

View File

@@ -545,6 +545,15 @@ class TestService(nsxlib_testcase.NsxClientTestCase):
get.assert_called_with(
'loadbalancer/services/%s/status' % fake_service['id'])
def test_get_virtual_servers_status(self):
with mock.patch.object(self.nsxlib.client, 'get') as get:
fake_service = consts.FAKE_SERVICE.copy()
self.nsxlib.load_balancer.service.get_virtual_servers_status(
fake_service['id'])
get.assert_called_with(
'loadbalancer/services/%s/virtual-servers/status' %
fake_service['id'])
def test_delete_service(self):
with mock.patch.object(self.nsxlib.client, 'delete') as delete:
fake_service = consts.FAKE_SERVICE.copy()