Change in vdsm[ovirt-3.6]: vmfex hook: remove filter from directly-attached vnics

danken at redhat.com danken at redhat.com
Wed Feb 17 09:19:55 UTC 2016


Dan Kenigsberg has uploaded a new change for review.

Change subject: vmfex hook: remove filter from directly-attached vnics
......................................................................

vmfex hook: remove filter from directly-attached vnics

It seems that libvirt has become more strict, and would not accept a
filterref that it cannot enforce. This patch makes the hook drop the
<filterref> element that is added by Vdsm.

Change-Id: I47f38a76b06c4d8e8dd14adb7e9c0a1eb6e3ad9e
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1308839
Signed-off-by: Dan Kenigsberg <danken at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/53571
Continuous-Integration: Jenkins CI
Reviewed-by: Edward Haas <edwardh at redhat.com>
Reviewed-by: Ondřej Svoboda <osvoboda at redhat.com>
(cherry picked from commit 3b81a65ad0d95145e85fc11e96828465cbb0d446)
---
M vdsm_hooks/vmfex_dev/vmfex_vnic.py
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/32/53632/1

diff --git a/vdsm_hooks/vmfex_dev/vmfex_vnic.py b/vdsm_hooks/vmfex_dev/vmfex_vnic.py
index 6d41639..866c5db 100755
--- a/vdsm_hooks/vmfex_dev/vmfex_vnic.py
+++ b/vdsm_hooks/vmfex_dev/vmfex_vnic.py
@@ -131,6 +131,11 @@
     interface.setAttribute('type', 'network')
 
 
+def removeFilter(interface):
+    for filterElement in interface.getElementsByTagName('filterref'):
+        interface.removeChild(filterElement)
+
+
 def test():
     interface = minidom.parseString("""
     <interface type="bridge">
@@ -149,6 +154,8 @@
           interface.toprettyxml(encoding='UTF-8'))
 
     attachProfileToInterfaceXml(interface, 'Profail')
+    removeFilter(interface)
+
     print("Interface after attaching to VM-FEX port: %s" %
           interface.toprettyxml(encoding='UTF-8'))
 
@@ -171,6 +178,7 @@
             doc = hooking.read_domxml()
             interface, = doc.getElementsByTagName('interface')
             attachProfileToInterfaceXml(interface, portProfile)
+            removeFilter(interface)
             hooking.write_domxml(doc)
 
 


-- 
To view, visit https://gerrit.ovirt.org/53632
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47f38a76b06c4d8e8dd14adb7e9c0a1eb6e3ad9e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Dan Kenigsberg <danken at redhat.com>


More information about the vdsm-patches mailing list