We mostly sorted this out on IRC at least candlepin side, but for anyone reading, the process of creating the custom pool involves a refresh pools, which is async and returns job detail. It is however swallowed up within the katello API calls that are being used for this process and thus probably hidden.


On Thu, Jun 20, 2013 at 5:49 PM, Og Maciel <omaciel@redhat.com> wrote:
I'm writing a script that uses the Katello API to perform several actions. One of these actions is to create a custom provider/product/repo and then create and register systems to use the available pools. For that I am using the following API call:

https://github.com/omaciel/katello-cli/blob/master/src/katello/client/api/organization.py#L53

The problem I'm facing is that there is a delay between creating the provider/product/repo and pools data becoming available through this API call. If I call it right after creating my content, I get an empty list back. If I wait "long enough" I then get a nice list of pools I can subscribe to.

QUESTION: is there another candlepin API call that I can make to poll information about the available pools? I looked at api/owners/events but that didn't work:

% curl -k -u admin:admin -X GET 'https://$SERVER/katello/api/owners/Org1/events'
{"displayMessage":"Resource not found on the server","errors":["Not found"]}

Thanks in advance for the information,
--
Og Maciel

Supervisor, Quality Engineering
Red Hat, Inc.
+1.646.707.7723
irc: omaciel
_______________________________________________
candlepin mailing list
candlepin@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/candlepin