Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ Community contributions are encouraged.
* View and file issues in the `Redmine Tracker
<https://pulp.plan.io/projects/pulp_python/issues>`_.

REST API
--------

REST API documentation for this plugin can be found `here <restapi.html>`_

Table of Contents
-----------------
Expand All @@ -28,6 +24,7 @@ Table of Contents

installation
workflows/index
restapi/index
release-notes/3.0.z.rst


Expand Down
10 changes: 8 additions & 2 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
User Setup
==========

Install pulp-python
-------------------
Ansible Installer (Recommended)
-------------------------------
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be a separate commit if anyone cares. Just fixed it when I noticed it was missing.


We recommend that you install `pulpcore` and `pulp-python` together using the `Ansible installer
<https://github.com/pulp/ansible-pulp/blob/master/README.md>`_.

Pip Install
-----------

This document assumes that you have
`installed pulpcore <https://docs.pulpproject.org/en/3.0/nightly/installation/instructions.html>`_
Expand Down
9 changes: 9 additions & 0 deletions docs/restapi/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
REST API
========

Pulpcore Reference: `pulpcore REST documentation <https://docs.pulpproject.org/en/3.0/nightly/restapi.html>`_.

Pulp Python Endpoints
---------------------

Pulp Python Reference `pulp-python REST documentation <../restapi.html>`_
7 changes: 7 additions & 0 deletions docs/workflows/publish-host.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Create a variable for convenience.::

$ export PUBLISHER_HREF=$(http $BASE_ADDR/pulp/api/v3/publishers/python/python/ | jq -r '.results[] | select(.name == "bar") | ._href')

Reference: `Python Publisher API Usage <../restapi.html#tag/publishers>`_


Publish a repository with a publisher
-------------------------------------
Expand All @@ -45,6 +47,8 @@ Create a variable for convenience.::

$ export PUBLICATION_HREF=$(http $BASE_ADDR/pulp/api/v3/publications/ | jq -r --arg PUBLISHER_HREF "$PUBLISHER_HREF" '.results[] | select(.publisher==$PUBLISHER_HREF) | ._href')

Reference: `Python Publish Task Usage <../restapi.html#operation/publishers_python_python_publish>`_

Host a Publication (Create a Distribution)
--------------------------------------------

Expand All @@ -61,6 +65,9 @@ Response::
...
}

Reference (pulpcore): `Distribution API Usage
<https://docs.pulpproject.org/en/3.0/nightly/restapi.html#tag/distributions>`_

.. _using-distributions:

Use the newly created distribution
Expand Down
9 changes: 9 additions & 0 deletions docs/workflows/sync.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ If you want to copy/paste your way through the guide, create an environment vari

$ export REPO_HREF=$(http $BASE_ADDR/pulp/api/v3/repositories/ | jq -r '.results[] | select(.name == "foo") | ._href')

Reference (pulpcore): `Repository API Usage
<https://docs.pulpproject.org/en/3.0/nightly/restapi.html#tag/repositories>`_


Create a Remote
---------------
Expand Down Expand Up @@ -101,6 +104,9 @@ You can also use version specifiers to "exclude" certain versions of a project,
},
]'

Reference: `Python Remote Usage
<https://pulp-python.readthedocs.io/en/latest/restapi.html#tag/remotes>`_

Sync repository foo with remote
-------------------------------

Expand Down Expand Up @@ -161,3 +167,6 @@ Response::
"state": "completed",
"worker": "/pulp/api/v3/workers/eaffe1be-111a-421d-a127-0b8fa7077cf7/"
}

Reference: `Python sync
<https://pulp-python.readthedocs.io/en/latest/restapi.html#operation/remotes_python_python_sync>`_
10 changes: 10 additions & 0 deletions docs/workflows/upload.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Create a variable for convenience::

$ export REPO_HREF=$(http $BASE_ADDR/pulp/api/v3/repositories/ | jq -r '.results[] | select(.name == "foo") | ._href')

Reference (pulpcore): `Repository API Usage
<https://docs.pulpproject.org/en/3.0/nightly/restapi.html#tag/repositories>`_

Upload a file to Pulp
---------------------
Expand All @@ -35,6 +37,9 @@ Response::
}


Reference (pulpcore): `Artifact API Usage
<https://docs.pulpproject.org/en/3.0/nightly/restapi.html#tag/artifacts>`_

Create content from an artifact
-------------------------------

Expand All @@ -57,9 +62,14 @@ Create a variable for convenience::

$ export CONTENT_HREF=$(http $BASE_ADDR/pulp/api/v3/content/python/packages/ | jq -r '.results[] | select(.filename == "shelf_reader-0.1-py2-none-any.whl") | ._href')

Reference: `Python Content API Usage <../restapi.html#tag/content>`_

Add content to a repository
---------------------------

Once there is a content unit, it can be added and removed and from to repositories::

$ http POST $BASE_ADDR$REPO_HREF'versions/' add_content_units:="[\"$CONTENT_HREF\"]"

Reference (pulpcore): `Repository Version Creation API Usage
<https://docs.pulpproject.org/en/3.0/nightly/restapi.html#operation/repositories_versions_create>`_