Get Cluster Host Physical Network Information

GET/zstack/v1/cluster/hosts-network-facts/{clusterUuid}?hostUuid={hostUuid}

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-facts/811d04aa12e3390cb29cb7664862e1f2?limit=1000&start=0

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
hostUuidStringurlCluster UUID 4.3.6
limit (optional)Integerquery  4.3.6
start (optional)Integerquery  4.3.6
systemTags (optional)Listquery  4.3.6
userTags (optional)Listquery  4.3.6

API Response

Response Example

{
  "bondings": [
    {
      "uuid": "23d8ef3080f3379887097e816463d1cf",
      "hostUuid": "46ee6624a6a8307295c583884340d5c2",
      "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,
      "allSlavesActive": true,
      "createDate": "Nov 14, 2017 2:20:57 PM",
      "lastOpDate": "Nov 14, 2017 2:20:57 PM",
      "slaves": [
        {
          "uuid": "79bae81259b83a5989d9f7664ea033ba",
          "hostUuid": "46ee6624a6a8307295c583884340d5c2",
          "bondingUuid": "23d8ef3080f3379887097e816463d1cf",
          "interfaceName": "eno1",
          "interfaceType": "bondingSlave",
          "speed": 1000,
          "slaveActive": true,
          "carrierActive": true,
          "mac": "ac:1f:6b:93:6c:8c",
          "createDate": "Nov 14, 2017 2:20:57 PM",
          "lastOpDate": "Nov 14, 2017 2:20:57 PM"
        },
        {
          "uuid": "197768d887cf3f2a985f58d0e10a48b4",
          "hostUuid": "46ee6624a6a8307295c583884340d5c2",
          "bondingUuid": "23d8ef3080f3379887097e816463d1cf",
          "interfaceName": "eno2",
          "interfaceType": "bondingSlave",
          "speed": 1000,
          "slaveActive": false,
          "carrierActive": false,
          "mac": "ac:1f:6b:93:6c:8c",
          "createDate": "Nov 14, 2017 2:20:57 PM",
          "lastOpDate": "Nov 14, 2017 2:20:57 PM"
        }
      ]
    }
  ],
  "nics": [
    {
      "uuid": "79bae81259b83a5989d9f7664ea033ba",
      "hostUuid": "46ee6624a6a8307295c583884340d5c2",
      "bondingUuid": "23d8ef3080f3379887097e816463d1cf",
      "interfaceName": "eno1",
      "interfaceType": "bondingSlave",
      "speed": 1000,
      "slaveActive": true,
      "carrierActive": true,
      "mac": "ac:1f:6b:93:6c:8c",
      "createDate": "Nov 14, 2017 2:20:57 PM",
      "lastOpDate": "Nov 14, 2017 2:20:57 PM"
    },
    {
      "uuid": "197768d887cf3f2a985f58d0e10a48b4",
      "hostUuid": "46ee6624a6a8307295c583884340d5c2",
      "bondingUuid": "23d8ef3080f3379887097e816463d1cf",
      "interfaceName": "eno2",
      "interfaceType": "bondingSlave",
      "speed": 1000,
      "slaveActive": false,
      "carrierActive": false,
      "mac": "ac:1f:6b:93:6c:8c",
      "createDate": "Nov 14, 2017 2:20:57 PM",
      "lastOpDate": "Nov 14, 2017 2:20:57 PM"
    },
    {
      "uuid": "2b43c44d63b03009a52cd95dbceccc21",
      "hostUuid": "46ee6624a6a8307295c583884340d5c2",
      "interfaceName": "ens2f0",
      "interfaceType": "noMaster",
      "speed": 1000,
      "slaveActive": true,
      "carrierActive": true,
      "ipAddresses": [
        "169.254.0.115/24"
      ],
      "mac": "98:03:9b:00:ea:f2",
      "createDate": "Nov 14, 2017 2:20:57 PM",
      "lastOpDate": "Nov 14, 2017 2:20:57 PM"
    },
    {
      "uuid": "3071fef136fa3102b7289c3e3c461da1",
      "hostUuid": "46ee6624a6a8307295c583884340d5c2",
      "interfaceName": "ens2f1",
      "interfaceType": "bridgeSlave",
      "speed": 1000,
      "slaveActive": false,
      "carrierActive": false,
      "mac": "98:03:9b:00:ea:f3",
      "createDate": "Nov 14, 2017 2:20:57 PM",
      "lastOpDate": "Nov 14, 2017 2:20:57 PM"
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 4.3.6
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. See details error4.3.6
bondingsListSee details bondings4.3.6
nicsListSee details nics4.3.6

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier of the error, e.g. SYS.1000, HOST.10010.6
descriptionStringBrief description of the error0.6
detailsStringDetailed error information0.6
elaborationStringReserved field, default is null0.6
opaqueLinkedHashMapReserved field, default is null0.6
causeErrorCodeRoot cause, the error that caused the current error. If there is no original error, this field is null0.6

bondings

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource3.5.0
hostUuidStringHost UUID3.5.0
bondingNameStringBond name3.5.0
bondingTypeStringBond application status, can be noBridge, bridgeSlave4.7.0
speedLongBond speed4.7.0
modeStringBond mode3.5.0
xmitHashPolicyStringHash policy3.5.0
miiStatusStringMII status3.5.0
macStringMAC address3.5.0
ipAddressesListIP addresses3.5.0
gatewayStringGateway address4.7.0
callBackIpStringCallback address4.7.0
miimonLongMII monitor interval3.5.0
typeStringBond type4.7.0
allSlavesActiveBoolean 3.5.0
descriptionStringResource description4.7.0
createDateTimestampCreation time3.5.0
lastOpDateTimestampLast modification time3.5.0
slavesListSee details slaves3.5.0

slaves

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource3.5.0
hostUuidStringHost UUID3.5.0
bondingUuidStringBond UUID3.5.0
interfaceModelStringNetwork card model4.7.11
vendorIdStringVendor ID4.7.11
deviceIdStringDevice ID4.7.11
subvendorIdStringSub-vendor ID4.7.11
subdeviceIdStringSub-device ID4.7.11
interfaceNameStringNetwork card name3.5.0
interfaceTypeStringNetwork card application status, can be noMaster, bridgeSlave, bondSlave3.5.0
speedLongNetwork card speed3.5.0
slaveActiveBooleanBond link status3.5.0
carrierActiveBooleanPhysical link status3.5.0
ipAddressesListIP addresses3.5.0
gatewayStringGateway address4.7.0
macStringMAC address3.5.0
callBackIpStringCallback address4.7.0
pciDeviceAddressStringNetwork card PCI address3.5.0
offloadStatusString 4.7.0
descriptionStringResource description4.7.0
createDateTimestampCreation time3.5.0
lastOpDateTimestampLast modification time3.5.0

nics

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource3.5.0
hostUuidStringHost UUID3.5.0
bondingUuidStringBond UUID3.5.0
interfaceModelStringNetwork card model4.7.11
vendorIdStringVendor ID4.7.11
deviceIdStringDevice ID4.7.11
subvendorIdStringSub-vendor ID4.7.11
subdeviceIdStringSub-device ID4.7.11
interfaceNameStringNetwork card name3.5.0
interfaceTypeStringNetwork card application status, can be noMaster, bridgeSlave, bondSlave3.5.0
speedLongNetwork card speed3.5.0
slaveActiveBooleanBond link status3.5.0
carrierActiveBooleanPhysical link status3.5.0
ipAddressesListIP addresses3.5.0
gatewayStringGateway address4.7.0
macStringMAC address3.5.0
callBackIpStringCallback address4.7.0
pciDeviceAddressStringNetwork card PCI address3.5.0
offloadStatusString 4.7.0
descriptionStringResource description4.7.0
createDateTimestampCreation time3.5.0
lastOpDateTimestampLast modification time3.5.0

SDK Examples

Java SDK

GetClusterHostNetworkFactsAction action = new GetClusterHostNetworkFactsAction();
action.clusterUuid = "811d04aa12e3390cb29cb7664862e1f2";
action.limit = 1000;
action.start = 0;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetClusterHostNetworkFactsAction.Result res = action.call();

Python SDK

GetClusterHostNetworkFactsAction action = GetClusterHostNetworkFactsAction()
action.clusterUuid = "811d04aa12e3390cb29cb7664862e1f2"
action.limit = 1000
action.start = 0
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetClusterHostNetworkFactsAction.Result res = action.call()