[Libvirt-cim] [PATCH] [TEST] Updating 01_enum_crs.py of RedirectionService

Deepti B Kalakeri deeptik at linux.vnet.ibm.com
Mon Nov 3 10:40:56 UTC 2008


Please ignore this patch, the revision number needs to be 725 and not 723.
I have submitted patch with correct revision is submitted.

Thanks and Regards,
Deepti.

Deepti B. Kalakeri wrote:
> # HG changeset patch
> # User Deepti B. Kalakeri<deeptik at linux.vnet.ibm.com>
> # Date 1225474164 25200
> # Node ID e3bfd8360898b9b7a940d170667638c487793883
> # Parent  d1614c101c281b57bd2bc98dfb6625f790748e54
> [TEST] Updating 01_enum_crs.py of RedirectionService .
>
> Updating 01_enum_crs.py to use appropriate 'MaxConcurrentEnabledSAPs' depending on the
> revision of provider < 723
>
> Signed-off-by: Deepti B. Kalakeri <deeptik at linux.vnet.ibm.com>
>
> diff -r d1614c101c28 -r e3bfd8360898 suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py
> --- a/suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py	Wed Oct 29 20:11:47 2008 -0700
> +++ b/suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py	Fri Oct 31 10:29:24 2008 -0700
> @@ -26,17 +26,19 @@
>  #
>
>  import sys
> -from VirtLib.live import domain_list
> +from sets import Set
> +from XenKvmLib.xm_virt_util import domain_list, active_domain_list
>  from XenKvmLib.enumclass import EnumInstances
>  from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
>  from XenKvmLib.classes import get_typed_class
>  from XenKvmLib.const import do_main 
>  from CimTest.ReturnCodes import PASS, FAIL
>  from XenKvmLib.common_util import get_host_info
> +from XenKvmLib.const import get_provider_version 
>
>  SHAREMODE = 3
>  REDIRECTION_SER_TYPE = 3
> -MAX_SAP_SESSIONS = 65535
> +CRS_MAX_SAP_REV = 723 
>
>  sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
>  @do_main(sup_types)
> @@ -50,6 +52,19 @@
>
>      cname = 'ConsoleRedirectionService'
>      classname = get_typed_class(virt, cname)
> +
> +    cim_rev, changeset = get_provider_version(virt, server)
> +    #  This branch should be removed once the F9 rpm has changes with
> +    #  Revision >= 723, and max_sap_sessions = 65535 should be used
> +    #  for verification.
> +    if cim_rev < CRS_MAX_SAP_REV:
> +        inactive_active_doms = domain_list(server, virt)
> +        active_doms = active_domain_list(server, virt)
> +        inactive_doms = len(Set(inactive_active_doms) - Set(active_doms))
> +        max_sap_sessions =  2 * inactive_doms
> +    else:
> +        max_sap_sessions = 65535
> +
>      crs_list =  {
>                     'ElementName'             : cname,
>                     'SystemCreationClassName' : host_cn, 
> @@ -61,7 +76,7 @@
>                     'EnabledState'            : 2,
>                     'EnabledDefault'          : 2,
>                     'RequestedState'          : 12,
> -                   'MaxConcurrentEnabledSAPs': MAX_SAP_SESSIONS
> +                   'MaxConcurrentEnabledSAPs': max_sap_sessions
>                  }
>
>      try:
>
> _______________________________________________
> 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