community.network.ce_lldp_interface – Manages INTERFACE LLDP configuration on HUAWEI CloudEngine switches.

Note

This plugin is part of the community.network collection (version 2.1.1).

To install it use: ansible-galaxy collection install community.network.

To use it in a playbook, specify: community.network.ce_lldp_interface.

New in version 0.2.0: of community.network

Synopsis

  • Manages INTERFACE LLDP configuration on HUAWEI CloudEngine switches.

Parameters

Parameter Choices/Defaults Comments
dcbx
boolean
    Choices:
  • no
  • yes
Enable the ability to send DCBX TLV.
eee
boolean
    Choices:
  • no
  • yes
Enable the ability to send EEE TLV.
function_lldp_interface_flag
string
    Choices:
  • disableINTERFACE
  • tlvdisableINTERFACE
  • tlvenableINTERFACE
  • intervalINTERFACE
Used to distinguish between command line functions.
ifname
string
Interface name.
linkaggretxenable
boolean
    Choices:
  • no
  • yes
Enable the ability to send link aggregation TLV.
lldpadminstatus
string
    Choices:
  • txOnly
  • rxOnly
  • txAndRx
  • disabled
Set interface lldp enable state.
lldpenable
string
    Choices:
  • enabled
  • disabled
Set global LLDP enable state.
macphytxenable
boolean
    Choices:
  • no
  • yes
Enable MAC/PHY configuration and state TLV to be sent.
manaddrtxenable
boolean
    Choices:
  • no
  • yes
Make it able to send management address TLV.
maxframetxenable
boolean
    Choices:
  • no
  • yes
Enable the ability to send maximum frame length TLV.
portdesctxenable
boolean
    Choices:
  • no
  • yes
Enabling the ability to send a description of TLV.
portvlantxenable
boolean
    Choices:
  • no
  • yes
Enable port vlan tx.
protoidtxenable
boolean
    Choices:
  • no
  • yes
Enable the ability to send protocol identity TLV.
protovlantxenable
boolean
    Choices:
  • no
  • yes
Enable protocol vlan tx.
state
string
    Choices:
  • present ←
  • absent
Manage the state of the resource.
syscaptxenable
boolean
    Choices:
  • no
  • yes
Enable the ability to send system capabilities TLV.
sysdesctxenable
boolean
    Choices:
  • no
  • yes
Enable the ability to send system description TLV.
sysnametxenable
boolean
    Choices:
  • no
  • yes
Enable the ability to send system name TLV.
txinterval
integer
LLDP send message interval.
txprotocolvlanid
integer
Set tx protocol vlan id.
txvlannameid
integer
Set tx vlan name id.
type_tlv_disable
string
    Choices:
  • basic_tlv
  • dot3_tlv
Used to distinguish between command line functions.
type_tlv_enable
string
    Choices:
  • dot1_tlv
  • dcbx
Used to distinguish between command line functions.
vlannametxenable
boolean
    Choices:
  • no
  • yes
Set vlan name tx enable or not.

Notes

Note

  • This module requires the netconf system service be enabled on the remote device being managed.

  • Recommended connection is netconf.

  • This module also works with local connections for legacy playbooks.

Examples

- name: "Configure global LLDP enable state"
  ce_lldp_interface_interface:
    lldpenable: enabled

- name: "Configure interface lldp enable state"
  community.network.ce_lldp_interface:
    function_lldp_interface_flag: disableINTERFACE
    ifname: 10GE1/0/1
    lldpadminstatus: rxOnly
- name: "Configure LLDP transmit interval and ensure global LLDP state is already enabled"
  community.network.ce_lldp_interface:
    function_lldp_interface_flag: intervalINTERFACE
    ifname: 10GE1/0/1
    txinterval: 4

- name: "Configure basic-tlv: management-address TLV"
  community.network.ce_lldp_interface:
    function_lldp_interface_flag: tlvdisableINTERFACE
    type_tlv_disable: basic_tlv
    ifname: 10GE1/0/1
    manaddrtxenable: true

