diff --git a/files/build_templates/qos_config.j2 b/files/build_templates/qos_config.j2 index 3d95d33359..46cebb6e32 100644 --- a/files/build_templates/qos_config.j2 +++ b/files/build_templates/qos_config.j2 @@ -217,6 +217,13 @@ }, {% endif %} "PORT_QOS_MAP": { +{% if generate_global_dscp_to_tc_map is defined %} + {{- generate_global_dscp_to_tc_map() }} +{% else %} + "global": { + "dscp_to_tc_map" : "AZURE" + }{% if PORT_ACTIVE %},{% endif %} +{% endif %} {% for port in PORT_ACTIVE %} "{{ port }}": { {% if 'type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] in backend_device_types and 'storage_device' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['storage_device'] == 'true' %} diff --git a/src/sonic-config-engine/tests/sample_output/py2/qos-arista7050.json b/src/sonic-config-engine/tests/sample_output/py2/qos-arista7050.json index b15fcf7a36..6a09e605c3 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/qos-arista7050.json +++ b/src/sonic-config-engine/tests/sample_output/py2/qos-arista7050.json @@ -114,6 +114,9 @@ } }, "PORT_QOS_MAP": { + "global": { + "dscp_to_tc_map" : "AZURE" + }, "Ethernet4": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", diff --git a/src/sonic-config-engine/tests/sample_output/py2/qos-arista7800r3-48cq2-lc.json b/src/sonic-config-engine/tests/sample_output/py2/qos-arista7800r3-48cq2-lc.json index 92ba2caf8d..48b3a293e0 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/qos-arista7800r3-48cq2-lc.json +++ b/src/sonic-config-engine/tests/sample_output/py2/qos-arista7800r3-48cq2-lc.json @@ -114,6 +114,9 @@ } }, "PORT_QOS_MAP": { + "global": { + "dscp_to_tc_map" : "AZURE" + }, "Ethernet0": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", diff --git a/src/sonic-config-engine/tests/sample_output/py2/qos-dell6100.json b/src/sonic-config-engine/tests/sample_output/py2/qos-dell6100.json index 27bea8cd32..bf28af765e 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/qos-dell6100.json +++ b/src/sonic-config-engine/tests/sample_output/py2/qos-dell6100.json @@ -114,6 +114,9 @@ } }, "PORT_QOS_MAP": { + "global": { + "dscp_to_tc_map" : "AZURE" + }, "Ethernet0": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", diff --git a/src/sonic-config-engine/tests/sample_output/py2/qos-dell9332.json b/src/sonic-config-engine/tests/sample_output/py2/qos-dell9332.json index 8130a45549..a3dd5cbeea 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/qos-dell9332.json +++ b/src/sonic-config-engine/tests/sample_output/py2/qos-dell9332.json @@ -118,6 +118,9 @@ } }, "PORT_QOS_MAP": { + "global": { + "dscp_to_tc_map" : "AZURE" + }, "Ethernet0": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050.json index b15fcf7a36..6a09e605c3 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050.json @@ -114,6 +114,9 @@ } }, "PORT_QOS_MAP": { + "global": { + "dscp_to_tc_map" : "AZURE" + }, "Ethernet4": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050cx3-dualtor-remap-disabled.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050cx3-dualtor-remap-disabled.json index 68774f5856..67669c169b 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050cx3-dualtor-remap-disabled.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050cx3-dualtor-remap-disabled.json @@ -114,6 +114,9 @@ } }, "PORT_QOS_MAP": { + "global": { + "dscp_to_tc_map" : "AZURE" + }, "Ethernet0": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050cx3-dualtor.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050cx3-dualtor.json index 843e68a49c..a48656d57c 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050cx3-dualtor.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050cx3-dualtor.json @@ -217,6 +217,9 @@ } }, "PORT_QOS_MAP": { + "global": { + "dscp_to_tc_map" : "AZURE" + }, "Ethernet0": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-dualtor-remap-disabled.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-dualtor-remap-disabled.json index 27b7ebd7e4..49ed2038e7 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-dualtor-remap-disabled.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-dualtor-remap-disabled.json @@ -114,6 +114,9 @@ } }, "PORT_QOS_MAP": { + "global": { + "dscp_to_tc_map" : "AZURE" + }, "Ethernet0": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-dualtor.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-dualtor.json index 1d8c2dbdff..cad403c93d 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-dualtor.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-dualtor.json @@ -217,6 +217,9 @@ } }, "PORT_QOS_MAP": { + "global": { + "dscp_to_tc_map" : "AZURE" + }, "Ethernet0": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-t1-remap-disabled.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-t1-remap-disabled.json index ae9fa775dc..f4e639b3dd 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-t1-remap-disabled.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-t1-remap-disabled.json @@ -114,6 +114,9 @@ } }, "PORT_QOS_MAP": { + "global": { + "dscp_to_tc_map" : "AZURE" + }, "Ethernet0": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-t1.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-t1.json index 9db828a759..f850e3285b 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-t1.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-t1.json @@ -114,6 +114,9 @@ } }, "PORT_QOS_MAP": { + "global": { + "dscp_to_tc_map" : "AZURE" + }, "Ethernet0": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7800r3-48cq2-lc.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7800r3-48cq2-lc.json index 92ba2caf8d..48b3a293e0 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7800r3-48cq2-lc.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7800r3-48cq2-lc.json @@ -114,6 +114,9 @@ } }, "PORT_QOS_MAP": { + "global": { + "dscp_to_tc_map" : "AZURE" + }, "Ethernet0": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-dell6100.json b/src/sonic-config-engine/tests/sample_output/py3/qos-dell6100.json index 27bea8cd32..bf28af765e 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-dell6100.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-dell6100.json @@ -114,6 +114,9 @@ } }, "PORT_QOS_MAP": { + "global": { + "dscp_to_tc_map" : "AZURE" + }, "Ethernet0": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE", diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-dell9332.json b/src/sonic-config-engine/tests/sample_output/py3/qos-dell9332.json index 8130a45549..a3dd5cbeea 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-dell9332.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-dell9332.json @@ -118,6 +118,9 @@ } }, "PORT_QOS_MAP": { + "global": { + "dscp_to_tc_map" : "AZURE" + }, "Ethernet0": { "dscp_to_tc_map" : "AZURE", "tc_to_queue_map" : "AZURE",