[Libvirt-cim] [PATCH] [TEST] Modifying SettingsDefine/03_sds_fwd_errs.py tc to use cim_define() and cim_start(), cim_destroy()

Deepti B. Kalakeri deeptik at linux.vnet.ibm.com
Tue Mar 3 17:05:53 UTC 2009


# HG changeset patch
# User Deepti B. Kalakeri <deeptik at linux.vnet.ibm.com>
# Date 1236099940 28800
# Node ID ff8506dbb92773611c3c120a0be9bd400b3a7e44
# Parent  04affa1172676d8872be3e58b55697bd7513febf
[TEST] Modifying SettingsDefine/03_sds_fwd_errs.py tc to use cim_define() and cim_start(), cim_destroy().

Also, removed un necessary import statements.
Tested with Xen/XenFV for RHEL 5.3 rpm.
Signed-off-by: Deepti B. Kalakeri <deeptik at linux.vnet.ibm.com>

diff -r 04affa117267 -r ff8506dbb927 suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py
--- a/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py	Tue Mar 03 08:56:24 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py	Tue Mar 03 09:05:40 2009 -0800
@@ -145,7 +145,6 @@
 
 import sys
 import pywbem
-from VirtLib import utils
 from XenKvmLib import assoc
 from XenKvmLib import vxml
 from XenKvmLib.common_util import try_assoc
@@ -221,9 +220,15 @@ def main():
         cxml= virt_xml(test_dom, vcpus = test_vcpus, mac = test_mac,
                        disk = test_disk)
 
-    ret = cxml.create(options.ip)
+    ret = cxml.cim_define(options.ip)
     if not ret:
-        logger.error("Failed to Create the dom: %s", test_dom)
+        logger.error("Failed to define the dom: %s", test_dom)
+        return FAIL
+
+    status = cxml.cim_start(options.ip)
+    if status != PASS:
+        cxml.undefine(options.ip)
+        logger.error("Failed to start the dom: %s", test_dom)
         return FAIL
 
     global conn
@@ -262,8 +267,8 @@ def main():
             if retval != PASS:
                 status = retval
 
-    cxml.destroy(options.ip)
-    cxml.destroy(options.ip)
+    cxml.cim_destroy(options.ip)
+    cxml.undefine(options.ip)
     return status
 
 if __name__ == "__main__":




More information about the Libvirt-cim mailing list