Skip to content

Commit 1753f22

Browse files
authored
[show] remove 'device2interface_dict' in show interface neighbor expected (#1188)
Remove `device2interface_dict` in `expect` as it is no longer needed. Signed-off-by: Longxiang Lyu <[email protected]>
1 parent 63c6733 commit 1753f22

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

show/interfaces/__init__.py

-3
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,11 @@ def expected(db, interfacename):
237237
click.echo("DEVICE_NEIGHBOR_METADATA information is not present.")
238238
return
239239

240-
#Swap Key and Value from interface: name to name: interface
241-
device2interface_dict = {}
242240
for port in natsorted(neighbor_dict.keys()):
243241
temp_port = port
244242
if clicommon.get_interface_naming_mode() == "alias":
245243
port = clicommon.InterfaceAliasConverter().name_to_alias(port)
246244
neighbor_dict[port] = neighbor_dict.pop(temp_port)
247-
device2interface_dict[neighbor_dict[port]['name']] = {'localPort': port, 'neighborPort': neighbor_dict[port]['port']}
248245

249246
header = ['LocalPort', 'Neighbor', 'NeighborPort', 'NeighborLoopback', 'NeighborMgmt', 'NeighborType']
250247
body = []

0 commit comments

Comments
 (0)