Skip to content

Commit e0f8753

Browse files
neethajohnmssonicbld
authored andcommitted
Update backend acl template and unit tests (#18659)
Signed-off-by: Neetha John <[email protected]>
1 parent d3c4271 commit e0f8753

File tree

3 files changed

+0
-40
lines changed

3 files changed

+0
-40
lines changed

files/build_templates/backend_acl.j2

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
{%- set vlan2ports = {} %}
2-
{%- for vlan in VLAN %}
3-
{% set portlist = [] %}
4-
{%- for vlan_name, port in VLAN_MEMBER %}
5-
{%- if vlan_name == vlan %}
6-
{%- if portlist.append(port) %}{%- endif %}
7-
{%- endif %}
8-
{%- endfor %}
9-
{%- set _ = vlan2ports.update({vlan: portlist| sort | join(',')}) %}
10-
{%- endfor %}
11-
12-
131
{
142
"acl": {
153
"acl-sets": {
@@ -31,13 +19,6 @@
3119
"config": {
3220
"vlan_id": "{{ vlan_entries['vlanid'] }}"
3321
}
34-
},
35-
"input_interface": {
36-
"interface_ref": {
37-
"config": {
38-
"interface": "{{ vlan2ports[vlan] }}"
39-
}
40-
}
4122
}
4223

4324
}{% if not loop.last %},{% endif %}

src/sonic-config-engine/tests/data/backend_acl/acl_multi_vlan.json

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@
1919
"config": {
2020
"vlan_id": "1000"
2121
}
22-
},
23-
"input_interface": {
24-
"interface_ref": {
25-
"config": {
26-
"interface": "Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76"
27-
}
28-
}
2922
}
3023

3124
}, "2": {
@@ -41,13 +34,6 @@
4134
"config": {
4235
"vlan_id": "2000"
4336
}
44-
},
45-
"input_interface": {
46-
"interface_ref": {
47-
"config": {
48-
"interface": "Ethernet4,Ethernet8"
49-
}
50-
}
5137
}
5238

5339
} }

src/sonic-config-engine/tests/data/backend_acl/acl_single_vlan.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@
1919
"config": {
2020
"vlan_id": "1000"
2121
}
22-
},
23-
"input_interface": {
24-
"interface_ref": {
25-
"config": {
26-
"interface": "Ethernet12,Ethernet16,Ethernet20,Ethernet24,Ethernet28,Ethernet32,Ethernet36,Ethernet4,Ethernet40,Ethernet44,Ethernet48,Ethernet52,Ethernet56,Ethernet60,Ethernet64,Ethernet68,Ethernet72,Ethernet76,Ethernet8"
27-
}
28-
}
2922
}
3023

3124
}

0 commit comments

Comments
 (0)