- name: "Configure basic-tlv: prot description TLV"
  community.network.ce_lldp_interface:
    function_lldp_interface_flag: tlvdisableINTERFACE
    type_tlv_disable: basic_tlv
    ifname: 10GE1/0/1
    portdesctxenable: true

- name: "Configure basic-tlv: system capabilities TLV"
  community.network.ce_lldp_interface:
    function_lldp_interface_flag: tlvdisableINTERFACE
    type_tlv_disable: basic_tlv
    ifname: 10GE1/0/1
    syscaptxenable: true

- name: "Configure basic-tlv: system description TLV"
  community.network.ce_lldp_interface:
    function_lldp_interface_flag: tlvdisableINTERFACE
    type_tlv_disable: basic_tlv
    ifname: 10GE1/0/1
    sysdesctxenable: true

- name: "Configure basic-tlv: system name TLV"
  community.network.ce_lldp_interface:
    function_lldp_interface_flag: tlvdisableINTERFACE
    type_tlv_disable: basic_tlv
    ifname: 10GE1/0/1
    sysnametxenable: true

- name: "TLV types that are forbidden to be published on the configuration interface, link aggregation TLV"
  community.network.ce_lldp_interface:
    function_lldp_interface_flag: tlvdisableINTERFACE
    type_tlv_disable: dot3_tlv
    ifname: 10GE1/0/1
    linkAggreTxEnable: true

- name: "TLV types that are forbidden to be published on the configuration interface, MAC/PHY configuration/status TLV"
  community.network.ce_lldp_interface:
    function_lldp_interface_flag: tlvdisableINTERFACE
    type_tlv_disable: dot3_tlv
    ifname: 10GE1/0/1
    macPhyTxEnable: true

- name: "TLV types that are forbidden to be published on the configuration interface, maximum frame size TLV"
  community.network.ce_lldp_interface:
    function_lldp_interface_flag: tlvdisableINTERFACE
    type_tlv_disable: dot3_tlv
    ifname: 10GE1/0/1
    maxFrameTxEnable: true

- name: "TLV types that are forbidden to be published on the configuration interface, EEE TLV"
  community.network.ce_lldp_interface:
    function_lldp_interface_flag: tlvdisableINTERFACE
    type_tlv_disable: dot3_tlv
    ifname: 10GE1/0/1
    eee: true

- name: "Configure the interface to publish an optional DCBX TLV type "
  community.network.ce_lldp_interface:
    function_lldp_interface_flag: tlvenableINTERFACE
    ifname: 10GE1/0/1
    type_tlv_enable: dcbx

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
changed
boolean
always
check to see if a change was made on the device

Sample:
True
end_state
dictionary
always
k/v pairs of global DLDP configration after module execution

Sample:
{'function_lldp_interface_flag': 'tlvenableINTERFACE', 'ifname': '10GE1/0/1', 'lldpadminstatus': 'rxOnly', 'lldpenable': 'enabled', 'type_tlv_enable': 'dot1_tlv'}
existing
dictionary
always
k/v pairs of existing global LLDP configration

Sample:
{'ifname': '10GE1/0/1', 'lldpadminstatus': 'txAndRx', 'lldpenable': 'disabled'}
proposed
dictionary
always
k/v pairs of parameters passed into module

Sample:
{'function_lldp_interface_flag': 'tlvenableINTERFACE', 'ifname': '10GE1/0/1', 'lldpadminstatus': 'rxOnly', 'lldpenable': 'enabled', 'state': 'present', 'type_tlv_enable': 'dot1_tlv'}
updates
list / elements=string
always
command sent to the device

Sample:
['lldp enable', 'interface 10ge 1/0/1', 'undo lldp disable', 'lldp tlv-enable dot1-tlv vlan-name 4']


Authors

  • xuxiaowei0512 (@CloudEngine-Ansible)