File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -2076,7 +2076,7 @@ def get_bgp_neighbors(self):
20762076 return bgp_neighbor_data
20772077
20782078 def get_bgp_neighbors_detail (self , neighbor_address = "" ):
2079- bgp_detail = defaultdict ( lambda : defaultdict ( lambda : []))
2079+ bgp_detail = {}
20802080
20812081 raw_bgp_sum = self ._send_command ("show ip bgp all sum" ).strip ()
20822082
@@ -2227,6 +2227,14 @@ def get_bgp_neighbors_detail(self, neighbor_address=""):
22272227 "export_policy" : bgp_neigh_afi ["policy_out" ],
22282228 }
22292229 )
2230+
2231+ vrf_name = details ["routing_table" ]
2232+ if vrf_name not in bgp_detail .keys ():
2233+ bgp_detail [vrf_name ] = {}
2234+ remote_as = details ["remote_as" ]
2235+ if remote_as not in bgp_detail [vrf_name ].keys ():
2236+ bgp_detail [vrf_name ][remote_as ] = []
2237+
22302238 bgp_detail [details ["routing_table" ]][details ["remote_as" ]].append (details )
22312239 return bgp_detail
22322240
You can’t perform that action at this time.
0 commit comments