Change in vdsm[master]: virt: set correct permissions for hwrng device
nsoffer at redhat.com
nsoffer at redhat.com
Sat Mar 19 22:01:36 UTC 2016
Nir Soffer has posted comments on this change.
Change subject: virt: set correct permissions for hwrng device
......................................................................
Patch Set 3:
(2 comments)
https://gerrit.ovirt.org/#/c/54806/3/vdsm/virt/vm.py
File vdsm/virt/vm.py:
Line 1263: self.log.exception('Could not reattach device %s back to host '
Line 1264: 'due to missing IOMMU support.')
Line 1265:
Line 1266: def _cleanupRngDevices(self):
Line 1267: for device in self._devices[hwclass.RNG]:
> this works
I agree with Francesco about iterating over a copy.
Line 1268: device.hwrng_fix_perm()
Line 1269:
Line 1270: def _host_devices(self):
Line 1271: for device in self._devices[hwclass.HOSTDEV][:]:
https://gerrit.ovirt.org/#/c/54806/3/vdsm/virt/vmdevices/core.py
File vdsm/virt/vmdevices/core.py:
Line 252:
Line 253: def uses_source(self, source):
Line 254: return self._SOURCES[self.specParams['source']] == source
Line 255:
Line 256: def hwrng_set_perm(self):
> consider using full-word "permission", as the partial word left me perplexe
I agree with Dan about using full words. Shortcuts are ok when we have a very common terms that we use everywhere (e.g. sd, dev), but this is not the case.
How about:
- grant_hwrng_permission()
- revoke_hwrng_permission()
I'm not sure about the names (grant, revoke), but I'm sure that the action should come before the object.
Line 257: supervdsm.getProxy().appropriateHwrngDevice(self.conf['vmId'])
Line 258:
Line 259: def hwrng_fix_perm(self):
Line 260: supervdsm.getProxy().rmAppropriateHwrngDevice(self.conf['vmId'])
--
To view, visit https://gerrit.ovirt.org/54806
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id958a291e5a15813309928ba3d8c67828273b6c6
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list