[Libvirt-cim] [PATCH] [TEST] Modifying devices.py to fix tc 01_netport.py which was failing on F9 libvirt-cim rpm

Deepti B. Kalakeri deeptik at linux.vnet.ibm.com
Thu Jun 19 09:35:50 UTC 2008


# HG changeset patch
# User Deepti B. Kalakeri <deeptik at linux.vnet.ibm.com>
# Date 1213868143 25200
# Node ID f67381970add8e02ecd3ebbdc600f397c7fa51fe
# Parent  0986ab7af5023cac28da15c59fffcca60c78866c
[TEST] Modifying devices.py to fix tc 01_netport.py which was failing on F9 libvirt-cim rpm.

Signed-off-by: Deepti B. Kalakeri <deeptik at linux.vnet.ibm.com>

diff -r 0986ab7af502 -r f67381970add suites/libvirt-cim/lib/XenKvmLib/devices.py
--- a/suites/libvirt-cim/lib/XenKvmLib/devices.py	Thu Jun 19 01:42:12 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/devices.py	Thu Jun 19 02:35:43 2008 -0700
@@ -26,9 +26,19 @@ from CimTest import CimExt
 from CimTest import CimExt
 from CimTest import Globals
 from XenKvmLib import assoc
+from XenKvmLib.const import CIM_REV
 from XenKvmLib.classes import get_typed_class
 
-LinkTechnology_Ethernet = 2
+net_rev = 598
+
+# The branch has to be removed once the new rpm
+# including the changes in revision 598 is available.
+# The value of LinkTechnology should be set to 2 for
+# network, bridge and ethernet type interfaces.
+if net_rev > CIM_REV:
+    LinkTechnology_Ethernet = 0
+else:
+    LinkTechnology_Ethernet = 2
 
 class CIM_Instance:
     def __init__(self, inst):




More information about the Libvirt-cim mailing list