Get Host Candidate NIC Information

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

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-interfaces?hostUuids=5712f3960ae23d24988f4e091bf5704f&interfaceType=all&intersecting=true&limit=1000&start=0

Parameter List

Name

Type

Location

Description

Allowed Values

Starting Version

hostUuids

List

query

Host UUIDs

 

4.7.0

interfaceType (optional)

String

query

NIC type

  • interface
  • bonding
  • all

4.1.0

limit (optional)

Integer

query

 

 

4.7.0

start (optional)

Integer

query

 

 

4.7.0

systemTags (optional)

List

body

System tag

 

4.7.0

userTags (optional)

List

body

User tag

 

4.7.0

intersecting (optional)

boolean

query

 

 

4.1.0

API Response

Response Example

{
  "slaveNames": [
    "eth0",
    "eth1"
  ]
}
NameTypeDescriptionStarting Version
slaveNamesListNIC names4.7.0
successboolean 4.7.0
candidateNicsListSee details candidateNics4.7.0
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. See details error4.7.0

candidateNics

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
gatewayStringGateway address4.7.0
macStringMAC address3.5.0
callBackIpStringCallback address4.7.0
pciDeviceAddressStringNIC PCI address3.5.0
offloadStatusString 4.7.0
descriptionStringResource description4.7.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.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

SDK Examples

Java SDK

GetCandidateNetworkInterfacesAction action = new GetCandidateNetworkInterfacesAction();
action.hostUuids = asList("5712f3960ae23d24988f4e091bf5704f");
action.interfaceType = "all";
action.intersecting = true;
action.limit = 1000;
action.start = 0;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetCandidateNetworkInterfacesAction.Result res = action.call();

Python SDK

GetCandidateNetworkInterfacesAction action = GetCandidateNetworkInterfacesAction()
action.hostUuids = [5712f3960ae23d24988f4e091bf5704f]
action.interfaceType = "all"
action.intersecting = true
action.limit = 1000
action.start = 0
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetCandidateNetworkInterfacesAction.Result res = action.call()