Configure ZCE-X Cluster

PUT/zstack/v1/zce-x-plugin/config/cluster

Headers

Authorization: OAuth the-session-uuid

Body

{
  "updateZceXClusterConfig": {
    "uuid": "77e1393bf5aa4536a018b4c0c4e29c72",
    "managementNetworkCidr": "172.26.30.1/24",
    "publicNetworkCidr": "172.26.30.1/24",
    "clusterNetworkCidr": "172.26.30.1/24",
    "otherManagementIp": [
      "172.26.30.113",
      "172.26.30.202"
    ],
    "username": "admin"
  },
  "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 PUT -d '{"updateZceXClusterConfig":{"uuid":"77e1393bf5aa4536a018b4c0c4e29c72","managementNetworkCidr":"172.26.30.1/24","publicNetworkCidr":"172.26.30.1/24","clusterNetworkCidr":"172.26.30.1/24","otherManagementIp":["172.26.30.113","172.26.30.202"],"username":"admin"}}' \
http://localhost:8080/zstack/v1/zce-x-plugin/config/cluster

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringbody (included in updateZceXClusterConfig structure)ZCE-X UUID, uniquely identifies the resource 4.10.6
managementIp (Optional)Stringbody (included in updateZceXClusterConfig structure)ZCE-X management node IP. If not filled, defaults to ZceXVO.uuid 4.10.6
managementNetworkCidrStringbody (included in updateZceXClusterConfig structure)ZCE-X management network IP CIDR 4.10.6
publicNetworkCidrStringbody (included in updateZceXClusterConfig structure)ZCE-X public network IP CIDR 4.10.6
clusterNetworkCidrStringbody (included in updateZceXClusterConfig structure)ZCE-X cluster network IP CIDR 4.10.6
gatewayNetworkCidr (Optional)Stringbody (included in updateZceXClusterConfig structure)ZCE-X gateway network IP CIDR, defaults to public network IP CIDR 4.10.6
otherManagementIpListbody (included in updateZceXClusterConfig structure)Other two ZCE-X management node IPs. Must provide two different IPs. Passwordless authentication is required between nodes 4.10.6
otherStorageIp (Optional)Listbody (included in updateZceXClusterConfig structure)Other ZCE-X storage node IP list 4.10.6
username (Optional)Stringbody (included in updateZceXClusterConfig structure)Administrator username created during ZCE-X initialization 4.10.6
password (Optional)Stringbody (included in updateZceXClusterConfig structure)Administrator password created during ZCE-X initialization 4.10.6
systemTags (Optional)ListbodySystem Tag 4.10.6
userTags (Optional)ListbodyUser Tag 4.10.6
softwarePackageUuidStringbody (included in updateZceXClusterConfig structure)Distributed software package UUID 4.10.20
  • Parameters for the initialization software package.
  • SystemTag format: initConfig::{%s}
  • SystemTag example: APIUpdateZceXClusterConfigMsg converted to json string

API Response

Response Example

{
  "initSuccess": true,
  "tokenCreated": true
}
NameTypeDescriptionStarting Version
clusterInitSuccessbooleanWhether initialization was successful4.10.20
tokenCreatedbooleanWhether token generation was successful4.10.20
successbooleanWhether configuration 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

UpdateZceXClusterConfigAction action = new UpdateZceXClusterConfigAction();
action.uuid = "77e1393bf5aa4536a018b4c0c4e29c72";
action.managementNetworkCidr = "172.26.30.1/24";
action.publicNetworkCidr = "172.26.30.1/24";
action.clusterNetworkCidr = "172.26.30.1/24";
action.otherManagementIp = asList("172.26.30.113","172.26.30.202");
action.username = "admin";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateZceXClusterConfigAction.Result res = action.call();

Python SDK

action = UpdateZceXClusterConfigAction()
action.uuid = "77e1393bf5aa4536a018b4c0c4e29c72"
action.managementNetworkCidr = "172.26.30.1/24"
action.publicNetworkCidr = "172.26.30.1/24"
action.clusterNetworkCidr = "172.26.30.1/24"
action.otherManagementIp = [172.26.30.113, 172.26.30.202]
action.username = "admin"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()