[katello-devel] Modelling of environments, products, etc in Katello (take ||)
Justin Sherrill
jsherril at redhat.com
Mon Aug 13 16:18:55 UTC 2012
On 08/13/2012 11:05 AM, Dmitri Dolguikh wrote:
> Could a couple of folks on Katello team spend an hour or so and take a
> look at the architectural changes I propose in
> https://www.redhat.com/archives/katello-devel/2012-August/msg00102.html?
>
>
> Much appreciated,
> -d
>
>
> _______________________________________________
> katello-devel mailing list
> katello-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/katello-devel
A couple of thoughts. As we discussed previously productContent does
not have a 1-1 mapping to a pulp repo, so with that in mind:
1. Pulp::Repos is a module made up of product and content related items
in relation to pulp. I understand that product may not be the best fit
for this, however sticking it within repo really isn't either (I would
be 100% against this). Potentially breaking it up into product related
items and product content related items would make the most sense.
2. I don't see how repositories are tied to environments in this
diagram. How would i go about getting all the repositories for a
product within an environment?
3. Data level organization is great and all, but if the code isn't more
readable (or at least isn't less readable) its all for nothing. Its
been my experience that rarely within the code do we need all the repos
for a product content within an environment (I don''t know that i've
ever needed that information). This is how you've proposed to organize
the data however. So if i have to do something like
my_product.product_content.collect{|pc| pc.repositories}.flatten in
order to get the list of repos in a product, it would not be worth it.
I believe the current structure came out of the lack of a need for
product content within katello itself (as a user facing object). Try to
keep the scopes within product as they are today as much as possible.
(i.e. I should still be able to do my_product.repos(my_environment) as
that is much nicer :} ). I understand that candlepin relies on
product content for lots of things, but katello itself really doesn't
care about product content. I'm hesitant to make it a first class model
citizen in katello as it could make a lot of code more complicated, but
as long as that's kept to a minimum, I'm ok with it.
I would say as part of this if you find yourself replacing lots of db
queries/AR lookups with longer statements, step back and ask yourself
how to simplify it.
4. I would like to see a new proposed diagram with some of these
concerns (#1 & #2 & the fact that productContent and repos are not 1-1
mapped) addressed.
Thanks,
-Justin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/katello-devel/attachments/20120813/bf070d09/attachment.htm>
More information about the katello-devel
mailing list