Actions
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`
Start date:
Due date:
% Done:
100%
Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:
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
Actions
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