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

fix EOS get_bgp_config mismatch between neighbors and peer-group #1503

Merged
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions napalm/eos/eos.py
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,10 @@ def parse_options(options, default_value=False):
bgp_neighbors[peer_address] = default_neighbor_dict(local_as)
if options[0] == "peer-group":
bgp_neighbors[peer_address]["__group"] = options[1]
# EOS > 4.23.0 only supports the new syntax
# https://www.arista.com/en/support/advisories-notices/fieldnotices/7097-field-notice-39
elif options[0] == "peer" and options[1] == "group":
bgp_neighbors[peer_address]["__group"] = options[2]

# in the config, neighbor details are lister after
# the group is specified for the neighbor:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"IPv6-PEERS-GROUP-NAME": {
"type": "",
"multipath": false,
"apply_groups": [],
"remove_private_as": true,
"multihop_ttl": 0,
"remote_as": 0,
"local_address": "",
"local_as": 64496,
"description": "",
"import_policy": "reject-all",
"export_policy": "reject-all",
"prefix_limit": {},
"neighbors": {
"2001:db8::0:1": {
"description": "",
"remote_as": 64510,
"local_address": "",
"local_as": 64496,
"nhs": false,
"route_reflector_client": false,
"import_policy": "",
"export_policy": "",
"authentication_key": "",
"prefix_limit": {}
},
"2001:db8::0:2": {
"description": "",
"remote_as": 64511,
"local_address": "",
"local_as": 64496,
"nhs": false,
"route_reflector_client": false,
"import_policy": "",
"export_policy": "",
"authentication_key": "",
"prefix_limit": {}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
router bgp 64496
maximum-paths 32
neighbor IPv6-PEERS-GROUP-NAME peer group
neighbor IPv6-PEERS-GROUP-NAME remove-private-as
neighbor IPv6-PEERS-GROUP-NAME route-map reject-all in
neighbor IPv6-PEERS-GROUP-NAME route-map reject-all out
neighbor IPv6-PEERS-GROUP-NAME maximum-routes 100
neighbor IPv6-PEERS-GROUP-NAME send-community
neighbor 2001:db8::0:1 peer group IPv6-PEERS-GROUP-NAME
neighbor 2001:db8::0:1 remote-as 64510
neighbor 2001:db8::0:1 maximum-routes 500
neighbor 2001:db8::0:2 peer group IPv6-PEERS-GROUP-NAME
neighbor 2001:db8::0:2 remote-as 64511
!