-
Notifications
You must be signed in to change notification settings - Fork 239
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
Refactor(eos_designs): structured_config for core_interfaces_and_l3_edge router_bgp #5063
base: devel
Are you sure you want to change the base?
Refactor(eos_designs): structured_config for core_interfaces_and_l3_edge router_bgp #5063
Conversation
Review docs on Read the Docs To test this pull request: # Create virtual environment for this testing below the current directory
python -m venv test-avd-pr-5063
# Activate the virtual environment
source test-avd-pr-5063/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/Vibhu-gslab/avd.git@refactor_core_interfaces_router_bgp#subdirectory=python-avd" --force
# Point Ansible collections path to the Python virtual environment
export ANSIBLE_COLLECTIONS_PATH=$VIRTUAL_ENV/ansible_collections
# Install Ansible collection
ansible-galaxy collection install git+https://github.com/Vibhu-gslab/avd.git#/ansible_collections/arista/avd/,refactor_core_interfaces_router_bgp --force
# Optional: Install AVD examples
cd test-avd-pr-5063
ansible-playbook arista.avd.install_examples |
7d63ac8
to
606d57e
Compare
bfb05ee
to
03b70e4
Compare
python-avd/pyavd/_eos_designs/structured_config/core_interfaces_and_l3_edge/router_bgp.py
Show resolved
Hide resolved
python-avd/pyavd/_eos_designs/structured_config/core_interfaces_and_l3_edge/router_bgp.py
Outdated
Show resolved
Hide resolved
cbd8c4b
to
01a08ec
Compare
8d08efb
to
5b846d1
Compare
5b846d1
to
e3e1a27
Compare
Found duplicate objects with conflicting data while generating configuration for Ethernet Interfaces defined under l3_edge p2p_link. | ||
{'name': 'ethernet1', 'peer': 'peer2', 'peer_interface': 'ethernet2', 'description': 'P2P_peer2_ethernet2'} conflicts with | ||
{'name': 'ethernet1', 'peer': 'peer1', 'peer_interface': 'ethernet1', 'description': 'P2P_peer1_ethernet1'}. | ||
Found duplicate objects with conflicting data while generating configuration for Neighbors. {'ip_address': '192.168.0.3', |
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.
This is detecting duplicate BGP neighbors now, where before it was checking for duplicate interfaces. Please revert and add another test for duplicate neighbors. Thanks.
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.
same for core-interface variant
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.
Fixed error message.
@@ -33,6 +33,7 @@ core_interfaces: | |||
interfaces: [ Ethernet1, Ethernet2 ] | |||
profile: isis_bb_profile | |||
ip: ["unnumbered loopback0", "unnumbered loopback0"] | |||
as: [65000, 65002] |
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.
why do we need to add AS and IP info here?
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.
We were getting the below errors and molecule was failing
{"changed": false, "msg": "core_interfaces.p2p_links.[].as or core_interfaces.p2p_links_profiles.[].as”}
{"changed": false, "msg": "core_interfaces.p2p_links.[].ip, .subnet or .ip_pool"}
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.
it should be possible to not set AS so lets make sure the behavior is not changing
|
||
# RFC5549 | ||
if self.inputs.underlay_rfc5549 and p2p_link.routing_protocol != "ebgp": | ||
neighbor_interfaces.append({"name": p2p_link_data["interface"], **neighbor}) | ||
self.structured_config.router_bgp.neighbor_interfaces.append_new(name=p2p_link_data["interface"], **neighbor._as_dict()) |
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.
We should avoid going to dict at all.
It will be simpler to just build the full neighbor interface here setting the 5 arguments directly.
And then remove the neighbor =
stuff below this if
so it only runs when building a regular neighbor.
Alternative is to use _cast_as
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.
Fixed!
36e83d2
to
b79f7f1
Compare
|
Change Summary
Refactor eos_designs structured_config for core_interfaces_and_l3_edge router_bgp
Related Issue(s)
Fixes #
Component(s) name
arista.avd.eos_designs
Proposed changes
How to test
Checklist
Repository Checklist