Skip to content

The admin CLI needs to have a consistent interface #1849

@inf0rmatiker

Description

@inf0rmatiker

This Epic is to track work done to make the forge/carbide-admin-cli consistent with how it handles inputs and how it displays output.

Stories should be created to track categories of work, i.e. "Powershelf commands output formatting", and Tasks for smaller units of work like "Add JSON support to powershelf show command".

The work can largely be broken into two categories:

1. Input

Positional arguments, flags, and command/subcommand names should be consistent, especially within common groups.

For example, the inputs to machine show should be implemented like, and look like the inputs to switch show and power-shelf show.

Current example: if one takes a positional arg machine show machine_id, where id is a parsed MachineId, then switch show id, where id is a String is inconsistent -> this needs to be rectified to switch show switch_id where switch_id is a parsed SwitchId.

2. Output

All output formats should be implemented and supported where it is reasonable and makes sense.

For example, "show" commands should all support JSON, YAML, Text/ASCII table, and CSV.

Text/ASCII Table Formatting

When displaying a singular resource, like a Switch, or Managed Host, a detailed Text representation should be used.

Text Format

The purpose of Text is to be as friendly to human-readability as possible.
So, no ALL_CAPS_WITH_UNDERSCORES, just use capitalized titles, e.g. "Serial Number".

Example Text format (fac mh show <id>)

colossus@forge-rack-manager-ipp6-2:~/cacarlson$ fac mh show fm100ht5ldjmk2g8d4reoopaqu3ec4gtp6n6ds02tdjvfpt23bbr88loj40
Hostname    : Unknown
State       : Ready
    Time in State : 1 hour and 5 minutes
    State SLA     :
    In State > SLA: falseHost:
----------------------------------------
  ID                       : fm100ht5ldjmk2g8d4reoopaqu3ec4gtp6n6ds02tdjvfpt23bbr88loj40
  Slot Number              : 16
  Tray Index               : 6
  Last reboot completed    : 2026-05-20 04:02:15.505139 UTC
  Last reboot requested    : 2026-05-17 17:17:11.458010921 UTC/Reboot
  Serial Number            : 1932725000836
  BIOS Version             : 02.04.14
  GPU Count                : 4
  IB Interface Count       : 4
  Memory                   : 960 GiB (480 GiBx2)
  Admin IP                 : Unknown
  Admin MAC                : Unknown
  Associated Instance Type : Unassociated
  Quarantined              : no
  Health
    Probe Alerts           : HeartbeatTimeout [Target: scout]: Last scout heartbeat over PT300S ago
    Health Reports         : hardware-health.bmc-leak-detectors,hardware-health.bmc-sensors,hardware-health.tray-leak-detection,scout
  BMC
    Version                : Unknown
    Firmware Version       : Unknown
    IP                     : 10.85.111.185
    MAC                    : 3C:6D:66:A5:3B:96

ASCII Table format

Example ASCII Table (mh show)

When displaying multiple resources, an ASCII Table should be used with a row for each resource represented.

colossus@forge-rack-manager-ipp6-2:~/cacarlson$ fac mh show
+---+-------------------------------------------------------------+-------+
|   | Machine IDs (H/D)                                           | State |
+===+=============================================================+=======+
| U | fm100ht5ldjmk2g8d4reoopaqu3ec4gtp6n6ds02tdjvfpt23bbr88loj40 | Ready |
+---+-------------------------------------------------------------+-------+
| U | fm100ht6ipagom8c1q317sbj20ci4h4ojv5hmrun9k1jrcd0t2atcc5hi90 | Ready |
+---+-------------------------------------------------------------+-------+
| U | fm100ht76l3lfm636jojjsta9nq8b3sk7imlv7c5n92i26r1oge5996k1q0 | Ready |
+---+-------------------------------------------------------------+-------+
| H | fm100htdcr4ldsaprnqhnnto4rqoelsrk321fbo6olnqbsnf04dg8md93b0 | Ready |
+---+-------------------------------------------------------------+-------+
| U | fm100htjftl03lsc13vit0ck6ep8duhgk0b8cj1h5a0e80sg0kr248go36g | Ready |
+---+-------------------------------------------------------------+-------+
| U | fm100htmmqoqqqbe41og7vsv5slhk3mofvv0he52ojggn00cm82nm8l4040 | Ready |
+---+-------------------------------------------------------------+-------+
| U | fm100htmqd91q0jniqpcc33vs21em5199359di60v6g6kmn264b2suh3q10 | Ready |
+---+-------------------------------------------------------------+-------+
| U | fm100httrhv8c050jd1ie9ki325s9va5gkdiid495mm8ird9amkhph65dhg | Ready |
+---+-------------------------------------------------------------+-------+ 

Metadata

Metadata

Assignees

Labels

admin toolsIssue related to admin tools (CLI/UI)rack lifecycleIssues that relate to managing the lifecycle of a full rack (compute, switches and powershelves)

Type

No fields configured for Epic.

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions