-
Notifications
You must be signed in to change notification settings - Fork 234
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): Refactor structured_config code for underlay/as.py
#4978
base: devel
Are you sure you want to change the base?
Refactor(eos_designs): Refactor structured_config code for underlay/as.py
#4978
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-4978
# Activate the virtual environment
source test-avd-pr-4978/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/laxmikantchintakindi/avd.git@refactor/underlay/as-path#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/laxmikantchintakindi/avd.git#/ansible_collections/arista/avd/,refactor/underlay/as-path --force
# Optional: Install AVD examples
cd test-avd-pr-4978
ansible-playbook arista.avd.install_examples |
2bb5a0c
to
f6772a0
Compare
access_lists = EosCliConfigGen.AsPath.AccessLists() | ||
entries = EosCliConfigGen.AsPath.AccessListsItem.Entries() | ||
entries.append_new(type="permit", match=self.shared_utils.bgp_as) | ||
access_lists.append_new(name="ASPATH-WAN", entries=entries) | ||
|
||
if access_lists: | ||
self.structured_config.as_path._update(access_lists=access_lists) |
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.
access_lists = EosCliConfigGen.AsPath.AccessLists() | |
entries = EosCliConfigGen.AsPath.AccessListsItem.Entries() | |
entries.append_new(type="permit", match=self.shared_utils.bgp_as) | |
access_lists.append_new(name="ASPATH-WAN", entries=entries) | |
if access_lists: | |
self.structured_config.as_path._update(access_lists=access_lists) | |
entries = EosCliConfigGen.AsPath.AccessListsItem.Entries() | |
entries.append_new(type="permit", match=self.shared_utils.bgp_as) | |
access_lists = EosCliConfigGen.AsPath.AccessListsItem(name="ASPATH-WAN", entries=entries) | |
self.structured_config.as_path.access_lists.append(access_lists) |
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.
6573094
to
b424f42
Compare
Quality Gate passedIssues Measures |
Change Summary
Refactor structured_config code for underlay/as.py
Related Issue(s)
Fixes #
Component(s) name
arista.avd.eos_designs
Proposed changes
Refactor structured_config code for underlay/as.py
How to test
Checklist
User Checklist
Repository Checklist