dellemc.enterprise_sonic.sonic_lst module – Manage link state tracking (LST) configuration on SONiC
Note
This module is part of the dellemc.enterprise_sonic collection (version 3.2.0).
You might already have this collection installed if you are using the ansible package.
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install dellemc.enterprise_sonic.
To use it in a playbook, specify: dellemc.enterprise_sonic.sonic_lst.
New in dellemc.enterprise_sonic 3.1.0
Synopsis
This module provides configuration management of LST for devices running SONiC
Parameters
Parameter |
Comments |
|---|---|
LST configuration |
|
LST configuration for interfaces |
|
LST group name used to track the interface as downstream |
|
Name of interface |
|
Upstream groups configuration |
|
LST group name used to track the interface as upstream |
|
LST groups configuration |
|
Indicates that the LST group tracks all EVPN ethernet segments as downstream interfaces Choices:
|
|
Indicates that the LST group tracks all MCLAGs as downstream interfaces Choices:
|
|
Description of LST group |
|
LST group type Choices:
|
|
Name of LST group |
|
Downstream ports will shut down if the threshold falls below this value Range 0-100 |
|
Type of threshold calculation scheme to use Choices:
|
|
Downstream ports will go online if the threshold is greater than or equal to this value Range 0-100 |
|
Time in seconds to wait to bring up the downstream ports after the first upstream port is online Range 1-1800 |
|
The state of the configuration after module completion Choices:
|
Notes
Note
Tested against Enterprise SONiC Distribution by Dell Technologies.
Supports
check_mode.
Examples
# Using "merged" state
#
# Before state:
# -------------
#
# sonic# show running-configuration link state tracking
# (No link state tracking configuration present)
# sonic# show running-configuration interface Ethernet 20
# !
# interface Ethernet20
# (No link state tracking configuration present for interface Ethernet20)
# sonic# show running-configuration interface Ethernet 24
# !
# interface Ethernet24
# (No link state tracking configuration present for interface Ethernet24)
- name: Merge LST configuration
dellemc.enterprise_sonic.sonic_lst:
config:
lst_groups:
- name: lst
all_evpn_es_downstream: true
group_description: abc
group_type: l3
threshold_down: 20
threshold_type: percentage
threshold_up: 40
timeout: 120
interfaces:
- name: Ethernet20
downstream_group: lst
- name: Ethernet24
upstream_groups:
- group_name: lst
state: merged
# After state:
# ------------
#
# sonic# show running-configuration link state tracking
# !
# link state track lst
# timeout 120
# description abc
# downstream all-evpn-es
# threshold type percentage up 40 down 20
# sonic# show running-configuration interface Ethernet 20
# !
# interface Ethernet20
# link state track lst downstream
# sonic# show running-configuration interface Ethernet 24
# !
# interface Ethernet24
# link state track lst upstream
# Using "replaced" state
#
# Before state:
# -------------
#
# sonic# show running-configuration link state tracking
# !
# link state track lst
# timeout 120
# description abc
# downstream all-evpn-es
# threshold type percentage up 40 down 20
# sonic# show running-configuration interface Ethernet 20
# !
# interface Ethernet20
# link state track lst downstream
# sonic# show running-configuration interface Ethernet 24
# !
# interface Ethernet24
# link state track lst upstream
- name: Replace LST configuration
dellemc.enterprise_sonic.sonic_lst:
config:
lst_groups:
- name: lst
all_mclags_downstream: true
timeout: 75
interfaces:
- name: Ethernet20
upstream_groups:
- group_name: lst
- name: Ethernet24
downstream_group: lst
state: replaced
# After state:
# ------------
#
# sonic# show running-configuration link state tracking
# !
# link state track lst
# timeout 75
# downstream all-mclag
# sonic# show running-configuration interface Ethernet 20
# !
# interface Ethernet20
# link state track lst upstream
# sonic# show running-configuration interface Ethernet 24
# !
# interface Ethernet24
# link state track lst downstream
# Using "overridden" state
#
# Before state:
# -------------
#
# sonic# show running-configuration link state tracking
# !
# link state track lst
# timeout 75
# downstream all-mclag
# sonic# show running-configuration interface Ethernet 20
# !
# interface Ethernet20
# link state track lst upstream
# sonic# show running-configuration interface Ethernet 24
# !
# interface Ethernet24
# link state track lst downstream
- name: Override LST configuration
dellemc.enterprise_sonic.sonic_lst:
config:
lst_groups:
- name: lst2
all_evpn_es_downstream: true
group_description: xyz
group_type: l3
threshold_down: 30
threshold_type: percentage
threshold_up: 50
timeout: 130
interfaces:
- name: Ethernet20
downstream_group: lst2
state: overridden
# After state:
# ------------
#
# sonic# show running-configuration link state tracking
# !
# link state track lst2
# timeout 130
# description xyz
# downstream all-evpn-es
# threshold type percentage up 50 down 30
# sonic# show running-configuration interface Ethernet 20
# !
# interface Ethernet20
# link state track lst2 downstream
# sonic# show running-configuration interface Ethernet 24
# !
# interface Ethernet24
# (No link state configuration present for interface Ethernet24)
# Using "deleted" state
#
# Before state:
# -------------
#
# sonic# show running-configuration link state tracking
# !
# link state track lst2
# timeout 130
# description xyz
# downstream all-evpn-es
# threshold type percentage up 50 down 30
# sonic# show running-configuration interface Ethernet 20
# !
# interface Ethernet20
# link state track lst2 downstream
# sonic# show running-configuration interface Ethernet 24
# !
# interface Ethernet24
# link state track lst2 upstream
- name: Delete LST configuration
dellemc.enterprise_sonic.sonic_lst:
config:
lst_groups:
- name: lst2
all_evpn_es_downstream: true
group_description: xyz
threshold_down: 30
threshold_type: percentage
threshold_up: 50
timeout: 130
interfaces:
- name: Ethernet20
downstream_group: lst2
- name: Ethernet24
upstream_groups:
- group_name: lst2
state: deleted
# After state:
# ------------
#
# sonic# show running-configuration link state tracking
# !
# link state track lst2
# sonic# show running-configuration interface Ethernet 20
# !
# interface Ethernet20
# (No link state configuration present for interface Ethernet20)
# sonic# show running-configuration interface Ethernet 24
# !
# interface Ethernet24
# (No link state configuration present for interface Ethernet24)
# Using "deleted" state
#
# Before state:
# -------------
#
# sonic# show running-configuration link state tracking
# !
# link state track lst
# timeout 120
# description abc
# downstream all-evpn-es
# threshold type percentage up 40 down 20
# sonic# show running-configuration interface Ethernet 20
# !
# interface Ethernet20
# link state track lst downstream
# sonic# show running-configuration interface Ethernet 24
# !
# interface Ethernet24
# link state track lst upstream
- name: Delete LST configuration
dellemc.enterprise_sonic.sonic_lst:
config: {}
state: deleted
# After state:
# ------------
#
# sonic# show running-configuration link state tracking
# (No link state tracking configuration present)
# sonic# show running-configuration interface Ethernet 20
# !
# interface Ethernet20
# (No link state tracking configuration present for interface Ethernet20)
# sonic# show running-configuration interface Ethernet 24
# !
# interface Ethernet24
# (No link state tracking configuration present for interface Ethernet24)
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The resulting configuration from module invocation. Returned: when changed Sample: |
|
The generated configuration from module invocation. Returned: when Sample: |
|
The configuration prior to the module invocation. Returned: always Sample: |
|
The set of commands pushed to the remote device. Returned: always Sample: |