GetHostNUMATopology
API Request
URLs
POST zstack/v1/hosts/{uuid}/numaHeaders
Authorization: OAuth the-session-uuidCurl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/hosts/21529457e42c30f0a9b2a137915a0b28/numaParameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | Host UUID | 4.3.12 |
API Response
Response Example
{
"topology": {
"0": {
"distance": ["10", "10", "21", "21"],
"cpus": ["0", "1", "2", "3", "4", "5", "6", "7"],
"VMsUuid": ["f7bae73b9874344b8766dfcdda48ad6e", "f7bae73b9874344b8766dfcdda48ad6e"],
"free": 5688.0,
"size": 8191.0
},
"1": {
"distance": ["10", "10", "21", "21"],
"cpus": ["16", "17", "18", "19", "20", "21", "22", "23"],
"VMsUuid": ["f7bae73b9874344b8766dfcdda48ad6e", "f7bae73b9874344b8766dfcdda48ad6e"],
"free": 5688.0,
"size": 8191.0
},
"2": {
"distance": ["21", "21", "10", "10"],
"cpus": ["8", "9", "10", "11", "12", "13", "14", "15"],
"VMsUuid": ["f7bae73b9874344b8766dfcdda48ad6e", "f7bae73b9874344b8766dfcdda48ad6e"],
"free": 5688.0,
"size": 8191.0
},
"3": {
"distance": ["21", "21", "10", "10"],
"cpus": ["24", "25", "26", "27", "28", "29", "30", "31"],
"VMsUuid": ["f7bae73b9874344b8766dfcdda48ad6e", "f7bae73b9874344b8766dfcdda48ad6e"],
"free": 5688.0,
"size": 8191.0
}
},
"name": "172.20.14.243",
"uuid": "7fd86bbe6ca94a8d810aa1d33e29932c"
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | Error code. If not null, the operation failed. If null, the operation succeeded. See details error | 4.3.12 |
| name | String | Resource name | 4.3.12 |
| uuid | String | Resource UUID, uniquely identifies the resource | 4.3.12 |
| topology | String | NUMA topology information, see details topology | 4.3.12 |
#error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, globally unique identifier of the error, e.g. SYS.1000, HOST.1001 | 4.3.12 |
| description | String | Brief description of the error | 4.3.12 |
| details | String | Detailed error information | 4.3.12 |
| elaboration | String | Reserved field, default is null | 4.3.12 |
| opaque | LinkedHashMap | Reserved field, default is null | 4.3.12 |
| cause | ErrorCode | Root cause, the error that caused the current error. If there is no original error, this field is null | 4.3.12 |
#topology
| Name | Type | Description | Starting Version |
|---|---|---|---|
| cpus | array[string] | CPU ID list contained in the NUMA node | 4.3.12 |
| size | long | Total memory size of NUMA node (in bytes) | 4.3.12 |
| distance | array[string] | Distance from this NUMA node to other nodes | 4.3.12 |
| VMsUuid | array[string] | UUID of VMs associated with this NUMA node | 4.3.12 |
| free | long | Available memory size of NUMA node (in bytes) | 4.3.12 |
SDK Examples
Java
SDK
GetHostNUMATopologyAction action = new GetHostNUMATopologyAction();
action.uuid = "2b8e587e99093c46b27e774dfe93024f";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetHostNUMATopologyAction.Result res = action.call();Python
SDK
GetHostNUMATopologyAction action = new GetHostNUMATopologyAction();
action.uuid = "2b8e587e99093c46b27e774dfe93024f";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetHostNUMATopologyAction.Result res = action.call();