[katello-devel] setting UUIDs on new consumers?

Bryan Kearney bkearney at redhat.com
Mon Oct 21 15:09:51 UTC 2013


On 10/21/2013 10:37 AM, Christopher Duryee wrote:
> I'm trying to set UUIDs on systems when they are created in katello. When python-rhsm calls candlepin directly, it passes up a "uuid" attribute on the consumer creation request that gets used.


This is only done when you are registering against a pre-existing UUID.

>
> However, to get this to work with katello, I wasn't able to just add the "uuid" attribute to get passed through. Instead, I had to pass my UUID as "new_uuid", and map it back to "uuid" when calling create() in app/lib/resources/candlepin.rb. Katello seems to get stuck in a loop when I use just "uuid" in my request, possibly from this code in the lazy_accessor initializer in app/models/glue/candlepin/consumer.rb:
>
> if uuid
>    consumer_json = Resources::Candlepin::Consumer.get(uuid)
>    convert_from_cp_fields(consumer_json)
> end
>
> Assuming this is the area I need to fix, is there a way to recognize a "uuid" attribute that's passed in from a creation request, so I can pass it through?

The only special case should be in the register command. I dont know if 
that is answering your question.

-- bk




More information about the katello-devel mailing list