# HG changeset patch
# User Zhengang Li <lizg(a)cn.ibm.com>
# Date 1209433339 -28800
# Node ID 45c4fad193746d9d971389758851d4858a5049d3
# Parent 292223637d873644587835e44aa3aadba11c924e
[TEST] .2# Add revision branch for VSMS.02_destroysystem
Changed to use if-else statement other than conditional expression.
Signed-off-by: Zhengang Li <lizg(a)cn.ibm.com>
diff -r 292223637d87 -r 45c4fad19374
suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Tue
Apr 29 09:38:28 2008 +0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Tue
Apr 29 09:42:19 2008 +0800
@@ -25,15 +25,17 @@ import pywbem
import pywbem
from pywbem.cim_obj import CIMInstanceName
from VirtLib import utils
-from VirtLib.live import domain_list
+from VirtLib.live import domain_list, active_domain_list
from XenKvmLib import vsms, vxml
from XenKvmLib.classes import get_typed_class
+from XenKvmLib.const import CIM_REV
from CimTest.Globals import do_main
from CimTest.Globals import logger
from CimTest.ReturnCodes import PASS, FAIL
sup_types = ['Xen', 'KVM', 'XenFV']
default_dom = 'test_domain'
+rev = 528
@do_main(sup_types)
def main():
@@ -48,8 +50,11 @@ def main():
cs_ref = CIMInstanceName(classname, keybindings = {
'Name':default_dom,
'CreationClassName':classname})
-
- list_before = domain_list(options.ip, options.virt)
+ if CIM_REV < rev:
+ dl_func = active_domain_list
+ else:
+ dl_func = domain_list
+ list_before = dl_func(options.ip, options.virt)
status = PASS
rc = -1
@@ -61,7 +66,7 @@ def main():
logger.error(details)
status = FAIL
- list_after = domain_list(options.ip, options.virt)
+ list_after = dl_func(options.ip, options.virt)
status = PASS
if default_dom not in list_before: