[katello-devel] setting UUIDs on new consumers?

Christopher Duryee cduryee at redhat.com
Mon Oct 21 14:37:52 UTC 2013


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.

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?




More information about the katello-devel mailing list