CLI Get Subcommand
The get
subcommand provides read access to records. There is a singular and plural subcommand for each
managed object type. Type the get
subcommand without any additional parameters for the comprehensive list:
$ onprem get
Usage: onprem get <COMMAND>
Commands:
api-key
api-keys
chasses
chassis
chassis-type
chassis-types
device
devices
...
Output Formats
Supported output formats include [arrow
, json
, markdown
, ps
, and wide
]. The ps
and wide
format definitions are borrowed from
kubectl.
Examples
Get devices
$ onprem get devices
┌──────────────────────┬───────────────┬──────────────┬─────────────┬──────────┬───────────────────────────────────┬─────────────────┬─────────┐
│ id ┆ name ┆ manufacturer ┆ model ┆ assetTag ┆ uuid ┆ lastIpAddr ┆ tainted │
│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ str ┆ str ┆ str ┆ str ┆ str ┆ str ┆ str ┆ bool │
╞══════════════════════╪═══════════════╪══════════════╪═════════════╪══════════╪═══════════════════════════════════╪═════════════════╪═════════╡
│ c6uso9fqrh9u4hh2bnng ┆ c003-n4 ┆ Raspberry Pi ┆ 4B Rev 1.4 ┆ def ┆ e3f42058-9100-5b9b-ba4e-0b81f98f… ┆ 192.168.240.25 ┆ false │
│ c6ut2ffqrh9u4hh2bnqg ┆ c003-n1 ┆ Raspberry Pi ┆ 4B Rev 1.4 ┆ null ┆ 02da31b3-6f0e-5558-bf9f-930b7ed0… ┆ 192.168.240.47 ┆ false │
│ cft7kep32ckrvnbjkt7g ┆ c003-n3 ┆ Raspberry Pi ┆ 4B Rev 1.2 ┆ null ┆ 0c9af28b-bc4f-571f-9c7a-5240f475… ┆ 192.168.240.44 ┆ false │
│ ch2ql7p32ckj9ndqd200 ┆ c006-n1 ┆ NVIDIA ┆ Jetson Nano ┆ null ┆ 185b8d7c-5c4a-5f63-86d9-d80bbf72… ┆ 192.168.241.123 ┆ false │
│ chai28932ckjgou9an3g ┆ c006-n2 ┆ NVIDIA ┆ Jetson Nano ┆ null ┆ 8ed6b72b-9056-5f3e-8ef4-9a1e537d… ┆ 192.168.241.162 ┆ false │
│ ci2fabp32ckvhk1g9qe0 ┆ bitscope-0 ┆ Raspberry Pi ┆ 4B Rev 1.4 ┆ null ┆ 070b9dbf-437a-59e2-b84d-bcabaa3d… ┆ 192.168.240.43 ┆ false │
└──────────────────────┴───────────────┴──────────────┴─────────────┴──────────┴───────────────────────────────────┴─────────────────┴─────────┘%
Get devices in Arrow Format
$ onprem get devices -o arrow > mydevices.arrow
Get Chassis Types in JSON Format
$ onprem get chassis-types -o json | jq
{
"id": "c0lrpqun8s3m99789sgg",
"manufacturer": "BitScope",
"model": "Cluster Blade",
"partNumber": "CB04B",
"type": "Blade",
"url": "http://my.bitscope.com/store/?p=view&i=product+CB04B",
"createdAt": "2022-11-25 17:18:02.247",
"createdByUserId": "blmkmfd5jj89vu275l3g",
"updatedAt": "2022-11-25 17:18:02.247",
"updatedByUserId": "blmkmfd5jj89vu275l3g"
}
{
"id": "cdbuuo932ckju5n1t9p0",
"manufacturer": "BitScope",
"model": "48 Node Edge Rack",
"partNumber": "ER48A",
"type": "RackMount",
"url": "https://docs.bitscope.com/cluster-blade",
"createdAt": "2022-11-25 17:18:02.665",
"createdByUserId": "blmkmfd5jj89vu275l3g",
"updatedAt": "2022-11-25 17:18:02.665",
"updatedByUserId": "blmkmfd5jj89vu275l3g"
}
{
"id": "c6uuol7qrh9u4hh2bo60",
"manufacturer": "Seeed",
"model": "Jetson Mate",
"partNumber": "114992562",
"type": "Blade",
"url": "https://www.seeedstudio.com/Jetson-Mate-p-4899.html",
"createdAt": "2022-11-25 17:18:03.801",
"createdByUserId": "blmkmfd5jj89vu275l3g",
"updatedAt": "2023-04-29 17:20:30.362",
"updatedByUserId": "c1h03qj68fokvtj56vk0"
}
...
Get a single device
$ onprem get device c6uuol7qrh9u4hh2bo60
┌──────────────────────┬─────────┬──────────────┬─────────────┬───────────────────────────────────┬─────────────────┬─────────┐
│ id ┆ name ┆ manufacturer ┆ model ┆ uuid ┆ lastIpAddr ┆ tainted │
│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ str ┆ str ┆ str ┆ str ┆ str ┆ str ┆ bool │
╞══════════════════════╪═════════╪══════════════╪═════════════╪═══════════════════════════════════╪═════════════════╪═════════╡
│ chai28932ckjgou9an3g ┆ c006-n2 ┆ NVIDIA ┆ Jetson Nano ┆ 8ed6b72b-9056-5f3e-8ef4-9a1e537d… ┆ 192.168.241.162 ┆ false │
└──────────────────────┴─────────┴──────────────┴─────────────┴───────────────────────────────────┴─────────────────┴─────────┘
Get HATs in Wide Format
$ onprem get hats -o wide
┌──────────────────────┬──────────────────────┬──────────────────────┬─────────────────────────┬──────────────────────┬─────────────────────────┐
│ id ┆ deviceId ┆ hatTypeId ┆ createdAt ┆ createdByUserId ┆ updatedAt │
│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ str ┆ str ┆ str ┆ datetime[ns] ┆ str ┆ datetime[ns] │
╞══════════════════════╪══════════════════════╪══════════════════════╪═════════════════════════╪══════════════════════╪═════════════════════════╡
│ c772ic7qrh9vs0qgt3a0 ┆ c6ut0jvqrh9u4hh2bnq0 ┆ c5d549vqrh9ga1fc4ddg ┆ 2021-12-30 21:48:32.601 ┆ c1h03qj68fokvtj56vk0 ┆ 2021-12-30 21:48:32.601 │
│ c772iffqrh9vs0qgt3b0 ┆ c6ut2ffqrh9u4hh2bnqg ┆ c5d549vqrh9ga1fc4ddg ┆ 2021-12-30 21:48:45.573 ┆ c1h03qj68fokvtj56vk0 ┆ 2021-12-30 21:48:45.573 │
│ c772igfqrh9vs0qgt3bg ┆ c6ut45vqrh9u4hh2bnr0 ┆ c5d549vqrh9ga1fc4ddg ┆ 2021-12-30 21:48:49.934 ┆ c1h03qj68fokvtj56vk0 ┆ 2021-12-30 21:48:49.934 │
└──────────────────────┴──────────────────────┴──────────────────────┴─────────────────────────┴──────────────────────┴─────────────────────────┘%