Name and ID validation may be paginated

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

Change-Id: Ic18caa4bfb675a7db908b20acf86434ed47f2c49
This commit is contained in:
Gary Kotton 2017-03-15 00:31:59 -07:00
parent 4fa7c0da15
commit 0c2c8c8dab
1 changed files with 1 additions and 1 deletions

View File

@ -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: