dellemc.enterprise_sonic.sonic_qos_maps module – Manage QoS maps 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_maps.

New in dellemc.enterprise_sonic 2.5.0

Synopsis

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

Parameters

Parameter

Comments

config

dictionary

QoS maps configuration

dot1p_maps

list / elements=dictionary

DOT1P maps configuration

entries

list / elements=dictionary

DOT1P map entries configuration

dot1p

integer / required

DOT1P value, range 0-7

fwd_group

string

Forwarding group value, range 0-7

name

string / required

Name of DOT1P map

dscp_maps

list / elements=dictionary

DSCP maps configuration

entries

list / elements=dictionary

DSCP map entries configuration

dscp

integer / required

DSCP value, range 0-63

fwd_group

string

Forwarding group value, range 0-7

name

string / required

Name of DSCP map

fwd_group_dot1p_maps

list / elements=dictionary

Forwarding group DOT1P maps configuration

entries

list / elements=dictionary

Forwarding group DOT1P map entries configuration

dot1p

integer

DOT1P value, range 0-7

fwd_group

string / required

Forwarding group value, range 0-7

name

string / required

Name of forwarding group DOT1P map

fwd_group_dscp_maps

list / elements=dictionary

Forwarding group DSCP maps configuration

entries

list / elements=dictionary

Forwarding group DSCP map entries configuration

dscp

integer

DSCP value, range 0-63

fwd_group

string / required

Forwarding group value, range 0-7

name

string / required

Name of forwarding group DSCP map

fwd_group_pg_maps

list / elements=dictionary

Forwarding group priority group maps configuration

entries

list / elements=dictionary

Forwarding group priority group entries configuration

fwd_group

string / required

Forwarding group value, range 0-7

pg_index

integer

Priority group index value, range 0-7

name

string / required

Name of forwarding group priority group map

fwd_group_queue_maps

list / elements=dictionary

Forwarding group queue maps configuration

entries

list / elements=dictionary

Forwarding group queue map entries configuration

fwd_group

string / required

Forwarding group value, range 0-7

queue_index

integer

Output queue index value, range 0-7

name

string / required

Name of forwarding group queue map

pfc_priority_pg_maps

list / elements=dictionary

PFC priority priority group maps configuration

entries

list / elements=dictionary

PFC priority priority group map entries configuration

dot1p

integer / required

DOT1P value, range 0-7

pg_index

integer

Priority group index value, range 0-7

name

string / required

Name of PFC priority priority group map

SONiC currently only supports configuration of a single PFC priority priority group map

pfc_priority_queue_maps

list / elements=dictionary

PFC priority queue maps configuration

entries

list / elements=dictionary

PFC priority queue map entries configuration

dot1p

integer / required

DOT1P value, range 0-7

queue_index

integer

Output queue index value, range 0-7

name

string / required

Name of PFC priority queue map

SONiC currently only supports configuration of a single PFC priority queue map

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 qos map dscp-tc
# (No qos map dscp-tc configuration present)

- name: Merge QoS maps configurations
  dellemc.enterprise_sonic.sonic_qos_maps:
    config:
      dscp_maps:
        - name: dscp_map1
          entries:
            - dscp: 0
              fwd_group: 0
            - dscp: 1
              fwd_group: 7
        - name: dscp_map2
          entries:
            - dscp: 2
              fwd_group: 4
    state: merged

# After state:
# ------------
#
# sonic# show qos map dscp-tc
# DSCP-TC-MAP: dscp_map1
# ----------------------------
#     DSCP TC
# ----------------------------
#     0    0
#     1    7
# ----------------------------
# DSCP-TC-MAP: dscp_map2
# ----------------------------
#     DSCP TC
# ----------------------------
#     2    4
# ----------------------------
#
#
# Using Replaced
#
# Before state:
# -------------
#
# sonic# show qos map dscp-tc
# DSCP-TC-MAP: dscp_map1
# ----------------------------
#     DSCP TC
# ----------------------------
#     0    0
#     1    7
# ----------------------------
# DSCP-TC-MAP: dscp_map2
# ----------------------------
#     DSCP TC
# ----------------------------
#     2    4
# ----------------------------

- name: Replace QoS maps configurations
  dellemc.enterprise_sonic.sonic_qos_maps:
    config:
      dscp_maps:
        - name: dscp_map1
          entries:
            - dscp: 3
              fwd_group: 5
    state: replaced

# After state:
# ------------
#
# sonic# show qos map dscp-tc
# DSCP-TC-MAP: dscp_map1
# ----------------------------
#     DSCP TC
# ----------------------------
#     3    5
# ----------------------------
# DSCP-TC-MAP: dscp_map2
# ----------------------------
#     DSCP TC
# ----------------------------
#     2    4
# ----------------------------
#
#
# Using Overridden
# Before state:
# -------------
#
# sonic# show qos map dscp-tc
# DSCP-TC-MAP: dscp_map1
# ----------------------------
#     DSCP TC
# ----------------------------
#     3    5
# ----------------------------
# DSCP-TC-MAP: dscp_map2
# ----------------------------
#     DSCP TC
# ----------------------------
#     2    4
# ----------------------------

- name: Override QoS maps configurations
  dellemc.enterprise_sonic.sonic_qos_maps:
    config:
      pfc_priority_queue_maps:
        - name: pfc_map1
          entries:
            - dot1p: 0
              queue_index: 0
            - dot1p: 4
              queue_index: 5
    state: overridden

# After state:
# ------------
#
# sonic# show qos map pfc-priority-queue
# PFC-Priority-Queue-MAP: pfc_map1
# ----------------------------
#     PFC Priority   Queue
# ----------------------------
#     0              0
#     4              5
# ----------------------------
#
#
# Using deleted
#
# Before state:
# -------------
#
# sonic# show qos map dot1p-tc
# DOT1P-TC-MAP: dot1p_map1
# ----------------------------
#     DOT1P  TC
# ----------------------------
#     0      0
#     1      6
# ----------------------------
# DOT1P-TC-MAP: dot1p_map2
# ----------------------------
#     DOT1P  TC
# ----------------------------
#     2      5
# ----------------------------

- name: Delete QoS maps configurations
  dellemc.enterprise_sonic.sonic_qos_maps:
    config:
      dot1p_maps:
        - name: dot1p_map1
          entries:
            - dot1p: 0
            - dot1p: 1
              fwd_group: 6
        - name: dot1p_map2
    state: deleted

# After state:
# ------------
#
# sonic# show qos map dot1p-tc
# (No qos map dot1p-tc configuration present)

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)