Change in vdsm[master]: virt: New method Vm.get_devices
fromani at redhat.com
fromani at redhat.com
Mon Feb 29 11:08:42 UTC 2016
Francesco Romani has posted comments on this change.
Change subject: virt: New method Vm.get_devices
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
I'm ok with the idea, hence partial ACK. Please see inline comments to see why it is not full ACK.
https://gerrit.ovirt.org/#/c/54090/1/vdsm/virt/vm.py
File vdsm/virt/vm.py:
Line 5070: def getNicDevices(self):
Line 5071: return self._devices[hwclass.NIC]
Line 5072:
Line 5073: def get_devices(self, hw_class):
Line 5074: return self._devices[hw_class]
fine as long as we make sure we pass a copy of the data, to skip future headaches about concurrent access.
Since we are adding a new API, I suggest to make sure that this one does the right thing. It should be simple as
def get_devices(self, hw_class):
return self._devices[hw_class][:]
Line 5075:
Line 5076: def getBalloonDevicesConf(self):
Line 5077: for dev in self.conf['devices']:
Line 5078: if dev['type'] == hwclass.BALLOON:
--
To view, visit https://gerrit.ovirt.org/54090
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6a7c32806501df8672718c588b2f62087ff4e085
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Milan Zamazal <mzamazal at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list