dellemc.enterprise_sonic.sonic_lag_interfaces (2.4.0) — module

Manage link aggregation group (LAG) interface parameters

| "added in version" 1.0.0 of dellemc.enterprise_sonic"

Authors: Abirami N (@abirami-n)

This plugin has a corresponding action plugin.

Install collection

Install with ansible-galaxy collection install dellemc.enterprise_sonic:==2.4.0


Add to requirements.yml

  collections:
    - name: dellemc.enterprise_sonic
      version: 2.4.0

Description

This module manages attributes of link aggregation group (LAG) interfaces of devices running Enterprise SONiC Distribution by Dell Technologies.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Using merged
#
# Before state:
# -------------
#
# interface Eth1/10
#  mtu 9100
#  speed 100000
#  no shutdown
# !
# interface Eth1/15
#  channel-group 12
#  mtu 9100
#  speed 100000
#  no shutdown
#
- name: Merges provided configuration with device configuration
  dellemc.enterprise_sonic.sonic_lag_interfaces:
    config:
     - name: PortChannel10
       members:
         interfaces:
           - member: Eth1/10
    state: merged
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
#
# After state:
# ------------
#
# interface Eth1/10
#  channel-group 10
#  mtu 9100
#  speed 100000
#  no shutdown
# !
# interface Eth1/15
#  channel-group 12
#  mtu 9100
#  speed 100000
#  no shutdown
#
# Using replaced
#
# Before state:
# -------------
#
# interface Eth1/5
#   channel-group 10
#   mtu 9100
#   speed 100000
#   no shutdown
#
# interface Eth1/6
#   channel-group 20
#   mtu 9100
#   speed 100000
#   no shutdown
#
# interface Eth1/7
#   no channel-group
#   mtu 9100
#   speed 100000
#   no shutdown
#
- name: Replace device configuration of specified LAG attributes
  dellemc.enterprise_sonic.sonic_lag_interfaces:
    config:
      - name: PortChannel10
        members:
          interfaces:
            - member: Eth1/7
    state: replaced
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
#
# After state:
# ------------
#
# interface Eth1/5
#   no channel-group
#   mtu 9100
#   speed 100000
#   no shutdown
#
# interface Eth1/6
#   channel-group 20
#   mtu 9100
#   speed 100000
#   no shutdown
#
# interface Eth1/7
#   channel-group 10
#   mtu 9100
#   speed 100000
#   no shutdown
#
# Using overridden
#
# Before state:
# -------------
#
# interface Eth1/5
#   channel-group 10
#   mtu 9100
#   speed 100000
#   no shutdown
#
# interface Eth1/6
#   no channel-group
#   mtu 9100
#   speed 100000
#   no shutdown
#
# interface Eth1/7
#   channel-group 2
#   mtu 9100
#   speed 100000
#   no shutdown
#
- name: Override device configuration of all LAG attributes
  dellemc.enterprise_sonic.sonic_lag_interfaces:
    config:
      - name: PortChannel20
        members:
          interfaces:
            - member: Eth1/6
    state: overridden
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
#
# After state:
# ------------
# interface Eth1/5
#   no channel-group
#   mtu 9100
#   speed 100000
#   no shutdown
#
# interface Eth1/6
#   channel-group 20
#   mtu 9100
#   speed 100000
#   no shutdown
#
# interface Eth1/7
#   no channel-group
#   mtu 9100
#   speed 100000
#   no shutdown
#
# Using deleted
#
# Before state:
# -------------
# interface PortChannel10
# !
# interface Eth1/10
#  channel-group 10
#  mtu 9100
#  speed 100000
#  no shutdown
#
- name: Deletes LAG attributes of a given interface, This does not delete the port-channel itself
  dellemc.enterprise_sonic.sonic_lag_interfaces:
    config:
     - name: PortChannel10
       members:
         interfaces:
    state: deleted
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
#
# After state:
# ------------
# interface PortChannel10
# !
# interface Eth1/10
#  mtu 9100
#  speed 100000
#  no shutdown
#
# Using deleted
#
# Before state:
# -------------
# interface PortChannel 10
# !
# interface PortChannel 12
# !
# interface Eth1/10
#  channel-group 10
#  mtu 9100
#  speed 100000
#  no shutdown
# !
# interface Eth1/15
#  channel-group 12
#  mtu 9100
#  speed 100000
#  no shutdown
#
- name: Deletes all LAGs and LAG attributes of all interfaces
  dellemc.enterprise_sonic.sonic_lag_interfaces:
    config:
    state: deleted

Inputs

    
state:
    choices:
    - merged
    - replaced
    - overridden
    - deleted
    default: merged
    description:
    - The state that the configuration should be left in.
    type: str

config:
    description: A list of LAG configurations.
    elements: dict
    suboptions:
      members:
        description:
        - The list of interfaces that are part of the group.
        suboptions:
          interfaces:
            description: The list of interfaces that are part of the group.
            elements: dict
            suboptions:
              member:
                description:
                - The interface name.
                type: str
            type: list
        type: dict
      mode:
        choices:
        - static
        - lacp
        description:
        - Specifies mode of the port-channel while creation.
        type: str
      name:
        description:
        - ID of the LAG.
        required: true
        type: str
    type: list

Outputs

after:
  description: The resulting configuration model invocation.
  returned: when changed
  sample: 'The configuration returned is always in the same format of the parameters
    above.

    '
  type: list
before:
  description: The configuration prior to the model invocation.
  returned: always
  sample: "The configuration that is returned is always in the same format\n of the\
    \ parameters above.\n"
  type: list
commands:
  description: The set of commands pushed to the remote device.
  returned: always
  sample:
  - command 1
  - command 2
  - command 3
  type: list