Skip to content

eos_validate_state_runner

Note

Always use the FQCN (Fully Qualified Collection Name) arista.avd.eos_validate_state_runner when using this plugin.

This module is in preview mode

This module is not guaranteed to have a backwards compatible interface.

Leverage ANTA for eos_validate_state role

Synopsis

The arista.avd.eos_validate_state_runner module is an Ansible Action Plugin leveraging the ANTA test framework to validate that the generated structured configurations by AVD are applied to the devices and that the deployed network is working correctly.

This plugin expects that the structued_configs of each device is present in hostvars, otherwise no test will be generated.

The plugin provides the following capabilities: - Generate a per-device test catalog based on the structured_configs - Run the generated tests against each device and generate a report in Markdown and CSV format. - When using check_mode, only generate the test catalog and generate a report to preview what would tests be run against each device - Dumping the per-device catalog to a file. - Backward compatibility with existing ansible tags behavior for eos_validate_state to filter categories of tests.

Parameters

Argument Type Required Default Value Restrictions Description
logging_level str False WARNING Valid values:
- CRITICAL
- ERROR
- WARNING
- INFO
- DEBUG
Controls the log level for the ANTA library. If unset, the Action plugin will set it to "WARNING"
save_catalog bool optional False A boolean to indicate whether or not the catalog should be saved for each device.
device_catalog_output_dir str optional None When save_catalog is True, this is the directory where the device catalogs will be saved.
Required if save_catalog=True
skipped_tests list optional None A list of dictionaries containing the categories and tests to skip
The keys for the dictionnary are categories and tests.
category str True None The name of one of the AvdTest categories. e.g., AvdTestHardware
tests list optional None A list of tests in the category. e.g, VerifyRoutingProtocolModel for AvdTestBGP

Notes

  • check_mode is supported for this module and allows to generate a Test Report without running the tests.

See Also

Examples

- name: Run eos_validate_state_runner leveraging ANTA
  arista.avd.eos_validate_state_runner:
    logging_level: ERROR
    save_catalog: True
    eos_validate_state_dir: "/tmp"
    skipped_tests:
      - category: AvdTestHardware
      - category: AvdTestBGP
        tests:
          - VerifyRoutingProtocolModel
  register: anta_results

Authors

  • Arista Ansible Team (@aristanetworks)

Last update: October 2, 2023