-
Notifications
You must be signed in to change notification settings - Fork 237
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 network_services route_maps #5037
base: devel
Are you sure you want to change the base?
Refactor(eos_designs): structured_config for network_services route_maps #5037
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-5037
# Activate the virtual environment
source test-avd-pr-5037/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/Vibhu-gslab/avd.git@refactor_networkservices_route_maps#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_networkservices_route_maps --force
# Optional: Install AVD examples
cd test-avd-pr-5037
ansible-playbook arista.avd.install_examples |
python-avd/pyavd/_eos_designs/structured_config/network_services/route_maps.py
Outdated
Show resolved
Hide resolved
370bf8a
to
647ea9b
Compare
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.
you can remove the usage of strip_empties_from_list
here - https://github.com/aristanetworks/avd/pull/5037/files#diff-d2355de0048a356757c66aa448770e31b41c3347735338110535c1c1587c850cL99
and update the methods to append to structured_config.route_maps
directly.
route_maps = strip_empties_from_list(
[
self._evpn_export_vrf_default_route_map(),
self._bgp_underlay_peers_route_map(),
self._redistribute_connected_to_bgp_route_map(),
self._redistribute_static_to_bgp_route_map(),
],
)
647ea9b
to
daabcf8
Compare
We are using the function |
Maybe we can try to build a small helper function with the "decider logic" which we can call from multiple places, but then insert the route-maps directly into structured config instead of returning. |
daabcf8
to
5dbe4ed
Compare
607fc32
to
2404885
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Conflicts have been resolved. A maintainer will review the pull request shortly. |
6deb954
to
ebc8780
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Conflicts have been resolved. A maintainer will review the pull request shortly. |
for more information, see https://pre-commit.ci
python-avd/pyavd/_eos_designs/structured_config/network_services/route_maps.py
Outdated
Show resolved
Hide resolved
Built a helper function with the decider logic and append rest of the config. |
|
Change Summary
Refactor eos_designs structured_config for network_services route_maps
Related Issue(s)
Fixes #
Component(s) name
arista.avd.eos_designs
Proposed changes
How to test
Checklist
Repository Checklist