« Previous | Next » 

Revision 09fe6589

Added by bmbouter almost 2 years ago

Add Repository.finalize_new_version

This PR adds a central place for plugin writers to put validation and content modification code.

  • RepositoryVersion.__exit__ calls finalize_new_version

  • Moves the /modify/ endpoint to pulpcore.plugin.actions as a mixin named ModifyRepositoryActionMixin.

  • Renames Repository.repo_key to Repository.repo_key_fields.

  • Remove the RemoveDuplicates stage for plugin writers to instead use Repository.finalize_new_version

  • Remove the implicit usage of RemoveDuplicates from RepositoryVerison.add_content and RepositoryVersion.remove_content.

  • Make the RemoveDuplicates available as pulpcore.plugin.repo_version_utils.remove_duplicates.

As an unrelated change, it also replaces the the >>> python codeblocks in various docblocks with python codeblock using :: and indention.

Required PR: re #3541