.. _dellemc.enterprise_sonic.sonic_lst_module: ********************************** dellemc.enterprise_sonic.sonic_lst ********************************** **Manage link state tracking (LST) configuration on SONiC** Version added: 3.1.0 .. contents:: :local: :depth: 1 Synopsis -------- - This module provides configuration management of LST for devices running SONiC Parameters ---------- .. raw:: html
Parameter Choices/Defaults Comments
config
dictionary
LST configuration
interfaces
list / elements=dictionary
LST configuration for interfaces
downstream_group
string
LST group name used to track the interface as downstream
name
string / required
Name of interface
upstream_groups
list / elements=dictionary
Upstream groups configuration
group_name
string / required
LST group name used to track the interface as upstream
lst_groups
list / elements=dictionary
LST groups configuration
all_evpn_es_downstream
boolean
    Choices:
  • no
  • yes
Indicates that the LST group tracks all EVPN ethernet segments as downstream interfaces
all_mclags_downstream
boolean
    Choices:
  • no
  • yes
Indicates that the LST group tracks all MCLAGs as downstream interfaces
group_description
string
Description of LST group
group_type
string
    Choices:
  • l3
LST group type
name
string / required
Name of LST group
threshold_down
integer
Downstream ports will shut down if the threshold falls below this value
Range 0-100
threshold_type
string
    Choices:
  • percentage
Type of threshold calculation scheme to use
threshold_up
integer
Downstream ports will go online if the threshold is greater than or equal to this value
Range 0-100
timeout
integer
Time in seconds to wait to bring up the downstream ports after the first upstream port is online
Range 1-1800
state
string
    Choices:
  • merged ←
  • deleted
  • replaced
  • overridden
The state of the configuration after module completion

Notes ----- .. note:: - Tested against Enterprise SONiC Distribution by Dell Technologies. - Supports ``check_mode``. Examples -------- .. code-block:: yaml # 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: .. raw:: html
Key Returned Description
after
dictionary
when changed
The resulting configuration from module invocation.

Sample:
The configuration returned will always be in the same format as the parameters above.
after_generated
dictionary
when check_mode
The generated configuration from module invocation.

Sample:
The configuration returned will always be in the same format as the parameters above.
before
dictionary
always
The configuration prior to the module invocation.

Sample:
The configuration returned will always be in the same format as the parameters above.
commands
list
always
The set of commands pushed to the remote device.

Sample:
['command 1', 'command 2', 'command 3']


Status ------ Authors ~~~~~~~ - S\. Talabi (@stalabi1)