community.general.ce_lacp (0.1.1) — module

Manages Eth-Trunk interfaces 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 Eth-Trunk specific configuration parameters on HUAWEI CloudEngine switches.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Ensure Eth-Trunk100 is created, and set to mode lacp-static
    ce_lacp:
      trunk_id: 100
      mode: 'lacp-static'
      state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Ensure Eth-Trunk100 is created, add two members, and set global priority to 1231
    ce_lacp:
      trunk_id: 100
      global_priority: 1231
      state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Ensure Eth-Trunk100 is created, and set mode to Dynamic and configure other options
    ce_lacp:
      trunk_id: 100
      mode: Dynamic
      preempt_enable: True,
      state_flapping: True,
      port_id_extension_enable: True,
      unexpected_mac_disable: True,
      timeout_type: Fast,
      fast_timeout: 123,
      mixed_rate_link_enable: True,
      preempt_delay: 23,
      collector_delay: 33,
      state: present

Inputs

    
mode:
    choices:
    - Manual
    - Dynamic
    - Static
    default: null
    description:
    - Specifies the working mode of an Eth-Trunk interface.
    type: str

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

select:
    choices:
    - Speed
    - Prority
    description:
    - Select priority or speed to preempt.
    type: str

priority:
    description:
    - The priority of eth-trunk member interface.
    type: int

trunk_id:
    description:
    - Eth-Trunk interface number. The value is an integer. The value range depends on
      the assign forward eth-trunk mode command. When 256 is specified, the value ranges
      from 0 to 255. When 512 is specified, the value ranges from 0 to 511. When 1024
      is specified, the value ranges from 0 to 1023.
    type: int

system_id:
    description:
    - Link Aggregation Control Protocol System ID,interface Eth-Trunk View.
    - Formate 'X-X-X',X is hex(a,aa,aaa, or aaaa)
    type: str

fast_timeout:
    description:
    - When lacp timeout type is 'Fast', user-defined time can be a number(3~90).
    type: int

timeout_type:
    choices:
    - Slow
    - Fast
    description:
    - Lacp timeout type,that may be 'Fast' or 'Slow'.
    type: str

preempt_delay:
    description:
    - Value of preemption delay time.
    type: int

preempt_enable:
    description:
    - Specifies lacp preempt enable of Eth-Trunk lacp. The value is an boolean 'true'
      or 'false'.
    type: bool

state_flapping:
    description:
    - Lacp dampening state-flapping.
    type: bool

collector_delay:
    description:
    - Value of delay time in units of 10 microseconds.
    type: int

global_priority:
    description:
    - Configure lacp priority on system-view.
    type: int

max_active_linknumber:
    description:
    - Max active linknumber in link aggregation group.
    type: int

mixed_rate_link_enable:
    description:
    - Value of max active linknumber.
    type: bool

unexpected_mac_disable:
    description:
    - Lacp dampening unexpected-mac disable.
    type: bool

port_id_extension_enable:
    description:
    - Enable the function of extending the LACP negotiation port number.
    type: bool

Outputs

end_state:
  description: k/v pairs of Eth-Trunk info after module execution
  returned: always
  sample:
    hash_type: mac
    members_detail:
    - memberIfName: 10GE1/0/24
      memberIfState: Down
    - memberIfName: 10GE1/0/25
      memberIfState: Down
    min_links: '1'
    mode: lacp-static
    trunk_id: '100'
  type: dict
existing:
  description: k/v pairs of existing Eth-Trunk
  returned: always
  sample:
    hash_type: mac
    members_detail:
    - memberIfName: 10GE1/0/25
      memberIfState: Down
    min_links: '1'
    mode: manual
    trunk_id: '100'
  type: dict
proposed:
  description: k/v pairs of parameters passed into module
  returned: always
  sample:
    members:
    - 10GE1/0/24
    - 10GE1/0/25
    mode: lacp-static
    trunk_id: '100'
  type: dict
updates:
  description: command sent to the device
  returned: always
  sample:
  - interface Eth-Trunk 100
  - mode lacp-static
  - interface 10GE1/0/25
  - eth-trunk 100
  type: list