Skip to content

Commit

Permalink
Fix for show l2route mac-ip all detail
Browse files Browse the repository at this point in the history
  • Loading branch information
dwapstra committed Jun 6, 2024
1 parent 529dba9 commit f8b0de5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/genie/libs/parser/nxos/show_vxlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -1501,6 +1501,7 @@ class ShowL2routeMacIpAllDetailSchema(MetaParser):
Optional('sent_to'): str,
Optional('soo'): int,
Optional('l3_info'): int,
Optional('label'): int,
}
}
}
Expand Down Expand Up @@ -1549,8 +1550,9 @@ def cli(self, output=None):
# 201 0011.01ff.0001 10.1.1.2 BGP -- 0 2001:db8:646:a2bb:0:abcd:5678:1
# 202 0011.01ff.0001 5:1:1:1::2 BGP -- 0 2001:db8:646:a2bb:0:abcd:5678:1
p5 = re.compile(r'^\s*(?P<topo_id>[\d]+) +(?P<mac_addr>[\w\.]+) +(?P<host_ip>[\w\/\.\:]+)'
' +(?P<mac_ip_prod_type>[\w\,]+)'
' +(?P<mac_ip_flags>[\w\,\-]+) +(?P<seq_num>[\d]+) +(?P<next_hop1>[\w\/\.\:]+)$')
r' +(?P<mac_ip_prod_type>[\w\,]+)'
r' +(?P<mac_ip_flags>[\w\,\-]+) +(?P<seq_num>[\d]+) +(?P<next_hop1>[\w\/\.\:]+)'
r'( +\(Label: (?P<label>\d+)\))?\s*$')

for line in out.splitlines():
if line:
Expand Down Expand Up @@ -1607,6 +1609,8 @@ def cli(self, output=None):
topo_dict.update({'mac_addr': mac_addr})
topo_dict.update({'host_ip': group.pop('host_ip')})
topo_dict.update({'next_hop1': group.pop('next_hop1').lower()})
if group.get('label'):
topo_dict.update({'label': int(group['label'])})
continue

return result_dict
Expand Down

0 comments on commit f8b0de5

Please sign in to comment.