Get Candidate Network Bondings

GET/zstack/v1/cluster/hosts-network-bondings

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/cluster/hosts-network-bondings?hostUuids=dc20018ed3483aeea38fd742f129a59b&limit=1000&start=0

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
hostUuidsListqueryHost UUIDs 4.1.0
limit (Optional)Integerquery  4.1.0
start (Optional)Integerquery  4.1.0
systemTags (Optional)ListquerySystem Tags 4.1.0
userTags (Optional)ListqueryUser Tags 4.1.0

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "b8f160bbdb5d392fbcb5720f3509bf0b",
      "hostUuid": "19506ab5300b3e169a616e9e0dd86d33",
      "bondingName": "bond0",
      "mode": "active-backup 1",
      "xmitHashPolicy": "layer2 0",
      "miiStatus": "up",
      "mac": "ac:1f:6b:93:6c:8c",
      "ipAddresses": [
        "172.20.0.116/16"
      ],
      "miimon": 100,
      "type": "LinuxBonding",
      "allSlavesActive": true,
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM",
      "slaves": [
        {
          "uuid": "fac6c85bbb743381a2edcaeb01e3a885",
          "hostUuid": "19506ab5300b3e169a616e9e0dd86d33",
          "bondingUuid": "b8f160bbdb5d392fbcb5720f3509bf0b",
          "interfaceName": "eno1",
          "interfaceType": "bondingSlave",
          "speed": 1000,
          "slaveActive": true,
          "carrierActive": true,
          "mac": "ac:1f:6b:93:6c:8c",
          "createDate": "Nov 14, 2017 10:20:57 PM",
          "lastOpDate": "Nov 14, 2017 10:20:57 PM"
        },
        {
          "uuid": "828ab68794dc31d89aa600a2792a0ac5",
          "hostUuid": "19506ab5300b3e169a616e9e0dd86d33",
          "bondingUuid": "b8f160bbdb5d392fbcb5720f3509bf0b",
          "interfaceName": "eno2",
          "interfaceType": "bondingSlave",
          "speed": 1000,
          "slaveActive": false,
          "carrierActive": false,
          "mac": "ac:1f:6b:93:6c:8c",
          "createDate": "Nov 14, 2017 10:20:57 PM",
          "lastOpDate": "Nov 14, 2017 10:20:57 PM"
        }
      ]
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 4.1.0
inventoriesListSee inventories for details4.1.0
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. See error for details4.1.0

inventories

NameTypeDescriptionStarting Version
uuidStringUUID of the resource. Uniquely identifies the resource.4.1.0
hostUuidStringHost UUID4.1.0
bondingNameStringBond name4.1.0
bondingTypeStringBond application status. Values include noBridge and bridgeSlave.4.1.0
speedLongBond speed4.1.0
modeStringBond mode4.1.0
xmitHashPolicyStringHash policy4.1.0
miiStatusStringMII status4.1.0
macStringMAC address4.1.0
ipAddressesListIP addresses4.1.0
gatewayStringGateway address4.1.0
callBackIpStringCallback address4.1.0
miimonLongMII monitor interval4.1.0
typeStringBond type4.1.0
allSlavesActiveBoolean 4.1.0
descriptionStringDetailed description of the resource4.1.0
createDateTimestampCreate time4.1.0
lastOpDateTimestampLast update time4.1.0
slavesListSee slaves for details4.1.0

slaves

NameTypeDescriptionStarting Version
uuidStringUUID of the resource. Uniquely identifies the resource.4.1.0
hostUuidStringHost UUID4.1.0
bondingUuidStringBond UUID4.1.0
interfaceNameStringNetwork interface name4.1.0
interfaceTypeStringNetwork interface application status. Values include nomaster, bridgeSlave, and bondingSlave.4.1.0
speedLongNetwork interface speed4.1.0
slaveActiveBooleanBond link status4.1.0
carrierActiveBooleanPhysical link status4.1.0
ipAddressesListIP addresses4.1.0
gatewayStringGateway address4.1.0
macStringMAC address4.1.0
callBackIpStringCallback address4.1.0
pciDeviceAddressStringNetwork interface PCI address4.1.0
offloadStatusString 4.1.0
descriptionStringDetailed description of the resource4.1.0
createDateTimestampCreate time4.1.0
lastOpDateTimestampLast update time4.1.0

error

NameTypeDescriptionStarting Version
codeStringError code number. Globally unique identifier of the error, for example SYS.1000, HOST.1001.4.1.0
descriptionStringBrief error description4.1.0
detailsStringDetailed error information4.1.0
elaborationStringReserved field, defaults to null4.1.0
opaqueLinkedHashMapReserved field, defaults to null4.1.0
causeErrorCodeRoot cause error. The error that caused the current error. If there is no original error, this field is null.4.1.0

SDK Examples

Java SDK

GetCandidateNetworkBondingsAction action = new GetCandidateNetworkBondingsAction();
action.hostUuids = asList("dc20018ed3483aeea38fd742f129a59b");
action.limit = 1000;
action.start = 0;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetCandidateNetworkBondingsAction.Result res = action.call();

Python SDK

GetCandidateNetworkBondingsAction action = GetCandidateNetworkBondingsAction()
action.hostUuids = [dc20018ed3483aeea38fd742f129a59b]
action.limit = 1000
action.start = 0
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetCandidateNetworkBondingsAction.Result res = action.call()