Change in vdsm[master]: libvirtvm.updateDevice change: updateInterfaceDevice in betw...

danken at redhat.com danken at redhat.com
Fri Apr 12 17:56:01 UTC 2013


Dan Kenigsberg has posted comments on this change.

Change subject: libvirtvm.updateDevice change: updateInterfaceDevice in between before and after hooks call.
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(1 inline comment)

....................................................
File vdsm/libvirtvm.py
Line 1713:             conf['portMirroring'] = networks
Line 1714: 
Line 1715:     def updateDevice(self, params):
Line 1716:         if params.get('deviceType') == vm.NIC_DEVICES:
Line 1717:             hooks.before_vm_update_device(self._dom.XMLDesc(0), self.conf)
one of the strongest points about hooks is that they let users change libvirt's xml definition for the device. Here, you cannot do it.

The hook point should probably sit just before the call to updateDeviceFlags(), and its argument should be the nicxml, and not the whole domxml.

Please see before_nic_hotplug() as a good reference.
Line 1718:             update_report = self._updateInterfaceDevice(params)
Line 1719:             hooks.after_vm_update_device(self._dom.XMLDesc(0), self.conf)
Line 1720:             return update_report
Line 1721:         else:


--
To view, visit http://gerrit.ovirt.org/13843
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5163b21fa59f3feea70c8ab4586041acab005bf8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Vallarelli <gvallare at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list