Skip to content

Commit

Permalink
eos: get_bgp_config when BGP not running (#1891)
Browse files Browse the repository at this point in the history
Return an empty dictionary if we are unable to detect a local ASN, as
this indicates that no BGP configuration is present on the device.
  • Loading branch information
bewing committed Apr 4, 2023
1 parent 483efae commit 02837c0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions napalm/eos/eos.py
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,10 @@ def parse_options(options, default_value=False):
bgp_config[peer_group] = default_group_dict(local_as)
bgp_config[peer_group]["neighbors"][peer] = peer_details

if local_as == 0:
# BGP not running
return {}

return bgp_config

def get_arp_table(self, vrf=""):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}

0 comments on commit 02837c0

Please sign in to comment.