Bootstrap Mini Appliance

POST/zstack/v1/mini-clusters/hosts

Headers

Authorization: OAuth the-session-uuid

Body

{
  "params": {
    "local": {
      "sn": "RD-BJD-001-07311A",
      "ipmi": {
        "gw": "172.20.27.1",
        "ip": "172.20.27.21/24",
        "vlan": "27"
      },
      "mgmt": {
        "gw": "172.20.26.1",
        "ip": "172.20.26.21/24",
        "vlan": "26",
        "bond": "lacp"
      }
    },
    "peer": {
      "sn": "RD-BJD-001-07311B",
      "mgmt": {
        "gw": "172.20.26.1",
        "ip": "172.20.26.22/24",
        "vlan": "26",
        "bond": "ab"
      }
    }
  },
  "systemTags": [],
  "userTags": []
}

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

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"local":{"sn":"RD-BJD-001-07311A","ipmi":{"gw":"172.20.27.1","ip":"172.20.27.21/24","vlan":"27"},"mgmt":{"gw":"172.20.26.1","ip":"172.20.26.21/24","vlan":"26","bond":"lacp"}},"peer":{"sn":"RD-BJD-001-07311B","mgmt":{"gw":"172.20.26.1","ip":"172.20.26.22/24","vlan":"26","bond":"ab"}}}}' \
http://localhost:8080/zstack/v1/mini-clusters/hosts

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
localMiniHostInfobody (included in params structure)  3.6.0
peerMiniHostInfobody (included in params structure)  3.6.0
resourceUuid (Optional)Stringbody (included in params structure)  3.6.0
tagUuids (Optional)Listbody (included in params structure)Tag UUID list 3.6.0
systemTags (Optional)Listbody  3.6.0
userTags (Optional)Listbody  3.6.0

API Response

This API returns an empty JSON structure {} on success, and a JSON structure containing an error field on failure, for example:

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