[katello-devel] ActiveResource-based Foreman client in Katello

Dmitri Dolguikh dmitri at redhat.com
Mon Sep 24 14:01:01 UTC 2012


On 24/09/12 01:11 PM, Bryan Kearney wrote:
> So.. did we come to a resolution on this yet?
>
> -- bk

I think four people voiced their opinions so far? It's equally divided 
atm, unless someone changed their mind?
-d

>
>
> On 09/24/2012 07:50 AM, Dmitri Dolguikh wrote:
>> On 21/09/12 01:06 PM, Ivan Nečas wrote:
>>>
>>>>> I'm not sure why Petr and Ivan continue repeating this, what are the
>>>>> problems, exactly, that we [are|will be] running into?
>>>> See my previous email about trying using ActiveResource to Candlepin
>>>> and perhaps find a solution to it. Thank you!
>>> I've send you the code on Wednesday on IRC but just in case [1]. If
>>> you find an elegant way how to update releaseVer for consumer that
>>> would be great.
>>>
>>> [1] - https://github.com/iNecas/katello/tree/foreman-ar-spike
>>>
>>> -- Ivan
>> Hey Ivan
>> I took a look at your branch. I see why _path* methods had to be on the
>> instance, @blah.update() uses instance methods to determine the path.
>>
>> The harder part: while looking at this I discovered a couple of issues:
>> one is with serialization of objects in ActiveResource (and it appears
>> it would affect ActiveRecord too - I'll have look into this), the other
>> one[s] are on the candlepin side.
>>
>> I'll start with the latter: update of Candlepin consumer is buggy -
>> candlepin can't consume json it produces. I fixed one issue [1], but
>> there's at least another one, which is bigger in scope. I'll have to
>> talk to candlepin folks today.
>>
>> in other words, @blah.update_attibutes(:first => "something") should
>> *always* work.
>>
>>
>> I discovered an issue with serialization when attempting to work around
>> the above. It appears ActiveSupport::JSON is pretty minimal, and cannot
>> constrain nested objects/attributes (:only and :except parameters of
>> to_json work on top-level attributes only). Might be a reason to look
>> into rabl.
>>
>> Having said that, I added 'patch' method that will only send updated
>> attributes to the server (once json issue is resolved).
>>
>>
>> -d
>>
>>
>> [1]. https://github.com/candlepin/candlepin/pull/71
>>
>>
>> _______________________________________________
>> katello-devel mailing list
>> katello-devel at redhat.com
>> https://www.redhat.com/mailman/listinfo/katello-devel
>>
>
> _______________________________________________
> katello-devel mailing list
> katello-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/katello-devel




More information about the katello-devel mailing list