Skip to content
This repository has been archived by the owner on Apr 25, 2022. It is now read-only.

Commit

Permalink
Change output of get_lldp_neighbors_detail to use canonical interface…
Browse files Browse the repository at this point in the history
… name
  • Loading branch information
Gary T. Giesen committed Jun 15, 2020
1 parent 6587b33 commit a9a5d0c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
7 changes: 5 additions & 2 deletions napalm_dellos6/dellos6.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,10 @@ def get_lldp_neighbors_detail(self, interface=""):

lldp = {}
for lldp_entry in show_lldp_remote_device_all:
lldp[lldp_entry["interface"]] = {}
interface = canonical_interface_name(
lldp_entry["interface"], addl_name_map=dellos6_interfaces
)
lldp[interface] = {}
raw_show_lldp_remote_device_detail = self._send_command(
"show lldp remote-device detail " + lldp_entry["interface"]
)
Expand Down Expand Up @@ -887,7 +890,7 @@ def get_lldp_neighbors_detail(self, interface=""):
"remote_system_enable_capab": remote_system_enable_capab,
}
entry_list.append(entry)
lldp[lldp_entry["interface"]] = entry_list
lldp[interface] = entry_list

return lldp

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Te1/0/10": [{
"Tengigabitethernet1/0/10": [{
"parent_interface": "",
"remote_chassis_id": "F4:E9:D4:86:5F:80",
"remote_port": "F4:E9:D4:86:5F:80",
Expand All @@ -10,7 +10,7 @@
"remote_system_name": ""
}
],
"Te1/0/21": [{
"Tengigabitethernet1/0/21": [{
"parent_interface": "",
"remote_chassis_id": "00:41:D2:17:2F:00",
"remote_port": "Gi1/0/1",
Expand All @@ -21,7 +21,7 @@
"remote_system_name": "switch2-loc123.example.com"
}
],
"Te1/0/4": [{
"Tengigabitethernet1/0/4": [{
"parent_interface": "",
"remote_chassis_id": "00:0E:1E:B0:5F:30",
"remote_port": "00:0E:1E:B0:5F:30",
Expand All @@ -32,7 +32,7 @@
"remote_system_name": ""
}
],
"Te1/0/5": [{
"Tengigabitethernet1/0/5": [{
"parent_interface": "",
"remote_chassis_id": "00:0E:1E:B0:6F:E0",
"remote_port": "00:0E:1E:B0:6F:E0",
Expand All @@ -43,7 +43,7 @@
"remote_system_name": ""
}
],
"Te1/0/6": [{
"Tengigabitethernet1/0/6": [{
"parent_interface": "",
"remote_chassis_id": "00:0E:1E:B0:6F:90",
"remote_port": "00:0E:1E:B0:6F:90",
Expand All @@ -54,7 +54,7 @@
"remote_system_name": ""
}
],
"Te1/0/9": [{
"Tengigabitethernet1/0/9": [{
"parent_interface": "",
"remote_chassis_id": "F4:E9:D4:86:8F:50",
"remote_port": "F4:E9:D4:86:8F:50",
Expand All @@ -65,7 +65,7 @@
"remote_system_name": ""
}
],
"Te2/0/10": [{
"Tengigabitethernet2/0/10": [{
"parent_interface": "",
"remote_chassis_id": "F4:E9:D4:86:5F:82",
"remote_port": "F4:E9:D4:86:5F:82",
Expand All @@ -76,7 +76,7 @@
"remote_system_name": ""
}
],
"Te2/0/11": [{
"Tengigabitethernet2/0/11": [{
"parent_interface": "",
"remote_chassis_id": "18:66:DA:70:1F:C6",
"remote_port": "18:66:DA:70:1F:C6",
Expand All @@ -87,7 +87,7 @@
"remote_system_name": ""
}
],
"Te2/0/21": [{
"Tengigabitethernet2/0/21": [{
"parent_interface": "",
"remote_chassis_id": "00:41:D2:17:2F:00",
"remote_port": "Gi2/0/1",
Expand All @@ -98,7 +98,7 @@
"remote_system_name": "switch2-loc123.example.com"
}
],
"Te2/0/3": [{
"Tengigabitethernet2/0/3": [{
"parent_interface": "",
"remote_chassis_id": "00:0E:1E:B0:4F:02",
"remote_port": "00:0E:1E:B0:4F:02",
Expand All @@ -109,7 +109,7 @@
"remote_system_name": ""
}
],
"Te2/0/4": [{
"Tengigabitethernet2/0/4": [{
"parent_interface": "",
"remote_chassis_id": "00:0E:1E:B0:5F:32",
"remote_port": "00:0E:1E:B0:5F:32",
Expand All @@ -120,7 +120,7 @@
"remote_system_name": ""
}
],
"Te2/0/5": [{
"Tengigabitethernet2/0/5": [{
"parent_interface": "",
"remote_chassis_id": "00:0E:1E:B0:6F:E2",
"remote_port": "00:0E:1E:B0:6F:E2",
Expand All @@ -131,7 +131,7 @@
"remote_system_name": ""
}
],
"Te2/0/6": [{
"Tengigabitethernet2/0/6": [{
"parent_interface": "",
"remote_chassis_id": "00:0E:1E:B0:6F:92",
"remote_port": "00:0E:1E:B0:6F:92",
Expand All @@ -142,7 +142,7 @@
"remote_system_name": ""
}
],
"Te2/0/8": [{
"Tengigabitethernet2/0/8": [{
"parent_interface": "",
"remote_chassis_id": "F4:E9:D4:86:3F:72",
"remote_port": "F4:E9:D4:86:3F:72",
Expand All @@ -153,7 +153,7 @@
"remote_system_name": ""
}
],
"Te2/0/9": [{
"Tengigabitethernet2/0/9": [{
"parent_interface": "",
"remote_chassis_id": "F4:E9:D4:86:8F:52",
"remote_port": "F4:E9:D4:86:8F:52",
Expand Down

0 comments on commit a9a5d0c

Please sign in to comment.