[Pulp-list] Importer Sync APIs

Jay Dobies jason.dobies at redhat.com
Mon Nov 28 15:06:15 UTC 2011


> We may want to model this as a 'references' association instead of
> parent/child. Parent/child implies ownership or a hierarchical
> relationship which I don't think exists here.

So, I just wrote out a big e-mail explaining why parent/child was better 
than arbitrary (potentially bi-directional) relationships as you 
suggested. And as I was writing it, I managed to convince myself that 
removing the parent/child-ness of it is probably a good idea. Any 
ambiguity in what the relationship meant I kept figuring the Consumer 
Profilers could resolve.

For now, the conduit API change is simple. I'll just make it something like:

link_units(from_unit, to_unit)

If it makes sense to have a bi-directional relationship, they can call 
it twice (or we can add some syntactic sugar to that one call to 
automatically establish both sides of it or to link multiple to_units at 
once -- all that sugar can be added later).

It'll take me a bit longer to change the fact that in the database the 
relationship uses the term "children", so I'll hold off on that side of 
it for a bit while the implications of this sink in.

-- 
Jay Dobies
Freenode: jdob @ #pulp
http://pulpproject.org | http://blog.pulpproject.org




More information about the Pulp-list mailing list