diff --git a/files/build_templates/qos_config.j2 b/files/build_templates/qos_config.j2 index 3d95d333594b..46cebb6e32d1 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 b15fcf7a36c1..6a09e605c3f2 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 92ba2caf8d17..48b3a293e02b 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 27bea8cd32d3..bf28af765e17 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 8130a455497a..a3dd5cbeea2b 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 b15fcf7a36c1..6a09e605c3f2 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 68774f58563a..67669c169b16 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 843e68a49c7d..a48656d57c0c 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 27b7ebd7e494..49ed2038e71b 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 1d8c2dbdfff6..cad403c93d2e 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 ae9fa775dc62..f4e639b3ddfe 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 9db828a759e4..f850e3285bef 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 92ba2caf8d17..48b3a293e02b 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 27bea8cd32d3..bf28af765e17 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 8130a455497a..a3dd5cbeea2b 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",