Project

Profile

Help

Story #3173

Updated by daviddavis over 2 years ago

A user should be able to make POST request to /api/v3/repositories/<id>/versions/ in order to create a new repository version. The user should be able to provide 3 optional arguments: importer, add_content_units, and remove_content_units. This task should implement the first option while #3234 will implement the last two.

A task should be spawned to create a new repository version. The repository version starts with the content from previous version, if any, and then uses the importer to import units, and then adds units from add_content_units, then removes content from remove_content_units.

The ViewSet for the RepositoryVersion model needs to be extended to handle POST requests. The repository version API endpoint should accept 3 parameters: importer, add_content_units, remove_content_units.

The detail 'sync' view for the Importer viewset needs to be removed.

The sync task in pulp/pulpcore/pulpcore/app/tasks/importer.py needs to be removed.

A repository_version task should be added to pulp/pulpcore/pulpcore/app/tasks/repository.py

The new task should implement the algorithm described above. The task should lock on the importer, the new repository version, and the associated repository itself. The task should produce a new repository version even if the content has not changed.

Back