-
Notifications
You must be signed in to change notification settings - Fork 272
Refactor(pyavd): Refactor backend ANTA code of PyAVD #6262
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
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-6262
# Activate the virtual environment
source test-avd-pr-6262/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/carl-baillargeon/avd.git@refactor/anta#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/carl-baillargeon/avd.git#/ansible_collections/arista/avd/,refactor/anta --force
# Optional: Install AVD examples
cd test-avd-pr-6262
ansible-playbook arista.avd.install_examples |
|
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. |
MaheshGSLAB
left a comment
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.
LGTM
python-avd/tests/pyavd/api/_anta/test_avd_catalog_generation_settings.py
Outdated
Show resolved
Hide resolved
python-avd/tests/pyavd/api/_anta/test_avd_catalog_generation_settings.py
Outdated
Show resolved
Hide resolved
python-avd/tests/pyavd/api/_anta/test_avd_catalog_generation_settings.py
Outdated
Show resolved
Hide resolved
python-avd/tests/pyavd/api/_anta/test_avd_catalog_generation_settings.py
Outdated
Show resolved
Hide resolved
|



Change Summary
Refactor and reorganize backend ANTA code of PyAVD.
Component(s) name
PyAVD
Proposed changes
1- Converted Pydantic models to dataclasses and updated class names to follow our codebase
2- Removed the
conditional_keysfield fromAvdTestSpecto use the newskip_if_missing_configdecorator instead3- Also added the relevant input factories that use the new decorator
4- Removed
ignore_is_deployedknob fromAvdCatalogGenerationSettings- users can simply look for theis_deployedkey prior to callingget_device_test_catalog5- Moved the filtering logic of
AvdTestSpecto a function in utils to simplifyget_device_test_catalog6- Moved the creation of
InputFactoryDataSource(previouslyDeviceTestContext) toget_device_test_catalog7- Removed perf_counter leftover logs from a previous PR
How to test
anta_runnermolecule.Checklist
User Checklist
Repository Checklist