[katello-devel] Custom Attributes for a System

Dmitri Dolguikh dmitri at redhat.com
Thu Aug 16 08:37:06 UTC 2012


On 16/08/12 04:59 AM, Jordan O'Mara wrote:
>
> ----- Original Message -----
>> On 08/15/2012 04:42 PM, Adam Price wrote:
>>> after looking at the email thread about key-value pairs for a
>>> system, i put together a small design doc outlining what this
>>> change entails. please look it over and make some comments.
>>>
>>> https://fedorahosted.org/katello/wiki/SystemsCustomAttributesDesign
>>>
>>> Brno guys, please specifically look over the cli portion. i want to
>>> make sure we stay with the same command-style (naming, etc) as the
>>> rest of the cli. thanks.
>>>
>> ouple of things:
>>
>> 1) How do I extend this to work for more than just systems? i would
>> like
>> to see this on many objects.
>> 2) How do I set up all objects (in an org mind you) to add an
>> attribute
>> on each object. For example, In my org I would like all systems to
>> have
>> the AssetTag and Project fields. Then, whoever is defining a system
>> will
>> see these fields. As a bonus, can I give them a type and some type of
>> regex to validate?
> I think these two problems could be solved with the same design. Make the attributes table generic
> and give any object you want to "Factify" and add a foreign key to that table.
+1, but I think we need an additional table to constrain what custom 
attributes are available on what object.
>
> Then, you can create arbitrary rules for fact summation. For example, a system's facts are the union of
>
> the system + the org + the environment
>
> Or something like that
>
>> 3) can I gemify this to share it with aeolus?
> IMO this design (as it is now) is not easily exportable to other projects since its basically a single AR model and some FKs
I think it's doable - there are rails plugins that extend project 
schema. Tom - did you figure out what retrieval/addition/removal of 
key-values is going to look like from API perspective?

-d




More information about the katello-devel mailing list