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):