From 3decf72b52618f6a397e634ff4ad0327336a51b8 Mon Sep 17 00:00:00 2001 From: Andriy Yurkiv Date: Wed, 18 Jan 2023 16:11:45 +0200 Subject: [PATCH] [Dual-ToR] add default value for ACL rule for mellanox platform Signed-off-by: Andriy Yurkiv --- files/build_templates/init_cfg.json.j2 | 11 +++++++++++ .../tests/files/sample_config_db.json | 4 ++++ .../tests_config/system_defaults.json | 8 ++++++++ 3 files changed, 23 insertions(+) diff --git a/files/build_templates/init_cfg.json.j2 b/files/build_templates/init_cfg.json.j2 index b490dc424b0a..39e180a1179d 100644 --- a/files/build_templates/init_cfg.json.j2 +++ b/files/build_templates/init_cfg.json.j2 @@ -133,5 +133,16 @@ "digits_class": "true", "special_class": "true" } + }, + "SYSTEM_DEFAULTS" : { +{%- if include_mux == "y" %} + "mux_tunnel_egress_acl": { +{%- if sonic_asic_platform == "mellanox" %} + "status": "enabled" +{% else %} + "status": "disabled" +{% endif %} + } +{% endif %} } } diff --git a/src/sonic-yang-models/tests/files/sample_config_db.json b/src/sonic-yang-models/tests/files/sample_config_db.json index 897f31e57238..20c941ff5409 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -2109,6 +2109,10 @@ "SYSTEM_DEFAULTS": { "tunnel_qos_remap": { "status": "enabled" + }, + "mux_tunnel_egress_acl": + { + "status": "enabled" } }, "LOSSLESS_TRAFFIC_PATTERN": { diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/system_defaults.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/system_defaults.json index a8ccc13c099d..da9a3e752bf7 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/system_defaults.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/system_defaults.json @@ -6,6 +6,10 @@ { "name": "tunnel_qos_remap", "status": "enabled" + }, + { + "name": "mux_tunnel_egress_acl", + "status": "enabled" } ] } @@ -18,6 +22,10 @@ { "name": "tunnel_qos_remap", "status": "invalid_status" + }, + { + "name": "mux_tunnel_egress_acl", + "status": "invalid_status" } ] }