opschain infrastructure register
packs:infrastructure
Registers one infrastructure node under a project, environment or
asset. The type must be one of the closed registry (host,
hypervisor, network_device, link); the properties document is
validated against the type's reference vocabulary — unknown *_ref
keys and credential material (passwords, private keys, tokens) refuse
by name. A hypervisor's host_ref, a device's mgmt_host_ref and a
link's endpoint_a_ref/endpoint_b_ref name sibling infrastructure at
the same level or above; a host's transport binding travels as
rpc.provider_ref, a transport-provider code, never a secret. A
duplicate address within the environment warns and never refuses.
Registering a code a deregistered node holds revives that node — the
same row returns, back in the registered state.
opschain infrastructure register --parent /projects/web/environments/prod \
--code kvm01 --name "KVM Host 1" --type host --address 10.1.1.1 \
--properties '{"os_family":"linux","rpc":{"provider_ref":"dc-ssh"}}'
-o, --output json|yaml emits the created node and warnings as a
machine document.
Flags
| Flag | Meaning |
|---|---|
--parent <node-path> | Parent node path (required): a project, environment or asset. |
--code <code> | Node code (required): lowercase letters, numbers and underscores, max 50, unique among the parent's infrastructure. |
--name <name> | Display name (required). |
--description <text> | Description. |
--type <type> | Infrastructure type (required): host, hypervisor, network_device or link. |
--address <address> | Network address. |
--fqdn <fqdn> | Fully qualified domain name. |
--properties <json> | Properties document as JSON text. |
--server <url> | Server base URL (default: the active context / OPSCHAIN_SERVER). |
--auth-token <token> | Admin bearer token override (default: your opschain login session, then $OPSCHAIN_ADMIN_TOKEN, then the token stored by opschain admin login). |