# HG changeset patch
# User Chip Vincent <cvincent(a)us.ibm.com>
# Date 1287510529 14400
# Node ID 756b9699be781c251b45ba8e4d9163ef485719e0
# Parent 13c765505895c9de34908d8f4d02c9a67fe4b907
Return profiles according to role
Signed-off-by: Chip Vincent <cvincent(a)us.ibm.com>
diff -r 13c765505895 -r 756b9699be78 src/Virt_ReferencedProfile.c
--- a/src/Virt_ReferencedProfile.c Thu Oct 14 11:51:44 2010 -0400
+++ b/src/Virt_ReferencedProfile.c Tue Oct 19 13:48:49 2010 -0400
@@ -126,7 +126,14 @@
if (conn == NULL)
goto out;
- s = get_scoping_prof_by_source(ref, info, conn, source, list);
+ // NOTE: Autonomous or scoping profiles are dependent profiles.
+ // Return them according to role
+ if ((!source->scoping_profile ||
+ STREQC(source->reg_name, "System Virtualization"))
&&
+ info->role && !STREQC(info->role, "Dependent"))
+ goto out;
+
+ s = get_scoping_prof_by_source(ref, info, conn, source, list);
if (s.rc != CMPI_RC_OK)
goto out;
--
Chip Vincent
Open Virtualization, Linux Technology Center
IBM Systems & Technology Group
phone: 919-254-4482, T/L 444-4482
email: cvincent(a)us.ibm.com