Project

Profile

Help

Story #8384

closed

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 over 3 years ago. Updated over 3 years 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 - CURRENTRELEASEbmbouter

Actions
Actions #1

Updated by bmbouter over 3 years ago

  • Description updated (diff)
Actions #2

Updated by bmbouter over 3 years ago

  • Description updated (diff)
Actions #3

Updated by bmbouter over 3 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to bmbouter
Actions #4

Updated by bmbouter over 3 years ago

  • Status changed from ASSIGNED to POST
Actions #5

Updated by bmbouter over 3 years ago

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

Added by bmbouter over 3 years ago

Revision d55f1c22 | View on GitHub

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

Actions #6

Updated by bmbouter over 3 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #7

Updated by pulpbot over 3 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF