Add ZStone

POST/zstack/v1/zstone-plugin

Headers

Authorization: OAuth the-session-uuid

Body

{
  "params": {
    "name": "zstone-storage",
    "username": "admin",
    "managementIp": "172.0.0.1",
    "logInPort": 4000,
    "apiPort": 4010,
    "logInUrl": "/sso/v1/accounts/login"
  },
  "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":"zstone-storage","username":"admin","managementIp":"172.0.0.1","logInPort":4000,"apiPort":4010,"logInUrl":"/sso/v1/accounts/login"}}' \
http://localhost:8080/zstack/v1/zstone-plugin

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
nameStringbody (included in params structure)Name of this ZStone-Storage in ZSvirt 4.10.6
username (Optional)Stringbody (included in params structure)Username for login, typically admin 4.10.6
password (Optional)Stringbody (included in params structure)Password for login 4.10.6
managementIpStringbody (included in params structure)ZStone management node IP 4.10.6
logInPort (Optional)intbody (included in params structure)ZStone login service port 4.10.6
apiPort (Optional)intbody (included in params structure)ZStone API service port 4.10.6
logInUrl (Optional)Stringbody (included in params structure)ZStone login URL 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": "53c0433a817349f89f66532addeb8b6c",
    "name": "zstone-plugin",
    "username": "admin",
    "managementIp": "127.0.0.1",
    "authorizationServer": "Local",
    "logInPort": 4000,
    "apiPort": 4010,
    "logInUrl": "/sso/v1/accounts/login",
    "createDate": "Nov 14, 2017 2:20:57 PM",
    "lastOpDate": "Nov 14, 2017 2:20:57 PM"
  }
}
NameTypeDescriptionStarting Version
successbooleanWhether the creation was successful4.10.6
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. For details, see error4.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

AddZStoneAction action = new AddZStoneAction();
action.name = "zstone-storage";
action.username = "admin";
action.managementIp = "172.0.0.1";
action.logInPort = 4000;
action.apiPort = 4010;
action.logInUrl = "/sso/v1/accounts/login";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddZStoneAction.Result res = action.call();

Python SDK

AddZStoneAction action = AddZStoneAction()
action.name = "zstone-storage"
action.username = "admin"
action.managementIp = "172.0.0.1"
action.logInPort = 4000
action.apiPort = 4010
action.logInUrl = "/sso/v1/accounts/login"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddZStoneAction.Result res = action.call()