[Pulp-list] Consumer Group - quick question on APIs

Sayli Karmarkar skarmark at redhat.com
Wed Apr 11 19:34:23 UTC 2012


On 04/10/2012 02:47 PM, Brad Buckingham wrote:
> Hi All,
>
> I was looking over the Consumer Group APIs 
> (https://fedorahosted.org/pulp/wiki/UGREST-ConsumerGroups) and have a 
> few questions.
>
> For the 'Create', 'Add consumer to a group' and 'Delete consumer from 
> a group' APIs, is it possible to provide a list of consumer IDs in the 
> request to Pulp?
>
>     In many scenarios (create/add/delete), we'll already know a list 
> of consumers; therefore, we would prefer to minimize the number of 
> requests to the Pulp server.

For create, you can add multiple consumers at the same time. For add and 
deleting consumer right now, you can't. The reason we did not add it was 
because it is hard to check and raise exception for key-value attribute 
conflict between multiple consumers and consumer groups. For example, if 
you try to add a consumer with conflicting key-value to consumer group, 
you get an exception saying "Consumer 'bla' cannot be added to 
consumergroup 'bla-bla' because of the following conflicting key-value 
pairs. You need to delete these key-values from the consumer in order to 
add it to this consumergroup: 'conflicting-key-values' "

I guess we can change it store all conflicting consumer key-values in a 
dictionary and return it, or just return consumer list and let user 
figure out which key-values are conflicting. I will make a note to think 
about this for next version, but if it can't wait till then, please open 
an RFE.
>
> For the 'Bind repository to consumer group' API, is this binding 
> required if we plan to use the consumer group install/update/uninstall 
> APIs or will pulp use the repositories that are already bound to a 
> given consumer?

Think of a consumergroup bind as just a group operation to bind repos to 
multiple consumers. If consumers in a group are already bound to certain 
repos, that will still be intact, so answer to your question is binding 
a consumergroup is not required to install packages if you want to use 
repositories that are already bound to individual consumers.
>
>     Note: we'll want to leverage these install/update/uninstall APIs 
> to minimize the requests to the pulp server; however, since each 
> consumer will already have repositories bound to them, it would be 
> ideal to leverage those consumer-repo bindings.
>
> Thanks,
> Brad
>
> _______________________________________________
> Pulp-list mailing list
> Pulp-list at redhat.com
> https://www.redhat.com/mailman/listinfo/pulp-list


-- 
Sayli Karmarkar

Software Engineer
Systems Management and Cloud Enablement
http://www.redhat.com





More information about the Pulp-list mailing list