dellemc.enterprise_sonic.sonic_qos_pfc module – Manage QoS PFC configuration on SONiC

Note

This module is part of the dellemc.enterprise_sonic collection (version 2.5.1).

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_qos_pfc.

New in dellemc.enterprise_sonic 2.5.0

Synopsis

  • This module provides configuration management of QoS PFC for devices running SONiC

Parameters

Parameter

Comments

config

dictionary

QoS PFC configuration

counter_poll

boolean

Enable or disable use of flex-counters for PFC watchdog

Choices:

  • false

  • true ← (default)

poll_interval

integer

Polling interval for PFC watchdog

Range 100-3000

state

string

The state of the configuration after module completion.

Choices:

  • "merged" ← (default)

  • "deleted"

  • "overridden"

  • "replaced"

Notes

Note

  • Tested against Enterprise SONiC Distribution by Dell Technologies.

  • Supports check_mode.

Examples

# Using Merged
#
# Before state:
# -------------
#
# sonic# show priority-flow-control watchdog
#
# Watchdog Summary
# ----------------
# Polling Interval:   : Not Available
# Flex Counters:      : enabled

- name: Merge QoS PFC configurations
  dellemc.enterprise_sonic.sonic_qos_pfc:
    config:
      counter_poll: True
      poll_interval: 150
    state: merged

# After state:
# ------------
#
# sonic# show priority-flow-control watchdog
#
# Watchdog Summary
# ----------------
# Polling Interval:   : 150
# Flex Counters:      : enabled
#
#
# Using Replaced
#
# Before state:
# -------------
#
# sonic# show priority-flow-control watchdog
#
# Watchdog Summary
# ----------------
# Polling Interval:   : 150
# Flex Counters:      : enabled

- name: Replace QoS PFC configurations
  dellemc.enterprise_sonic.sonic_qos_pfc:
    config:
      poll_interval: 365
    state: replaced

# After state:
# ------------
#
# sonic# show priority-flow-control watchdog
#
# Watchdog Summary
# ----------------
# Polling Interval:   : 365
# Flex Counters:      : enabled
#
#
# Using Overridden
# Before state:
# -------------
#
# sonic# show priority-flow-control watchdog
#
# Watchdog Summary
# ----------------
# Polling Interval:   : 365
# Flex Counters:      : enabled

- name: Override QoS PFC configurations
  dellemc.enterprise_sonic.sonic_qos_pfc:
    config:
      counter_poll: False
      poll_interval: 400
    state: overridden

# After state:
# ------------
#
# sonic# show priority-flow-control watchdog
#
# Watchdog Summary
# ----------------
# Polling Interval:   : 400
# Flex Counters:      : disabled
#
#
# Using deleted
#
# Before state:
# -------------
#
# sonic# show priority-flow-control watchdog
#
# Watchdog Summary
# ----------------
# Polling Interval:   : 400
# Flex Counters:      : disabled

- name: Delete QoS PFC configurations
  dellemc.enterprise_sonic.sonic_qos_pfc:
    config:
      counter_poll: False
      poll_interval: 400
    state: deleted

# After state:
# ------------
#
# sonic# show priority-flow-control watchdog
#
# Watchdog Summary
# ----------------
# Polling Interval:   : Not Available
# Flex Counters:      : enabled

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

after

list / elements=string

The resulting configuration module invocation.

Returned: when changed

Sample: ["The configuration returned will always be in the same format as the parameters above.\n"]

after(generated)

list / elements=string

The generated configuration module invocation.

Returned: when check_mode

Sample: ["The configuration returned will always be in the same format\n as the parameters above.\n"]

before

list / elements=string

The configuration prior to the module invocation.

Returned: always

Sample: ["The configuration returned will always be in the same format as the parameters above.\n"]

commands

list / elements=string

The set of commands pushed to the remote device.

Returned: always

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

Authors

  • Shade Talabi (@stalabi1)