Assaf Muller has uploaded a new change for review. Change subject: before/after_update_device hook now receives custom properties ......................................................................
before/after_update_device hook now receives custom properties Change-Id: Ife0f617fe7e40104de3dc5bcad28b2de04f1d446 Signed-off-by: Assaf Muller <[email protected]> --- M vdsm/vm.py 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/08/16408/1 diff --git a/vdsm/vm.py b/vdsm/vm.py index 281c584..b1d5cc0 100644 --- a/vdsm/vm.py +++ b/vdsm/vm.py @@ -2982,18 +2982,20 @@ link = xml.dom.minidom.Element('link') vnicXML.appendChildWithArgs(link) link.setAttribute('state', linkValue) + customProps = getattr(dev, 'custom', {}) try: try: vnicXML = hooks.before_update_device( - vnicXML.toprettyxml(encoding='utf-8'), self.conf) + vnicXML.toprettyxml(encoding='utf-8'), self.conf, + customProps) self._dom.updateDeviceFlags(vnicXML, libvirt.VIR_DOMAIN_AFFECT_LIVE) dev._deviceXML = vnicXML self.log.debug("Nic has been updated:\n %s" % vnicXML) - hooks.after_update_device(vnicXML, self.conf) + hooks.after_update_device(vnicXML, self.conf, customProps) except Exception as e: self.log.debug('Request failed: %s', vnicXML, exc_info=True) - hooks.after_update_device_fail(vnicXML, self.conf) + hooks.after_update_device_fail(vnicXML, self.conf, customProps) raise SetLinkAndNetworkError(e.message) yield except Exception: -- To view, visit http://gerrit.ovirt.org/16408 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ife0f617fe7e40104de3dc5bcad28b2de04f1d446 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Assaf Muller <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
