[Pulp-dev] Pulp 3 content import

Simon Baatz gmbnomis at gmail.com
Wed Apr 18 15:02:59 UTC 2018

I am looking at Pulp 3 for the first time and have a question on
creating/importing content units.

In the file plugin, a file content unit can be created using
POST at .../content/file/ by passing the meta-data ('relative_path') and the
artifact (from which 'digest' is obtained as additional meta-data).  The
POST is synchronous (returning a 201 CREATED if successful).

However, for other artifact types there is more meta-data in the artifact(s)
themselves and it may be "harder" to obtain.  For example, Puppet modules,
Chef cookbooks, and Helm charts are tarballs with specific meta-data files. 
In Pulp 2, this meta-data extraction seems to be part of the
import_uploaded_unit task.  According to the code comments, the puppet
module unpacks the entire module to get the meta-data.

If I got this correctly, Pulp 3 splits this up into content unit
creation (sync) and "importing" (async, add content units using
POST at ...versions/).  Where should the meta-data extraction be done
given this split?  (the first step is synchronous, but perhaps it is
acceptable to do some work there nevertheless. The second step
looks too late)

- Simon

More information about the Pulp-dev mailing list