Obtaining Nodes in a Resource Pool
Function
This API is used to obtain nodes in a resource pool.
URI
GET /v2/{project_id}/pools/{pool_name}/nodes
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details, see Obtaining a Project ID and Name. |
| pool_name | Yes | String | Resource pool ID. The value is the metadata.name field in the resource pool details. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| continue | No | String | Previous query location in pagination query. |
| limit | No | Integer | Number of records returned for a single pagination query. |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| apiVersion | String | API version. Options:
|
| kind | String | Resource type. Options:
|
| metadata | NodeListMetadata object | Metadata of the resource list, including pagination information. |
| items | Array of Node objects | Nodes. |
| Parameter | Type | Description |
|---|---|---|
| continue | String | Next query position in pagination query |
| remainingItemCount | Long | Remaining resources |
| Parameter | Type | Description |
|---|---|---|
| apiVersion | String | API version. Options:
|
| kind | String | Resource type. Options:
|
| metadata | NodeMetadata object | Node metadata information, including the node name, creation time, and billing mode. |
| spec | NodeSpec object | Node description. |
| status | NodeStatus object | Node status. |
| Parameter | Type | Description |
|---|---|---|
| name | String | Node name. |
| creationTimestamp | String | Creation time. |
| labels | NodeLabels object | Label information of a node. |
| annotations | NodeVOAnnotations object | Node annotations. |
| Parameter | Type | Description |
|---|---|---|
| os.modelarts.node/cluster | String | Name of the cluster where the node is located |
| os.modelarts.node/elastic.quota | String | Logical pool of the node |
| os.modelarts.node/batch.uid | String | ID of a batch creation. |
| os.modelarts.node/batch.name | String | Name of a batch creation. |
| os.modelarts.node/volcano.scheduler.cabinet-exclusive | String | Whether the node is exclusively occupied by the job of the entire cabinet. If yes, the label exists and its value is the ID of the exclusive training job. |
| cce.kubectl.kubernetes.io/cabinet | String | IP address of the TOR switch where the node is located. Use hyphens (-) to separate multiple IP addresses. |
| Parameter | Type | Description |
|---|---|---|
| os.modelarts/npu-topology-placement | String | Topology of the 910 card placement. The bits are numbered from 0 to 15 from right to left. Bit 1 indicates that the card is occupied. |
| os.modelarts.node/drain | String | Node drainage information. |
| Parameter | Type | Description |
|---|---|---|
| flavor | String | Node specifications |
| hostNetwork | NodeNetwork object | Node network information |
| Parameter | Type | Description |
|---|---|---|
| vpc | String | VPC ID |
| subnet | String | Subnet ID |
| securityGroups | Array of strings | Security group IDs |
| Parameter | Type | Description |
|---|---|---|
| phase | String | Node status. Options:
|
| az | String | AZ to which the node belongs |
| privateIp | String | IP address of a node |
| resources | NodeResource object | Node resources |
| availableResources | NodeResource object | Available node resources |
| taints | Array of Taint objects | Node taints. |
| Parameter | Type | Description |
|---|---|---|
| cpu | String | CPUs. |
| memory | String | Memory. |
| nvidia.com/gpu | String | GPUs. |
| huawei.com/ascend-snt3 | String | NPU resources on the node with Ascend snt3 processors, including Ascend snt3 and snt3p |
| huawei.com/ascend-1980 | String | NPU resources on the node with Ascend 1980 processors, including ascend-1980. |
| Parameter | Type | Description |
|---|---|---|
| key | String | Taint key to be applied to the node. |
| value | String | Taint value associated with the taint key. |
| effect | String | Impact of a taint on containers that do not tolerate it. Options:
|
| timeAdded | String | Time when a taint is added. |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error message. |
Example Requests
Obtain nodes in a resource pool.
GET https://{endpoint}/v2/{project_id}/pools/{pool_name}/nodes
{ } Example Responses
Status code: 200
OK
{
"kind" : "NodeList",
"apiVersion" : "v2",
"metadata" : { },
"items" : [ {
"kind" : "Node",
"apiVersion" : "v2",
"metadata" : {
"name" : "os-node-created-zlncn",
"creationTimestamp" : "2022-09-16T05:32:44Z"
},
"spec" : {
"flavor" : "modelarts.vm.cpu.4ud"
},
"status" : {
"phase" : "Available",
"az" : "xx-xxxx-xx",
"privateIp" : "192.168.0.1",
"resources" : {
"cpu" : "3920m",
"memory" : "6270Mi"
},
"availableResources" : {
"cpu" : "2970m",
"memory" : "4558Mi"
}
}
}, {
"kind" : "Node",
"apiVersion" : "v2",
"metadata" : {
"name" : "os-node-created-4s522",
"creationTimestamp" : "2022-09-16T03:20:53Z"
},
"spec" : {
"flavor" : "modelarts.vm.cpu.4ud"
},
"status" : {
"phase" : "Available",
"az" : "xx-xxxx-xx",
"privateIp" : "192.168.0.2",
"resources" : {
"cpu" : "3920m",
"memory" : "6270Mi"
},
"availableResources" : {
"cpu" : "2970m",
"memory" : "4558Mi"
}
}
}, {
"kind" : "Node",
"apiVersion" : "v2",
"metadata" : {
"name" : "os-node-created-v7hfj",
"creationTimestamp" : "2022-09-16T09:16:37Z"
},
"spec" : {
"flavor" : "modelarts.vm.cpu.4ud"
},
"status" : {
"phase" : "Available",
"az" : "xx-xxxx-xx",
"privateIp" : "192.168.0.3",
"resources" : {
"cpu" : "3920m",
"memory" : "6270Mi"
},
"availableResources" : {
"cpu" : "3720m",
"memory" : "5670Mi"
}
}
} ]
} Status code: 404
Not found.
{
"error_code" : "ModelArts.50015001",
"error_msg" : "pool not found"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 404 | Not found. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.