Skip to content

Commit

Permalink
Remove /pulp/api/v3/rpm/copy/ endpoint
Browse files Browse the repository at this point in the history
Pending design decisions in #5344, unexpose the copy endpoint.
Document the existing copy functionality via versions endpoint.

closes #5681
https://pulp.plan.io/issues/5681
  • Loading branch information
CodeHeeler committed Nov 12, 2019
1 parent 4416ab4 commit 645181d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 28 deletions.
4 changes: 4 additions & 0 deletions CHANGES/5681.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Remove /pulp/api/v3/rpm/copy/ endpoint

Removed the /pulp/api/v3/rpm/copy/ endpoint. To copy all content now with typed repos, use the
modify endpoint on a repository.
2 changes: 1 addition & 1 deletion docs/_static/api.json

Large diffs are not rendered by default.

25 changes: 6 additions & 19 deletions docs/workflows/copy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,15 @@ If you want to copy RPM content from one repository into another repository, you
Copy workflow
-------------

You can use the copy endpoint to copy RPM-related content present in one repository or
repository version over to another repository. If you specify a repository, then the latest
repository version for that repository will be used.
You can use the modify endpoint on a repository to copy all content present in one repository
version to another by specifying a base version.

``http POST http://localhost:24817/pulp/api/v3/rpm/copy/ source_repo=${SRC_REPO_HREF} dest_repo=${DEST_REPO_HREF}``

or

``http POST http://localhost:24817/pulp/api/v3/rpm/copy/ source_repo_version=${SRC_REPO_VER_HREF} dest_repo=${DEST_REPO_HREF}``
``http POST http://localhost:24817${REPO_HREF}modify/ base_version=${BASE_REPO_HREF}``

.. code:: json
{
"pulp_href": "/pulp/api/v3/tasks/f2b525e3-8d8f-4246-adab-2fabd2b089a8/",
"created_resources": [
"/pulp/api/v3/content/rpm/packages/1edf8d4e-4293-4b66-93cd-8e913731c87a/",
],
"created_resources": [
"/pulp/api/v3/repositories/rpm/rpm/5fc8a78e-068a-47c0-b728-a5475042573a/versions/2/"
],
}
You can also specify which types of content you would like to copy by providing a value for the
"types" parameter. Types that are not listed will not be copied. The supported types are "package"
and "advisory". For example, this query will copy only advisories, and not packages. If not
provided, all types will be copied.

``http POST http://localhost:24817/pulp/api/v3/rpm/copy/ source_repo=${SRC_REPO_HREF} dest_repo=${DEST_REPO_HREF} types=advisory``
8 changes: 0 additions & 8 deletions pulp_rpm/app/urls.py

This file was deleted.

0 comments on commit 645181d

Please sign in to comment.