Change in vdsm[master]: Update device hooks: Added before and after update device ho...
danken at redhat.com
danken at redhat.com
Wed Apr 24 08:31:28 UTC 2013
Dan Kenigsberg has posted comments on this change.
Change subject: Update device hooks: Added before and after update device hooks.
......................................................................
Patch Set 5: I would prefer that you didn't submit this
(3 inline comments)
....................................................
File vdsm/libvirtvm.py
Line 1677: vnicXML = hooks.before_update_device(
Line 1678: vnicXML.toprettyxml(encoding='utf-8'), self.conf)
Line 1679: self._dom.updateDeviceFlags(vnicXML,
Line 1680: libvirt.VIR_DOMAIN_AFFECT_LIVE)
Line 1681: self._new_nic_xml = vnicXML
please put the after_update_device() call here.
Line 1682: except Exception as e:
Line 1683: self.log.debug('Request failed: %s',
Line 1684: vnicXML.toprettyxml(encoding='utf-8'),
Line 1685: exc_info=True)
Line 1681: self._new_nic_xml = vnicXML
Line 1682: except Exception as e:
Line 1683: self.log.debug('Request failed: %s',
Line 1684: vnicXML.toprettyxml(encoding='utf-8'),
Line 1685: exc_info=True)
please consider an after_update_device_fail() call here.
Line 1686: raise SetLinkAndNetworkError(e.message)
Line 1687: yield
Line 1688: except Exception:
Line 1689: # Rollback link and network.
Line 1737: if params.get('deviceType') == vm.NIC_DEVICES:
Line 1738: update = self._updateInterfaceDevice(params)
Line 1739: new_nic_xml = update['new_nic_xml']
Line 1740: del update['new_nic_xml']
Line 1741: self.log.debug("Nic has been updated:\n %s" % new_nic_xml)
please verify that the vnicxml is logged only once.
Line 1742: hooks.after_update_device(new_nic_xml, self.conf)
Line 1743: else:
Line 1744: update = errCode['noimpl']
Line 1745:
--
To view, visit http://gerrit.ovirt.org/13972
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I8fe7f5e6d8291cc227a323b324c977bcd5bc8295
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Vallarelli <gvallare at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Giuseppe Vallarelli <gvallare at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the vdsm-patches
mailing list