Object Relationships

There are models which are expected to be used in plugin implementation, so understanding what they are designed for is useful for a plugin writer. Each model below has a link to its documentation where its purpose, all attributes and relations are listed.

Here is a gist of how models are related to each other and what each model is responsible for.

  • Repository contains Content. RepositoryContent is used to represent this relation.
  • Content can have Artifact associated with it. ContentArtifact is used to represent this relation.
  • ContentArtifact can have RemoteArtifact associated with it.
  • Artifact is a file.
  • RemoteArtifact contains information about Artifact from a remote source, including URL to perform download later at any point.
  • Remote knows specifics of the plugin Content to put it into Pulp. Remote defines how to synchronize remote content. Pulp Platform provides support for concurrent downloading of remote content. Plugin writer is encouraged to use one of them but is not required to.
  • PublishedArtifact refers to ContentArtifact which is published and belongs to a certain Publication.
  • PublishedMetadata is a repository metadata which is published, located in /var/lib/pulp/published and belongs to a certain Publication.
  • Publisher knows specifics of the plugin Content to make it available outside of Pulp. Publisher defines how to publish content available in Pulp.
  • Publication is a result of publish operation of a specific Publisher.
  • Distribution defines how a publication is distributed for a specific Publisher.
  • ProgressBar is used to report progress of the task.

An important feature of the current design is deduplication of Content and Artifact data. Content is shared between Repository, Artifact is shared between Content. See more details on how it affects remote implementation in Define your plugin Remote section.

Check pulp_file implementation to see how all those models are used in practice. More detailed explanation of model usage with references to pulp_file code is below.