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

Fix for show l2route mac-ip all detail #862

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
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
Loading