yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #10224
[Bug 1284658] [NEW] VMware: refactor how we iterate result objects from vCenter
Public bug reported:
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)
** Affects: nova
Importance: Undecided
Status: New
** Tags: vmware
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1284658
Title:
VMware: refactor how we iterate result objects from vCenter
Status in OpenStack Compute (Nova):
New
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)
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1284658/+subscriptions
Follow ups
References