Assaf Muller has uploaded a new change for review.
Change subject: Added support for before and after device create. ......................................................................
Added support for before and after device create.
before_device_create is called for each device, right before before_vm_create. Each such hook is supplied the device's dom xml and any custom properties. after_device_create is called right after after_vm_start.
Change-Id: I3291032ff85254d5c3a4260bffb7003ca3502d22 Signed-off-by: Muller amuller@redhat.com --- M vdsm.spec.in M vdsm/hooks.py M vdsm/libvirtvm.py M vdsm/vm.py M vdsm_hooks/Makefile.am 5 files changed, 39 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/96/13396/1
diff --git a/vdsm.spec.in b/vdsm.spec.in index 3f7397a..32eb97d 100644 --- a/vdsm.spec.in +++ b/vdsm.spec.in @@ -792,6 +792,8 @@ %{_libexecdir}/%{vdsm_name}/safelease %{_libexecdir}/%{vdsm_name}/spmprotect.sh %{_libexecdir}/%{vdsm_name}/spmstop.sh +%dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_create +%dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_create %dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_start %dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_cont diff --git a/vdsm/hooks.py b/vdsm/hooks.py index 33faa6e..a2cb932 100644 --- a/vdsm/hooks.py +++ b/vdsm/hooks.py @@ -91,6 +91,16 @@ return finalxml
+def before_device_create(devicexml, vmconf={}, customProperties={}): + return _runHooksDir(devicexml, 'before_device_create', vmconf=vmconf, + params=customProperties) + + +def after_device_create(devicexml, vmconf={}, customProperties={}): + return _runHooksDir(devicexml, 'after_device_create', vmconf=vmconf, + params=customProperties) + + def before_vm_start(domxml, vmconf={}): return _runHooksDir(domxml, 'before_vm_start', vmconf=vmconf)
diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py index 3855e56..25b0208 100644 --- a/vdsm/libvirtvm.py +++ b/vdsm/libvirtvm.py @@ -1318,10 +1318,26 @@ domxml.appendInput() domxml.appendGraphics()
+ # Temp injection of custom properties for testing purposes for devType in self._devices: for dev in self._devices[devType]: - devElem = dev.getXML() - domxml._devices.appendChild(devElem) + if devType == vm.NIC_DEVICES: + dev.custom = {'qos': True, 'color': 'red'} + + ''' + For each device + Get its XML, run a before_device_create hook + Append the XML to the VM's DOM XML + Save the XML for future use + ''' + for devType in self._devices: + for dev in self._devices[devType]: + devxmlString = dev.getXML().toxml(encoding='utf-8') + devxmlString = hooks.before_device_create( + devxmlString, self.conf, getattr(dev, 'custom', {})) + dev._deviceXML = devxmlString + devxml = xml.dom.minidom.parseString(devxmlString).firstChild + domxml._devices.appendChild(devxml)
for drive in self._devices[vm.DISK_DEVICES][:]: if not hasattr(drive, 'volumeChain'): @@ -1503,6 +1519,12 @@ if self._dom.UUIDString() != self.id: raise Exception('libvirt bug 603494') hooks.after_vm_start(self._dom.XMLDesc(0), self.conf) + + for devType in self._devices: + for dev in self._devices[devType]: + hooks.after_device_create(dev._deviceXML, self.conf, + getattr(dev, 'custom', {})) + if not self._dom: self.setDownStatus(ERROR, 'failed to start libvirt vm') return diff --git a/vdsm/vm.py b/vdsm/vm.py index 98f04fd..66ffeb2 100644 --- a/vdsm/vm.py +++ b/vdsm/vm.py @@ -69,6 +69,7 @@ pass self.conf = conf self.log = log + self._deviceXML = None
def __str__(self): attrs = [":".join((a, str(getattr(self, a)))) for a in dir(self) diff --git a/vdsm_hooks/Makefile.am b/vdsm_hooks/Makefile.am index fa5a795..3f890f6 100644 --- a/vdsm_hooks/Makefile.am +++ b/vdsm_hooks/Makefile.am @@ -59,6 +59,8 @@ persist-vdsm-hooks.in
VDSMHOOKS = \ + before_device_create \ + after_device_create \ before_vm_start \ after_vm_start \ before_vm_cont \
-- To view, visit http://gerrit.ovirt.org/13396 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I3291032ff85254d5c3a4260bffb7003ca3502d22 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Assaf Muller amuller@redhat.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Added support for before and after device create. ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1742/ (1/2)
-- 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: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Assaf Muller amuller@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Added support for before and after device create. ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1793/ (2/2)
-- 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: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Assaf Muller amuller@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Added support for before and after device create. ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1744/ (1/2)
-- 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: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Added support for before and after device create. ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1795/ (2/2)
-- 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: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Added support for before and after device create. ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1744/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1795/ : SUCCESS
-- 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: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Added support for before and after device create. ......................................................................
Patch Set 3:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1745/ (1/2)
-- 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: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Added support for before and after device create. ......................................................................
Patch Set 3:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1796/ (2/2)
-- 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: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Added support for before and after device create. ......................................................................
Patch Set 3:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1745/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1796/ : SUCCESS
-- 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: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Added support for before and after device create. ......................................................................
Patch Set 3: I would prefer that you didn't submit this
(4 inline comments)
.................................................... Commit Message Line 5: CommitDate: 2013-03-28 16:48:09 +0200 Line 6: Line 7: Added support for before and after device create. Line 8: Line 9: before_device_create is called for each device, right before for each device, or for each device with custom properties(?)
I am slightly worried that running all the device-specific hook script for all devices is too wasteful (just think of the added log lines!) , as there are relatively many device per VM.
I suggested to avoid that, and run the scripts only for devices that has custom properties. The down side of this is that it's slightly different from the per-vm sematics (hooks are run always, not only if custom properties are there). However, if you do not care about per-device custom properties, you can put your script in before_vm_create. Line 10: before_vm_create. Each such hook is supplied the device's Line 11: dom xml and any custom properties. after_device_create is Line 12: called right after after_vm_start. Line 13:
.................................................... File vdsm/libvirtvm.py Line 1318: domxml.appendInput() Line 1319: domxml.appendGraphics() Line 1320: Line 1321: ''' Line 1322: For each device I love comments, but: * translating Python into English like you do here, ends up in trouble, as the comment/code quickly fall out of sync. * use docstring to document functions. Comments are written with # Line 1323: Get its XML, run a before_device_create hook Line 1324: Append the XML to the VM's DOM XML Line 1325: Save the XML for future use Line 1326: '''
Line 1325: Save the XML for future use Line 1326: ''' Line 1327: for devType in self._devices: Line 1328: for dev in self._devices[devType]: Line 1329: devxmlString = dev.getXML().toxml(encoding='utf-8') it's not very pythonic to include the type in the variable name. if devElem is holding the object form, maybe devxml is now free for the string.
also, it's confusing to have self._deviceXML cache devxmlString. self._devxml and devxml seems better to me. Line 1330: devxmlString = hooks.before_device_create( Line 1331: devxmlString, self.conf, getattr(dev, 'custom', {})) Line 1332: dev._deviceXML = devxmlString Line 1333: devxml = xml.dom.minidom.parseString(devxmlString).firstChild
Line 1329: devxmlString = dev.getXML().toxml(encoding='utf-8') Line 1330: devxmlString = hooks.before_device_create( Line 1331: devxmlString, self.conf, getattr(dev, 'custom', {})) Line 1332: dev._deviceXML = devxmlString Line 1333: devxml = xml.dom.minidom.parseString(devxmlString).firstChild why did you rename devElem to devxml ? Line 1334: domxml._devices.appendChild(devxml) Line 1335: Line 1336: for drive in self._devices[vm.DISK_DEVICES][:]: Line 1337: if not hasattr(drive, 'volumeChain'):
-- 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: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Added support for before and after device create. ......................................................................
Patch Set 4:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1826/ (1/2)
-- 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@redhat.com Gerrit-Reviewer: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Added support for before and after device create. ......................................................................
Patch Set 4:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1775/ (2/2)
-- 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@redhat.com Gerrit-Reviewer: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Added support for before and after device create. ......................................................................
Patch Set 4:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1775/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1826/ : SUCCESS
-- 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@redhat.com Gerrit-Reviewer: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Added support for before and after device create. ......................................................................
Patch Set 4: (3 inline comments)
more minor comments about comments.
.................................................... 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 thanks, but it's better to fix the commit message, too, so it is less ambiguous. 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 again - this docstring is too much of a translation of Python into English. I prefer the string (note the format: title, space, more text)
"""Run before_device_create hook scripts for devices with custom properties
The resulting device xml is cached on dev._deviceXML. """ 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: didn't you want to have a generator for this iteration? ( you do not have to!) 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@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
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@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Added support for before and after device create. ......................................................................
Patch Set 5:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1800/ (2/2)
-- 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: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Added support for before and after device create. ......................................................................
Patch Set 5:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1851/ (1/2)
-- 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: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Assaf Muller has posted comments on this change.
Change subject: Added support for before and after device create. ......................................................................
Patch Set 5: Verified
Verified: Created fake hooks for at the new before_device_create and after_device_create. I then faked custom properties, and my hooks were called at the right time with the custom properties available. Only devices with custom properties were called.
-- 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: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Added support for before and after device create. ......................................................................
Patch Set 5:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1800/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1851/ : SUCCESS
-- 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: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Added support for before and after device create. ......................................................................
Patch Set 5: Looks good to me, approved
-- 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: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Added support for before and after device create. ......................................................................
Added support for before and after device create.
before_device_create is called for each device, that has custom properties, right before before_vm_create. Each such hook is supplied the device's dom xml and any custom properties. after_device_create is called for each device that has custom properties right after after_vm_start.
Patch Set 2: Changed it so only devices that have custom properties call such per-device hooks. Styled up code.
Patch Set 3+ Styling / fixing comments.
Change-Id: I3291032ff85254d5c3a4260bffb7003ca3502d22 Signed-off-by: Muller amuller@redhat.com --- M vdsm.spec.in M vdsm/hooks.py M vdsm/libvirtvm.py M vdsm/vdsmd.8.in M vdsm/vm.py M vdsm_hooks/Makefile.am 6 files changed, 49 insertions(+), 5 deletions(-)
Approvals: Assaf Muller: Verified Dan Kenigsberg: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/13396 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: I3291032ff85254d5c3a4260bffb7003ca3502d22 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Assaf Muller amuller@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org