Add ZCE-X

POST/zstack/v1/zce-x-plugin

Headers

Authorization: OAuth the-session-uuid

Body

{
  "params": {
    "name": "zce-x-storage",
    "managementIp": "172.0.0.1",
    "apiPort": 8056
  },
  "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":{"name":"zce-x-storage","managementIp":"172.0.0.1","apiPort":8056}}' \
http://localhost:8080/zstack/v1/zce-x-plugin

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
nameStringbody (included in params structure)ZCE-X name 4.10.6
adminToken (Optional)Stringbody (included in params structure)Access token for taking over ZCE-X. Required when taking over, not needed before initialization 4.10.6
managementIp (Optional)Stringbody (included in params structure)ZCE-X management network IP 4.10.6
apiPort (Optional)intbody (included in params structure)ZCE-X API port 4.10.6
resourceUuid (Optional)Stringbody (included in params structure)Resource UUID 4.10.6
tagUuids (Optional)Listbody (included in params structure)Tag UUID list 4.10.6
systemTags (Optional)ListbodySystem Tag 4.10.6
userTags (Optional)ListbodyUser Tag 4.10.6

API Response

Response Example

{
  "inventory": {
    "uuid": "77e1393bf5aa4536a018b4c0c4e29c72",
    "name": "zce-x-plugin",
    "managementIp": "127.0.0.1",
    "apiPort": 8056,
    "createDate": "Nov 14, 2017 2:20:57 PM",
    "lastOpDate": "Nov 14, 2017 2:20:57 PM"
  }
}
NameTypeDescriptionStarting Version
successbooleanWhether the addition was successful4.10.6
inventoryZceXInventoryFor details, see inventory4.10.6
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. For details, see error4.10.6

inventory

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource4.10.6
nameStringResource name4.10.6
managementIpStringIP address for accessing ZCE-X4.10.6
apiPortintAPI port for accessing ZCE-X4.10.6
createDateTimestampCreation time4.10.6
lastOpDateTimestampLast modification time4.10.6

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier of the error, for example SYS.1000, HOST.10014.10.0
descriptionStringBrief summary of the error4.10.0
detailsStringDetailed error information4.10.0
elaborationStringReserved field, defaults to null4.10.0
opaqueLinkedHashMapReserved field, defaults to null4.10.0
causeErrorCodeRoot cause: the source error that triggered the current error. If there is no original error, this field is null4.10.0

SDK Examples

Java SDK

AddZceXAction action = new AddZceXAction();
action.name = "zce-x-storage";
action.managementIp = "172.0.0.1";
action.apiPort = 8056;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddZceXAction.Result res = action.call();

Python SDK

AddZceXAction action = AddZceXAction()
action.name = "zce-x-storage"
action.managementIp = "172.0.0.1"
action.apiPort = 8056
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddZceXAction.Result res = action.call()