Execute DRS Scheduling

PUT/zstack/v1/clusters/drs/{uuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "executeDRSScheduling": {},
  "systemTags": [],
  "userTags": []
}

In the above example, the systemTags and userTags fields can be omitted. They are listed to indicate that these two fields can be included in the body.

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth YOUR_SESSION_UUID" \
-X PUT -d '{"executeDRSScheduling":{}}' \
http://localhost:8080/zstack/v1/clusters/drs/ff067b9ad438337aa3d5beea6f504f00/actions

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringurlThe UUID of the Cluster DRS, not the Cluster UUID 4.0.0
systemTags (Optional)ListbodySystem tags 4.0.0
userTags (Optional)ListbodyUser tags 4.0.0

API Response

On success, this API returns an empty JSON structure {}. On failure, 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

ExecuteDRSSchedulingAction action = new ExecuteDRSSchedulingAction();
action.uuid = "ff067b9ad438337aa3d5beea6f504f00";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
ExecuteDRSSchedulingAction.Result res = action.call();

Python SDK

ExecuteDRSSchedulingAction action = ExecuteDRSSchedulingAction()
action.uuid = "ff067b9ad438337aa3d5beea6f504f00"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
ExecuteDRSSchedulingAction.Result res = action.call()