Skip to content

Cani alpha add module

cani alpha add module

Add module(s) to the inventory.

Synopsis

Add one or more modules to the inventory by slug or part number.

Supports strategy-based placement across multiple devices: --device '%{FILL}' Fill available bays per device before moving to next --device hpe-xd670 Target all devices matching this slug --device Target a single device

Bays are auto-filtered by the module's hardware type (e.g. gpu modules go into GPU bays). Use --bay-filter to override.

A spare is stored at a location instead of a bay, and is tracked by the identity it records: --spare --location --serial --asset-tag

Template variables for --name: %{DEVICE}, %{BAY}, %{SEQ}

cani alpha add module [flags]

Options

      --device string          Parent device UUID, name, slug, or strategy (%{FILL})
      --bay string             Module bay name on the parent device
      --bay-filter string      Filter bays by name substring (overrides auto-filter)
      --name string            Module name, expansion pattern, or template (%{DEVICE}, %{BAY}, %{SEQ})
      --location string        Location filter for device selection, or the storage location of a --spare module (name or UUID)
      --spare                  Store the module as a spare at --location instead of installing it in a device
      --dry-run                Show placement plan without committing changes

Options inherited from parent commands

  -a, --auto                   Automatically recommend values for parent hardware
  -y, --accept                 Automatically accept recommended values.
  -L, --list-supported-types   List supported hardware types.
  -q, --qty int                Quantity of items to add. (default 1)
  -p, --parent string          Parent item UUID. (default "00000000-0000-0000-0000-000000000000")
      --prefix string          Name prefix for sequential naming (used with --qty).
      --start int              Starting number for sequential names (used with --prefix). (default 1)
      --pad-width int          Zero-pad width for sequential names (0 = auto).
      --tag stringArray        Tag(s) to apply to the item (repeatable)
      --metadata stringToString Provider metadata key=value pairs (repeatable)
      --status string          Status (Active, Available, Connected, Decommissioned, Decommissioning, Deprecated, Deprovisioning, Down, End-of-Life, Extended Support, Failed, Inventory, Maintenance, Offline, Planned, Primary, Provisioning, Reserved, Retired, Secondary, Staging, or any custom status)
      --serial string          Serial number
      --asset-tag string       Asset tag
      --config string          config file (default "/home/runner/.cani/cani.yml")
      --debug                  enable debug mode
      --datastore string       datastore type (json, postgres) (default "json")
      --datastore-path string  override path to the datastore file (for testing)
      --types-dirs stringSlice local directories with additional hardware types
      --types-repos stringSlice git repo URLs with additional hardware types
      --types-repo-clone       clone types repos that are not yet cached locally
      --types-repo-pull        pull latest changes from types repos on startup
      --strict                 require a resolved device type (slug) for all devices (default true)

SEE ALSO