[Pulp-list] Consumergroup add_keyvalue error handling

Pradeep Kilambi pkilambi at redhat.com
Mon Sep 27 17:37:49 UTC 2010


I would expect the following behavior:

Lets say a consumer group has {location: rdu} and it has consumers A and B

* consumers A and B in that group by default will inherit the group's key value pairs.

* If a consumer A has its own key value pair with same key, that takes precedence over the group key value pair for the consumer.

* consumer B since he doesn't have a location, will default to consumer group's key value.

This way a consumer can have its own location and not effect other consumers in the same group to inherit group values?

~ Prad


----- Original Message -----
From: "Sayli Karmarkar" <skarmark at redhat.com>
To: "pulp-list" <pulp-list at redhat.com>
Sent: Monday, September 27, 2010 1:28:39 PM GMT -05:00 US/Canada Eastern
Subject: [Pulp-list] Consumergroup add_keyvalue error handling

As we decided in key-value attributes deep dive, I am making changes to 
consumergroup to make key_value_pair a property of consumergroup (not 
just consumer). That will make sure that consumers added to the 
consumergroup AFTER setting a key-value property of the group will also 
inherit that property. This complicates error handling a little bit.

Let's say I have consumer1 and consumer2 registered to the pulp-server 
and I add key-value {location : rdu} to consumer1. consumer1 and 
consumer2 belong to consumergroup "testgroup". When I try to add 
key-value {location : sea} to this group, should it -
1. fail saying consumer1 already has  different value for that key ?
2. override key-value for consumer1 to {location : sea} ? (basically 
delete location key from consumer1, so there is no conflict)
3. fail, unless --override flag is set ?

Same error handling will need to be added when adding a consumer to 
consumergroup.

Thoughts? Suggestions?

-- 
Sayli Karmarkar
skarmark at redhat.com

Systems Management
http://www.redhat.com


_______________________________________________
Pulp-list mailing list
Pulp-list at redhat.com
https://www.redhat.com/mailman/listinfo/pulp-list

-- 
 
-- 
Pradeep Kilambi
Red Hat Systems Management
pkilambi at redhat.com
Phone: +1 919 754 4285
RHCE/RHCDS # 805008680430554




More information about the Pulp-list mailing list