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.
pulpcore.app.models.Repositorycontainspulpcore.plugin.models.Content.pulpcore.plugin.models.RepositoryContentis used to represent this relation.pulpcore.plugin.models.Contentcan havepulpcore.plugin.models.Artifactassociated with it.pulpcore.plugin.models.ContentArtifactis used to represent this relation.pulpcore.plugin.models.ContentArtifactcan havepulpcore.plugin.models.RemoteArtifactassociated with it.pulpcore.plugin.models.Artifactis a file.pulpcore.plugin.models.RemoteArtifactcontains information aboutpulpcore.plugin.models.Artifactfrom a remote source, including URL to perform download later at any point.pulpcore.plugin.models.Remoteknows specifics of the pluginpulpcore.plugin.models.Contentto put it into Pulp.pulpcore.plugin.models.Remotedefines how to synchronize remote content. Pulp Platform provides support for concurrentdownloading <download-docs>of remote content. Plugin writer is encouraged to use one of them but is not required to.pulpcore.plugin.models.PublishedArtifactrefers topulpcore.plugin.models.ContentArtifactwhich is published and belongs to a certainpulpcore.app.models.Publication.pulpcore.plugin.models.PublishedMetadatais a file generated while publishing and belongs to a certainpulpcore.app.models.Publication.pulpcore.app.models.Publicationis a result of publish operation of a specificpulpcore.plugin.models.RepositoryVersion.pulpcore.app.models.Distributiondefines how a publication is distributed for a specificpulpcore.plugin.models.Publication.pulpcore.plugin.models.ProgressReportis used to report progress of the task.pulpcore.plugin.models.GroupProgressReportis used to report progress of the task group.
An important feature of the current design is deduplication of
pulpcore.plugin.models.Content and pulpcore.plugin.models.Artifact data.
pulpcore.plugin.models.Content is shared between pulpcore.app.models.Repository,
pulpcore.plugin.models.Artifact is shared between
pulpcore.plugin.models.Content.
See more details on how it affects remote implementation in define-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.