Hardware State Manager has two important parts:
networks.yaml
and other sources).TOKEN
variable.
See Retrieve an Authentication Token.cray
CLI commands on this page require the Cray command line interface to be configured.
See Configure the Cray CLI.API call
ncn# curl -H "Authorization: Bearer ${TOKEN}" https://api_gw_service.local/apis/sls/v1/hardware | jq
CLI command
ncn# cray sls hardware list --format json
In either case, the output from SLS should consist of a list of objects that look like the following:
{
"Parent": "x1000c7s1b0",
"Xname": "x1000c7s1b0n0",
"Type": "comptype_node",
"Class": "Mountain",
"TypeString": "Node",
"ExtraProperties": {
"Aliases": [
"nid001228"
],
"NID": 1228,
"Role": "Compute"
}
}
API call
ncn# curl -s -k -H "Authorization: Bearer ${TOKEN}" https://api_gw_service.local/apis/smd/hsm/v2/Inventory/EthernetInterfaces | jq
CLI command
ncn# cray hsm inventory ethernetInterfaces list --format json
In either case, the output from SMD should consist of a list of objects that look like the following:
{
"ID": "0040a6838b0e",
"Description": "",
"MACAddress": "0040a6838b0e",
"IPAddress": "10.100.1.147",
"LastUpdate": "2020-07-24T23:44:24.578476Z",
"ComponentID": "x1000c7s1b0n0",
"Type": "Node"
}