Skip to content

Commit

Permalink
Update backend acl template and unit tests (sonic-net#18659)
Browse files Browse the repository at this point in the history
Signed-off-by: Neetha John <[email protected]>
  • Loading branch information
neethajohn authored and mssonicbld committed Apr 15, 2024
1 parent d3c4271 commit e0f8753
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 40 deletions.
19 changes: 0 additions & 19 deletions files/build_templates/backend_acl.j2
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
{%- set vlan2ports = {} %}
{%- for vlan in VLAN %}
{% set portlist = [] %}
{%- for vlan_name, port in VLAN_MEMBER %}
{%- if vlan_name == vlan %}
{%- if portlist.append(port) %}{%- endif %}
{%- endif %}
{%- endfor %}
{%- set _ = vlan2ports.update({vlan: portlist| sort | join(',')}) %}
{%- endfor %}


{
"acl": {
"acl-sets": {
Expand All @@ -31,13 +19,6 @@
"config": {
"vlan_id": "{{ vlan_entries['vlanid'] }}"
}
},
"input_interface": {
"interface_ref": {
"config": {
"interface": "{{ vlan2ports[vlan] }}"
}
}
}

}{% if not loop.last %},{% endif %}
Expand Down
14 changes: 0 additions & 14 deletions src/sonic-config-engine/tests/data/backend_acl/acl_multi_vlan.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@
"config": {
"vlan_id": "1000"
}
},
"input_interface": {
"interface_ref": {
"config": {
"interface": "Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76"
}
}
}

}, "2": {
Expand All @@ -41,13 +34,6 @@
"config": {
"vlan_id": "2000"
}
},
"input_interface": {
"interface_ref": {
"config": {
"interface": "Ethernet4,Ethernet8"
}
}
}

} }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@
"config": {
"vlan_id": "1000"
}
},
"input_interface": {
"interface_ref": {
"config": {
"interface": "Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet4,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet8"
}
}
}

}
Expand Down

0 comments on commit e0f8753

Please sign in to comment.