<html><body>
<p>+1<br>
<br>
Sharad Mishra<br>
Open Virtualization<br>
Linux Technology Center<br>
IBM<br>
<br>
<tt>libvirt-cim-bounces@redhat.com wrote on 10/19/2010 11:06:31 AM:<br>
<br>
> Chip Vincent <cvincent@linux.vnet.ibm.com> </tt><br>
<tt>> Sent by: libvirt-cim-bounces@redhat.com<br>
> </tt><br>
<tt>> 10/19/10 11:06 AM</tt><br>
<tt>> <br>
> Please respond to<br>
> List for discussion and development of libvirt CIM <libvirt-cim@redhat.com></tt><br>
<tt>> <br>
> To</tt><br>
<tt>> <br>
> List for discussion and development of libvirt CIM <libvirt-cim@redhat.com></tt><br>
<tt>> <br>
> cc</tt><br>
<tt>> <br>
> Subject</tt><br>
<tt>> <br>
> [Libvirt-cim] [PATCH] Return profiles according to role</tt><br>
<tt>> <br>
> # HG changeset patch<br>
> # User Chip Vincent <cvincent@us.ibm.com><br>
> # Date 1287510529 14400<br>
> # Node ID 756b9699be781c251b45ba8e4d9163ef485719e0<br>
> # Parent  13c765505895c9de34908d8f4d02c9a67fe4b907<br>
> Return profiles according to role<br>
> <br>
> Signed-off-by: Chip Vincent <cvincent@us.ibm.com><br>
> <br>
> diff -r 13c765505895 -r 756b9699be78 src/Virt_ReferencedProfile.c<br>
> --- a/src/Virt_ReferencedProfile.c      Thu Oct 14 11:51:44 2010 -0400<br>
> +++ b/src/Virt_ReferencedProfile.c      Tue Oct 19 13:48:49 2010 -0400<br>
> @@ -126,7 +126,14 @@<br>
>          if (conn == NULL)<br>
>                  goto out;<br>
>  <br>
> -        s = get_scoping_prof_by_source(ref, info, conn, source, list);<br>
> +        // NOTE: Autonomous or scoping profiles are dependent profiles.<br>
> +       // Return them according to role<br>
> +       if ((!source->scoping_profile ||<br>
> +               STREQC(source->reg_name, "System Virtualization")) &&<br>
> +               info->role && !STREQC(info->role, "Dependent"))<br>
> +               goto out;<br>
> +<br>
> +       s = get_scoping_prof_by_source(ref, info, conn, source, list);<br>
>          if (s.rc != CMPI_RC_OK)<br>
>                  goto out;<br>
> <br>
> -- <br>
> Chip Vincent<br>
> Open Virtualization, Linux Technology Center<br>
> IBM Systems & Technology Group<br>
> phone: 919-254-4482, T/L 444-4482<br>
> email: cvincent@us.ibm.com<br>
> <br>
> _______________________________________________<br>
> Libvirt-cim mailing list<br>
> Libvirt-cim@redhat.com<br>
> <a href="https://www.redhat.com/mailman/listinfo/libvirt-cim">https://www.redhat.com/mailman/listinfo/libvirt-cim</a><br>
</tt></body></html>