# Inventory

You can onboard all the devices on the application and can get a complete view of all the populated tables

* The Inventory tab has the below mentioned features:
  * **Custom OS upgrade:** Upgrade the device OS with any customised image. You need to provide the correct path to ensure the OS is updated successfully
  * **OS upgrade via ZTP:**  Upgrade the device OS via Zero touch provisioning
  * **Reboot devices:** Reboot the device from a single click in the UI
  * **Add/Remove devices from the dashboard:** You can onboard the devices using the YAML file upload or via in-built editor in the UI

## Devices

* Navigate to <mark style="color:blue;">**Inventory >> Devices**</mark>

<figure><img src="https://content.gitbook.com/content/zHwVfIGtJG6Cr2B0WHc5/blobs/ToHSCqiZ6NyLNcWtjJMb/Screenshot%202023-03-29%20at%2010.51.04%20PM.png" alt=""><figcaption></figcaption></figure>

* Using this tab, user can:
  * Onboard the device to the application using ADD/Remove Devices
  * Upgrade the device using Custom Upgrade
  * Upgrade the device using ZTP (Zero Touch Provisioning)
  * Reboot individual devices or multiple devices by selecting them in one click

### Add Devices

* Upload Device Inventory using YAML editor
* Navigate to <mark style="color:blue;">**Inventory >> Devices >> Add/Remove Devices**</mark>

<figure><img src="https://content.gitbook.com/content/zHwVfIGtJG6Cr2B0WHc5/blobs/EFMZL7XuMCcKjqR1f1n2/image.png" alt=""><figcaption></figcaption></figure>

* Use the below sample format to add devices to the application

```yaml
inventory:
  - ipAddress: "10.4.5.200"
    layer: "Superspine"
    region: "Houston"
    azId: 1
    brickId: 1
    user: "cumulus"
    password: "YourPaSsWoRd"
  - ipAddress: "10.4.4.55"
    layer: "Spine"
    region: "Houston"
    azId: 1
    brickId: 1
    user: "admin"
    password: "YourPaSsWoRd"
  - ipAddress: "10.4.4.77"
    layer: "Spine"
    region: "Houston"
    azId: 1
    brickId: 1
    user: "admin"
    password: "YourPaSsWoRd"
  - ipAddress: "10.4.4.60"
    layer: "Leaf"
    region: "Houston"
    azId: 1
    brickId: 1
    user: "admin"
    password: "YourPaSsWoRd"
  - ipAddress: "10.4.4.61"
    layer: "Leaf"
    region: "Houston"
    azId: 1
    brickId: 1
    user: "admin"
    password: "YourPaSsWoRd"
  - ipAddress: "10.4.4.62"
    layer: "Leaf"
    region: "Houston"
    azId: 1
    brickId: 1
    user: "admin"
    password: "YourPaSsWoRd"
  - ipAddress: "10.4.4.99"
    layer: "ToR"
    region: "Houston"
    azId: 1
    brickId: 1
    user: "admin"
    password: "YourPaSsWoRd"
  - ipAddress: "10.4.4.64"
    layer: "ToR"
    region: "Houston"
    azId: 1
    brickId: 1
    user: "admin"
    password: "YourPaSsWoRd"
  - ipAddress: "10.4.4.78"
    layer: "ToR"
    region: "Houston"
    azId: 1
    brickId: 1
    user: "admin"
    password: "YourPaSsWoRd"

```

* Make sure to use the correct indentation for the YAML files
* Make sure the Switch Name matches to Hostname of the device
* Click <mark style="color:blue;">**Save & Apply**</mark>
* ONES Application is now ready to manage the added devices

<figure><img src="https://content.gitbook.com/content/zHwVfIGtJG6Cr2B0WHc5/blobs/4N2J4RuK0C20hugITwmo/image.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/zHwVfIGtJG6Cr2B0WHc5/blobs/QObJ0WREeYq0YYJI9KFH/image.png" alt=""><figcaption></figcaption></figure>

### Feature Set

* Role / Region: Shows the device roles and regions
* SKU / ASIC: Shows the device hardware SKU and ASIC vendor
* Port / Max Speed
  * Shows the number of ports per device and max ports speed on the device&#x20;
  * Click on the number of ports to get a detailed view of all the ports on a particular device

<figure><img src="https://content.gitbook.com/content/zHwVfIGtJG6Cr2B0WHc5/blobs/x3Ji3me2KY9d9W0QduBt/Screenshot%202023-03-29%20at%2010.59.37%20PM.png" alt=""><figcaption></figcaption></figure>

* PSUs / Fans: Shows the total number of Power supplies and Fans present on a particular device
* NOS Image: Shows the details of the network operating system running on the device and when it was last updated
* ONIE Version: Shows which ONIE version is running on the device and when the last reboot time of the device
* Agent Version / Network OS: Shows the agent version running on the device and the current active OS version on the device
* Agent status / Last contact: Latest status of the Agent and when it was last communicated with that Agent.
* Connect: Using this feature we directly get the CLI access of the device, so we can use this if we need some tuning or need to push some extra config
* Details: This last option we can again use to get the details of the device

