NSX-V3| fix devstack cleanup
Backend list results do not always have the cursor field so we should use
get when accessing it.
Change-Id: I3f31b56c50a8f014cc322ceb5e6c69b5540c879e
(cherry picked from commit 7102def745
)
This commit is contained in:
parent
7eb9964944
commit
de83c156ef
|
@ -160,7 +160,7 @@ class NSXClient(object):
|
|||
while missing > 0 and not cursor.startswith(self.NULL_CURSOR_PREFIX):
|
||||
response = requests.get(url + cursor, headers=self.headers,
|
||||
verify=self.verify, params=params).json()
|
||||
cursor = response['cursor']
|
||||
cursor = response.get('cursor', self.NULL_CURSOR_PREFIX)
|
||||
missing -= len(response['results'])
|
||||
results += response['results']
|
||||
|
||||
|
|
Loading…
Reference in New Issue