diff --git a/vmware_nsxlib/tests/unit/v3/test_load_balancer.py b/vmware_nsxlib/tests/unit/v3/test_load_balancer.py index 352c96df..f53a6285 100644 --- a/vmware_nsxlib/tests/unit/v3/test_load_balancer.py +++ b/vmware_nsxlib/tests/unit/v3/test_load_balancer.py @@ -609,7 +609,8 @@ class TestService(nsxlib_testcase.NsxClientTestCase): self.nsxlib.load_balancer.service.get_stats(fake_service['id']) get.assert_called_with( 'loadbalancer/services/%s/statistics?source=realtime' % - fake_service['id']) + fake_service['id'], + silent=False) def test_get_status(self): with mock.patch.object(self.nsxlib.client, 'get') as get: diff --git a/vmware_nsxlib/v3/load_balancer.py b/vmware_nsxlib/v3/load_balancer.py index 9670fb44..bcfe7b99 100644 --- a/vmware_nsxlib/v3/load_balancer.py +++ b/vmware_nsxlib/v3/load_balancer.py @@ -494,10 +494,10 @@ class Service(LoadBalancerBase): 'virtual-servers', 'status') return self.client.get(object_url) - def get_stats(self, service_id, source='realtime'): + def get_stats(self, service_id, source='realtime', silent=False): object_url = '%s/%s/%s?source=%s' % (self.resource, service_id, 'statistics', source) - return self.client.get(object_url) + return self.client.get(object_url, silent=silent) def get_usage(self, service_id): object_url = '%s/%s/%s' % (self.resource, service_id, 'usage') diff --git a/vmware_nsxlib/v3/policy/core_resources.py b/vmware_nsxlib/v3/policy/core_resources.py index 6bd048af..8a820602 100644 --- a/vmware_nsxlib/v3/policy/core_resources.py +++ b/vmware_nsxlib/v3/policy/core_resources.py @@ -351,8 +351,8 @@ class NsxPolicyResourceBase(object, metaclass=abc.ABCMeta): except IndexError: return - def _list(self, obj_def): - return self.policy_api.list(obj_def).get('results', []) + def _list(self, obj_def, silent=False): + return self.policy_api.list(obj_def, silent=silent).get('results', []) def _create_or_store(self, policy_def, child_def=None): transaction = trans.NsxPolicyTransaction.get_current()