[PATCH] [TEST] .2# rebased VirtualSystemSettingDataComponent.02 for XenFV & KVM support

# HG changeset patch # User Guolian Yun <yunguol@cn.ibm.com> # Date 1208746833 -28800 # Node ID 359a198f236c0733587423009200fcde5c2a02f3 # Parent 0d31dff13ae341fd6515dc844ee98c7b5300b71d [TEST] .2# rebased VirtualSystemSettingDataComponent.02 for XenFV & KVM support Signed-off-by: Guolian Yun <yunguol@cn.ibm.com> diff -r 0d31dff13ae3 -r 359a198f236c suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py --- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py Fri Apr 18 17:00:16 2008 +0800 +++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py Mon Apr 21 11:00:33 2008 +0800 @@ -47,23 +47,21 @@ import sys from XenKvmLib import enumclass from VirtLib import utils -from XenKvmLib.test_doms import test_domain_function, destroy_and_undefine_all -from XenKvmLib import test_xml -from XenKvmLib.test_xml import testxml from CimTest import Globals from XenKvmLib import assoc +from XenKvmLib.test_doms import destroy_and_undefine_all +from XenKvmLib import vxml +from XenKvmLib.classes import get_typed_class from XenKvmLib.rasd import InstId_err from CimTest.Globals import log_param, logger, do_main from CimTest.ReturnCodes import PASS, FAIL -sup_types = ['Xen'] +sup_types = ['Xen', 'XenFV', 'KVM'] test_dom = "VSSDC_dom" test_vcpus = 1 test_mem = 128 test_mac = "00:11:22:33:44:aa" -test_disk = 'xvdb' -VSType = "Xen" def check_rasd_values(id, exp_id): try: @@ -77,7 +75,7 @@ return PASS -def assoc_values(ip, assoc_info): +def assoc_values(ip, assoc_info, virt="Xen"): """ The association info of Xen_VirtualSystemSettingDataComponent is @@ -95,17 +93,22 @@ logger.error("No RASD instances returned") return FAIL + proc_cn = get_typed_class(virt, 'ProcResourceAllocationSettingData') + net_cn = get_typed_class(virt, 'NetResourceAllocationSettingData') + disk_cn = get_typed_class(virt, 'DiskResourceAllocationSettingData') + mem_cn = get_typed_class(virt, 'MemResourceAllocationSettingData') + for inst in assoc_info: - if inst.classname == 'Xen_ProcResourceAllocationSettingData': + if inst.classname == proc_cn: status = check_rasd_values(inst['InstanceID'], rasd_list['proc_rasd']) - elif inst.classname == 'Xen_NetResourceAllocationSettingData': + elif inst.classname == net_cn: status = check_rasd_values(inst['InstanceID'], rasd_list['net_rasd']) - elif inst.classname == 'Xen_DiskResourceAllocationSettingData': + elif inst.classname == disk_cn: status = check_rasd_values(inst['InstanceID'], rasd_list['disk_rasd']) - elif inst.classname == 'Xen_MemResourceAllocationSettingData': + elif inst.classname == mem_cn: status = check_rasd_values(inst['InstanceID'], rasd_list['mem_rasd']) else: @@ -129,32 +132,41 @@ log_param() destroy_and_undefine_all(options.ip) - test_xml1 = testxml(test_dom, mem = test_mem, \ - vcpus = test_vcpus, \ - mac = test_mac, \ - disk = test_disk) - ret = test_domain_function(test_xml1, options.ip, cmd = "create") + global test_disk + if options.virt == "Xen": + test_disk = "xvdb" + else: + test_disk = "hdb" + virt_xml = vxml.get_class(options.virt) + cxml = virt_xml(test_dom, vcpus = test_vcpus, mac = test_mac, disk = test_disk) + ret = cxml.create(options.ip) if not ret: logger.error("Failed to create the dom: %s", test_dom) status = FAIL return status - instIdval = "%s:%s" % (VSType, test_dom) + if options.virt == "Xen" or options.virt == "XenFV": + instIdval = "Xen:%s" % test_dom + else: + instIdval = "KVM:%s" % test_dom + try: assoc_info = assoc.AssociatorNames(options.ip, - 'Xen_VirtualSystemSettingDataComponent', - 'Xen_VirtualSystemSettingData', - InstanceID = instIdval) - status = assoc_values(options.ip, assoc_info) + 'VirtualSystemSettingDataComponent', + 'VirtualSystemSettingData', + options.virt, + InstanceID = instIdval) + status = assoc_values(options.ip, assoc_info, options.virt) except Exception, detail : logger.error(Globals.CIM_ERROR_ASSOCIATORS, - 'Xen_VirtualSystemSettingDataComponent') + 'VirtualSystemSettingDataComponent') logger.error("Exception : %s" % detail) status = FAIL - test_domain_function(test_dom, options.ip, "destroy") + cxml.destroy(options.ip) + cxml.undefine(options.ip) return status if __name__ == "__main__":

Guo Lian Yun wrote:
# HG changeset patch # User Guolian Yun <yunguol@cn.ibm.com> # Date 1208746833 -28800 # Node ID 359a198f236c0733587423009200fcde5c2a02f3 # Parent 0d31dff13ae341fd6515dc844ee98c7b5300b71d [TEST] .2# rebased VirtualSystemSettingDataComponent.02 for XenFV & KVM support
Signed-off-by: Guolian Yun <yunguol@cn.ibm.com>
This fails for me on F9 using KVM and latest sources. -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

