Roy Golan has posted comments on this change.

Change subject: packaging: setup: database: support get vdc option's versions
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.ovirt.org/#/c/24844/1/packaging/setup/ovirt_engine_setup/database.py
File packaging/setup/ovirt_engine_setup/database.py:

Line 209:             args=dict(
Line 210:                 name=name,
Line 211:             ),
Line 212:             ownConnection=ownConnection,
Line 213:         )
> why? you get empty list if option not available, maybe handy in future.
maybe. but this is not what you did for the single getVdcOption.
Line 214:         return [r['version'] for r in result]
Line 215: 
Line 216:     def getVdcOption(
Line 217:         self,


Line 210:                 name=name,
Line 211:             ),
Line 212:             ownConnection=ownConnection,
Line 213:         )
Line 214:         return [r['version'] for r in result]
> you can use this output to call get/setVdcOptions.
its a waste. fetch versions and for each version call the db again?

1 time fetch all values and version and do what you need.

it fits exactly my case:

 getAll...
   for each value in list
     change value
       updateVdcOption(name,value,version)

if one really wants, he can get the versions list with the list comprehension 
you suggested
Line 215: 
Line 216:     def getVdcOption(
Line 217:         self,
Line 218:         name,


-- 
To view, visit http://gerrit.ovirt.org/24844
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4c36d59afbc502f0bb28b0bbad1315f4e9c65702
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to