[Libvirt-cim] [PATCH] [TEST] Modify HostedDependency.01&02 to call new EnumInstances

Deepti B Kalakeri deeptik at linux.vnet.ibm.com
Mon Oct 13 13:39:52 UTC 2008



yunguol at cn.ibm.com wrote:
> # HG changeset patch
> # User Guolian Yun <yunguol at cn.ibm.com>
> # Date 1223886561 25200
> # Node ID 88ef09807e84f327743be1f7b51718af9526dea5
> # Parent  c7eaf17bd591f313b93ff2b2087cee11b25789e0
> [TEST] Modify HostedDependency.01&02 to call new EnumInstances
>
> Signed-off-by: Guolian Yun <yunguol at cn.ibm.com>
>
> diff -r c7eaf17bd591 -r 88ef09807e84 suites/libvirt-cim/cimtest/HostedDependency/01_forward.py
> --- a/suites/libvirt-cim/cimtest/HostedDependency/01_forward.py	Fri Oct 10 03:08:12 2008 -0700
> +++ b/suites/libvirt-cim/cimtest/HostedDependency/01_forward.py	Mon Oct 13 01:29:21 2008 -0700
> @@ -82,10 +82,10 @@
>      if status != PASS:
>          cxml.undefine(server)
>          return status
> -
> -    keys = ['Name', 'CreationClassName']
> +   
> +    cs_class = get_typed_class(options.virt, 'ComputerSystem')
>      try: 
> -        cs = enumclass.enumerate(server, 'ComputerSystem', keys, virt)
> +        cs = enumclass.EnumInstances(server, cs_class)
>      except Exception,detail:
>          logger.error(CIM_ERROR_ENUMERATE, 'ComputerSystem')
>   
You can use cs_class instead of hardcoding the 'ComputerSystem'.
otherwise +1 for me.
>          logger.error("Exception: %s", detail)
> diff -r c7eaf17bd591 -r 88ef09807e84 suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py
> --- a/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py	Fri Oct 10 03:08:12 2008 -0700
> +++ b/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py	Mon Oct 13 01:29:21 2008 -0700
> @@ -89,8 +89,8 @@
>              cxml.undefine(server)
>              return status
>
> -        keys = ['Name', 'CreationClassName']
> -        cs = enumclass.enumerate(server, 'ComputerSystem', keys, virt)
> +        cs_class = get_typed_class(options.virt, 'ComputerSystem')
> +        cs = enumclass.EnumInstances(server, cs_class)
>          if virt == 'Xen' or options.virt == 'XenFV':
>              # Xen honors additional domain-0
>              cs_list_len = 2
>   
+1 for me the 01_reverse.py changes.
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
>   




More information about the Libvirt-cim mailing list