Adding Nodes to a Node Group

Function

Adds nodes to a node group. During this process, the system checks whether the remaining resources of the current node are sufficient for running all containerized applications deployed in the target node group. If the remaining resources do not meet the requirements, nodes fail to be added to the node group.

MindEdge Framework checks the CPU, memory, and NPU resources of nodes based on the requirements of containerized applications. You need to ensure that other types of container resources are sufficient.

The resource restrictions of MindEdge Framework take effect only on nodes in the ready state.

Syntax

Operation type: POST

URL: https://{ip}:{port}/edgemanager/v1/nodegroup/node

Request message body:

{
    "groupID": NodeGroupId,
    "nodeIDs": [NodeId]
}

Request Parameters

Table 1 Description

Parameter

Mandatory/Optional

Description

Value

groupID

Mandatory

ID of the new node group

32-bit unsigned number. The minimum value is 1 and the maximum value is 2^32-1.

nodeIDs

Mandatory

Node ID array of the new node group

32-bit unsigned numeric array. The maximum number of elements in an array is 1024. The minimum value is 1 and the maximum value is 2^32-1.

Usage Example

Request:

POST https://10.10.10.10:30035/edgemanager/v1/nodegroup/node

Request message body:

{
    "groupID": 1,
    "nodeIDs": [1,2]
}

Response:

{
    "status": "00000000",
    "msg": "success"
}

Response status code: 200

Output Description

Table 2 Operation output description

Parameter

Type

Description

status

String

Error code

msg

String

Description

data

Object

Batch operation result. If all batch operations are successful, this parameter is not returned.

Table 3 data field description

Parameter

Type

Description

successIDs

Array

ID of the node that is successfully added

failedInfos

Hash table. The key and value are character strings.

key is the ID of the node group that fails to be added, and value is the failure cause.