Actions
Task #2916
closedTask #2868: Platform support for publishing.
Add Distribution serializer and viewset.
Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:
0%
Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Sprint:
Sprint 25
Quarter:
Description
Add Distribution serializer and viewset.
The distribution URL: repositories/<id>/publishers/<id>/distributions/
Additional work may be need to support URL nesting more than 1 level deep.
Related issues
Updated by bizhang over 7 years ago
- Groomed changed from No to Yes
- Sprint Candidate changed from No to Yes
Updated by jortel@redhat.com over 7 years ago
- Blocked by Task #2893: Add Publication and Distribution models. added
Updated by mhrivnak over 7 years ago
Having thought more about it, I think the URL nesting might just work. Looking here:
https://github.com/pulp/pulp/blob/f61019e79a/platform/pulpcore/app/urls.py#L24-L26
you would need to create the nested routers in whatever order makes sense and give the correct reference to its parent router.
Updated by jortel@redhat.com over 7 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to jortel@redhat.com
Updated by jortel@redhat.com over 7 years ago
- Status changed from ASSIGNED to NEW
- Assignee deleted (
jortel@redhat.com)
Updated by amacdona@redhat.com over 7 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to amacdona@redhat.com
Updated by jortel@redhat.com over 7 years ago
- Sprint/Milestone changed from 43 to 44
Added by amacdona@redhat.com over 7 years ago
Updated by amacdona@redhat.com over 7 years ago
- Status changed from ASSIGNED to MODIFIED
Updated by bmbouter about 7 years ago
- Tags deleted (
Pulp 3 Plugin Writer Alpha)
Cleaning up Redmine tags
Updated by bmbouter about 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions
Add Distribution ViewSet and Serializer
Additional work was done to allow arbitrarily deeply nested ViewSets.
The router registration code in urls.py was significantly changed. A
ViewSetNode
tree is assembled that mirrors the nesting hierarchy of the url structure, and is able to create child routers as necessary and use them to register child ViewSets.A
parent_viewset
attribute is added to ViewSets, which indicates how they are nested and assists in the retrieval of parents.A new type of field,
WritableNestedUrlRelatedField
was added to allow parent fields to be writable when the parent is determined by the nested url rather than by request parameters (and designatedread_only
). Serializers with writable url fields inherit fromNestedModelSerializer
.