VMware: refactor how we iterate result objects from vCenter

Bug #1284658 reported by Radoslav Gerganov
6
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.get_objects_from_vcenter()
while result:
    do_something(result)
    token = get_token(result)
    if token:
        result = session.continue_to_get_objects(token)
    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.get_objects():
    do_something_with_result(result)

Tags: vmware
Changed in nova:
assignee: nobody → Radoslav Gerganov (rgerganov)
Changed in nova:
importance: Undecided → Low
Changed in nova:
status: New → Confirmed
Revision history for this message
Tracy Jones (tjones-i) wrote :

rado - surely this is fixed by now?

Changed in nova:
assignee: Radoslav Gerganov (rgerganov) → nobody
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote : Cleanup EOL bug report

This is an automated cleanup. This bug report has been closed because it
is older than 18 months and there is no open code change to fix this.
After this time it is unlikely that the circumstances which lead to
the observed issue can be reproduced.

If you can reproduce the bug, please:
* reopen the bug report (set to status "New")
* AND add the detailed steps to reproduce the issue (if applicable)
* AND leave a comment "CONFIRMED FOR: <RELEASE_NAME>"
  Only still supported release names are valid (LIBERTY, MITAKA, OCATA, NEWTON).
  Valid example: CONFIRMED FOR: LIBERTY

Changed in nova:
importance: Low → Undecided
status: Confirmed → Expired
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/oslo.vmware 1.22.0

This issue was fixed in the openstack/oslo.vmware 1.22.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.