dellemc.enterprise_sonic.sonic_qos_scheduler module – Manage QoS scheduler 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_scheduler
.
New in dellemc.enterprise_sonic 2.5.0
Synopsis
This module provides configuration management of QoS scheduler for devices running SONiC
Parameters
Parameter |
Comments |
---|---|
QoS scheduler configuration |
|
Name of scheduler policy |
|
Schedulers configuration for the scheduler policy |
|
Committed burst size measured in bytes Range 0-125000000 |
|
Committed information rate measured in bps Range 0-400000000000 |
|
Metering method used by the scheduler Choices:
|
|
Excess burst size measured in bytes Range 0-125000000 |
|
Peak information rate measured in bps Range 0-400000000000, must be greater than or equal to cir |
|
Specifies the type of scheduler Strict priority scheduling cannot be configured with weight Choices:
|
|
Sequence number of the scheduler Range 0-7 for interface queues Range 0-47 for CPU queues Specify 255 for port queues |
|
Weight of the scheduler Range 1-100 |
|
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 scheduler-policy
# (No qos scheduler-policy configuration present)
- name: Merge QoS scheduler configurations
dellemc.enterprise_sonic.sonic_qos_scheduler:
config:
- name: policy1
schedulers:
- sequence: 0
scheduler_type: dwrr
weight: 10
meter_type: packets
cir: 32000
pir: 40000
cbs: 30000
pbs: 35000
state: merged
# After state:
# ------------
#
# sonic# show qos scheduler-policy
# Scheduler Policy: policy1
# Queue: 0
# type: dwrr
# weight: 10
# meter-type: packets
# cir: 32000 Pps
# cbs: 30000 Packets
# pir: 40000 Pps
# pbs: 35000 Packets
#
#
# Using Replaced
#
# Before state:
# -------------
#
# sonic# show qos scheduler-policy
# Scheduler Policy: policy1
# Queue: 0
# type: dwrr
# weight: 10
# meter-type: packets
# cir: 32000 Pps
# cbs: 30000 Packets
# pir: 40000 Pps
# pbs: 35000 Packets
- name: Replace QoS scheduler configurations
dellemc.enterprise_sonic.sonic_qos_scheduler:
config:
- name: policy1
schedulers:
- sequence: 0
weight: 12
state: replaced
# After state:
# ------------
#
# sonic# show qos scheduler-policy
# Scheduler Policy: policy1
# Queue: 0
# weight: 12
#
#
# Using Overridden
# Before state:
# -------------
#
# sonic# show qos scheduler-policy
# Scheduler Policy: policy1
# Queue: 0
# type: dwrr
# weight: 10
# meter-type: packets
# cir: 32000 Pps
# cbs: 30000 Packets
# pir: 40000 Pps
# pbs: 35000 Packets
# Queue: 1
# type: dwrr
# weight: 14
# meter-type: packets
- name: Override QoS scheduler configurations
dellemc.enterprise_sonic.sonic_qos_scheduler:
config:
- name: policy2
schedulers:
- sequence: 0
scheduler_type: wrr
weight: 5
meter_type: bytes
cir: 50000
pir: 60000
cbs: 800000
pbs: 900000
state: overridden
# After state:
# ------------
#
# sonic# show qos scheduler-policy
# Scheduler Policy: policy2
# Queue: 0
# type: wrr
# weight: 5
# meter-type: bytes
# cir: 50 Kbps
# cbs: 800000 Bytes
# pir: 60 Kbps
# pbs: 900000 Bytes
#
#
# Using deleted
#
# Before state:
# -------------
#
# sonic# show qos scheduler-policy
# Scheduler Policy: policy1
# Queue: 0
# type: dwrr
# weight: 10
# meter-type: packets
# cir: 32000 Pps
# cbs: 30000 Packets
# pir: 40000 Pps
# pbs: 35000 Packets
# Queue: 1
# type: dwrr
# weight: 14
# meter-type: packets
# Scheduler Policy: policy2
# Queue: 0
# type: wrr
# weight: 5
# meter-type: bytes
# cir: 50 Kbps
# cbs: 800000 Bytes
# pir: 60 Kbps
# pbs: 900000 Bytes
- name: Delete QoS scheduler configurations
dellemc.enterprise_sonic.sonic_qos_scheduler:
config:
- name: policy1
schedulers:
- sequence: 0
cir: 32000
pir: 40000
cbs: 30000
pbs: 35000
- sequence: 1
- name: policy2
state: deleted
# After state:
# -------------
#
# sonic# show qos scheduler-policy
# Scheduler Policy: policy1
# Queue: 0
# type: dwrr
# weight: 10
# meter-type: packets
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: |