Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.
/ pulp Public archive

965283 - updating the REST API docs for repo updates as they pertain to ... #651

Merged
merged 1 commit into from
Oct 4, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
92 changes: 83 additions & 9 deletions docs/sphinx/dev-guide/integration/rest-api/repo/cud.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,12 @@ is centered around updating only that metadata.
| :method:`put`
| :path:`/v2/repositories/<repo_id>/`
| :permission:`update`
| :param_list:`post` The body of the request is a JSON document with a root element
called "delta". The contents of delta are the values to update. Only changed
parameters need be specified. The following keys are allowed in the delta
object. Descriptions for each parameter can be found under the create
repository API:
| :param_list:`put` The body of the request is a JSON document with three
possible root elements:

* :param:`display_name,,`
* :param:`description,,`
* :param:`notes,,`
* :param:`delta,object,object containing keys with values that should be updated on the repository`
* :param:`?importer_config,object,object containing keys with values that should be updated on the repository's importer config`
* :param:`?distributor_configs,object,object containing keys that are distributor ids, and values that are objects containing keys with values that should be updated on the specified distributor's config`
Copy link
Contributor

Choose a reason for hiding this comment

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

If possible in the constraints of restructured text, it would be nice to keep this inside of 100 characters of width.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to punt on this for now as it is some kind of special sphinx macro foo that I don't understand, and needs addressing throughout our docs. I don't think it's worth investing time in that right at this moment.


| :response_list:`_`

Expand All @@ -104,7 +101,17 @@ is centered around updating only that metadata.
:sample_request:`_` ::

{
"delta": {"display_name" : "Updated"},
"delta": {
"display_name" : "Updated"
},
"importer_config": {
"demo_key": "demo_value"
},
"distributor_configs": {
"demo_distributor": {
"demo_key": "demo_value"
}
}
}

:sample_response:`200` ::
Expand Down Expand Up @@ -270,6 +277,73 @@ The details of the added distributor are returned from the call.
}


Update an Importer Associated with a Repository
-------------------------------------------------

Update the configuration for an :term:`importer` that has already been associated with a
repository.

Any importer configuration value that is not specified remains unchanged.

| :method:`put`
| :path:`/v2/repositories/<repo_id>/importers/<importer_id>/`
| :permission:`update`
| :param_list:`put`

* :param:`importer_config,object,object containing keys with values that should be updated on the importer`

| :response_list:`_`

* :response_code:`200,if the update was executed`
* :response_code:`202,if the request was accepted by the server to update the importer
when the repository is available`
* :response_code:`404,if there is no repository or importer with the specified IDs`
* :response_code:`409,if a conflict was detected and the request is not serviceable now, or any time
in the future`

| :return:`A call report list`

:sample_request:`_` ::

{
"importer_config": {
"demo_key": "demo_value"
}
}

:sample_response:`200` ::

{
"scratchpad": null,
"_ns": "repo_importers",
"importer_type_id": "demo_importer",
"last_sync": "2013-10-03T14:08:35-04:00",
"scheduled_syncs": [],
"repo_id": "demo_repo",
"_id": {
"$oid": "524db282dd01fb194283e53f"
},
"config": {
"demo_key": "demo_value"
},
"id": "demo_importer"
}


Disassociate an Importer from a Repository
--------------------------------------------

| :method:`delete`
| :path:`/v2/repositories/<repo_id>/importers/<importer_id>/`
| :permission:`delete`

| :response_list:`_`

* :response_code:`200,if the delete was executed`
* :response_code:`202,if the request was accepted by the server to disassociate when the repository is available`
* :response_code:`404,if there is no repository or importer with the specified IDs`


Update a Distributor Associated with a Repository
-------------------------------------------------

Expand Down