better/compute
API

inventory

A node's hardware and software inventory as the daemon reports it, kept as an append-only history of snapshots: a new snapshot is stored each time the node's reported section set changes. Every method decides `compute:nodes:read` on `compute-node/{nodeId}` and only answers for nodes the calling tenant owns. See [Inventory and health](/docs/guides/nodes/inventory-and-health).

A node's hardware and software inventory as the daemon reports it, kept as an append-only history of snapshots: a new snapshot is stored each time the node's reported section set changes. Every method decides compute:nodes:read on compute-node/{nodeId} and only answers for nodes the calling tenant owns. See Inventory and health.

All 3 methods are served by this release.

MethodKindAuthorizationPhaseStatus
getreadcompute:nodes:read @ compute-nodev0.1registered
historyreadcompute:nodes:read @ compute-nodev0.2registered
diffreadcompute:nodes:read @ compute-nodev0.2registered

get

POST /api/compute/inventory/get

Returns the node's latest inventory snapshot: its hash, its sections and when it was collected.

NOT_FOUND when the node has no inventory yet or is not owned by the tenant.

  • Kind: read
  • Authorization: compute:nodes:read @ compute-node
  • Module: inventory
  • Phase: v0.1 (registered)

Input

FieldTypeRequiredConstraints
tenantIdstringyesmatches ^[A-Za-z0-9._:-]{1,128}$
nodeIdstringyesmatches ^node_[0-9a-hjkmnp-tv-z]{26,52}$

history

POST /api/compute/inventory/history

Lists the node's inventory snapshots newest first; returns a page with a cursor.

limit is at most 100 (20 by default). The cursor is the id of the last snapshot returned. NOT_FOUND when the node is not owned by the tenant.

  • Kind: read
  • Authorization: compute:nodes:read @ compute-node
  • Module: inventory
  • Phase: v0.2 (registered)

Input

FieldTypeRequiredConstraints
tenantIdstringyesmatches ^[A-Za-z0-9._:-]{1,128}$
nodeIdstringyesmatches ^node_[0-9a-hjkmnp-tv-z]{26,52}$
limitinteger1-100
cursorstringmatches ^inv_[0-9a-hjkmnp-tv-z]{26,52}$

diff

POST /api/compute/inventory/diff

Compares two of the node's snapshots, named by snapshot id or hash, and returns the changes between them with their stable device ids (GPU UUID, disk WWN or MAC).

  • Without to, the latest snapshot is used; without from, the snapshot before to. A node with a single snapshot diffs against nothing: from is empty and there are no changes.

  • Change types are gpu.missing, gpu.added, disk.replaced, driver.changed and mig.layout.changed, each with before and after values where they apply.

  • NOT_FOUND when the node has no inventory, a named snapshot does not exist for the node, or the node is not owned by the tenant.

  • Kind: read

  • Authorization: compute:nodes:read @ compute-node

  • Module: inventory

  • Phase: v0.2 (registered)

Input

FieldTypeRequiredConstraints
tenantIdstringyesmatches ^[A-Za-z0-9._:-]{1,128}$
nodeIdstringyesmatches ^node_[0-9a-hjkmnp-tv-z]{26,52}$
fromstringmatches ^(inv_[0-9a-hjkmnp-tv-z]{26,52}|[0-9a-f]{64})$
tostringmatches ^(inv_[0-9a-hjkmnp-tv-z]{26,52}|[0-9a-f]{64})$

Was this page helpful?

Better Compute is created by Sean Filimon

Last updated

On this page