Change in vdsm[master]: Added support for before and after device create.

amuller at redhat.com amuller at redhat.com
Thu Apr 4 08:34:21 UTC 2013


Assaf Muller has posted comments on this change.

Change subject: Added support for before and after device create.
......................................................................


Patch Set 4: (3 inline comments)

Replied to in-code comments. Next patch set coming up.

....................................................
Commit Message
Line 11: dom xml and any custom properties. after_device_create is
Line 12: called right after after_vm_start.
Line 13: 
Line 14: Patch Set 2:
Line 15: Changed it so only devices that have custom properties
Done
Line 16: call such per-device hooks. Styled up code.
Line 17: 
Line 18: Change-Id: I3291032ff85254d5c3a4260bffb7003ca3502d22


....................................................
File vdsm/libvirtvm.py
Line 1296:         return leaseElem
Line 1297: 
Line 1298:     def _runBeforeDeviceCreateHooks(self, domxml):
Line 1299:         """
Line 1300:             For each device that has custom properties
Agreed.
Line 1301:                 Get its XML and run before_device_create hook
Line 1302:                 Append the XML to the VM's DOM XML
Line 1303:                 Save the device's DOM XML for future use
Line 1304:         """


Line 1521:             if self._dom.UUIDString() != self.id:
Line 1522:                 raise Exception('libvirt bug 603494')
Line 1523:             hooks.after_vm_start(self._dom.XMLDesc(0), self.conf)
Line 1524: 
Line 1525:             for devType in self._devices:
In the next commit in the series.
Line 1526:                 for dev in self._devices[devType]:
Line 1527:                     deviceCustomProperties = getattr(dev, 'custom', {})
Line 1528:                     if not deviceCustomProperties:
Line 1529:                         continue


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3291032ff85254d5c3a4260bffb7003ca3502d22
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Assaf Muller <amuller at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Assaf Muller <amuller 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