Spec-Zone.ru › Ansible

Модуль dellemc.enterprise_sonic.sonic_lst — Управление конфигурацией отслеживания состояния каналов связи (LST) в SONiC

Примечание

Этот модуль входит в коллекцию dellemc.enterprise_sonic (версия 3.2.0).

Возможно, эта коллекция уже установлена, если вы используете пакет ansible. Она не входит в ansible-core. Чтобы проверить, установлена ли она, выполните ansible-galaxy collection list.

Для установки используйте: ansible-galaxy collection install dellemc.enterprise_sonic.

Чтобы использовать её в плейбуке, укажите: dellemc.enterprise_sonic.sonic_lst.

Добавлено в dellemc.enterprise_sonic 3.1.0

  • Краткое описание
  • Параметры
  • Примечания
  • Примеры
  • Возвращаемые значения

Краткое описание

  • Этот модуль управляет конфигурацией LST для устройств под управлением SONiC

Параметры

Параметр

Комментарии

config

dictionary

Конфигурация LST

interfaces

list / elements=dictionary

Конфигурация LST для интерфейсов

downstream_group

string

Имя группы LST, используемой для отслеживания интерфейса как нисходящего

name

string / обязательный

Имя интерфейса

upstream_groups

list / elements=dictionary

Конфигурация восходящих групп

group_name

string / обязательный

Имя группы LST, используемой для отслеживания интерфейса как восходящего

lst_groups

list / elements=dictionary

Конфигурация групп LST

all_evpn_es_downstream

boolean

Указывает, что группа LST отслеживает все сегменты Ethernet EVPN как нисходящие интерфейсы

Возможные значения:

  • false
  • true

all_mclags_downstream

boolean

Указывает, что группа LST отслеживает все MCLAG как нисходящие интерфейсы

Возможные значения:

  • false
  • true

group_description

string

Описание группы LST

group_type

string

Тип группы LST

Возможные значения:

  • "l3"

name

string / обязательный

Имя группы LST

threshold_down

integer

Нисходящие порты будут отключены, если пороговое значение станет ниже этого значения

Диапазон: 0–100

threshold_type

string

Тип используемой схемы расчёта порогового значения

Возможные значения:

  • "percentage"

threshold_up

integer

Нисходящие порты будут переведены в рабочее состояние, если пороговое значение будет больше или равно этому значению

Диапазон: 0–100

timeout

integer

Время в секундах ожидания перед включением нисходящих портов после перехода первого восходящего порта в рабочее состояние

Диапазон: 1–1800

state

string

Состояние конфигурации после завершения работы модуля

Возможные значения:

  • "merged" ← (по умолчанию)
  • "deleted"
  • "replaced"
  • "overridden"

Примечания

Примечание

  • Проверено на Enterprise SONiC Distribution от Dell Technologies.
  • Поддерживает check_mode.

Примеры

# 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)

Возвращаемые значения

Общие возвращаемые значения описаны здесь; ниже перечислены поля, уникальные для этого модуля:

Ключ

Описание

after

dictionary

Конфигурация, полученная в результате вызова модуля.

Возвращается: при изменении

Пример: "The configuration returned will always be in the same format as the parameters above.\n"

after(generated)

dictionary

Конфигурация, созданная в результате вызова модуля.

Возвращается: когда check_mode

Пример: "The configuration returned will always be in the same format as the parameters above.\n"

before

dictionary

Конфигурация до вызова модуля.

Возвращается: всегда

Пример: "The configuration returned will always be in the same format as the parameters above.\n"

commands

list / elements=string

Набор команд, отправленных на удалённое устройство.

Возвращается: всегда

Пример: ["command 1", "command 2", "command 3"]

Авторы

    1. Talabi (@stalabi1)

Ссылки на коллекцию

  • Отслеживание проблем
  • Репозиторий (исходный код)

© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/dellemc/enterprise_sonic/sonic_lst_module.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API