Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dual-ToR] add default value for ACL rule for mellanox platform (Standby ToR) #13547

Merged
merged 1 commit into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions files/build_templates/init_cfg.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,16 @@
"digits_class": "true",
"special_class": "true"
}
},
"SYSTEM_DEFAULTS" : {
{%- if include_mux == "y" %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it better to generate the SYSTEM_DEFAULTS table only when sonic_asic_platform == "mellanox", and include_mux == "y"? In this way, there will be no change for other platforms.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your remark.
I thought about it previously. But I decided that it may look confusing that SYSTEM_DEFAULT table (that is generic table) is under "mellanox" and "mux" condition.
What do you think about it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense. Please also consider when we are upgrading from previous version, the mux_tunnel_egress_acl is absent. Our code should be handle that exception.

"mux_tunnel_egress_acl": {
{%- if sonic_asic_platform == "mellanox" %}
"status": "enabled"
{% else %}
"status": "disabled"
{% endif %}
}
{% endif %}
}
}
4 changes: 4 additions & 0 deletions src/sonic-yang-models/tests/files/sample_config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -2109,6 +2109,10 @@
"SYSTEM_DEFAULTS": {
"tunnel_qos_remap": {
"status": "enabled"
},
"mux_tunnel_egress_acl":
{
"status": "enabled"
}
},
"LOSSLESS_TRAFFIC_PATTERN": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
{
"name": "tunnel_qos_remap",
"status": "enabled"
},
{
"name": "mux_tunnel_egress_acl",
"status": "enabled"
}
]
}
Expand All @@ -18,6 +22,10 @@
{
"name": "tunnel_qos_remap",
"status": "invalid_status"
},
{
"name": "mux_tunnel_egress_acl",
"status": "invalid_status"
}
]
}
Expand Down