Skip to content

Commit

Permalink
includes inventory refresh all in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rooftopcellist committed Jul 21, 2017
1 parent 825dfc9 commit a3d1877
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
9 changes: 9 additions & 0 deletions awx/api/templates/api/inventory_inventory_sources_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,13 @@ inventory sources:
* `project_update`: ID of the project update job that was started if this inventory source is an SCM source.
(interger, read-only, optional)

> *Note:* All manual inventory sources (source='') will be ignored by the update_inventory_sources endpoint.
Response code from this action will be:

- 200 if all inventory source updates were successful
- 202 if some inventory source updates were successful, but some failed
- 400 if all of the inventory source updates failed
- 400 if there are no inventory sources in the inventory

{% include "api/_new_in_awx.md" %}
20 changes: 16 additions & 4 deletions docs/inventory_refresh.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,12 @@ functions in the same way that `/api/v2/inventory_source/:id/update` functions f
sources and if they will be updated when a POST to the same endpoint is made. The result of
this request will look like this:

> *Note:* All manual inventory sources (source='') will be ignored by the update_inventory_sources endpoint.
{
results: [
{"inventory_source": 1, "can_update": True},
{"inventory_source": 2, "can_update": False},
"inventory_source": 1, "can_update": True,
"inventory_source": 2, "can_update": False,
]
}

Expand All @@ -144,12 +146,22 @@ When making a POST to the same endpoint, the response will contain a status as w

{
results: [
{"inventory_update": 20, "inventory_source": 1, "status": "started"},
{"inventory_update": 21, "inventory_source": 2, "status": "Could not start because `can_update` returned False"}
"inventory_update": 20, "inventory_source": 1, "status": "started",
"inventory_update": 21, "inventory_source": 2, "status": "Could not start because `can_update` returned False"
]
}


Response code from this action will be:

- 200 if all inventory source updates were successful
- 202 if some inventory source updates were successful, but some failed
- 400 if all of the inventory source updates failed
- 400 if there are no inventory sources in the inventory


### Background deletion of Inventory

If a DELETE request is submitted to an inventory, the field `pending_delete` will be True until a separate task fully completes the task of deleting the inventory and all its contents.

### InventorySource Hosts and Groups read-only

0 comments on commit a3d1877

Please sign in to comment.