# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1220041572 25200
# Node ID 90ff66d2baee23319d29727d61fa9cf5d8f64f27
# Parent 8c056f2d614a9bf26ed8154a7a355f9c9551ab22
[TEST] Update HostSystem, HostedService, and HRP to use do_main from const.py
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostSystem/01_enum.py
--- a/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Fri Aug 29 13:26:04 2008 -0700
+++ b/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Fri Aug 29 13:26:12 2008 -0700
@@ -30,7 +30,8 @@
from XenKvmLib.classes import get_typed_class
from VirtLib import live
from VirtLib import utils
-from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, do_main
+from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
+from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL
SUPPORTED_TYPES = ['Xen', 'KVM', 'XenFV', 'LXC']
diff -r 8c056f2d614a -r 90ff66d2baee
suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py
--- a/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Fri Aug 29 13:26:04
2008 -0700
+++ b/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Fri Aug 29 13:26:12
2008 -0700
@@ -47,7 +47,7 @@
# Date :
29.01.2008
import sys
-from CimTest.Globals import do_main
+from XenKvmLib.const import do_main
from XenKvmLib.vxml import get_class
from XenKvmLib.classes import get_typed_class
from XenKvmLib.test_doms import destroy_and_undefine_all
diff -r 8c056f2d614a -r 90ff66d2baee
suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py
--- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Fri Aug 29 13:26:04
2008 -0700
+++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Fri Aug 29 13:26:12
2008 -0700
@@ -45,7 +45,8 @@
from XenKvmLib.assoc import Associators
from XenKvmLib.vxml import XenXML, KVMXML, get_class
from XenKvmLib.classes import get_typed_class
-from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES, do_main
+from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES
+from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL
from XenKvmLib.test_xml import testxml
from XenKvmLib.test_doms import destroy_and_undefine_all
diff -r 8c056f2d614a -r 90ff66d2baee
suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py
--- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Fri Aug 29 13:26:04 2008
-0700
+++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Fri Aug 29 13:26:12 2008
-0700
@@ -51,7 +51,7 @@
from VirtLib import utils
from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES, \
CIM_ERROR_ASSOCIATORS
-from CimTest.Globals import do_main
+from XenKvmLib.const import do_main
from XenKvmLib.vxml import XenXML, KVMXML, get_class
from XenKvmLib.assoc import AssociatorNames, Associators
from XenKvmLib.common_util import get_host_info
diff -r 8c056f2d614a -r 90ff66d2baee
suites/libvirt-cim/cimtest/HostSystem/05_hs_gi_errs.py
--- a/suites/libvirt-cim/cimtest/HostSystem/05_hs_gi_errs.py Fri Aug 29 13:26:04 2008
-0700
+++ b/suites/libvirt-cim/cimtest/HostSystem/05_hs_gi_errs.py Fri Aug 29 13:26:12 2008
-0700
@@ -79,7 +79,8 @@
from XenKvmLib.classes import get_typed_class
from optparse import OptionParser
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', 'KVM', 'XenFV', 'LXC']
diff -r 8c056f2d614a -r 90ff66d2baee
suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py
--- a/suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py Fri Aug 29 13:26:04 2008
-0700
+++ b/suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py Fri Aug 29 13:26:12 2008
-0700
@@ -45,7 +45,7 @@
# Date :
28.03.2008
import sys
-from CimTest.Globals import do_main
+from XenKvmLib.const import do_main
from XenKvmLib.classes import get_typed_class
from XenKvmLib.assoc import Associators, AssociatorNames
from XenKvmLib.common_util import get_host_info
diff -r 8c056f2d614a -r 90ff66d2baee
suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py
--- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Fri Aug 29 13:26:04
2008 -0700
+++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Fri Aug 29 13:26:12
2008 -0700
@@ -30,7 +30,7 @@
from CimTest import Globals
from CimTest.Globals import logger
from CimTest.ReturnCodes import PASS, FAIL
-from CimTest.Globals import do_main
+from XenKvmLib.const import do_main
from XenKvmLib.classes import get_typed_class
from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf
diff -r 8c056f2d614a -r 90ff66d2baee
suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py
--- a/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Fri Aug 29 13:26:04
2008 -0700
+++ b/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Fri Aug 29 13:26:12
2008 -0700
@@ -29,7 +29,7 @@
from CimTest import Globals
from CimTest.Globals import logger
from CimTest.ReturnCodes import PASS, FAIL
-from CimTest.Globals import do_main
+from XenKvmLib.const import do_main
from XenKvmLib.classes import get_typed_class
from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf
diff -r 8c056f2d614a -r 90ff66d2baee
suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py
--- a/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Fri Aug 29
13:26:04 2008 -0700
+++ b/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Fri Aug 29
13:26:12 2008 -0700
@@ -29,7 +29,7 @@
from CimTest import Globals
from CimTest.Globals import logger
from CimTest.ReturnCodes import PASS, FAIL
-from CimTest.Globals import do_main
+from XenKvmLib.const import do_main
from XenKvmLib.classes import get_typed_class
expr_values = { "rc" : pywbem.CIM_ERR_NOT_FOUND, \
diff -r 8c056f2d614a -r 90ff66d2baee
suites/libvirt-cim/cimtest/HostedResourcePool/04_reverse_errs.py
--- a/suites/libvirt-cim/cimtest/HostedResourcePool/04_reverse_errs.py Fri Aug 29
13:26:04 2008 -0700
+++ b/suites/libvirt-cim/cimtest/HostedResourcePool/04_reverse_errs.py Fri Aug 29
13:26:12 2008 -0700
@@ -29,7 +29,7 @@
from CimTest import Globals
from CimTest.Globals import logger
from CimTest.ReturnCodes import PASS
-from CimTest.Globals import do_main
+from XenKvmLib.const import do_main
from XenKvmLib.classes import get_typed_class
from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf
diff -r 8c056f2d614a -r 90ff66d2baee
suites/libvirt-cim/cimtest/HostedService/01_forward.py
--- a/suites/libvirt-cim/cimtest/HostedService/01_forward.py Fri Aug 29 13:26:04 2008
-0700
+++ b/suites/libvirt-cim/cimtest/HostedService/01_forward.py Fri Aug 29 13:26:12 2008
-0700
@@ -27,7 +27,7 @@
from XenKvmLib import enumclass
from XenKvmLib.classes import get_typed_class
from CimTest import Globals
-from CimTest.Globals import do_main
+from XenKvmLib.const import do_main
from CimTest.Globals import logger
from CimTest.ReturnCodes import PASS, FAIL, XFAIL
diff -r 8c056f2d614a -r 90ff66d2baee
suites/libvirt-cim/cimtest/HostedService/02_reverse.py
--- a/suites/libvirt-cim/cimtest/HostedService/02_reverse.py Fri Aug 29 13:26:04 2008
-0700
+++ b/suites/libvirt-cim/cimtest/HostedService/02_reverse.py Fri Aug 29 13:26:12 2008
-0700
@@ -27,7 +27,7 @@
from XenKvmLib import enumclass
from XenKvmLib.classes import get_typed_class
from CimTest import Globals
-from CimTest.Globals import do_main
+from XenKvmLib.const import do_main
from CimTest.Globals import logger
from CimTest.ReturnCodes import PASS, FAIL, XFAIL
diff -r 8c056f2d614a -r 90ff66d2baee
suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py
--- a/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py Fri Aug 29 13:26:04
2008 -0700
+++ b/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py Fri Aug 29 13:26:12
2008 -0700
@@ -26,8 +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 logger, do_main
+from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_USER, \
+ CIM_PASS, CIM_NS
+from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL, XFAIL
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
@@ -43,13 +44,13 @@
try:
host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys,
options.virt)[0]
except Exception:
- logger.error(Globals.CIM_ERROR_ENUMERATE % host_sys.name)
+ logger.error(CIM_ERROR_ENUMERATE % host_sys.name)
return FAIL
conn = assoc.myWBEMConnection('http://%s' % options.ip,
- (Globals.CIM_USER, Globals.CIM_PASS),
- Globals.CIM_NS)
+ (CIM_USER, CIM_PASS),
+ CIM_NS)
instanceref = CIMInstanceName(get_typed_class(options.virt, "HostSystem"),
keybindings = {"Wrong" : "wrong",
"CreationClassName" : host_sys.CreationClassName})
diff -r 8c056f2d614a -r 90ff66d2baee
suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py
--- a/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Fri Aug 29 13:26:04
2008 -0700
+++ b/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Fri Aug 29 13:26:12
2008 -0700
@@ -26,8 +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 logger, do_main
+from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_USER, \
+ CIM_PASS, CIM_NS
+from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL, XFAIL
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
@@ -43,7 +44,7 @@
try:
host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys,
options.virt)[0]
except Exception:
- logger.error(Globals.CIM_ERROR_ENUMERATE % host_sys.name)
+ logger.error(CIM_ERROR_ENUMERATE % host_sys.name)
return FAIL
@@ -53,8 +54,8 @@
conn = assoc.myWBEMConnection('http://%s' % options.ip,
- (Globals.CIM_USER, Globals.CIM_PASS),
- Globals.CIM_NS)
+ (CIM_USER, CIM_PASS),
+ CIM_NS)
for k, v in servicelist.items():
instanceref = CIMInstanceName(k,
keybindings = {"Wrong" : v,
_______________________________________________
Libvirt-cim mailing list
Libvirt-cim(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-cim