[PATCH] [TES] Modifying SystemDevice/02_reverse.py tc to use cim_define() and cim_start(), cim_destroy()

# HG changeset patch # User Deepti B. Kalakeri <deeptik@linux.vnet.ibm.com> # Date 1235733425 28800 # Node ID a26791e2890e59a1f02e5d7050da3d75f8f4e0e2 # Parent 6f8acadebaaeb10823656391e89e58439e64ac77 [TES] Modifying SystemDevice/02_reverse.py tc to use cim_define() and cim_start(), cim_destroy(). Tested with Xen/XenFV for RHEL 5.3 rpm. Signed-off-by: Deepti B. Kalakeri <deeptik@linux.vnet.ibm.com> diff -r 6f8acadebaae -r a26791e2890e suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py --- a/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Tue Feb 17 08:48:52 2009 -0800 +++ b/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Fri Feb 27 03:17:05 2009 -0800 @@ -53,8 +53,17 @@ def main(): cxml = virt_xml(test_dom, mac=test_mac) devlist = [ "NetworkPort", "Memory", "LogicalDisk", "Processor", "PointingDevice", "DisplayController" ] - cxml.create(options.ip) + ret = cxml.cim_define(options.ip) + if not ret: + logger.error('Unable to define domain %s', test_dom) + return FAIL + + status = cxml.cim_start(options.ip) + if status != PASS: + cxml.undefine(options.ip) + logger.error('Unable to start domain %s', test_dom) + return FAIL key_list = ["DeviceID", "CreationClassName", "SystemName", "SystemCreationClassName"] @@ -64,7 +73,7 @@ def main(): devs = enumclass.EnumInstances(options.ip, cn) except Exception, detail: logger.error("Exception: %s", detail) - cxml.destroy(options.ip) + cxml.cim_destroy(options.ip) cxml.undefine(options.ip) return FAIL @@ -82,18 +91,18 @@ def main(): SystemCreationClassName=dev.SystemCreationClassName) except Exception, detail: logger.error("Exception: %s", detail) - cxml.destroy(options.ip) + cxml.cim_destroy(options.ip) cxml.undefine(options.ip) return FAIL if systems == None: logger.error("Device association failed") - cxml.destroy(options.ip) + cxml.cim_destroy(options.ip) cxml.undefine(options.ip) return FAIL elif len(systems) != 1: logger.error("%s systems returned, expected 1", len(systems)) - cxml.destroy(options.ip) + cxml.cim_destroy(options.ip) cxml.undefine(options.ip) return FAIL @@ -111,7 +120,7 @@ def main(): logger.error("Association returned wrong system: %s", system.Name) - cxml.destroy(options.ip) + cxml.cim_destroy(options.ip) cxml.undefine(options.ip) return status
participants (1)
-
Deepti B. Kalakeri