dellemc.enterprise_sonic.sonic_qos_interfaces 模块 – 在 SONiC 上管理 QoS 接口配置
注意
此模块是 dellemc.enterprise_sonic 集合(版本 2.5.1)的一部分。
如果您正在使用 ansible
包,则可能已经安装了此集合。它不包含在 ansible-core
中。要检查是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install dellemc.enterprise_sonic
。
要在 playbook 中使用它,请指定:dellemc.enterprise_sonic.sonic_qos_interfaces
。
dellemc.enterprise_sonic 2.5.0 中的新增功能
概要
此模块为运行 SONiC 的设备提供 QoS 接口的配置管理
参数
参数 |
注释 |
---|---|
QoS 接口配置 |
|
接口的名称 |
|
PFC 配置 |
|
在接口上启用或禁用非对称 PFC 选项
|
|
PFC 优先级配置 |
|
DOT1P 值,范围 0-7 最多支持 2 个优先级 |
|
启用或禁用优先级 选项
|
|
PFC 监控器风暴操作 选项
|
|
PFC 监控器检测时间,以毫秒为单位,范围 100-5000 |
|
PFC 监控器恢复时间,以毫秒为单位,范围 100-60000 |
|
QoS 映射接口配置 |
|
与接口关联的 DOT1P 到转发组映射 |
|
与接口关联的 DSCP 到转发组映射 |
|
与接口关联的转发组到 DOT1P 映射 |
|
与接口关联的转发组到 DSCP 映射 |
|
与接口关联的转发组到优先级组映射 |
|
与接口关联的转发组到队列映射 |
|
与接口关联的 PFC 优先级到优先级组映射 |
|
与接口关联的 PFC 优先级到队列映射 |
|
队列配置 |
|
队列标识 接口队列范围为 0-7,CPU 队列范围为 0-47 |
|
WRED 配置文件的名称 |
|
要应用于接口上流量的调度程序策略的名称 |
|
模块完成后的配置状态 由于配置约束,此模块不支持替换和覆盖状态 选项
|
备注
注意
已针对戴尔科技公司的 Enterprise SONiC 发行版进行了测试。
支持
check_mode
。
示例
# Using Merged
#
# Before state:
# -------------
#
# sonic# show running-configuration interface Eth 1/5
# !
# interface Eth1/5
# (No QoS configuration present for the interface)
- name: Merge QoS interfaces configuration
dellemc.enterprise_sonic.sonic_qos_interfaces:
config:
- name: Eth1/5
queues:
- id: 0
wred_profile: profile1
scheduler_policy: policy1
qos_maps:
dscp_fwd_group: dscp_map1
dot1p_fwd_group: dot1p_map1
fwd_group_dscp: fwd_dscp_map1
fwd_group_dot1p: fwd_dot1p_map1
fwd_group_queue: fwd_queue_map1
fwd_group_pg: fwd_pg_map1
pfc_priority_queue: pfc_queue_map1
pfc_priority_pg: pfc_pg_map1
pfc:
asymmetric: True
watchdog_action: alert
watchdog_detect_time: 100
watchdog_restore_time: 200
priorities:
- dot1p: 0
enable: True
- dot1p: 1
enable: True
state: merged
# After state:
# ------------
#
# sonic# show running-configuration interface Eth 1/5
# !
# interface Eth1/5
# queue 0 wred-policy profile1
# scheduler-policy policy1
# qos-map dscp-tc dscp_map1
# qos-map dot1p-tc dot1p_map1
# qos-map tc-queue fwd_queue_map1
# qos-map tc-pg fwd_pg_map1
# qos-map tc-dscp fwd_dscp_map1
# qos-map tc-dot1p fwd_dot1p_map1
# qos-map pfc-priority-queue pfc_queue_map1
# qos-map pfc-priority-pg pfc_pg_map1
# priority-flow-control priority 0
# priority-flow-control priority 1
# priority-flow-control asymmetric
# priority-flow-control watchdog action alert
# priority-flow-control watchdog on detect-time 100
# priority-flow-control watchdog restore-time 200
#
#
# Using deleted
#
# Before state:
# -------------
#
# sonic# show running-configuration interface Eth 1/5
# !
# interface Eth1/5
# queue 0 wred-policy profile2
# queue 1 wred-policy profile1
# scheduler-policy policy2
# qos-map dscp-tc dscp_map2
# qos-map dot1p-tc dot1p_map2
# qos-map tc-queue fwd_queue_map2
# qos-map tc-pg fwd_pg_map2
# qos-map tc-dscp fwd_dscp_map2
# qos-map tc-dot1p fwd_dot1p_map2
# qos-map pfc-priority-queue pfc_queue_map1
# qos-map pfc-priority-pg pfc_pg_map1
# priority-flow-control priority 1
# priority-flow-control watchdog action drop
# priority-flow-control watchdog on detect-time 150
# priority-flow-control watchdog restore-time 250
# sonic# show running-configuration interface Eth 1/6
# !
# interface Eth1/6
# queue 0 wred-policy profile1
# scheduler-policy policy1
# qos-map dscp-tc dscp_map1
# qos-map dot1p-tc dot1p_map1
# qos-map tc-queue fwd_queue_map1
# qos-map tc-pg fwd_pg_map1
# qos-map tc-dscp fwd_dscp_map1
# qos-map tc-dot1p fwd_dot1p_map1
# qos-map pfc-priority-queue pfc_queue_map1
# qos-map pfc-priority-pg pfc_pg_map1
# priority-flow-control priority 0
# priority-flow-control asymmetric
# priority-flow-control watchdog on detect-time 100
# priority-flow-control watchdog restore-time 200
- name: Delete QoS interfaces attributes
dellemc.enterprise_sonic.sonic_interfaces:
config:
- name: Eth1/5
queues:
- id: 0
wred_profile: profile2
- id: 1
scheduler_policy: policy2
qos_maps:
dscp_fwd_group: dscp_map2
dot1p_fwd_group: dot1p_map2
fwd_group_dscp: fwd_dscp_map2
fwd_group_dot1p: fwd_dot1p_map2
fwd_group_queue: fwd_queue_map2
fwd_group_pg: fwd_pg_map2
- name: Eth1/6
pfc:
asymmetric: True
watchdog_action: drop
watchdog_detect_time: 100
watchdog_restore_time: 200
priorities:
- dot1p: 0
enable: True
- dot1p: 1
enable: True
state: deleted
# After state:
# ------------
#
# sonic# show running-configuration interface Eth 1/5
# !
# interface Eth1/5
# qos-map pfc-priority-queue pfc_queue_map1
# qos-map pfc-priority-pg pfc_pg_map1
# priority-flow-control priority 1
# priority-flow-control watchdog action drop
# priority-flow-control watchdog on detect-time 150
# priority-flow-control watchdog restore-time 250
# sonic# show running-configuration interface Eth 1/6
# !
# interface Eth1/6
# queue 0 wred-policy profile1
# scheduler-policy policy1
# qos-map dscp-tc dscp_map1
# qos-map dot1p-tc dot1p_map1
# qos-map tc-queue fwd_queue_map1
# qos-map tc-pg fwd_pg_map1
# qos-map tc-dscp fwd_dscp_map1
# qos-map tc-dot1p fwd_dot1p_map1
# qos-map pfc-priority-queue pfc_queue_map1
# qos-map pfc-priority-pg pfc_pg_map1
返回值
常见的返回值记录在此处,以下是此模块独有的字段
键 |
描述 |
---|---|
模块调用产生的最终配置。 返回:发生更改时,如果未设置 示例: |
|
模块调用生成的(模拟的)配置。 返回: 当 示例: |
|
模块调用之前的配置。 返回:始终 示例: |
|
推送到远程设备的一组命令。 返回:始终 示例: |