Skip to content

Commit 65f69e4

Browse files
tsvanduynjleveque
authored andcommitted
[show interface neighbor expected] Support 'alias' interface naming mode (#495)
1 parent aae39e7 commit 65f69e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

show/main.py

+4
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,10 @@ def expected(interfacename):
450450
#Swap Key and Value from interface: name to name: interface
451451
device2interface_dict = {}
452452
for port in natsorted(neighbor_dict.keys()):
453+
temp_port = port
454+
if get_interface_mode() == "alias":
455+
port = iface_alias_converter.name_to_alias(port)
456+
neighbor_dict[port] = neighbor_dict.pop(temp_port)
453457
device2interface_dict[neighbor_dict[port]['name']] = {'localPort': port, 'neighborPort': neighbor_dict[port]['port']}
454458

455459
header = ['LocalPort', 'Neighbor', 'NeighborPort', 'NeighborLoopback', 'NeighborMgmt', 'NeighborType']

0 commit comments

Comments
 (0)