[Libvirt-cim] [PATCH] [TEST] Fixing 03_user_netport.py tc

Deepti B. Kalakeri deeptik at linux.vnet.ibm.com
Wed Jun 18 12:16:49 UTC 2008


# HG changeset patch
# User Deepti B. Kalakeri <deeptik at linux.vnet.ibm.com>
# Date 1213791390 25200
# Node ID f96b00310c76d5bb109f1f9842eb547eccc29372
# Parent  f4a167c62403c8aaaac5127d0c984c74ea863344
[TEST] Fixing 03_user_netport.py tc.

1) Changed the return value to XFAIL since the provider does not support guest with user interface type.
2) Fixed the KeyError.

This tc is dependent on the vxml.py changes submitted today.

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

diff -r f4a167c62403 -r f96b00310c76 suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py
--- a/suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py	Tue Jun 17 13:20:47 2008 +0800
+++ b/suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py	Wed Jun 18 05:16:30 2008 -0700
@@ -32,18 +32,18 @@
 from XenKvmLib.vxml import KVMXML
 from CimTest.Globals import logger
 from CimTest.Globals import do_main
-from CimTest.ReturnCodes import PASS, FAIL
+from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
 
 sup_types = ['KVM']
 
 test_dom = "test_domain"
 test_mac = "00:11:22:33:44:55"
+bug = '00004'
 
 @do_main(sup_types)
 def main():
     options = main.options
-    const.KVM_default_net_type = 'user'
-    cxml = KVMXML(test_dom, mac = test_mac)
+    cxml = KVMXML(test_dom, mac = test_mac, ntype='user')
     ret = cxml.define(options.ip)
     if not ret:
         logger.error('Unable to define domain %s' % test_dom)
@@ -62,10 +62,10 @@
     except Exception, detail:
         logger.error("Exception: %s" % detail)
         cxml.undefine(options.ip)
-        return FAIL
+        return XFAIL_RC(bug)
 
-    if dev == None:
-        logger.error("Error retrieving instance for devid %s" % devid)
+    if dev.DeviceID == None:
+        logger.error("Error retrieving instance for devid %s" % dev.DeviceID)
         cxml.undefine(options.ip)
         return FAIL
 




More information about the Libvirt-cim mailing list