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

use named function for defaultdict in IOSDriver.get_bgp_neighbors_detail #2162

Closed
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
5 changes: 4 additions & 1 deletion napalm/ios/ios.py
Original file line number Diff line number Diff line change
Expand Up @@ -2076,7 +2076,10 @@ def get_bgp_neighbors(self):
return bgp_neighbor_data

def get_bgp_neighbors_detail(self, neighbor_address=""):
bgp_detail = defaultdict(lambda: defaultdict(lambda: []))
def _inner_defaultdict():
return defaultdict(list)

bgp_detail = defaultdict(_inner_defaultdict)

raw_bgp_sum = self._send_command("show ip bgp all sum").strip()

Expand Down