community.general.ce_lldp_interface (0.1.1) — module

Manages INTERFACE LLDP configuration on HUAWEI CloudEngine switches.

Authors: xuxiaowei0512 (@CloudEngine-Ansible)

preview | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

Manages INTERFACE LLDP configuration on HUAWEI CloudEngine switches.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: "Configure global LLDP enable state"
    ce_lldp_interface_interface:
      lldpenable: enabled
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: "Configure interface lldp enable state"
    ce_lldp_interface:
      function_lldp_interface_flag: disableINTERFACE
      ifname: 10GE1/0/1
      lldpadminstatus: rxOnly
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: "Configure LLDP transmit interval and ensure global LLDP state is already enabled"
    ce_lldp_interface:
      function_lldp_interface_flag: intervalINTERFACE
      ifname: 10GE1/0/1
      txinterval: 4
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: "Configure basic-tlv: management-address TLV"
    ce_lldp_interface:
      function_lldp_interface_flag: tlvdisableINTERFACE
      type_tlv_disable: basic_tlv
      ifname: 10GE1/0/1
      manaddrtxenable: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: "Configure basic-tlv: prot description TLV"
    ce_lldp_interface:
      function_lldp_interface_flag: tlvdisableINTERFACE
      type_tlv_disable: basic_tlv
      ifname: 10GE1/0/1
      portdesctxenable: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: "Configure basic-tlv: system capabilities TLV"
    ce_lldp_interface:
      function_lldp_interface_flag: tlvdisableINTERFACE
      type_tlv_disable: basic_tlv
      ifname: 10GE1/0/1
      syscaptxenable: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: "Configure basic-tlv: system description TLV"
    ce_lldp_interface:
      function_lldp_interface_flag: tlvdisableINTERFACE
      type_tlv_disable: basic_tlv
      ifname: 10GE1/0/1
      sysdesctxenable: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: "Configure basic-tlv: system name TLV"
    ce_lldp_interface:
      function_lldp_interface_flag: tlvdisableINTERFACE
      type_tlv_disable: basic_tlv
      ifname: 10GE1/0/1
      sysnametxenable: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: "TLV types that are forbidden to be published on the configuration interface, link aggregation TLV"
    ce_lldp_interface:
      function_lldp_interface_flag: tlvdisableINTERFACE
      type_tlv_disable: dot3_tlv
      ifname: 10GE1/0/1
      linkAggreTxEnable: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: "TLV types that are forbidden to be published on the configuration interface, MAC/PHY configuration/status TLV"
    ce_lldp_interface:
      function_lldp_interface_flag: tlvdisableINTERFACE
      type_tlv_disable: dot3_tlv
      ifname: 10GE1/0/1
      macPhyTxEnable: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: "TLV types that are forbidden to be published on the configuration interface, maximum frame size TLV"
    ce_lldp_interface:
      function_lldp_interface_flag: tlvdisableINTERFACE
      type_tlv_disable: dot3_tlv
      ifname: 10GE1/0/1
      maxFrameTxEnable: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: "TLV types that are forbidden to be published on the configuration interface, EEE TLV"
    ce_lldp_interface:
      function_lldp_interface_flag: tlvdisableINTERFACE
      type_tlv_disable: dot3_tlv
      ifname: 10GE1/0/1
      eee: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: "Configure the interface to publish an optional DCBX TLV type "
    ce_lldp_interface:
      function_lldp_interface_flag: tlvenableINTERFACE
      ifname: 10GE1/0/1
      type_tlv_enable: dcbx

Inputs

    
eee:
    description:
    - Enable the ability to send EEE TLV.
    type: bool

dcbx:
    description:
    - Enable the ability to send DCBX TLV.
    type: bool

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Manage the state of the resource.
    type: str

ifname:
    description:
    - Interface name.
    type: str

lldpenable:
    choices:
    - enabled
    - disabled
    description:
    - Set global LLDP enable state.
    type: str

txinterval:
    description:
    - LLDP send message interval.
    type: int

txvlannameid:
    description:
    - Set tx vlan name id.
    type: int

macphytxenable:
    description:
    - Enable MAC/PHY configuration and state TLV to be sent.
    type: bool

syscaptxenable:
    description:
    - Enable the ability to send system capabilities TLV.
    type: bool

lldpadminstatus:
    choices:
    - txOnly
    - rxOnly
    - txAndRx
    - disabled
    description:
    - Set interface lldp enable state.
    type: str

manaddrtxenable:
    description:
    - Make it able to send management address TLV.
    type: bool

protoidtxenable:
    description:
    - Enable the ability to send protocol identity TLV.
    type: bool

sysdesctxenable:
    description:
    - Enable the ability to send system description TLV.
    type: bool

sysnametxenable:
    description:
    - Enable the ability to send system name TLV.
    type: bool

type_tlv_enable:
    choices:
    - dot1_tlv
    - dcbx
    description:
    - Used to distinguish between command line functions.
    type: str

maxframetxenable:
    description:
    - Enable the ability to send maximum frame length TLV.
    type: bool

portdesctxenable:
    description:
    - Enabling the ability to send a description of TLV.
    type: bool

portvlantxenable:
    description:
    - Enable port vlan tx.
    type: bool

txprotocolvlanid:
    description:
    - Set tx protocol vlan id.
    type: int

type_tlv_disable:
    choices:
    - basic_tlv
    - dot3_tlv
    description:
    - Used to distinguish between command line functions.
    type: str

vlannametxenable:
    description:
    - Set vlan name tx enable or not.
    type: bool

linkaggretxenable:
    description:
    - Enable the ability to send link aggregation TLV.
    type: bool

protovlantxenable:
    description:
    - Enable protocol vlan tx.
    type: bool

function_lldp_interface_flag:
    choices:
    - disableINTERFACE
    - tlvdisableINTERFACE
    - tlvenableINTERFACE
    - intervalINTERFACE
    description:
    - Used to distinguish between command line functions.
    type: str

Outputs

changed:
  description: check to see if a change was made on the device
  returned: always
  sample: true
  type: bool
end_state:
  description: k/v pairs of global DLDP configration after module execution
  returned: always
  sample:
    function_lldp_interface_flag: tlvenableINTERFACE
    ifname: 10GE1/0/1
    lldpadminstatus: rxOnly
    lldpenable: enabled
    type_tlv_enable: dot1_tlv
  type: dict
existing:
  description: k/v pairs of existing global LLDP configration
  returned: always
  sample:
    ifname: 10GE1/0/1
    lldpadminstatus: txAndRx
    lldpenable: disabled
  type: dict
proposed:
  description: k/v pairs of parameters passed into module
  returned: always
  sample:
    function_lldp_interface_flag: tlvenableINTERFACE
    ifname: 10GE1/0/1
    lldpadminstatus: rxOnly
    lldpenable: enabled
    state: present
    type_tlv_enable: dot1_tlv
  type: dict
updates:
  description: command sent to the device
  returned: always
  sample:
  - lldp enable
  - interface 10ge 1/0/1
  - undo lldp disable
  - lldp tlv-enable dot1-tlv vlan-name 4
  type: list