Change in vdsm[master]: vmDevices: add mechanism to persist vmDevice defaults
Federico Simoncelli
fsimonce at redhat.com
Mon Jan 13 11:35:38 UTC 2014
Federico Simoncelli has posted comments on this change.
Change subject: vmDevices: add mechanism to persist vmDevice defaults
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
I like the idea, just check if the getattr part can be simplified.
http://gerrit.ovirt.org/#/c/21066/2/vdsm/vm.py
File vdsm/vm.py:
Line 1199: for attrName in attributes:
Line 1200: if attrName in self.specParams:
Line 1201: attr = self.specParams[attrName]
Line 1202: elif hasattr(self, attrName):
Line 1203: attr = getattr(self, attrName)
getattr also supports a default (if the attr is missing).
Line 1204: else:
Line 1205: continue
Line 1206:
Line 1207: if isinstance(attr, dict):
--
To view, visit http://gerrit.ovirt.org/21066
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc8383cbce78490c8dfab1c253883a06459f1547
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpoledni at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list