Change Host Network Interface LLDP Mode

PUT/zstack/v1/hostNetworkInterface/lldp/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "changeHostNetworkInterfaceLldpMode": {
    "interfaceUuids": [
      "f37102496ac2357aaa214622322adb65"
    ],
    "mode": "rx_only"
  },
  "systemTags": [],
  "userTags": []
}

In the example above, systemTags and userTags fields can be omitted. They are listed to indicate that the body can contain these two fields.

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"changeHostNetworkInterfaceLldpMode":{"interfaceUuids":["f37102496ac2357aaa214622322adb65"],"mode":"rx_only"}}' http://localhost:8080/zstack/v1/hostNetworkInterface/lldp/actions

Parameter List

Name

Type

Location

Description

Allowed Values

Starting Version

interfaceUuids

List

body (contained in the changeHostNetworkInterfaceLldpMode structure)

Physical Network Interface UUIDs

 

4.1.0

mode (Optional)

String

body (contained in the changeHostNetworkInterfaceLldpMode structure)

LLDP working mode

  • rx_only
  • tx_only
  • rx_and_tx
  • disable

 

systemTags (Optional)

List

body

System Tags

 

4.1.0

userTags (Optional)

List

body

User Tags

 

4.1.0

API Response

Response Example

{
  "inventories": [
    {
      "interfaceUuid": "1cae08c11e8530a8bf892df7ef709249",
      "mode": "rx_only"
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 4.1.0
inventoriesListSee inventories for details4.1.0
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. See error for details4.1.0

inventories

NameTypeDescriptionStarting Version
uuidStringUUID of the resource. Uniquely identifies the resource.4.1.0
interfaceUuidStringPhysical Network Interface UUID4.1.0
modeStringLLDP working mode4.1.0
createDateTimestampCreate time4.1.0
lastOpDateTimestampLast update time4.1.0
lldpHostNetworkInterfaceLldpRefInventorySee lldp for details4.1.0

lldp

NameTypeDescriptionStarting Version
lldpUuidStringLLDP UUID4.1.0
chassisIdStringChassis identifier4.1.0
timeToLiveIntegerTime to live4.1.0
managementAddressStringManagement address4.1.0
systemNameStringSystem name4.1.0
systemDescriptionStringSystem description4.1.0
systemCapabilitiesStringSystem capabilities4.1.0
portIdStringPort identifier4.1.0
portDescriptionStringPort description4.1.0
vlanIdIntegerVLAN identifier4.1.0
aggregationPortIdLongAggregation port identifier4.1.0
mtuIntegerMaximum transmission unit4.1.0
createDateTimestampCreate time4.1.0
lastOpDateTimestampLast update time4.1.0

error

NameTypeDescriptionStarting Version
codeStringError code number. Globally unique identifier of the error, for example SYS.1000, HOST.1001.4.1.0
descriptionStringBrief error description4.1.0
detailsStringDetailed error information4.1.0
elaborationStringReserved field, defaults to null4.1.0
opaqueLinkedHashMapReserved field, defaults to null4.1.0
causeErrorCodeRoot 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

ChangeHostNetworkInterfaceLldpModeAction action = new ChangeHostNetworkInterfaceLldpModeAction();
action.interfaceUuids = asList("f37102496ac2357aaa214622322adb65");
action.mode = "rx_only";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
ChangeHostNetworkInterfaceLldpModeAction.Result res = action.call();

Python SDK

ChangeHostNetworkInterfaceLldpModeAction action = ChangeHostNetworkInterfaceLldpModeAction()
action.interfaceUuids = [f37102496ac2357aaa214622322adb65]
action.mode = "rx_only"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
ChangeHostNetworkInterfaceLldpModeAction.Result res = action.call()