Skip to content

Conversation

gmuloc
Copy link
Collaborator

@gmuloc gmuloc commented Sep 27, 2023

Description

  • Add anta check catalog -c <CATALOG>
  • Add AntaCatalog class to manipulate test catalog
    • tests property can be used to get and set tests to the catalog.
    • get_tests_by_tags to filter tests by tag
    • get_tests_by_device to filter tests by device
  • Add AntaCatalogFile pydantic model to provide validation for test catalog YAML file
    catalog = AntaCatalog(filename='/mnt/lab/my_anta_catalog.yaml')
    catalog.check()
  • Add AntaTestDefinition pydantic model to provide validation mainly for programmatic AntaCatalog instantiation.
    AntaCatalog(tests=[(AntaTest, AntaTest.Input())])

Fixes #408
Fixes #407

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have run pre-commit for code linting and typing (pre-commit run)
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (tox -e testenv)

@gmuloc gmuloc added this to the v0.10.0 milestone Sep 27, 2023
@titom73 titom73 added framework-enhancement New feature or request Anta CLI All things around CLI labels Sep 28, 2023
@gmuloc gmuloc modified the milestones: v0.10.0, v0.11.0 Oct 9, 2023
@github-actions
Copy link
Contributor

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

@mtache mtache marked this pull request as ready for review October 27, 2023 13:15
@github-actions
Copy link
Contributor

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

Copy link
Contributor

@carl-baillargeon carl-baillargeon left a comment

Choose a reason for hiding this comment

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

LGTM. Tested with AVD as well. Thanks!!

Co-authored-by: Carl Baillargeon <carl.baillargeon@arista.com>
@gmuloc gmuloc merged commit e4c1a90 into aristanetworks:main Nov 10, 2023
@gmuloc gmuloc deleted the issue/408 branch January 15, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Anta CLI All things around CLI framework-enhancement New feature or request rn: feat(anta.cli)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat(anta.cli): Implement anta check catalog / anta check inventory Optimize runner once #377 is pushed
4 participants