[Libvirt-cim] [PATCH 08/10] cimtest: Add controller pool support

Xu Wang gesaint at linux.vnet.ibm.com
Mon Apr 14 05:57:02 UTC 2014


于 2014年04月05日 00:12, John Ferlan 写道:
> Add support for controller pools
>
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>   suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py | 4 ++++
>   suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py | 1 +
>   suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py       | 3 +++
>   suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py  | 7 ++++++-
>   4 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py b/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py
> index 133b8a1..6cc874a 100644
> --- a/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py
> +++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py
> @@ -36,6 +36,7 @@ from XenKvmLib.classes import get_typed_class
>
>   sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
>   input_graphics_pool_rev = 757
> +controller_pool_rev = 1312
>
>   def enum_pools(ip, ac_cn, virt):
>       pt = [get_typed_class(virt, 'MemoryPool'),
> @@ -48,6 +49,9 @@ def enum_pools(ip, ac_cn, virt):
>             pt.append(get_typed_class(virt, 'GraphicsPool'))
>             pt.append(get_typed_class(virt, 'InputPool'))
>
> +    if curr_rev >= controller_pool_rev and virt == 'KVM':
> +        pt.append(get_typed_class(virt, 'ControllerPool'))
> +
I have applied all patches for libvirt-cim you submitted and run cimtest 
with these 10 patches.
But here I got: curr_rev=1309, controller_pool_rev=1312, (of course that 
caused if missed)
and virt=KVM. Could you give me some suggestion about that? What should 
I do to get the
right answer or, if something around the code should be updated?
>       pools = {}
>
>       try:
> diff --git a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py
> index 8a96677..62f3112 100644
> --- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py
> +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py
> @@ -54,6 +54,7 @@ def set_pool_info(server, virt, valid_elc_id):
>           valid_elc_id = append_to_list(server, virt, "NetworkPool", valid_elc_id)
>           valid_elc_id = append_to_list(server, virt, "GraphicsPool", valid_elc_id)
>           valid_elc_id = append_to_list(server, virt, "InputPool", valid_elc_id)
> +        valid_elc_id = append_to_list(server, virt, "ControllerPool", valid_elc_id)
>
>       except Exception, details:
>           logger.error("Exception: In fn set_pool_info(): %s", details)
> diff --git a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py
> index bd9c42b..614a795 100644
> --- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py
> +++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py
> @@ -96,6 +96,9 @@ def pool_init_list(virt, pool_assoc, net_name, dp_InstID):
>           exp_pllist[mpool] = 'MemoryPool/0'
>           exp_pllist[gpool] = 'GraphicsPool/0'
>           exp_pllist[ipool] = 'InputPool/0'
> +    if virt == 'KVM':
> +        cpool = get_typed_class(virt, 'ControllerPool')
> +        exp_pllist[cpool] = 'ControllerPool/0'
>
>       for p_inst in pool_assoc:
>           CName = p_inst.classname
> diff --git a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py
> index 2c6cbaf..cf2c999 100755
> --- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py
> +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py
> @@ -36,6 +36,8 @@ from XenKvmLib.const import do_main, default_pool_name
>   from XenKvmLib.classes import get_typed_class
>
>   input_graphics_pool_rev = 757
> +controller_pool_rev = 1312
> +
>   sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
>   @do_main(sup_types)
>   def main():
> @@ -71,6 +73,7 @@ def main():
>
>       mpool =  get_typed_class(virt, 'MemoryPool')
>       exp_pllist = { mpool   : ['MemoryPool/0'] }
> +    curr_cim_rev, changeset = get_provider_version(virt, options.ip)
>       if virt != 'LXC':
>           npool =  get_typed_class(virt, 'NetworkPool')
>           dpool =  get_typed_class(virt, 'DiskPool')
> @@ -79,12 +82,14 @@ def main():
>           exp_pllist[npool] = ['NetworkPool/%s' %default_network_name]
>           exp_pllist[ppool] = ['ProcessorPool/0']
>
> -        curr_cim_rev, changeset = get_provider_version(virt, options.ip)
>           if curr_cim_rev >= input_graphics_pool_rev:
>               ipool = get_typed_class(virt, 'InputPool')
>               gpool = get_typed_class(virt, 'GraphicsPool')
>               exp_pllist[ipool] = ['InputPool/0']
>               exp_pllist[gpool] = ['GraphicsPool/0']
> +    if curr_cim_rev >= controller_pool_rev and virt == 'KVM':
> +        cpool = get_typed_class(virt, 'ControllerPool')
> +        exp_pllist[cpool] = ['ControllerPool/0']
>       
>       try:
>           res_pllist = {}




More information about the Libvirt-cim mailing list