Francesco Romani has posted comments on this change. Change subject: vm: check operation result for vm nic hotunplug ......................................................................
Patch Set 9: (2 comments) https://gerrit.ovirt.org/#/c/48473/9/vdsm/virt/vm.py File vdsm/virt/vm.py: Line 2669: def _waitForDriveRemoval(self, device): : """ : As stated in libvirt documentary, after detaching a device using : virDomainDetachDeviceFlags, we need to verify that this device : has actually been detached: : libvirt.org/html/libvirt-libvirt-domain.html#virDomainDetachDeviceFlags : : This function waits for the device to be detached. : : Currently we use virDomainDetachDevice. However- That function behaves : the same in that matter. (Currently it is not documented at libvirt's : API docs- but after contacting libvirt's guys it turned out that this : is true. Bug 1257280 opened for fixing the documentation.) : TODO: remove this comment when the documentation will be fixed. : : :param device: Device to wait for : """ : self.log.debug("Waiting for hotunplug to finish") : with utils.stopwatch("Hotunplug device %s" % device.name): : deadline = (utils.monotonic_time() + : config.getfloat('vars', 'hotunplug_timeout')) : sleep_time = config.getfloat('vars', 'hotunplug_check_interval') : while self._isDriveAttached(device): : time.sleep(sleep_time) : if utils.monotonic_time() > deadline: : raise HotunplugTimeout("Timeout detaching device %s" : % device.name) why is this rename useful? https://gerrit.ovirt.org/#/c/48473/9/vdsm/virt/vmdevices/network.py File vdsm/virt/vmdevices/network.py: Line 193: The path is relative to the root element Line 194: """ Line 195: return "./devices/interface/mac[@address='%s']" % self.macAddr Line 196: Line 197: def _makeName(self): why not just make this a property? @property def name(self): name = '' if hasattr(self, 'type'): name += self.type + ' ' if hasattr(self, 'macAddr'): name += self.macAddr + ' ' Line 198: name = '' Line 199: if hasattr(self, 'type'): Line 200: name += self.type + ' ' Line 201: if hasattr(self, 'macAddr'): -- To view, visit https://gerrit.ovirt.org/48473 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3d3b2c839cbb4733aecc8d5a0e9a1ae691e14ac3 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Marcin Mirecki <mmire...@redhat.com> Gerrit-Reviewer: Amit Aviram <aavi...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Marcin Mirecki <mmire...@redhat.com> Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches