# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1220041548 25200
# Node ID d722b79c405442082ccd02dbf1e50f0542a3344b
# Parent bc9a4f35b1b48b6111f12d86925c1fbec09780a0
[TEST] Update ElementCapabilities and ElementConforms to use do_main from const.py
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r bc9a4f35b1b4 -r d722b79c4054
suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Fri Aug 29 13:24:32
2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Fri Aug 29 13:25:48
2008 -0700
@@ -26,9 +26,9 @@
from XenKvmLib import assoc
from XenKvmLib import enumclass
from XenKvmLib.classes import get_typed_class
-from CimTest import Globals
-from CimTest.Globals import do_main, logger, CIM_ERROR_ASSOCIATORNAMES, \
-CIM_ERROR_ENUMERATE
+from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES, \
+ CIM_ERROR_ENUMERATE
+from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL, SKIP
from XenKvmLib.enumclass import enumerate
@@ -113,7 +113,7 @@
Name = system,
CreationClassName = ccn)
except Exception:
- logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % system)
+ logger.error(CIM_ERROR_ASSOCIATORNAMES % system)
return FAIL
cn = get_typed_class(virt, "EnabledLogicalElementCapabilities")
if elec[0].classname != cn:
diff -r bc9a4f35b1b4 -r d722b79c4054
suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Fri Aug 29 13:24:32
2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Fri Aug 29 13:25:48
2008 -0700
@@ -29,7 +29,7 @@
from XenKvmLib import vsms
from XenKvmLib.classes import get_typed_class
from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_ERROR_ASSOCIATORNAMES
-from CimTest.Globals import do_main
+from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL, SKIP
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
diff -r bc9a4f35b1b4 -r d722b79c4054
suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Fri Aug 29
13:24:32 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Fri Aug 29
13:25:48 2008 -0700
@@ -26,8 +26,8 @@
from XenKvmLib import assoc
from XenKvmLib import enumclass
from XenKvmLib.classes import get_typed_class
-from CimTest import Globals
-from CimTest.Globals import logger, do_main
+from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS
+from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
@@ -37,8 +37,8 @@
def try_assoc(ref, ref_class, exp_rc, exp_desc, options):
conn = assoc.myWBEMConnection('http://%s' % options.ip,
- (Globals.CIM_USER, Globals.CIM_PASS),
- Globals.CIM_NS)
+ (CIM_USER, CIM_PASS),
+ CIM_NS)
status = FAIL
rc = -1
names = []
diff -r bc9a4f35b1b4 -r d722b79c4054
suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py Fri Aug 29
13:24:32 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py Fri Aug 29
13:25:48 2008 -0700
@@ -25,8 +25,8 @@
from pywbem.cim_obj import CIMInstanceName
from XenKvmLib import assoc
from XenKvmLib.classes import get_typed_class
-from CimTest import Globals
-from CimTest.Globals import logger, do_main
+from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS
+from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL, SKIP
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
@@ -36,8 +36,8 @@
def try_assoc(ref, ref_class, exp_rc, exp_desc, options):
conn = assoc.myWBEMConnection('http://%s' % options.ip,
- (Globals.CIM_USER, Globals.CIM_PASS),
- Globals.CIM_NS)
+ (CIM_USER, CIM_PASS),
+ CIM_NS)
status = FAIL
rc = -1
names = []
diff -r bc9a4f35b1b4 -r d722b79c4054
suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py Fri Aug 29
13:24:32 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py Fri Aug 29
13:25:48 2008 -0700
@@ -53,7 +53,7 @@
from XenKvmLib.common_util import get_host_info
from XenKvmLib.classes import get_typed_class
from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES
-from CimTest.Globals import do_main
+from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
diff -r bc9a4f35b1b4 -r d722b79c4054
suites/libvirt-cim/cimtest/ElementConforms/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri Aug 29 13:24:32 2008
-0700
+++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri Aug 29 13:25:48 2008
-0700
@@ -38,8 +38,9 @@
from XenKvmLib.test_doms import destroy_and_undefine_all
from XenKvmLib.classes import get_typed_class
from XenKvmLib import vxml
-from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS, do_main
from CimTest import Globals
+from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS
+from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
diff -r bc9a4f35b1b4 -r d722b79c4054
suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Fri Aug 29 13:24:32 2008
-0700
+++ b/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Fri Aug 29 13:25:48 2008
-0700
@@ -42,7 +42,7 @@
from VirtLib import utils
from CimTest import Globals
from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_ERROR_ASSOCIATORS
-from CimTest.Globals import do_main
+from XenKvmLib.const import do_main
from XenKvmLib import enumclass
from XenKvmLib import computersystem
from XenKvmLib import assoc
diff -r bc9a4f35b1b4 -r d722b79c4054
suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py Fri Aug 29 13:24:32
2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py Fri Aug 29 13:25:48
2008 -0700
@@ -58,7 +58,8 @@
from XenKvmLib.classes import get_typed_class
from CimTest.ReturnCodes import PASS, FAIL
from CimTest import Globals
-from CimTest.Globals import logger, CIM_USER, CIM_PASS, do_main
+from CimTest.Globals import logger, CIM_USER, CIM_PASS
+from XenKvmLib.const import do_main
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
diff -r bc9a4f35b1b4 -r d722b79c4054
suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Fri Aug 29 13:24:32
2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Fri Aug 29 13:25:48
2008 -0700
@@ -87,7 +87,8 @@
from XenKvmLib.common_util import try_assoc
from XenKvmLib.test_doms import destroy_and_undefine_all
from CimTest.ReturnCodes import PASS, FAIL
-from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, do_main
+from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS
+from XenKvmLib.const import do_main
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']