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

Show mac learned on lag interface #730

Closed
wants to merge 1 commit into from
Closed
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
9 changes: 8 additions & 1 deletion scripts/fdbshow
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class FdbShow(object):
self.db = SonicV2Connector(host="127.0.0.1")
self.if_name_map, \
self.if_oid_map = port_util.get_interface_oid_map(self.db)
self.lag_if_name_map, \
self.lag_if_oid_map = port_util.get_lag_interface_oid_map(self.db)
self.if_br_oid_map = port_util.get_bridge_port_map(self.db)
self.fetch_fdb_data()
return
Expand Down Expand Up @@ -76,7 +78,12 @@ class FdbShow(object):
if br_port_id not in self.if_br_oid_map:
continue
port_id = self.if_br_oid_map[br_port_id]
if_name = self.if_oid_map[port_id]
if port_id in self.if_oid_map:
if_name = self.if_oid_map[port_id]
elif port_id in self.lag_if_oid_map:
if_name = self.lag_if_oid_map[port_id]
else:
if_name = ""
if 'vlan' in fdb:
vlan_id = fdb["vlan"]
elif 'bvid' in fdb:
Expand Down