Query Host Network Interface LLDP
Headers
Authorization: OAuth the-session-uuidCurl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/hostNetworkInterface/lldp/allcurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/hostNetworkInterface/lldp/{interfaceUuid}Queryable Fields
Run the CLI command-line tool, enter QueryHostNetworkInterfaceLldp and press Tab to view all queryable fields and resource names that support cross-table queries.
API Response
Response Example
{
"inventories": [
{
"interfaceUuid": "d90dd5538ca2343099ea96cb89857aca",
"mode": "rx_only"
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | 4.1.0 | |
| inventories | List | See inventories for details | 4.1.0 |
| error | ErrorCode | Error code. If not null, the operation failed. If null, the operation succeeded. See error for details | 4.1.0 |
inventories
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | UUID of the resource. Uniquely identifies the resource. | 4.1.0 |
| interfaceUuid | String | Physical Network Interface UUID | 4.1.0 |
| mode | String | LLDP working mode | 4.1.0 |
| createDate | Timestamp | Create time | 4.1.0 |
| lastOpDate | Timestamp | Last update time | 4.1.0 |
| lldp | HostNetworkInterfaceLldpRefInventory | See lldp for details | 4.1.0 |
lldp
| Name | Type | Description | Starting Version |
|---|---|---|---|
| lldpUuid | String | LLDP UUID | 4.1.0 |
| chassisId | String | Chassis identifier | 4.1.0 |
| timeToLive | Integer | Time to live | 4.1.0 |
| managementAddress | String | Management address | 4.1.0 |
| systemName | String | System name | 4.1.0 |
| systemDescription | String | System description | 4.1.0 |
| systemCapabilities | String | System capabilities | 4.1.0 |
| portId | String | Port identifier | 4.1.0 |
| portDescription | String | Port description | 4.1.0 |
| vlanId | Integer | VLAN identifier | 4.1.0 |
| aggregationPortId | Long | Aggregation port identifier | 4.1.0 |
| mtu | Integer | Maximum transmission unit | 4.1.0 |
| createDate | Timestamp | Create time | 4.1.0 |
| lastOpDate | Timestamp | Last update time | 4.1.0 |
error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number. Globally unique identifier of the error, for example SYS.1000, HOST.1001. | 4.1.0 |
| description | String | Brief error description | 4.1.0 |
| details | String | Detailed error information | 4.1.0 |
| elaboration | String | Reserved field, defaults to null | 4.1.0 |
| opaque | LinkedHashMap | Reserved field, defaults to null | 4.1.0 |
| cause | ErrorCode | Root 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
QueryHostNetworkInterfaceLldpAction action = new QueryHostNetworkInterfaceLldpAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryHostNetworkInterfaceLldpAction.Result res = action.call();Python SDK
QueryHostNetworkInterfaceLldpAction action = QueryHostNetworkInterfaceLldpAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryHostNetworkInterfaceLldpAction.Result res = action.call()