Skip to content

Conversation

@carl-baillargeon
Copy link
Contributor

@carl-baillargeon carl-baillargeon commented Dec 17, 2025

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_keys field from AvdTestSpec to use the new skip_if_missing_config decorator instead
3- Also added the relevant input factories that use the new decorator
4- Removed ignore_is_deployed knob from AvdCatalogGenerationSettings - users can simply look for the is_deployed key prior to calling get_device_test_catalog
5- Moved the filtering logic of AvdTestSpec to a function in utils to simplify get_device_test_catalog
6- Moved the creation of InputFactoryDataSource (previously DeviceTestContext) to get_device_test_catalog
7- Removed perf_counter leftover logs from a previous PR

How to test

anta_runner molecule.

Checklist

User Checklist

  • Add unit tests

Repository Checklist

  • My code has been rebased from devel before I start
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation and documentation have been updated accordingly.
  • I have updated molecule CI testing accordingly. (check the box if not applicable)

@github-actions
Copy link

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

@carl-baillargeon carl-baillargeon marked this pull request as ready for review December 17, 2025 20:35
@carl-baillargeon carl-baillargeon requested review from a team as code owners December 17, 2025 20:35
@github-actions github-actions bot added the state: conflict PR with conflict label Jan 2, 2026
@github-actions
Copy link

github-actions bot commented Jan 2, 2026

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the state: conflict PR with conflict label Jan 5, 2026
@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Conflicts have been resolved. A maintainer will review the pull request shortly.

Copy link
Contributor

@MaheshGSLAB MaheshGSLAB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gmuloc gmuloc added this to the v6.0.0 milestone Jan 12, 2026
@github-actions github-actions bot added the state: CI Updated CI scenario have been updated in the PR label Jan 12, 2026
@sonarqubecloud
Copy link

@gmuloc gmuloc added this pull request to the merge queue Jan 15, 2026
Merged via the queue into aristanetworks:devel with commit 6f3f10c Jan 15, 2026
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rn: Refactor(pyavd) state: CI Updated CI scenario have been updated in the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants