Story #4901
closedRepository Version creation api should provide an easy way to clear out all units when adding new units
100%
Description
When creating a new repository version, its very easy to add units or remove units, but if I want to specify some list of units I want the repository version to have, i must first clear out all the existing units which is very cumbersome.
Solution¶
Allow users to specify ['*']
for remove_content_units
. This will let users remove all content units from a repo version. They can also specify add_content_units
which will add back units to the empty repo version.
Note that we'll need to change the current logic to add units after removing units. We want to document these behaviors clearly in the docs too.
Related issues
Updated by dkliban@redhat.com over 5 years ago
What about letting the user submit ['*'] for remove_content_units?
Updated by bmbouter over 5 years ago
@dkliban I was thinking the same thing! wow.
Updated by daviddavis over 5 years ago
What if I submit a list of add_content_units (e.g. A, B, C) along with ['*'] for remove_content_units? Then my repo version has just A, B, C?
Updated by dkliban@redhat.com over 5 years ago
Yes. However, I don't think that will happen always now. If A, B, C were in the previous version, they will not be present in the new version because we add first and then remove.
https://github.com/pulp/pulpcore/blob/master/pulpcore/app/tasks/repository.py#L72
Updated by dkliban@redhat.com over 5 years ago
- Groomed changed from No to Yes
- Sprint Candidate changed from No to Yes
- Sprint set to Sprint 54
Updated by daviddavis over 5 years ago
- Tracker changed from Issue to Story
- % Done set to 0
Updated by daviddavis over 5 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to daviddavis
Updated by daviddavis over 5 years ago
- Related to Test #4956: As a user, I can clear all units from a new repository version added
Updated by daviddavis over 5 years ago
- Status changed from ASSIGNED to POST
Added by daviddavis over 5 years ago
Updated by daviddavis over 5 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulpcore|5c5bbfa41abec146f07a985d80533f47b1a33840.
Updated by bmbouter almost 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Updated by ggainey over 4 years ago
- Tags Katello added
- Tags deleted (
Katello-P2)
Allow users to remove all content units from repo versions
fixes #4901 https://pulp.plan.io/issues/4901