# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1223029001 25200
# Node ID ea47af48530d8cdfe804deb7367e0e586a2df0d7
# Parent 84f0b85c6afc80ac8f54dbea8713503e695bdcd1
[TEST] Updated RASD, ReferencedProfile, RAFP tc for Association parameter changes
Updated the following tc for Association parameter changes
RASD/01_verify_rasd_fields.py
ReferencedProfile/01_verify_refprof.py
ResourceAllocationFromPool/01_forward.py
ResourceAllocationFromPool/02_reverse.py
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 84f0b85c6afc -r ea47af48530d
suites/libvirt-cim/cimtest/RASD/01_verify_rasd_fields.py
--- a/suites/libvirt-cim/cimtest/RASD/01_verify_rasd_fields.py Fri Oct 03 02:56:24 2008
-0700
+++ b/suites/libvirt-cim/cimtest/RASD/01_verify_rasd_fields.py Fri Oct 03 03:16:41 2008
-0700
@@ -113,15 +113,17 @@ def assoc_values(assoc_info, xml, disk,
@do_main(sup_types)
def main():
options = main.options
+ virt = options.virt
status = PASS
+
destroy_and_undefine_all(options.ip)
- if options.virt == 'Xen':
+ if virt == 'Xen':
test_disk = 'xvda'
else:
test_disk = 'hda'
- virt_xml = vxml.get_class(options.virt)
- if options.virt == 'LXC':
+ virt_xml = vxml.get_class(virt)
+ if virt == 'LXC':
cxml = virt_xml(test_dom)
else:
cxml = virt_xml(test_dom, mem=test_mem, vcpus = test_vcpus,
@@ -133,21 +135,20 @@ def main():
if status == 1:
destroy_and_undefine_all(options.ip)
return FAIL
- if options.virt == "XenFV":
+ if virt == "XenFV":
instIdval = "Xen:%s" % test_dom
else:
- instIdval = "%s:%s" % (options.virt, test_dom)
+ instIdval = "%s:%s" % (virt, test_dom)
- vssdc_cn = 'VirtualSystemSettingDataComponent'
- vssd_cn = 'VirtualSystemSettingData'
+ vssdc_cn = get_typed_class(virt, 'VirtualSystemSettingDataComponent')
+ vssd_cn = get_typed_class(virt, 'VirtualSystemSettingData')
try:
assoc_info = assoc.Associators(options.ip, vssdc_cn, vssd_cn,
- options.virt,
InstanceID = instIdval)
- status = assoc_values(assoc_info, cxml, test_disk, options.virt)
+ status = assoc_values(assoc_info, cxml, test_disk, virt)
except Exception, details:
logger.error(Globals.CIM_ERROR_ASSOCIATORS,
- get_typed_class(options.virt, vssdc_cn))
+ get_typed_class(virt, vssdc_cn))
logger.error("Exception : %s" % details)
status = FAIL
diff -r 84f0b85c6afc -r ea47af48530d
suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py
--- a/suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py Fri Oct 03
02:56:24 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py Fri Oct 03
03:16:41 2008 -0700
@@ -138,7 +138,7 @@ def get_refprof_verify_info(proflist):
for instid in proflist:
try:
assoc_info = Associators(server, assoc_name, reg_classname,
- virt, InstanceID = instid,
+ InstanceID = instid,
CreationClassName = reg_classname)
if len(assoc_info) < 1:
logger.error("%s returned %i %s objects, expected atleast 1",
diff -r 84f0b85c6afc -r ea47af48530d
suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Fri Oct 03
02:56:24 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Fri Oct 03
03:16:41 2008 -0700
@@ -86,10 +86,10 @@ def get_instance(server, pool, list, vir
def verify_rasd(server, assoc_cn, cn, virt, list, rasd):
try:
+ assoc_cn = get_typed_class(virt, assoc_cn)
data = assoc.AssociatorNames(server,
assoc_cn,
- cn,
- virt,
+ get_typed_class(virt, cn),
InstanceID=list)
except Exception:
logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % cn)
diff -r 84f0b85c6afc -r ea47af48530d
suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Fri Oct 03
02:56:24 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Fri Oct 03
03:16:41 2008 -0700
@@ -116,8 +116,9 @@ def verify_pool_from_RAFP(server, virt,
def verify_pool_from_RAFP(server, virt, inst, pool_id, cn):
pool = []
try:
- pool = assoc.AssociatorNames(server, "ResourceAllocationFromPool",
- cn, virt, InstanceID = inst.InstanceID)
+ an = get_typed_class(virt, "ResourceAllocationFromPool")
+ cn = get_typed_class(virt, cn)
+ pool = assoc.AssociatorNames(server, an, cn, InstanceID=inst.InstanceID)
except Exception:
logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES, inst.InstanceID)
return FAIL