GetBareMetal2ProvisionNetworkIpAddressCapacity

API Request

URLs
GET zstack/v1/baremetal2/provision-networks/ip-capacity
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/baremetal2/provision-networks/ip-capacity?networkUuids=f9c4c95cf7f43f6eaf7af5e7b3715c60
Request Parameters
Name Type Location Description Valid Value Starting Version
networkUuids List query The deployment network UUIDs. 4.0.0
systemTags List query Optional. The system tags. 4.0.0
userTags List query Optional. The user tags. 4.0.0

API Response

Sample Response
{
  "capacityData": [
    {
      "networkUuid": "da4ac0c888fc34b399a343140780a627",
      "totalCapacity": 100.0,
      "availableCapacity": 50.0,
      "gatewayUsedIpNumber": 10.0,
      "instanceUsedIpNumber": 40.0
    }
  ]
}
Name Type Description Starting Version
success boolean Indicates that the API request succeeded. 4.0.0
capacityData List See capacityData. 4.0.0
error ErrorCode See error. 4.0.0
#capacityData
Name Type Description Starting Version
networkUuid String The deployment network UUID. 4.0.0
totalCapacity long The total number of IP addresses in the deployment network. 4.0.0
availableCapacity long The available number of IP addresses in the deployment network. 4.0.0
gatewayUsedIpNumber long The number of IP addresses used by gateways in the deployment network. 4.0.0
instanceUsedIpNumber long The number of IP addresses used by bare metal instances in the deployment network. 4.0.0
#error
Name Type Description Starting Version
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 4.0.0
description String The brief description of the error. 4.0.0
details String The details about the error. 4.0.0
elaboration String The reserved field. Default value: null. 4.0.0
opaque LinkedHashMap The reserved field. Default value: null. 4.0.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 4.0.0

SDK Sample

Java SDK
GetBareMetal2ProvisionNetworkIpAddressCapacityAction action = new GetBareMetal2ProvisionNetworkIpAddressCapacityAction();
action.networkUuids = asList("f9c4c95cf7f43f6eaf7af5e7b3715c60");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetBareMetal2ProvisionNetworkIpAddressCapacityAction.Result res = action.call();
Python SDK
GetBareMetal2ProvisionNetworkIpAddressCapacityAction action = GetBareMetal2ProvisionNetworkIpAddressCapacityAction()
action.networkUuids = [f9c4c95cf7f43f6eaf7af5e7b3715c60]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetBareMetal2ProvisionNetworkIpAddressCapacityAction.Result res = action.call()