[PATCH] [TEST] Updated test to only verify disk RASD
by Sharad Mishra
# HG changeset patch
# User Sharad Mishra <snmishra(a)us.ibm.com>
# Date 1295018716 28800
# Node ID 8866ff769a7637cbee7c793827152649856815f2
# Parent 2c9689c31d42c2320ecca7a4283bd564c5a27737
[TEST] Updated test to only verify disk RASD.
This test was written to look for disk and cdrom.
But default VM created by this test case only uses
disk and no cdrom. This test has been updated to
test for disk only.
Signed-off-by: Sharad Mishra <snmishra(a)us.ibm.com>
diff -r 2c9689c31d42 -r 8866ff769a76 suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py
--- a/suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py Fri Jan 14 07:06:49 2011 -0800
+++ b/suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py Fri Jan 14 07:25:16 2011 -0800
@@ -42,47 +42,43 @@
if curr_cim_rev < libvirt_em_type_changeset:
return SKIP
- if options.virt == 'Xen':
- emu_types = [0]
- else:
- emu_types = [0, 1]
+ exp_emu_type = 0
try:
- for exp_emu_type in emu_types:
- virt_xml = get_class(options.virt)
- cxml = virt_xml(default_dom, emu_type=exp_emu_type)
- ret = cxml.cim_define(options.ip)
- if not ret:
- logger.error("Failed to call DefineSystem()")
- return FAIL
+ virt_xml = get_class(options.virt)
+ cxml = virt_xml(default_dom, emu_type=exp_emu_type)
+ ret = cxml.cim_define(options.ip)
+ if not ret:
+ logger.error("Failed to call DefineSystem()")
+ return FAIL
- drasd= get_typed_class(options.virt,
- 'DiskResourceAllocationSettingData')
+ drasd= get_typed_class(options.virt,
+ 'DiskResourceAllocationSettingData')
- drasd_list = EnumInstances(options.ip, drasd, ret_cim_inst=True)
- if len(drasd_list) < 1:
- raise Exception("%s returned %i instances, expected at least 1"\
- %(drasd, len(drasd_list)))
+ drasd_list = EnumInstances(options.ip, drasd, ret_cim_inst=True)
+ if len(drasd_list) < 1:
+ raise Exception("%s returned %i instances, expected at least 1"\
+ %(drasd, len(drasd_list)))
- found_rasd = None
- for rasd in drasd_list:
- guest, dev, status = parse_instance_id(rasd['InstanceID'])
- if status != PASS:
- raise Exception("Unable to parse InstanceID: %s" \
- % rasd['InstanceID'])
- if guest == default_dom:
- if rasd['EmulatedType'] == exp_emu_type:
- found_rasd = rasd
- status = PASS
- break
- else:
- raise Exception("EmulatedType Mismatch: got %d,"
- "expected %d" %(rasd['EmulatedType'],
- exp_emu_type))
+ found_rasd = None
+ for rasd in drasd_list:
+ guest, dev, status = parse_instance_id(rasd['InstanceID'])
+ if status != PASS:
+ raise Exception("Unable to parse InstanceID: %s" \
+ % rasd['InstanceID'])
+ if guest == default_dom:
+ if rasd['EmulatedType'] == exp_emu_type:
+ found_rasd = rasd
+ status = PASS
+ break
+ else:
+ raise Exception("EmulatedType Mismatch: got %d,"
+ "expected %d" %(rasd['EmulatedType'],
+ exp_emu_type))
- if found_rasd is None:
- raise Exception("DiskRASD for defined dom was not found")
+ if found_rasd is None:
+ raise Exception("DiskRASD for defined dom was not found")
- cxml.undefine(options.ip)
+ cxml.undefine(options.ip)
except Exception, detail:
logger.error("Exception: %s", detail)
13 years, 9 months
[PATCH] [TEST] Updated test case for VSI
by Sharad Mishra
# HG changeset patch
# User Sharad Mishra <snmishra(a)us.ibm.com>
# Date 1295017601 28800
# Node ID a226c6d2bccad847da03d29746b8f2c821957517
# Parent bb3fbbcdfd16998662bc8187dcdac95f959473d0
[TEST] Updated test case for VSI.
libvirt-cim netpool template was changed to support VSI
and this test has been updated to reflect the new template
count.
Signed-off-by: Sharad Mishra <snmishra(a)us.ibm.com>
diff -r bb3fbbcdfd16 -r a226c6d2bcca suites/libvirt-cim/lib/XenKvmLib/rasd.py
--- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py Fri Jan 14 06:56:10 2011 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py Fri Jan 14 07:06:41 2011 -0800
@@ -395,11 +395,14 @@
def get_exp_net_rasd_len(virt, rev, id):
net_rasd_template_changes = 861
net_rasd_direct_nettype_changes = 1029
+ net_rasd_vsi_nettype_changes = 1043
# NetRASD record for Direct NetType 1 for each min, max, incr, default
exp_direct = 4
exp_base_num = 4
+ dev_types = 2
+ net_types = 3
if id == "NetworkPool/0":
pool_types = 3
@@ -408,14 +411,13 @@
return (exp_base_num * pool_types) + (exp_base_num * forward_modes)
if rev >= net_rasd_template_changes:
- dev_types = 2
- net_types = 3
exp_base_num = exp_base_num * dev_types * net_types
- if rev >= net_rasd_direct_nettype_changes:
- exp_base_num += exp_direct
+ if rev >= net_rasd_direct_nettype_changes:
+ exp_base_num += exp_direct
- return exp_base_num
+ if rev >= net_rasd_vsi_nettype_changes:
+ exp_base_num = 4 * (dev_types * net_types + exp_direct)
return exp_base_num
13 years, 9 months
[PATCH] [TEST] Updated this testcase to focus on pause/resume
by Sharad Mishra
# HG changeset patch
# User Sharad Mishra <snmishra(a)us.ibm.com>
# Date 1295017609 28800
# Node ID 2c9689c31d42c2320ecca7a4283bd564c5a27737
# Parent a226c6d2bccad847da03d29746b8f2c821957517
[TEST] Updated this testcase to focus on pause/resume.
This test was running suspend and reboot which is not
supported on all hypervisor types. So changed this test
case to focus on pause and resume.
Signed-off-by: Sharad Mishra <snmishra(a)us.ibm.com>
diff -r a226c6d2bcca -r 2c9689c31d42 suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Fri Jan 14 07:06:41 2011 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Fri Jan 14 07:06:49 2011 -0800
@@ -59,7 +59,7 @@
server = options.ip
virt = options.virt
- tc_scen = ['Start', 'Suspend', 'Reboot']
+ tc_scen = ['Start', 'Paused', 'Resume']
action_passed = PASS
try:
@@ -73,10 +73,10 @@
for action in tc_scen:
if action == "Start":
status = cxml.cim_start(server)
- elif action == "Suspend":
- status = cxml.cim_suspend(server)
- elif action == "Reboot":
- status = cxml.cim_reboot(server)
+ elif action == "Paused":
+ status = cxml.cim_pause(server)
+ elif action == "Resume":
+ status = cxml.cim_reset(server)
else:
raise Exception("Unexpected state change: %s" % action)
13 years, 9 months