[Libvirt-cim] [PATCH] [TEST] Fixing VSMS/08*py

Deepti B. Kalakeri deeptik at linux.vnet.ibm.com
Wed Aug 19 16:04:06 UTC 2009


# HG changeset patch
# User Deepti B. Kalakeri <deeptik at linux.vnet.ibm.com>
# Date 1250697820 25200
# Node ID c338efef06278a9a40a90f07a34750ec50c49939
# Parent  5c08aeea7fa147dea06d6b1f0c75c2de70b4b0ae
[TEST] Fixing VSMS/08*py .

Tested with KVM on F10 and Xen on SLES with current sources.
Signed-off-by: Deepti B. Kalakeri <deeptik at linux.vnet.ibm.com>

diff -r 5c08aeea7fa1 -r c338efef0627 suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py	Mon Aug 17 04:16:50 2009 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py	Wed Aug 19 09:03:40 2009 -0700
@@ -43,7 +43,9 @@
 ncpu = 1
 nmem = 256 
 new_int = randint(10, 99)
-new_mac = "11:%s:22:%s:33:%s" % (new_int, new_int, new_int)
+new_mac1 = "11:%s:22:%s:33:%s" % (new_int, new_int, new_int)
+new_int += 1
+new_mac2 = "11:%s:22:%s:33:%s" % (new_int, new_int, new_int)
 
 def cleanup_env(ip, virt, cxml):
     cxml.destroy(ip)
@@ -54,7 +56,7 @@
     options = main.options 
 
     service = vsms.get_vsms_class(options.virt)(options.ip)
-    cxml = vxml.get_class(options.virt)(default_dom, vcpus=cpu)
+    cxml = vxml.get_class(options.virt)(default_dom, vcpus=cpu, mac=new_mac1)
     ndpath = cxml.secondary_disk_path
     dasd = vsms.get_dasd_class(options.virt)(dev=cxml.xml_get_disk_dev(),
                                              source=ndpath, 
@@ -77,7 +79,6 @@
     for case in test_cases:
         #Each time through, define guest using a default XML
         cxml.undefine(options.ip)
-        cxml = vxml.get_class(options.virt)(default_dom, vcpus=cpu)
         ret = cxml.cim_define(options.ip)
         if not ret:
             logger.error("Failed to define the dom: %s", default_dom)
@@ -107,7 +108,7 @@
         if status != PASS:
             break
 
-        nasd.Address = new_mac
+        nasd.Address = new_mac2
         status = vsms_util.mod_net_res(options.ip, service, options.virt, cxml,
                                        nasd, ntype, default_network_name)
         if status != PASS:




More information about the Libvirt-cim mailing list