Skip to content

Commit 4079d39

Browse files
daallabdosi
authored andcommitted
[minigraph] Add tags for egress mirror tables (#4526)
Signed-off-by: Danny Allen <[email protected]>
1 parent 11ce761 commit 4079d39

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/sonic-config-engine/minigraph.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,8 @@ def parse_dpg(dpg, hname):
393393
# Give a warning if trying to attach ACL to a LAG member interface, correct way is to attach ACL to the LAG interface
394394
if port_alias_map[member] in intfs_inpc:
395395
print >> sys.stderr, "Warning: ACL " + aclname + " is attached to a LAG member interface " + port_alias_map[member] + ", instead of LAG interface"
396-
elif member.lower().startswith('erspan'):
397-
if member.lower().startswith('erspanv6'):
396+
elif member.lower().startswith('erspan') or member.lower().startswith('egress_erspan'):
397+
if member.lower().startswith('erspanv6') or member.lower().startswith('egress_erspanv6'):
398398
is_mirror_v6 = True
399399
else:
400400
is_mirror = True

src/sonic-config-engine/tests/t0-sample-graph.xml

+5
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,11 @@
303303
<InAcl>everflowV6</InAcl>
304304
<Type>Everflow</Type>
305305
</AclInterface>
306+
<AclInterface>
307+
<AttachTo>EGRESS_ERSPAN</AttachTo>
308+
<OutAcl>everflow_egress</OutAcl>
309+
<Type>Everflow</Type>
310+
</AclInterface>
306311
<AclInterface>
307312
<AttachTo>PortChannel01;PortChannel02;PortChannel03;PortChannel04</AttachTo>
308313
<InAcl>DataAclIngress</InAcl>

src/sonic-config-engine/tests/test_cfggen.py

+1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def test_minigraph_acl(self):
111111
"Warning: ignore interface 'fortyGigE0/2' in DEVICE_NEIGHBOR as it is not in the port_config.ini\n"
112112
"{'NTP_ACL': {'services': ['NTP'], 'type': 'CTRLPLANE', 'policy_desc': 'NTP_ACL', 'stage': 'ingress'}, "
113113
"'EVERFLOW': {'stage': 'ingress', 'type': 'MIRROR', 'ports': ['PortChannel01', 'PortChannel02', 'PortChannel03', 'PortChannel04', 'Ethernet4'], 'policy_desc': 'EVERFLOW'}, "
114+
"'EVERFLOW_EGRESS': {'stage': 'egress', 'type': 'MIRROR', 'ports': ['PortChannel01', 'PortChannel02', 'PortChannel03', 'PortChannel04', 'Ethernet4'], 'policy_desc': 'EVERFLOW_EGRESS'}, "
114115
"'ROUTER_PROTECT': {'services': ['SSH', 'SNMP'], 'type': 'CTRLPLANE', 'policy_desc': 'ROUTER_PROTECT', 'stage': 'ingress'}, "
115116
"'DATAACLINGRESS': {'stage': 'ingress', 'type': 'L3', 'ports': ['PortChannel01', 'PortChannel02', 'PortChannel03', 'PortChannel04'], 'policy_desc': 'DATAACLINGRESS'}, "
116117
"'SNMP_ACL': {'services': ['SNMP'], 'type': 'CTRLPLANE', 'policy_desc': 'SNMP_ACL', 'stage': 'ingress'}, "

0 commit comments

Comments
 (0)