libvirt-cim-bounces@redhat.com wrote on 2008-04-21 23:16:27:
Guo Lian Yun wrote:
# HG changeset patch # User Guolian Yun <yunguol@cn.ibm.com> # Date 1208746833 -28800 # Node ID 359a198f236c0733587423009200fcde5c2a02f3 # Parent 0d31dff13ae341fd6515dc844ee98c7b5300b71d [TEST] .2# rebased VirtualSystemSettingDataComponent.02 for XenFV & KVM support
Signed-off-by: Guolian Yun <yunguol@cn.ibm.com>
This fails for me on F9 using KVM and latest sources.
This fails because of the InstanceID of ProcResourceAllocationSettingData, the "proc_rasd" is set by '%s/%s' %(test_dom,0) in 02, which can be passed on Xen, actually, the InstanceID has to be update as %(test_dom, "proc"), right? Then it passes on KVM, fails on Xen. Below is the output of wbemein. wbemein http://root:password@localhost:5988/root/virt:Xen_ProcResourceAllocationSett... localhost:5988/root/virt:Xen_ProcResourceAllocationSettingData.InstanceID="Domain-0/0" localhost:5988/root/virt:Xen_ProcResourceAllocationSettingData.InstanceID="Domain-0/1" I will fix the InstanceID in tc, then would you please apply it?
-- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com
_______________________________________________ Libvirt-cim mailing list Libvirt-cim@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim

Guo Lian Yun wrote:
libvirt-cim-bounces@redhat.com wrote on 2008-04-21 23:16:27:
Guo Lian Yun wrote:
# HG changeset patch # User Guolian Yun <yunguol@cn.ibm.com> # Date 1208746833 -28800 # Node ID 359a198f236c0733587423009200fcde5c2a02f3 # Parent 0d31dff13ae341fd6515dc844ee98c7b5300b71d [TEST] .2# rebased VirtualSystemSettingDataComponent.02 for XenFV & KVM support
Signed-off-by: Guolian Yun <yunguol@cn.ibm.com>
This fails for me on F9 using KVM and latest sources.
This fails because of the InstanceID of ProcResourceAllocationSettingData, the "proc_rasd" is set by '%s/%s' %(test_dom,0) in 02, which can be passed on Xen, actually, the InstanceID has to be update as %(test_dom, "proc"), right? Then it passes on KVM, fails on Xen. Below is the output of wbemein.
I forgot to note in my previous mail - the patch worked for me when I tested with Xen.
wbemein http://root:password@localhost:5988/root/virt:Xen_ProcResourceAllocationSett...
localhost:5988/root/virt:Xen_ProcResourceAllocationSettingData.InstanceID="Domain-0/0"
localhost:5988/root/virt:Xen_ProcResourceAllocationSettingData.InstanceID="Domain-0/1"
Are you testing with current sources?
I will fix the InstanceID in tc, then would you please apply it?
I didn't apply that patch yet - the commit message confused me (see my other mail). Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

libvirt-cim-bounces@redhat.com wrote on 2008-04-24 03:10:32:
Guo Lian Yun wrote:
libvirt-cim-bounces@redhat.com wrote on 2008-04-21 23:16:27:
Guo Lian Yun wrote:
# HG changeset patch # User Guolian Yun <yunguol@cn.ibm.com> # Date 1208746833 -28800 # Node ID 359a198f236c0733587423009200fcde5c2a02f3 # Parent 0d31dff13ae341fd6515dc844ee98c7b5300b71d [TEST] .2# rebased VirtualSystemSettingDataComponent.02 for XenFV & KVM support
Signed-off-by: Guolian Yun <yunguol@cn.ibm.com>
This fails for me on F9 using KVM and latest sources.
This fails because of the InstanceID of ProcResourceAllocationSettingData, the "proc_rasd" is set by '%s/%s' %(test_dom,0) in 02, which can be
passed on Xen, actually, the InstanceID has to be update as %(test_dom, "proc"), right? Then it passes on KVM, fails on Xen. Below is the output of wbemein.
I forgot to note in my previous mail - the patch worked for me when I tested with Xen.
Xen_ProcResourceAllocationSettingData
localhost:5988/root/virt:Xen_ProcResourceAllocationSettingData.
InstanceID="Domain-0/0"
localhost:5988/root/virt:Xen_ProcResourceAllocationSettingData.
InstanceID="Domain-0/1"
Are you testing with current sources?
I will fix the InstanceID in tc, then would you please apply it?
I didn't apply that patch yet - the commit message confused me (see my other mail).
With the latest sources, the patch together with the previous fix work of me on both Xen and KVM now. Sorry for my message confuses you. So I resubmit a new patch consisted the InstanceID fix and KVM & XenFV support.
Thanks!
-- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com
_______________________________________________ Libvirt-cim mailing list Libvirt-cim@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim

I didn't apply that patch yet - the commit message confused me (see my other mail).
With the latest sources, the patch together with the previous fix work of me on both Xen and KVM now. Sorry for my message confuses you.
No problem - the new patch looks good. =)
So I resubmit a new patch consisted the InstanceID fix and KVM & XenFV support.
I noticed this test is failing on F9 with the release rpm. But I applied it since it works KVM and XenFV upstream sources. Could you work up a patch that branches the test based on the changeset revision? Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

libvirt-cim-bounces@redhat.com wrote on 2008-04-25 00:34:58:
I didn't apply that patch yet - the commit message confused me (see
my
other mail).
With the latest sources, the patch together with the previous fix work of me on both Xen and KVM now. Sorry for my message confuses you.
No problem - the new patch looks good. =)
So I resubmit a new patch consisted the InstanceID fix and KVM & XenFV support.
I noticed this test is failing on F9 with the release rpm. But I applied it since it works KVM and XenFV upstream sources.
Could you work up a patch that branches the test based on the changeset revision? Thanks!
Done! Thanks!
-- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com
_______________________________________________ Libvirt-cim mailing list Libvirt-cim@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim
participants (2)
-
Guo Lian Yun
-
Kaitlin Rupert