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] Fix int status when portchannel is in the system #1376

Merged
merged 2 commits into from
Feb 5, 2021
Merged
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
10 changes: 8 additions & 2 deletions scripts/intfutil
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,12 @@ def po_speed_dict(po_int_dict, appl_db):
po_list.append(key)
if len(value) == 1:
interface_speed = appl_db.get(appl_db.APPL_DB, "PORT_TABLE:" + value[0], "speed")
interface_speed = '{}G'.format(interface_speed[:-3])
po_list.append(interface_speed)
if interface_speed is None:
# If no speed was returned, append None without format
po_list.append(None)
else:
interface_speed = '{}G'.format(interface_speed[:-3])
po_list.append(interface_speed)
elif len(value) > 1:
for intf in value:
temp_speed = appl_db.get(appl_db.APPL_DB, "PORT_TABLE:" + intf, "speed")
Expand All @@ -273,6 +277,8 @@ def appl_db_portchannel_status_get(appl_db, config_db, po_name, status_type, por
#print(full_table_id)
if status_type == "speed":
status = portchannel_speed_dict[po_name]
if status is None:
return "N/A"
return status
if status_type == "vlan":
if combined_int_to_vlan_po_dict and po_name in combined_int_to_vlan_po_dict.keys():
Expand Down