Cani alpha add
cani alpha add
Add items to the inventory
Synopsis
Add items to the inventory.
When called with a slug or part number, searches all hardware registries (rack, device, module, cable) and automatically determines the type.
Use subcommands (rack, device, module, cable, location) to constrain to a specific type; subcommands reject slugs that do not match their type.
cani alpha add [slug-or-part-number] [flags]
Options
-y, --accept Automatically accept recommended values.
-a, --auto Automatically recommend values for parent hardware
-h, --help help for add
-L, --list-supported-types List supported hardware types.
--location string Parent location UUID or name
--metadata stringArray Provider metadata key=value pairs (repeatable)
--name string Name for the added item
--pad-width int Zero-pad width for sequential names (0 = auto).
-p, --parent string Parent item UUID. (default "00000000-0000-0000-0000-000000000000")
--prefix string Name prefix for sequential naming (used with --qty).
-q, --qty int Quantity of items to add. (default 1)
--serial string Serial number
--start int Starting number for sequential names (used with --prefix). (default 1)
--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)
--tag stringArray Tag(s) to apply to the item (repeatable)
Options inherited from parent commands
--config string config file (default "/home/runner/.cani/cani.yml")
--datastore string datastore type (json, postgres) (default "json")
--datastore-path string override path to the datastore file (for testing)
--debug enable debug mode
--strict require a resolved device type (slug) for all devices (default true)
--types-dirs strings local directories 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
--types-repos strings git repo URLs with additional hardware types
SEE ALSO
- cani alpha - Run commands that are considered unstable.
- cani alpha add cable - Add cable(s) to the inventory.
- cani alpha add connections - Add cable connections from a YAML connection map or CSV file.
- cani alpha add device - Add device(s) to the inventory.
- cani alpha add ip - Add an IP address to the inventory.
- cani alpha add location - Add a location to the inventory.
- cani alpha add metadata - Create metadata definitions (roles, statuses, tags) in the local inventory.
- cani alpha add module - Add module(s) to the inventory.
- cani alpha add prefix - Add an IP prefix (subnet) to the inventory.
- cani alpha add rack - Add rack(s) to the inventory.
- cani alpha add vlan - Add a VLAN to the inventory.