Name and ID validation may be paginated

So we need to do a list instead of a get.

Change-Id: Ic18caa4bfb675a7db908b20acf86434ed47f2c49
changes/96/445796/1
Gary Kotton 6 years ago
parent 4fa7c0da15
commit 0c2c8c8dab

@ -146,7 +146,7 @@ class NsxLibApiBase(object):
return do_update()
def _get_resource_by_name_or_id(self, name_or_id, resource):
all_results = self.client.get(resource)['results']
all_results = self.client.list(resource)['results']
matched_results = []
for rs in all_results:
if rs.get('id') == name_or_id:

Loading…
Cancel
Save