# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1226705922 28800
# Node ID ce6191aeebc7e856eb0aa2d563a2127579950d24
# Parent 948d7dc5b2acdb9f95af95e933eb1a9b07b6337f
[TEST] Update misc tests to expect instance from get_host_info().
Updates for: RPCS, VSSS, CRS
Also remove XFAILs as these tests should pass now.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 948d7dc5b2ac -r ce6191aeebc7
suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py
--- a/suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py Fri Nov 14 15:38:42
2008 -0800
+++ b/suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py Fri Nov 14 15:38:42
2008 -0800
@@ -55,9 +55,12 @@
"hence skipping the tc ....")
return SKIP
- status, host_name, host_cn = get_host_info(server, virt)
+ status, host_inst = get_host_info(server, virt)
if status != PASS:
return status
+
+ host_cn = host_inst.CreationClassName
+ host_name = host_inst.Name
cname = 'ConsoleRedirectionService'
classname = get_typed_class(virt, cname)
diff -r 948d7dc5b2ac -r ce6191aeebc7
suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py Fri Nov 14
15:38:42 2008 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py Fri Nov 14
15:38:42 2008 -0800
@@ -40,10 +40,13 @@
server = options.ip
classname = get_typed_class(options.virt,
"ResourcePoolConfigurationService")
keys = ['Name', 'CreationClassName']
- status, host_sys, host_cn = get_host_info(server, options.virt)
+ status, host_inst = get_host_info(server, options.virt)
if status != PASS:
logger.error("Error in calling get_host_info function")
return FAIL
+
+ host_cn = host_inst.CreationClassName
+ host_sys = host_inst.Name
try:
rpcservice = rpcs.enumerate(server, classname)
diff -r 948d7dc5b2ac -r ce6191aeebc7
suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/02_rcps_gi_errors.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/02_rcps_gi_errors.py Fri
Nov 14 15:38:42 2008 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/02_rcps_gi_errors.py Fri
Nov 14 15:38:42 2008 -0800
@@ -29,7 +29,6 @@
import pywbem
from CimTest.ReturnCodes import PASS
from XenKvmLib import assoc
-from XenKvmLib.common_util import check_sblim
from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS
from XenKvmLib.common_util import get_host_info, try_getinstance
from XenKvmLib.const import do_main
@@ -238,15 +237,14 @@
conn = assoc.myWBEMConnection('http://%s' % options.ip,
(CIM_USER, CIM_PASS), CIM_NS)
virt = options.virt
- status, linux_cs = check_sblim(options.ip, options.virt)
- if status == PASS:
- hostname = linux_cs.Name
- sccname = linux_cs.CreationClassName
- else:
- status, hostname, sccname = get_host_info(server, virt)
- if status != PASS:
- logger.error("Problem getting host information")
- return status
+ status, host_inst = get_host_info(server, virt)
+ if status != PASS:
+ logger.error("Problem getting host information")
+ return status
+
+ sccname = host_inst.CreationClassName
+ hostname = host_inst.Name
+
classname = get_typed_class(virt, 'ResourcePoolConfigurationService')
ret_value = err_invalid_ccname_keyname(conn, classname, hostname, sccname, \
field='INVALID_CCName_KeyName')
diff -r 948d7dc5b2ac -r ce6191aeebc7
suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/01_enum.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/01_enum.py Fri Nov 14
15:38:42 2008 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/01_enum.py Fri Nov 14
15:38:42 2008 -0800
@@ -23,7 +23,6 @@
# Date: 25-03-2008
import sys
from XenKvmLib import enumclass
-from XenKvmLib.common_util import check_sblim
from CimTest.Globals import CIM_ERROR_ENUMERATE, logger
from CimTest.ReturnCodes import PASS, FAIL
from XenKvmLib.const import do_main
@@ -41,14 +40,13 @@
# Expected results from enumeration
cn = get_typed_class(options.virt, "VirtualSystemSnapshotService")
Name = 'SnapshotService'
- status, linux_cs = check_sblim(options.ip, options.virt)
- if status == PASS:
- host_name = linux_cs.Name
- classname = linux_cs.CreationClassName
- else:
- status, host_name, classname = get_host_info(options.ip, options.virt)
- if status != PASS:
- return status
+ status, host_inst = get_host_info(options.ip, options.virt)
+ if status != PASS:
+ return status
+
+ classname = host_inst.CreationClassName
+ host_name = host_inst.Name
+
try:
vs_sservice = enumclass.EnumNames(options.ip, cn)
except Exception, detail:
diff -r 948d7dc5b2ac -r ce6191aeebc7
suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/02_vs_sservice_gi_errs.py
---
a/suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/02_vs_sservice_gi_errs.py Fri
Nov 14 15:38:42 2008 -0800
+++
b/suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/02_vs_sservice_gi_errs.py Fri
Nov 14 15:38:42 2008 -0800
@@ -28,7 +28,6 @@
import sys
import pywbem
from XenKvmLib import assoc
-from XenKvmLib.common_util import check_sblim
from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS
from CimTest.ReturnCodes import PASS
from XenKvmLib.common_util import try_getinstance
@@ -232,14 +231,13 @@
conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, CIM_PASS),
CIM_NS)
ccn = get_typed_class(options.virt, "VirtualSystemSnapshotService")
name = "SnapshotService"
- status, linux_cs = check_sblim(options.ip, options.virt)
- if status == PASS:
- sys_name = linux_cs.Name
- sccn = linux_cs.CreationClassName
- else:
- status, sys_name, sccn = get_host_info(options.ip, options.virt)
+ status, host_inst = get_host_info(options.ip, options.virt)
if status != PASS:
return status
+
+ sccn = host_inst.CreationClassName
+ sys_name = host_inst.Name
+
field = 'INVALID_CCName'
status = err_invalid_ccname()
if status != PASS: