dellemc.enterprise_sonic.sonic_qos_wred module – Manage QoS WRED profiles configuration on SONiC
Note
This module is part of the dellemc.enterprise_sonic collection (version 3.0.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_qos_wred
.
New in dellemc.enterprise_sonic 2.5.0
Synopsis
This module provides configuration management of QoS WRED profiles for devices running SONiC
Parameters
Parameter |
Comments |
---|---|
QoS WRED profile configuration |
|
ECN setting for colored packets Choices:
|
|
WRED configuration for green packets |
|
Drop probablity percentage rate for green packets Range 0-100 |
|
Enable or disable WRED for green packets Choices:
|
|
Maximum threshold set for green packets in bytes Range 1000-12480000 |
|
Minimum threshold set for green packets in bytes Range 1000-12480000 |
|
Name of the WRED profile |
|
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
#
# Before state:
# -------------
#
# sonic# show qos wred-policy
# (No qos wred-policy configuration present)
- name: Merge QoS WRED policy configuration
dellemc.enterprise_sonic.sonic_qos_wred:
config:
- name: profile1
ecn: green
green:
enable: True
min_threshold: 1000
max_threshold: 5000
drop_probability: 25
state: merged
# After state:
# ------------
#
# sonic# show qos wred-policy
# ---------------------------------------------------
# Policy : profile1
# ---------------------------------------------------
# ecn : ecn_green
# green-min-threshold : 1 KBytes
# green-max-threshold : 5 KBytes
# green-drop-probability : 25
#
#
# Using Replaced
#
# Before state:
# -------------
#
# sonic# show qos wred-policy
# ---------------------------------------------------
# Policy : profile1
# ---------------------------------------------------
# ecn : ecn_green
# green-min-threshold : 1 KBytes
# green-max-threshold : 5 KBytes
# green-drop-probability : 25
- name: Replace QoS WRED policy configuration
dellemc.enterprise_sonic.sonic_qos_wred:
config:
- name: profile1
green:
drop_probability: 75
state: replaced
# After state:
# ------------
#
# sonic# show qos wred-policy
# ---------------------------------------------------
# Policy : profile1
# ---------------------------------------------------
# green-drop-probability : 75
# Using Overridden
#
# Before state:
# -------------
#
# sonic# show qos wred-policy
# ---------------------------------------------------
# Policy : profile1
# ---------------------------------------------------
# ecn : ecn_green
# green-min-threshold : 1 KBytes
# green-max-threshold : 5 KBytes
# green-drop-probability : 25
- name: Override QoS WRED policy configuration
dellemc.enterprise_sonic.sonic_qos_wred:
config:
- name: profile2
ecn: green
green:
enable: False
min_threshold: 3000
max_threshold: 9000
drop_probability: 75
state: overridden
# After state:
# ------------
#
# sonic# show qos wred-policy
# ---------------------------------------------------
# Policy : profile2
# ---------------------------------------------------
# ecn : ecn_green
# green-min-threshold : 3 KBytes
# green-max-threshold : 9 KBytes
# green-drop-probability : 75
#
#
# Using deleted
#
# Before state:
# -------------
#
# sonic# show qos wred-policy
# ---------------------------------------------------
# Policy : profile1
# ---------------------------------------------------
# ecn : ecn_green
# green-min-threshold : 1 KBytes
# green-max-threshold : 5 KBytes
# green-drop-probability : 25
# ---------------------------------------------------
# Policy : profile2
# ---------------------------------------------------
# ecn : ecn_green
# green-min-threshold : 3 KBytes
# green-max-threshold : 9 KBytes
# green-drop-probability : 75
- name: Delete QoS WRED policy configuration
dellemc.enterprise_sonic.sonic_qos_wred:
config:
- name: profile1
- name: profile2
green:
enable: False
min_threshold: 3000
max_threshold: 9000
state: deleted
# After state:
# ------------
#
# sonic# show qos wred-policy
# ---------------------------------------------------
# Policy : profile2
# ---------------------------------------------------
# ecn : ecn_green
# green-drop-probability : 75
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The resulting configuration module invocation. Returned: when changed Sample: |
|
The generated configuration 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: |