Power On Bare Metal Chassis

PUT/zstack/v1/baremetal/chassis/{chassisUuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "powerOnBaremetalChassis": {},
  "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 '{"powerOnBaremetalChassis":{}}' \
http://localhost:8080/zstack/v1/baremetal/chassis/7405d7ceb46634528618789cde730795/actions

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
chassisUuidStringurlBare metal chassis UUID 2.6.0
systemTags (Optional)ListbodySystem Tag 2.6.0
userTags (Optional)ListbodyUser Tag 2.6.0

API Response

This API returns an empty JSON structure {} on success. On error, the returned JSON structure contains an error field, for example:

{
  "error": {
    "code": "SYS.1001",
    "description": "A message or a operation timeout",
    "details": "Create VM on KVM timeout after 300s"
  }
}

SDK Examples

Java SDK

PowerOnBaremetalChassisAction action = new PowerOnBaremetalChassisAction();
action.chassisUuid = "7405d7ceb46634528618789cde730795";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
PowerOnBaremetalChassisAction.Result res = action.call();

Python SDK

action = PowerOnBaremetalChassisAction()
action.chassisUuid = "7405d7ceb46634528618789cde730795"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()