Get Host Physical Network Information

GET/zstack/v1/hosts/network-facts/{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/hosts/network-facts/9397de8c860231c08b87031e226c691b

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
hostUuidStringurlHost UUID 3.5.0
systemTags (optional)Listquery  3.5.0
userTags (optional)Listquery  3.5.0

API Response

Response Example

{
  "bondings": [
    {
      "uuid": "c1ff34db684e3b8785572902ef99efea",
      "hostUuid": "e336fa8ef9283fe4a4d746957284379a",
      "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": "08643629c29d34a0a4a2d858b49a41a4",
          "hostUuid": "e336fa8ef9283fe4a4d746957284379a",
          "bondingUuid": "c1ff34db684e3b8785572902ef99efea",
          "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": "14ca7ad13e573cfdb6f929b12b750553",
          "hostUuid": "e336fa8ef9283fe4a4d746957284379a",
          "bondingUuid": "c1ff34db684e3b8785572902ef99efea",
          "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"
        }
      ]
    }
  ],
  "nics": [
    {
      "uuid": "08643629c29d34a0a4a2d858b49a41a4",
      "hostUuid": "e336fa8ef9283fe4a4d746957284379a",
      "bondingUuid": "c1ff34db684e3b8785572902ef99efea",
      "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": "14ca7ad13e573cfdb6f929b12b750553",
      "hostUuid": "e336fa8ef9283fe4a4d746957284379a",
      "bondingUuid": "c1ff34db684e3b8785572902ef99efea",
      "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"
    },
    {
      "uuid": "8d871eb89020363ebc764ed41be4c213",
      "hostUuid": "e336fa8ef9283fe4a4d746957284379a",
      "interfaceName": "ens2f0",
      "interfaceType": "noMaster",
      "speed": 1000.0,
      "slaveActive": true,
      "carrierActive": true,
      "ipAddresses": [
        "169.254.0.115/24"
      ],
      "mac": "98:03:9b:00:ea:f2",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    },
    {
      "uuid": "d39d0eead2d53e47a8f7b3aca375c1d3",
      "hostUuid": "e336fa8ef9283fe4a4d746957284379a",
      "interfaceName": "ens2f1",
      "interfaceType": "bridgeSlave",
      "speed": 1000.0,
      "slaveActive": false,
      "carrierActive": false,
      "mac": "98:03:9b:00:ea:f3",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 3.5.0
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. See details error3.5.0
bondingsListSee details bondings3.5.0
nicsListSee details nics3.5.0
errorErrorCodeSee details error3.5.0

error

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

bondings

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource3.5.0
hostUuidStringHost UUID3.5.0
bondingNameStringBond name3.5.0
modeStringBond mode3.5.0
xmitHashPolicyStringHash policy3.5.0
miiStatusStringMII status3.5.0
macStringMAC address3.5.0
ipAddressesListIP addresses3.5.0
miimonLongMII monitor interval3.5.0
allSlavesActiveBoolean 3.5.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
interfaceNameStringNIC name3.5.0
interfaceTypeStringNIC usage state, can be nomaster, bridgeSlave, bondSlave3.5.0
speedLongNIC speed3.5.0
slaveActiveBooleanBond link status3.5.0
carrierActiveBooleanPhysical link status3.5.0
ipAddressesListIP addresses3.5.0
macStringMAC address3.5.0
pciDeviceAddressStringNIC PCI address3.5.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
interfaceNameStringNIC name3.5.0
interfaceTypeStringNIC usage state, can be nomaster, bridgeSlave, bondSlave3.5.0
speedLongNIC speed3.5.0
slaveActiveBooleanBond link status3.5.0
carrierActiveBooleanPhysical link status3.5.0
ipAddressesListIP addresses3.5.0
macStringMAC address3.5.0
pciDeviceAddressStringNIC PCI address3.5.0
createDateTimestampCreation time3.5.0
lastOpDateTimestampLast modification time3.5.0

error

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

SDK Examples

Java SDK

GetHostNetworkFactsAction action = new GetHostNetworkFactsAction();
action.hostUuid = "9397de8c860231c08b87031e226c691b";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetHostNetworkFactsAction.Result res = action.call();

Python SDK

GetHostNetworkFactsAction action = GetHostNetworkFactsAction()
action.hostUuid = "9397de8c860231c08b87031e226c691b"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetHostNetworkFactsAction.Result res = action.call()