Skip to content

Cani alpha add connections generate

cani alpha add connections generate

Generate a connection map from a topology pattern.

Synopsis

Generate a connection map YAML file from a named topology pattern.

Supported patterns: star, leaf-spine, ring

Examples: cani alpha add connections generate star --hub switch-01 --spokes "node-{01..48}" > topo.yaml cani alpha add connections generate leaf-spine --leaves "leaf-{01..04}" --spines "spine-{01..02}" cani alpha add connections generate ring --devices "sw-{01..08}"

cani alpha add connections generate [flags]

Options

      --hub string             Hub device name (star topology)
      --hub-ports string       Port pattern on hub (e.g. eth{1..48})
      --spokes string          Spoke device pattern (e.g. node-{01..48})
      --spoke-port string      Port name on each spoke (default "eth0")
      --leaves stringSlice     Leaf switch names or pattern (leaf-spine topology)
      --spines stringSlice     Spine switch names or pattern (leaf-spine topology)
      --uplinks-per-leaf int   Number of uplinks from each leaf to each spine (default 1)
      --devices stringSlice    Ordered device names for ring topology
      --port-a string          Port for forward ring link (default "eth0")
      --port-b string          Port for reverse ring link (default "eth1")
      --cable-type string      Default cable type for generated connections
      --cable-color string     Default cable color

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 stringArray   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
      --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