From 65f69e475a7a5ea8cc1ab5499e1ad68b96c7ab28 Mon Sep 17 00:00:00 2001 From: Travis Van Duyn Date: Wed, 3 Apr 2019 13:05:02 -0700 Subject: [PATCH] [show interface neighbor expected] Support 'alias' interface naming mode (#495) --- show/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/show/main.py b/show/main.py index 461db91ed4b1..34875d4eb2e0 100755 --- a/show/main.py +++ b/show/main.py @@ -450,6 +450,10 @@ def expected(interfacename): #Swap Key and Value from interface: name to name: interface device2interface_dict = {} for port in natsorted(neighbor_dict.keys()): + temp_port = port + if get_interface_mode() == "alias": + port = iface_alias_converter.name_to_alias(port) + neighbor_dict[port] = neighbor_dict.pop(temp_port) device2interface_dict[neighbor_dict[port]['name']] = {'localPort': port, 'neighborPort': neighbor_dict[port]['port']} header = ['LocalPort', 'Neighbor', 'NeighborPort', 'NeighborLoopback', 'NeighborMgmt', 'NeighborType']