Project

Profile

Help

Story #7621

Updated by daviddavis 8 months ago

## Problem

The current repository modify endpoint[0][1] calls the add_remove task[2] which just adds or removes content to a repository. For users copying content between repos, this has been sufficient up until now as content is fully self contained. The problem though is with #7504 we are storing deprecated information per repository. So when content is copied over using the modify endpoint and add_remove task, that information is not being copied.

## Solution

Add a copy endpoint similar to the one in pulp_rpm[3]. This endpoint tasks a source repository version, a destination repository, and a set of content to be copied. It calls a new task (copy_content?) with these parameters and copies over the content plus any repository data (ie AnsibleCollectionDeprecated).

[0] https://github.com/pulp/pulp_ansible/blob/f16fefc9350dcec13547961db30b411de6d3c3b5/pulp_ansible/app/viewsets.py#L209


[1] https://github.com/pulp/pulpcore/blob/612611162e0382bbcd5df52b44471e33e5725e7e/pulpcore/plugin/actions.py#L24


[2] https://github.com/pulp/pulpcore/blob/612611162e0382bbcd5df52b44471e33e5725e7e/pulpcore/plugin/actions.py#L54


[3] https://github.com/pulp/pulp_rpm/blob/6b78e365962fdb00c529f455b3882b191bc0615b/pulp_rpm/app/viewsets.py#L253

Back