-
Notifications
You must be signed in to change notification settings - Fork 231
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
Feat(eos_designs): Accept auto as argument for rd_override and rt_override #4858
base: devel
Are you sure you want to change the base?
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-4858
# Activate the virtual environment
source test-avd-pr-4858/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/rrajpuro-anet/avd.git@devel#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/rrajpuro-anet/avd.git#/ansible_collections/arista/avd/,devel --force
# Optional: Install AVD examples
cd test-avd-pr-4858
ansible-playbook arista.avd.install_examples |
python-avd/pyavd/_eos_designs/structured_config/network_services/utils.py
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_designs/structured_config/network_services/utils.py
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_designs/structured_config/network_services/utils.py
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_designs/structured_config/network_services/utils.py
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_designs/structured_config/network_services/utils.py
Show resolved
Hide resolved
Please add this to molecule tests and verify the outputs are as expected. I would suggest modifying the file After updating the files mentioned you can rerun molecule with: cd ansible_collections/arista/avd
molecule converge -s eos_designs_unit_tests and then inspect the changed files if you get all and only the changes you expect. Moving this PR to draft while you work on this. Set it "ready for review" once you have addressed by comments and added test coverage. |
- Check for None is cheaper than isInstance Co-authored-by: Claus Holbech <[email protected]>
I ran the above requested unit tests are following are my observations on setting rt and rd override: Case1:
|
Thank you for going through the tests. The tests you have comitted cover the non-bundle case. If you could add the auto variant in some bundle test as well that would be good. You don't need to add on SVI for the bundle test, but you would need to cover the three other cases since the code paths are separate. Thanks. |
Change Summary
This PR adds feature to use the specific keyword
auto
when overriding rd or rt to auto.Related Issue(s)
Fixes #4857
Component(s) name
arista.avd.eos_designs
Proposed changes
rd_overrride
orrt_override
to match the literal stringauto
.auto
if matchesPending changes