Device Inventory - IAG 2023.1 & 2022.1
  • 03 May 2024
  • Dark
    Light
  • PDF

Device Inventory - IAG 2023.1 & 2022.1

  • Dark
    Light
  • PDF

Article summary

Device Inventory Management

Automation Gateway supports different concepts of device inventory. In its most simple form, a user supplies a JSON object with a name and a set of variables which are meaningful to the particular integration being used.

  • For Ansible, that may be variables like ansible_host or ansible_user which come directly from the Ansible documentation.
  • In other cases, like HTTP Requests, a certain set of variables are required to create the device (protocol, base_url) so that the associated integration will execute properly.

In addition to integration-specific variables, there are also multiple sources that device inventory can originate from (depending on the integration). Currently, the two source types are "Internal", meaning they are created directly by interacting with Automation Gateway, and "External", meaning they are supplied as a file on the server and pulled into Automation Gateway by referencing the file path.

The following will describe which integrations are compatible with Automation Gateway's inventories, which variables are required and recommended for each integration, where you can go to learn more about non-Automation Gateway inventories, subtleties between inventory source types and legacy inventory systems, and finally, how to manage the various inventories via graphical user interface (GUI), or via API calls.

Inventory Integration Variables

The following is a list of inventory types which are available on a per-integration basis.

Integration Internal External
Ansible Yes Yes
HTTP Requests Yes No
NETCONF Yes No
Netmiko Yes No
Nornir No Yes
Scripts Yes (Ansible) Yes (Ansible)
Terraform No No

Managing Inventory Devices

The following references variables from the Inventory Integration Variables table here.

Create

via API

Users can create an inventory device by specifying the correct integration_type and making a POST call to /api/2.0/inventories/{integration_type}/default/devices.

An example payload to create an Inventory Device to use with HTTP Requests:

{
    "name": "device",
    "variables": {
        "protocol": "http",
        "base_url": "example.com"
    }
}

via GUI

Users can click the circled + button on the upper-left to start an interactive window to create an Inventory Device.

Figure 1: Create Inventory Device

10_inventory_device_create

View

via API

Users can view an Inventory Device by specifying the correct integration_type and (optionally) device_name by making a GET call to /api/2.0/inventories/{integration_type}/default/devices or /inventories/{integration_type}/default/devices/{device_name}, respectively.

via GUI

Under each integration type, the Inventory panel will list all the devices that users have created for that integration.

Figure 2: Inventory Device View

11_inventory_device_view

Update

via API

Users can update an Inventory Device by specifying the correct integration_type and device_name by making a PUT call to /api/2.0/inventories/{integration_type}/default/devices/{device_name}.

An example payload to update an Inventory Device to use with HTTP Requests:

{
    "name": "device",
    "variables": {
        "protocol": "http",
        "base_url": "example.com"
    }
}

via GUI

When a device is selected on the left panel, user can click the pencil icon above the Variables to edit the associated variables of that device.

Figure 3: Inventory Device Update

12_inventory_device_update

Remove

via API

Users can delete an Inventory Device by specifying the correct integration_type and device_name by making a DELETE call to /api/2.0/inventories/{integration_type}/default/devices/{device_name}.

via GUI

When a device is selected on the left panel, hover the cursor over the three vertical dots on the upper-right corner, a Delete Device button will appear. Users can delete a device by clicking the trashcan icon.

Figure 4: Delete Inventory Device

13_inventory_device_delete


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.