Attach PXE Server to Bare Metal Cluster
Headers
Authorization: OAuth the-session-uuidBody
{
"params": {},
"systemTags": [],
"userTags": []
}In the example above, systemTags and userTags fields can be omitted. They are listed to indicate that these fields can be included in the body.
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{}}' \
http://localhost:8080/zstack/v1/clusters/47b43452a77a309e9c9e1b3b23a9e978/pxeservers/b069eaeb0e2c355aaabca9738fb8332bParameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| pxeServerUuid | String | url | Deployment server UUID | 3.1.1 | |
| clusterUuid | String | url | Bare metal cluster UUID | 3.1.1 | |
| systemTags (Optional) | List | body | System Tag | 3.1.1 | |
| userTags (Optional) | List | body | User Tag | 3.1.1 |
API Response
Response Example
{
"inventory": {
"uuid": "976aafa241603b26acb48dce89e29dec",
"name": "test",
"hostname": "127.0.0.1",
"sshUsername": "root",
"sshPassword": "password",
"sshPort": 22,
"storagePath": "/zstack_bm_cache",
"dhcpInterface": "eth0",
"dhcpRangeBegin": "10.0.0.1",
"dhcpRangeEnd": "10.0.0.255",
"dhcpRangeNetmask": "255.255.255.0",
"state": "Enabled",
"status": "Disconnected"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | 0.6 | |
| error | ErrorCode | Error code. If not null, the operation failed. When the operation is successful, this field is null. For details, see error | 3.1.1 |
| inventory | BaremetalPxeServerInventory | For details, see inventory | 3.1.1 |
error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, globally unique identifier of the error, for example SYS.1000, HOST.1001 | 0.6 |
| description | String | Brief description of the error | 0.6 |
| details | String | Detailed error information | 0.6 |
| elaboration | String | Reserved field, default is null | 0.6 |
| opaque | LinkedHashMap | Reserved field, default is null | 0.6 |
| cause | ErrorCode | Root cause: the source error that triggered the current error. If there is no original error, this field is null | 0.6 |
inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | UUID of the resource, uniquely identifying the resource | 3.1.1 |
| zoneUuid | String | Data Center UUID | 3.1.1 |
| name | String | Resource name | 3.1.1 |
| description | String | Detailed description of the resource | 3.1.1 |
| hostname | String | Deployment server address | 3.1.1 |
| sshUsername | String | Deployment server SSH account | 3.1.1 |
| sshPassword | String | Deployment server SSH password | 3.1.1 |
| sshPort | Integer | Deployment server SSH port | 3.1.1 |
| storagePath | String | Deployment server storage path | 3.1.1 |
| dhcpInterface | String | DHCP request listening NIC | 3.1.1 |
| dhcpInterfaceAddress | String | DHCP request listening NIC IP address | 3.1.1 |
| dhcpRangeBegin | String | DHCP address range start | 3.1.1 |
| dhcpRangeEnd | String | DHCP address range end | 3.1.1 |
| dhcpRangeNetmask | String | DHCP subnet mask | 3.1.1 |
| state | String | Deployment server running state | 3.1.1 |
| status | String | Deployment server connection status | 3.1.1 |
| createDate | Timestamp | Create time | 3.1.1 |
| lastOpDate | Timestamp | Last modification time | 3.1.1 |
| totalCapacity | Long | Storage path total capacity | 3.1.1 |
| availableCapacity | Long | Storage path available capacity | 3.1.1 |
| attachedClusterUuids | List | Deployment server attached cluster UUID list | 3.1.1 |
SDK Examples
Java SDK
AttachBaremetalPxeServerToClusterAction action = new AttachBaremetalPxeServerToClusterAction();
action.pxeServerUuid = "b069eaeb0e2c355aaabca9738fb8332b";
action.clusterUuid = "47b43452a77a309e9c9e1b3b23a9e978";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AttachBaremetalPxeServerToClusterAction.Result res = action.call();Python SDK
action = AttachBaremetalPxeServerToClusterAction()
action.pxeServerUuid = "b069eaeb0e2c355aaabca9738fb8332b"
action.clusterUuid = "47b43452a77a309e9c9e1b3b23a9e978"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()