On this page
ce_dldp_interface - Manages interface DLDP configuration on HUAWEI CloudEngine switches.
New in version 2.4.
Synopsis
- Manages interface DLDP configuration on HUAWEI CloudEngine switches.
 
Parameters
| Parameter | Choices/Defaults | Comments | 
|---|---|---|
| enable | 
       
  | 
      
        
        Set interface DLDP enable state.
         | 
     
| interface  
        required
         | 
      
        
        Must be fully qualified interface name, i.e. GE1/0/1, 10GE1/0/1, 40GE1/0/22, 100GE1/0/1.
         | 
     |
| local_mac | 
        
        Set the source MAC address for DLDP packets sent in the DLDP-compatible mode. The value of MAC address is in H-H-H format. H contains 1 to 4 hexadecimal digits.
         | 
     |
| mode_enable | 
       
  | 
      
        
        Set DLDP compatible-mode enable state.
         | 
     
| reset | 
       
  | 
      
        
        Specify whether reseting interface DLDP state.
         | 
     
| state | 
       
  | 
      
        
        Manage the state of the resource.
         | 
     
Notes
Note
- If 
state=present, enable=disable, interface DLDP enable will be turned off and related interface DLDP confuration will be cleared. - If 
state=absent, only local_mac is supported to configure. 
Examples
- name: DLDP interface test
  hosts: cloudengine
  connection: local
  gather_facts: no
  vars:
    cli:
      host: "{{ inventory_hostname }}"
      port: "{{ ansible_ssh_port }}"
      username: "{{ username }}"
      password: "{{ password }}"
      transport: cli
  tasks:
  - name: "Configure interface DLDP enable state and ensure global dldp enable is turned on"
    ce_dldp_interface:
      interface: 40GE2/0/1
      enable: enable
      provider: "{{ cli }}"
  - name: "Configuire interface DLDP compatible-mode enable state  and ensure interface DLDP state is already enabled"
    ce_dldp_interface:
      interface: 40GE2/0/1
      enable: enable
      mode_enable: enable
      provider: "{{ cli }}"
  - name: "Configuire the source MAC address for DLDP packets sent in the DLDP-compatible mode  and
           ensure interface DLDP state and compatible-mode enable state  is already enabled"
    ce_dldp_interface:
      interface: 40GE2/0/1
      enable: enable
      mode_enable: enable
      local_mac: aa-aa-aa
      provider: "{{ cli }}"
  - name: "Reset DLDP state of specified interface and ensure interface DLDP state is already enabled"
    ce_dldp_interface:
      interface: 40GE2/0/1
      enable: enable
      reset: enable
      provider: "{{ cli }}"
  - name: "Unconfigure interface DLDP local mac addreess when C(state=absent)"
    ce_dldp_interface:
      interface: 40GE2/0/1
      state: absent
      local_mac: aa-aa-aa
      provider: "{{ cli }}"
  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  
        dict
         | 
      always | 
        
        k/v pairs of interface DLDP configration after module execution
         Sample:
        
       
        {'enable': 'enable', 'interface': '40GE2/0/22', 'local_mac': '00aa-00aa-00aa', 'mode_enable': 'enable', 'reset': 'enable'}
         | 
     
| existing  
        dict
         | 
      always | 
        
        k/v pairs of existing interface DLDP configration
         Sample:
        
       
        {'enable': 'disable', 'interface': '40GE2/0/22', 'local_mac': None, 'mode_enable': None, 'reset': 'disable'}
         | 
     
| proposed  
        dict
         | 
      always | 
        
        k/v pairs of parameters passed into module
         Sample:
        
       
        {'enable': 'enalbe', 'interface': '40GE2/0/22', 'local_mac': 'aa-aa-aa', 'mode_enable': 'enable', 'reset': 'enable'}
         | 
     
| updates  
        list
         | 
      always | 
        
        command sent to the device
         Sample:
        
       
        ['dldp enable', 'dldp compatible-mode enable', 'dldp compatible-mode local-mac aa-aa-aa', 'dldp reset']
         | 
     
Status
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
Maintenance
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Author
- Zhou Zhijin (@CloudEngine-Ansible)
 
Hint
If you notice any issues in this documentation you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
 https://docs.ansible.com/ansible/2.6/modules/ce_dldp_interface_module.html