Story #8384
closedStory #8383: [EPIC] As a plugin writer I have the `repository`, `publication`, and `repository_version` fields on Distribution MasterModel
As a plugin, writer I have a new `Distribution` MasterModel replacing `BaseDistribution`
100%
Description
-
Create a new MasterModel named
Distribution
. This would have these fields:- All the existing fields from
BaseDistribution
see here. - Include all of the fields from the
PublicationDistribution
andRepositoryVersionDistribution
models also, this includes the:publication
,repository
, andrepository_version
fields
- All the existing fields from
-
Create corresponding Serializer and Viewset. These will be similar to the
BaseDistributionSerializer
andBaseDistributionViewset
. -
Handle the pulpcore code that deals with these detail types to ensure a mixutre of detail inheriting from
BaseDistribution
andDistribution
can cooperate together.- base path overlap, the code here needs to be updated for both models to consider base path overlaps from both models.
- name field uniqueness. We need to have uniqueness of the name apply across both models
- The content app needs to be prepared to read/handle data from both
BaseDistribution
andDistribution
.
NOTE: while doing this work, the author should also implement https://pulp.plan.io/issues/8387 at the same time.
Related issues
Updated by bmbouter almost 4 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to bmbouter
Updated by bmbouter almost 4 years ago
- Status changed from ASSIGNED to POST
PR available: https://github.com/pulp/pulpcore/pull/1198
Updated by bmbouter almost 4 years ago
- Blocks Task #8480: Rename `NewDistributionFilter` to `DistributionFilter`. added
Added by bmbouter over 3 years ago
Updated by bmbouter over 3 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulpcore|d55f1c2225dda098b51fe096677fbfe623016321.
Updated by pulpbot over 3 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Adds new
Distribution
MasterModelAdded the following new objects related to a new
Distribution
MasterModel:pulpcore.plugin.models.Distribution
- A new MasterModelDistribution
which replaces thepulpcore.plugin.models.BaseDistribution
. This now contains therepository
,repository_version
, andpublication
fields on the MasterModel instead of on the detail models as was done withpulpcore.plugin.models.BaseDistribution
.pulpcore.plugin.serializer.DistributionSerializer
- A serializer plugin writers should use with the newpulpcore.plugin.models.Distribution
.pulpcore.plugin.viewset.DistributionViewSet
- The viewset that replaces the deprecatedpulpcore.plugin.viewset.BaseDistributionViewSet
.pulpcore.plugin.viewset.NewDistributionFilter
- The filter that pairs with theDistribution
model.closes #8384