[Pulp-dev] linking units in pulp

Matthias Dellweg dellweg at atix.de
Tue Jul 11 13:13:50 UTC 2017


Thank oyu for your answer, Michael.
I am extending the pulp_deb plugin with Release and Component units, to be able to group packages into Components (think: main, contrib, non-free) and associate those to the Releases (think: stable, testing, unstable). Since it boils down to having file-less units with a list of ids, it is fairly easy to implement this link by hand. I just thought, if there is such a thing, i should use it.
BTW, there is one thing left in the code:
  server/pulp/plugins/conduits/mixins.py:556:    def link_unit(<...>
If this feature is actually removed, this might be, too. At least a deprecation warning would be nice.

  Matthias

----- Original Message -----
From: "Michael Hrivnak" <mhrivnak at redhat.com>
To: "Matthias Dellweg" <dellweg at atix.de>
Cc: "Pulp-dev" <pulp-dev at redhat.com>
Sent: Monday, July 10, 2017 4:11:32 PM
Subject: Re: [Pulp-dev] linking units in pulp

Matthias,

Thanks for asking. That feature was removed as we converted our data layer
to use the "mongoengine" library. The linking feature was theoretically
used by the pulp_rpm plugin to link errata with RPMs, but the links
themselves were never actually used by any feature or behavior. So in the
process of reviewing and converting the data model, we decided to leave
that out.

For the documentation, it sounds like we should just remove references to
that behavior. I created this bug report to track it, and anyone is welcome
to make a pull request with the changes: https://pulp.plan.io/issues/2877

What use case do you have in mind? Are you working on a plugin? Depending
on what you are hoping to accomplish and when, it might make more sense to
think about plugin development on Pulp 3. We would be very happy to hear
about your plans and discuss options.

Michael

On Thu, Jun 29, 2017 at 9:59 AM, Matthias Dellweg <dellweg at atix.de> wrote:

> In the developer guide, i have found the reference, that a given unit type
> can reference other units (referenced_types in 'Type Definitions' ->
> 'Attributes').
> I also read, that in the importer you can call 'link_unit' to 'establish
> any relationships between units' (in 'Importers' -> 'Functionality' ->
> 'Synchronize an External Respository').
> Sadly, that is all i could find on the topic.
>
> As far as i understand, it is up to you, what the relationship means,
> which is good for my problem (bundling packages into categories).
> But a few questions come to my mind:
>
> Is it a one-to-many relationship?
> Do you need to specify the referenced_types on the 'one' side, on the
> 'many' side or on both unit_types? ... or are these completely independent
> features?
> How do you recover the related/linked units (e.g. in the publisher)?
> Is the lack of documentation an indicator that this not a stable feature?
>
> If i knew more, i would be happy to work on the documentation, too.
>
> Thanks in advance,
>   Matthias
>
> _______________________________________________
> Pulp-dev mailing list
> Pulp-dev at redhat.com
> https://www.redhat.com/mailman/listinfo/pulp-dev
>



-- 

Michael Hrivnak

Principal Software Engineer, RHCE

Red Hat




More information about the Pulp-dev mailing list