Query Host Bond Information

GET/zstack/v1/hosts/bondings
GET zstack/v1/hosts/bondings/{uuid}

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/hosts/bondings
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/hosts/bondings/4557b1f12ef7393c926b8b7223ddebac

Queryable Fields

Run the CLI command tool, enter QueryHostNetworkBonding and press Tab to view all queryable fields and resources that support cross-table queries.

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "2e2226e18e853f20a5791684a1b644c8",
      "hostUuid": "903696c585a639bb8049713b98d93437",
      "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.0,
      "allSlavesActive": true,
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM",
      "slaves": [
        {
          "uuid": "17a40aa475cf322494ea82e09066892e",
          "hostUuid": "903696c585a639bb8049713b98d93437",
          "bondingUuid": "2e2226e18e853f20a5791684a1b644c8",
          "interfaceName": "eno1",
          "interfaceType": "bondingSlave",
          "speed": 1000.0,
          "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": "c3716c87b9173cbb8315e7d7f3645bc4",
          "hostUuid": "903696c585a639bb8049713b98d93437",
          "bondingUuid": "2e2226e18e853f20a5791684a1b644c8",
          "interfaceName": "eno2",
          "interfaceType": "bondingSlave",
          "speed": 1000.0,
          "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
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. See details error3.9.0
inventoriesListSee details inventories3.9.0

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier of the error, e.g. SYS.1000, HOST.10013.9.0
descriptionStringBrief description of the error3.9.0
detailsStringDetailed error information3.9.0
elaborationStringReserved field, default is null3.9.0
opaqueLinkedHashMapReserved field, default is null3.9.0
causeErrorCodeRoot cause, the error that caused the current error. If there is no original error, this field is null3.9.0

inventories

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource3.9.0
hostUuidStringHost UUID3.9.0
bondingNameStringBond name3.9.0
modeStringBond mode3.9.0
xmitHashPolicyStringHash policy3.9.0
miiStatusStringMII status3.9.0
macStringMAC address3.9.0
ipAddressesListIP addresses3.9.0
miimonLongMII monitor interval3.9.0
allSlavesActiveBoolean 3.9.0
createDateTimestampCreation time3.9.0
lastOpDateTimestampLast modification time3.9.0
slavesListSee details slaves3.9.0

slaves

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource3.9.0
hostUuidStringHost UUID3.9.0
bondingUuidStringBond UUID3.9.0
interfaceNameStringNIC name3.9.0
interfaceTypeStringNIC usage state, can be nomaster, bridgeSlave, bondSlave3.9.0
speedLongNIC speed3.9.0
slaveActiveBooleanBond link status3.9.0
carrierActiveBooleanPhysical link status3.9.0
ipAddressesListIP addresses3.9.0
macStringMAC address3.9.0
pciDeviceAddressStringNIC PCI address3.9.0
createDateTimestampCreation time3.9.0
lastOpDateTimestampLast modification time3.9.0

SDK Examples

Java SDK

QueryHostNetworkBondingAction action = new QueryHostNetworkBondingAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryHostNetworkBondingAction.Result res = action.call();

Python SDK

QueryHostNetworkBondingAction action = QueryHostNetworkBondingAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryHostNetworkBondingAction.Result res = action.call()