Use the ZEDEDA CLI to Upload a Hardware Model

Introduction

This article walks you through the steps to upload a hardware model JSON file to ZEDEDA Cloud to create or update a hardware model in your local marketplace.  

This is a series of articles. You will likely follow them in this order.

  1. Create a Hardware Model  
  2. Use the ZEDEDA CLI to Upload a Hardware Model - You are here!
  3. Use the ZEDEDA CLI to Update a Hardware Model Logo 

Prerequisites

Upload a Hardware Model to Docker

  1. After you create a hardware model, you can upload it.
  2. Upload the validated hardware model .json file to the zcli docker container.
    docker cp /Users/uname/Desktop/HWmodel.json docker_containerID:/home/zcli
  3. Continue on to create a new brand.

Create a New Brand

After you upload a hardware model, if you don’t see your hardware brand, you can create a new brand.

  1. Existing brands can be listed using zcli:
    zcli> zcli brand show
  2. If you don’t see your hardware brand, create a new "brand" in zcli:
    zcli> zcli brand create NAME --title=TITLE
    Example
    zcli> zcli brand create Advantech --title=Advantech
    
  3. Continue on to create and link the new device model. 

Create and Link the New Device Model

After you upload the hardware model, you can create the new device model and link it to the docker container json file path. If you already put your device models somewhere else, you can use that path instead of the path in the following examples.

  1. Create the new device model and link the hardware model .json file path:
    zcli> zcli model create NAME --hardware-details=PATH/TO/JSON --brand=BRAND [--title=TITLE]
    Example
    zcli> zcli model create UNO-148 --hardware-details=/home/zcli/uno148.json --title=Advantech --brand=Advantech 

Update an Existing Model

It is possible to update an existing model entry if needed. Modify the hardware model .json file then upload to the docker container.

  1. Use the "model update" command to apply the change:
    zcli> zcli model update NAME [--hardware-details=PATH/TO/JSON] [--brand=BRAND] [--title=TITLE]
    Example
    zcli> zcli model update UNO-148 --title=UNO-148 --brand=Advantech --hardware-details=/home/zcli/uno148.json  
    
  2. Upload the file to the docker container
  3. Changes made to an existing hardware model entry will be reflected on all Edge Nodes that reference the respective hardware model.

Next Steps

This is a series of articles. You will likely follow them in this order.

  1. Create a Hardware Model  
  2. Use the ZEDEDA CLI to Upload a Hardware Model - You are here!
  3. Use the ZEDEDA CLI to Update a Hardware Model Logo 

After you’ve completed the series, you might be interested in the following articles. 

Onboard an Edge Node to ZEDEDA Cloud

Was this article helpful?
2 out of 2 found this helpful