<figure><img src="https://content.gitbook.com/content/zHwVfIGtJG6Cr2B0WHc5/blobs/D6E6P0mHGJbbWJ2gPPbv/Screenshot%202023-03-29%20at%2011.01.35%20PM.png" alt=""><figcaption></figcaption></figure>

### Remove Devices from the Application

* Navigate to <mark style="color:blue;">**Inventory >> Devices >> Add/Remove Devices**</mark>

<figure><img src="https://content.gitbook.com/content/zHwVfIGtJG6Cr2B0WHc5/blobs/cNuGrRXq0SwlSUAzZt4T/11.png" alt=""><figcaption></figcaption></figure>

* Remove all the inputs entered by the user

<figure><img src="https://content.gitbook.com/content/zHwVfIGtJG6Cr2B0WHc5/blobs/9Dez1GASgexOsIuwS1a3/Screenshot%202023-06-05%20at%2010.26.49%20PM.png" alt=""><figcaption></figcaption></figure>

* Click Save and Apply
* Once the application detects, a user is trying to remove devices it shows one confirmation dialogue box to cross-check the status

<figure><img src="https://content.gitbook.com/content/zHwVfIGtJG6Cr2B0WHc5/blobs/p5f7CJ8ECQZXCKQHF1cv/Screenshot%202023-06-05%20at%2010.27.18%20PM.png" alt=""><figcaption></figcaption></figure>

* Now all the devices have been removed from the ONES application

<figure><img src="https://content.gitbook.com/content/zHwVfIGtJG6Cr2B0WHc5/blobs/zflmL4976X97LbmNoSph/image.png" alt=""><figcaption></figcaption></figure>

## Custom Upgrade

{% hint style="success" %}
This feature gives the control to upgrade the device to the new version

An HTTP image link is required to use the custom upgrade
{% endhint %}

* Select any of the devices to upgrade to the new version

<figure><img src="https://content.gitbook.com/content/zHwVfIGtJG6Cr2B0WHc5/blobs/wjXJb8aiQi6MSavyJ5s9/image.png" alt=""><figcaption></figcaption></figure>

* Click on `Custom Upgrade`

<figure><img src="https://content.gitbook.com/content/zHwVfIGtJG6Cr2B0WHc5/blobs/C4OgFExQKMVVxzA89CuF/Screenshot%202023-06-05%20at%2010.06.17%20PM.png" alt=""><figcaption></figcaption></figure>

* put the new Image URL and then `Submit`

{% hint style="info" %}
HTTP image URL should be accessible

This image will be downloaded to the device  and configured as the next boot image and devices will be reloaded

Once the device comes up with the new image, the ONES application will install Telemetry and Fabric manager agent

when we upgrade any device that will be locked to do any further changes after a successful upgrade user can again use the same device for another task\\

Once the image is loaded, the ONES application will show the last image details and time stamp

{% endhint %}

## Upgrade via ZTP

{% hint style="success" %}
Using this page a user can directly upgrade the box
{% endhint %}

* Select any of the devices to upgrade via ZTP

<figure><img src="https://content.gitbook.com/content/zHwVfIGtJG6Cr2B0WHc5/blobs/bLQHlaOWYqE7IsNs2yG2/image.png" alt=""><figcaption></figcaption></figure>

* Click on `Upgrade via ZTP`

<figure><img src="https://content.gitbook.com/content/zHwVfIGtJG6Cr2B0WHc5/blobs/27dRXHfbj7itJfBB4tZk/Screenshot%202023-06-05%20at%2010.05.43%20PM.png" alt=""><figcaption></figcaption></figure>

* Click on `Yes`

{% hint style="info" %}
when we upgrade any device that will be locked to do any further changes, after a successful upgrade user can again use the same device for another task
{% endhint %}

## Reboot Device

* Here we will see how we can reboot a device using&#x20;
* We have the option to choose one or multiple devices at a time to reboot
* Choose one of the devices that we want to reboot

<figure><img src="https://content.gitbook.com/content/zHwVfIGtJG6Cr2B0WHc5/blobs/8qcDY5ZM0Bwoe7m0dvfN/image.png" alt=""><figcaption></figcaption></figure>

* `Click on Reboot`&#x20;

  <figure><img src="https://lh5.googleusercontent.com/0Wa5c1BJMB2VH3vnFH2IUpCpdiPbvlqVTVy58jXOlc6C1PI79q7YGSD0JLyVGYOlL4XfJk_BRGwfaWJV4inS-s6WInkiNeYJVYPQaEcrNBDdwIjiNgysc9uAGEqg5huyWRvGbFXQSRJStPA3-KvqW6UA8jn5WZQSpFerOZEHDnJbv-59Eg9y2C7r" alt=""><figcaption></figcaption></figure>
* `Click on Yes`

{% hint style="info" %}
While rebooting the device, the device will be locked to do any other task, once the reboot is successful, the lock will be removed and the user can take any new action &#x20;
{% endhint %}
