get_hardware_cluster

Function get_hardware_cluster 

Source
pub async fn get_hardware_cluster(
    infra: &InfraContext<'_>,
    token: &str,
    params: &GetHardwareClusterParams,
) -> Result<HardwareClusterResult, Error>
Expand description

Fetch hardware inventory for every member of an HSM group.

When params.group_name is unset, the first group the caller has access to is used and surfaced back through HardwareClusterResult::hsm_group_name. Per-node inventory queries run concurrently, capped by HW_INVENTORY_CONCURRENCY_LIMIT. Empty groups are logged but not treated as an error.

ยงErrors

  • [Error::BadRequest] when params.group_name is unreachable for the caller.
  • [Error::NotFound] when the caller has no accessible groups and no params.group_name was supplied.
  • [Error::NetError] / [Error::CsmError] from get_group_available / get_group. Per-node inventory failures degrade to an empty NodeSummary row rather than surfacing an error.