diff options
author | Wayne Witzel III <wayne@riotousliving.com> | 2017-05-23 18:58:03 +0200 |
---|---|---|
committer | Wayne Witzel III <wayne@riotousliving.com> | 2017-05-23 18:58:03 +0200 |
commit | 66af36e5c9e7e8b866174e06024fd3cad8d5df5a (patch) | |
tree | 5c131b04405b5948f41aed9681a6ae004dba7f2e /docs/inventory_refresh.md | |
parent | Added initial Inventory Refresh doc (diff) | |
download | awx-66af36e5c9e7e8b866174e06024fd3cad8d5df5a.tar.xz awx-66af36e5c9e7e8b866174e06024fd3cad8d5df5a.zip |
inventory refresh overview updates
Diffstat (limited to '')
-rw-r--r-- | docs/inventory_refresh.md | 49 |
1 files changed, 45 insertions, 4 deletions
diff --git a/docs/inventory_refresh.md b/docs/inventory_refresh.md index 4ceb2083ad..4dca174a43 100644 --- a/docs/inventory_refresh.md +++ b/docs/inventory_refresh.md @@ -3,6 +3,7 @@ Tower should have an inventory view that is more aligned towards systems managem rather than merely maintaining inventory for automation. ## Inventory Source Promotion +Starting with Tower 3.2, `InventorySource` will be associated directly with an `Inventory`. ## Fact Searching and Caching @@ -21,16 +22,27 @@ for normal inventories and set to `smart` for smart inventories. for normal inventories. When `host_filter` is set AND the inventory `kind` is set to `smart` is the combination that makes a _Smart Inventory_. -### Smart Filter (host_filter) +### Smart Filter (host__filter) The `SmartFilter` class handles our translation of the smart search string. We store the filter value in the `host_filter` field for an inventory. This value should be expressed the same way we express our existing smart searches. host_filter="search=foo" - host_filter="groups__search=bar" - host_filter="search=baz and groups_search=bang" + host_filter="group__search=bar" + host_filter="search=baz and group__search=bang" host_filter="name=localhost or group__name=local" +Creating a new _Smart Inventory_ for all of our GCE and EC2 groups might look like this: + + HTTP POST /api/v2/inventories/ + + { + "name": "GCE and EC2 Smart Inventory", + "kind": "smart", + "host_filter": "group__search=ec2 and group__search=gce" + ... + } + ### Acceptance Critera When verifying acceptance we should ensure the following statements are true: @@ -48,6 +60,35 @@ There are no breaking or backwards incompatible changes for this feature. ## Other Changes -### Background Deleition of Inventory +### Inventory update all inventory__sources +A new endpoint `/api/v2/inventories/:id/update_inventory_sources` has been added. This endpoint +functions in the same way that `/api/v2/inventory_source/:id/update` functions for a single +`InventorySource` with the exception that it updates all of the inventory sources for the +`Inventory`. + +`HTTP GET /api/v2/inventories/:id/update_inventory_sources` will list all of the inventory +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: + + { + [ + {"inventory_source": 1, "can_update": True}, + {"inventory_source": 2, "can_update": False}, + ] + } + +When making a POST to the same endpoint, the response will contain a status as well as the job ID for the update. + + POST /api/v2/inventories/:id/update_inventory_sources + + { + [ + {"inventory_update": 20, "inventory_source": 1, "status": "started"}, + {"inventory_update": 21, "inventory_source": 2, "status": "Could not start because `can_update` returned False"} + ] + } + + +### Background deleition of Inventory ### InventorySource Hosts and Groups read-only |