-
Notifications
You must be signed in to change notification settings - Fork 349
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
bgp: T5943: BGP Peer-group members must be all internal or all external #3238
Conversation
src/conf_mode/protocols_bgp.py
Outdated
if peer_config['remote_as'] != 'internal' and \ | ||
peer_config['remote_as'] != bgp['system_as']: | ||
is_ibgp = False | ||
if peer_groups_context.get(peer_group) is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use if peer_group not in peer_groups_context:
to keep a consistent style accross this complex file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/conf_mode/protocols_bgp.py
Outdated
is_ibgp = False | ||
if peer_groups_context.get(peer_group) is None: | ||
peer_groups_context[peer_group] = is_ibgp | ||
elif peer_groups_context.get(peer_group) != is_ibgp: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please us: elif peer_groups_context[peer_group] != is_ibgp:
to keep a consistent style accross this complex file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@Mergifyio backport sagitta |
✅ Backports have been created
|
Change Summary
Added validation of remote-as for all group members
Types of changes
Related Task(s)
Related PR(s)
Component(s) name
Proposed changes
How to test
all internal:
all external:
Smoketest result
Checklist: