Start PXE Server

PUT/zstack/v1/baremetal/pxeservers/{uuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "startBaremetalPxeServer": {},
  "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 PUT -d '{"startBaremetalPxeServer":{}}' \
http://localhost:8080/zstack/v1/baremetal/pxeservers/340b1f6b12ab305aa05c12ded00020e7/actions

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringurlUUID of the resource, uniquely identifying the resource 2.6.0
systemTags (Optional)ListbodySystem Tag 2.6.0
userTags (Optional)ListbodyUser Tag 2.6.0

API Response

Response Example

{
  "inventory": {
    "uuid": "ac3a53373cfd328b8932bdd29f4886dd",
    "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": "Connected"
  }
}
NameTypeDescriptionStarting Version
successboolean 0.6
errorErrorCodeError code. If not null, the operation failed. When the operation is successful, this field is null. For details, see error2.6.0

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier of the error, for example SYS.1000, HOST.10010.6
descriptionStringBrief description of the error0.6
detailsStringDetailed error information0.6
elaborationStringReserved field, default is null0.6
opaqueLinkedHashMapReserved field, default is null0.6
causeErrorCodeRoot cause: the source error that triggered the current error. If there is no original error, this field is null0.6

SDK Examples

Java SDK

StartBaremetalPxeServerAction action = new StartBaremetalPxeServerAction();
action.uuid = "340b1f6b12ab305aa05c12ded00020e7";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
StartBaremetalPxeServerAction.Result res = action.call();

Python SDK

action = StartBaremetalPxeServerAction()
action.uuid = "340b1f6b12ab305aa05c12ded00020e7"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()