[Libvirt-cim] [PATCH] [TEST] Look for SNIA profile while gathering SLP profiles

Chip Vincent cvincent at linux.vnet.ibm.com
Wed Mar 30 14:53:51 UTC 2011


+1. Thanks.

On 03/29/2011 01:49 PM, Sharad Mishra wrote:
> # HG changeset patch
> # User Sharad Mishra<snmishra at us.ibm.com>
> # Date 1301420804 25200
> # Node ID 4f37c9bb6b41d678f0cd019dded1c35cd617e339
> # Parent  73e89596e15d229befd24a80f84806153b924a17
> [TEST] Look for SNIA profile while gathering SLP profiles.
>
> This cimtest was only looking at DMTF profiles and was not parsing SNIA profiles correctly. This patch fixes that issue.
>
> Signed-off-by: Sharad Mishra<snmishra at us.ibm.com>
>
> diff -r 73e89596e15d -r 4f37c9bb6b41 suites/libvirt-cim/cimtest/Profile/04_verify_libvirt_cim_slp_profiles.py
> --- a/suites/libvirt-cim/cimtest/Profile/04_verify_libvirt_cim_slp_profiles.py	Tue Mar 29 10:23:32 2011 -0700
> +++ b/suites/libvirt-cim/cimtest/Profile/04_verify_libvirt_cim_slp_profiles.py	Tue Mar 29 10:46:44 2011 -0700
> @@ -89,6 +89,16 @@
>           lines = line.split("RegisteredProfilesSupported")
>           dmtf_profiles = lines[1].split("DMTF")
>           for profile in dmtf_profiles:
> +            snia = profile.split(",SNIA")
> +            for sprofile in snia:
> +                tmp_prof =  sprofile.rsplit(":", 1)
> +                if len(tmp_prof)<  2:
> +                    return []
> +
> +                temp_reg_ele =  tmp_prof[1].rstrip(",")
> +                reg_prof_name = temp_reg_ele.rstrip(")")
> +                slp_profile_list.append(reg_prof_name)
> +
>               tmp_prof =  profile.rsplit(":", 1)
>               if len(tmp_prof)<  2:
>                   return []
> @@ -163,6 +173,8 @@
>       # Make sure all the Libvirt-CIM profiles are advertised via slp
>       if (libvirt_cim_reg_list)<= (slp_profile_list):
>           logger.info("Successfully verified the Libvirt-CIM profiles")
> +        logger.info("Slp returned profile -->  %s,\n Libvirt-CIM expected "
> +                     "profiles %s", slp_profile_list, libvirt_cim_reg_list)
>           return PASS
>
>       logger.error("Mismatch in the profiles registered")
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim

-- 
Chip Vincent
Open Virtualization
IBM Linux Technology Center
cvincent at linux.vnet.ibm.com




More information about the Libvirt-cim mailing list