[katello-devel] Foreman integration model question

Bryan Kearney bkearney at redhat.com
Thu Aug 23 16:38:04 UTC 2012


On 08/22/2012 08:26 AM, Petr Chalupa wrote:
> Lukas is right, our motivation was to break the code into smaller pieces
> (I am big fan of SOLID and 'single responsibility principle' in
> particular). If you write code this way, you can then move things around
> very quickly so you can develop features and fix bugs faster. No to
> mention it can be testes more easily.
>
> app/models/user.rb (User) is representation of katello user which mixes
> (if foreman is installed) foreman orchestration
> app/models/glue/forema/user.rb. Orchestration is working with foreman
> through children of ForemanModel which are representation of remote
> resources app/models/foreman/user.rb (Foreman::User). Foreman::User is
> using foreman-api bindings which are defined as singletons in
> lib/resources/foreman.rb.
>
> So there are 4 layers:
> - katello model
> - foreman-katello orchestration
> - foreman model (remote resource)
> - foreman bindings (gem foreman-api)
>
> I also for splitting up big parts.
>
So, you put code in models/foreman because there is no data in katello? 
This is similar ot candlepin/pools.

I tend to agree with justin in that it would be nice to have symmitry in 
whre the code is placed across all the backend engines.
-- kb





More information about the katello-devel mailing list