Project

Profile

Help

Story #8384

Story #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`

Added by bmbouter 7 months ago. Updated 6 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

  1. 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 and RepositoryVersionDistribution models also, this includes the: publication, repository, and repository_version fields
  2. Create corresponding Serializer and Viewset. These will be similar to the BaseDistributionSerializer and BaseDistributionViewset.

  3. Handle the pulpcore code that deals with these detail types to ensure a mixutre of detail inheriting from BaseDistribution and Distribution 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 and Distribution.

NOTE: while doing this work, the author should also implement https://pulp.plan.io/issues/8387 at the same time.


Related issues

Blocks Pulp - Task #8480: Rename `NewDistributionFilter` to `DistributionFilter`.CLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision d55f1c22 View on GitHub
Added by bmbouter 7 months ago

Adds new Distribution MasterModel

Added the following new objects related to a new Distribution MasterModel:

  • pulpcore.plugin.models.Distribution - A new MasterModel Distribution which replaces the pulpcore.plugin.models.BaseDistribution. This now contains the repository, repository_version, and publication fields on the MasterModel instead of on the detail models as was done with pulpcore.plugin.models.BaseDistribution.

  • pulpcore.plugin.serializer.DistributionSerializer - A serializer plugin writers should use with the new pulpcore.plugin.models.Distribution.

  • pulpcore.plugin.viewset.DistributionViewSet - The viewset that replaces the deprecated pulpcore.plugin.viewset.BaseDistributionViewSet.

  • pulpcore.plugin.viewset.NewDistributionFilter - The filter that pairs with the Distribution model.

closes #8384

History

#1 Updated by bmbouter 7 months ago

  • Description updated (diff)

#2 Updated by bmbouter 7 months ago

  • Description updated (diff)

#3 Updated by bmbouter 7 months ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to bmbouter

#4 Updated by bmbouter 7 months ago

  • Status changed from ASSIGNED to POST

#5 Updated by bmbouter 7 months ago

  • Blocks Task #8480: Rename `NewDistributionFilter` to `DistributionFilter`. added

#6 Updated by bmbouter 7 months ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#7 Updated by pulpbot 6 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF