Update modules/bgp.py
This commit is contained in:
parent
d4e480d49c
commit
c81d3c0f50
1 changed files with 6 additions and 2 deletions
|
|
@ -75,10 +75,14 @@ def extract_bgp_info(raw_data):
|
|||
info["peers_memory"] = parts[1].split("using")[1].strip()
|
||||
return info
|
||||
|
||||
def generate_bgp_json(ipv4_info, ipv4_peers, ipv6_info, ipv6_peers):
|
||||
def generate_bgp_json(ipv4_info, ipv4_peers, ipv6_info, ipv6_peers, bfd_peers=None):
|
||||
if bfd_peers is None:
|
||||
bfd_peers = []
|
||||
|
||||
return {
|
||||
"ipv4_info": ipv4_info,
|
||||
"ipv4_peers": ipv4_peers,
|
||||
"ipv6_info": ipv6_info,
|
||||
"ipv6_peers": ipv6_peers
|
||||
"ipv6_peers": ipv6_peers,
|
||||
"bfd_peers": list(bfd_peers)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue