VMware: refactor how we iterate result objects from vCenter
Bug #1284658 reported by
Radoslav Gerganov
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Expired
|
Undecided
|
Unassigned |
Bug Description
There is lot of duplicate code which does the following (pseudo code):
result = session.
while result:
do_
token = get_token(result)
if token:
result = session.
else:
break
The part that retrieves more objects if token is returned is repeated over and over again. We need to come up with a common utility (e.g. an iterator) which abstracts this boilerplate and then have something like:
for result in session.
do_
Changed in nova: | |
assignee: | nobody → Radoslav Gerganov (rgerganov) |
Changed in nova: | |
importance: | Undecided → Low |
Changed in nova: | |
status: | New → Confirmed |
Changed in nova: | |
assignee: | Radoslav Gerganov (rgerganov) → nobody |
To post a comment you must log in.
rado - surely this is fixed by now?