-
Notifications
You must be signed in to change notification settings - Fork 212
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_validate_state): Add ANTA integration to eos_validate_state role #3171
Feat(eos_validate_state): Add ANTA integration to eos_validate_state role #3171
Conversation
Remove anta_ from the module parameters |
ansible_collections/arista/avd/molecule/eos_validate_state/prepare.yml
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/molecule/eos_validate_state/reports/FABRIC-state.csv
Outdated
Show resolved
Hide resolved
...ble_collections/arista/avd/plugins/plugin_utils/eos_validate_state_utils/get_anta_results.py
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_validate_state/tasks/reports.yml
Show resolved
Hide resolved
...ble_collections/arista/avd/plugins/plugin_utils/eos_validate_state_utils/get_anta_results.py
Outdated
Show resolved
Hide resolved
d5ca5ce
to
c6d9d58
Compare
ansible_collections/arista/avd/plugins/action/eos_validate_state_runner.py
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/plugins/action/eos_validate_state_runner.py
Outdated
Show resolved
Hide resolved
In my tests, when I set
|
ansible_collections/arista/avd/plugins/action/eos_validate_state_runner.py
Outdated
Show resolved
Hide resolved
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.
Some changes to the documentation.
..._collections/arista/avd/docs/plugins/Modules and action plugins/eos_validate_state_runner.md
Show resolved
Hide resolved
..._collections/arista/avd/docs/plugins/Modules and action plugins/eos_validate_state_runner.md
Show resolved
Hide resolved
..._collections/arista/avd/docs/plugins/Modules and action plugins/eos_validate_state_runner.md
Show resolved
Hide resolved
..._collections/arista/avd/docs/plugins/Modules and action plugins/eos_validate_state_runner.md
Show resolved
Hide resolved
..._collections/arista/avd/docs/plugins/Modules and action plugins/eos_validate_state_runner.md
Outdated
Show resolved
Hide resolved
..._collections/arista/avd/docs/plugins/Modules and action plugins/eos_validate_state_runner.md
Outdated
Show resolved
Hide resolved
..._collections/arista/avd/docs/plugins/Modules and action plugins/eos_validate_state_runner.md
Outdated
Show resolved
Hide resolved
..._collections/arista/avd/docs/plugins/Modules and action plugins/eos_validate_state_runner.md
Outdated
Show resolved
Hide resolved
..._collections/arista/avd/docs/plugins/Modules and action plugins/eos_validate_state_runner.md
Show resolved
Hide resolved
When an interface is shutdown, I can still see |
Similarly - when an interface is shutdown, the BGP peer check |
When the devices are not present, I see that the eos_validate_state was successful , even though these devices are not reachable. I would expect that the task |
|
ansible_collections/arista/avd/plugins/action/eos_validate_state_runner.py
Show resolved
Hide resolved
The task should fail and stop the play if the device is unreachable or there is a connection problem (e.g. wrong password or SSL problem). Also, if for some reason we lose connectivity to the device during the tests, you should see a log with the failed commands and the tests associated with the failed commands will be marked as FAIL in the report. It would be great if you can confirm these behaviors on your end. Thanks |
dd1c8c0
to
4c17c15
Compare
Co-authored-by: Ryan Chetcuti <[email protected]>
cca56ce
to
5a2f509
Compare
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, great job @carl-baillargeon @gmuloc
Follow up to this PR is tracked in avd-internal repo: https://github.com/aristanetworks/avd-internal/issues/119 |
Change Summary
Integration of ANTA Python framework to eos_validate_state role.
Tasks List
accepted_
values - later discussioneos_validate_state
should not rely oneos_designs
variabletype
#1047 - will be addressed after this PRPostponed Tasks List
VerifyReachability
tests are still created for the peer IP address on that interface. #3182VerifyBGPSpecificPeers
is still created for the peer on that interface. #3183dc2-leaf1c
anddc2-leaf2c
(the L2 leave) and setshutdown_interfaces_towards_undeployed_peers: True
#3188VerifyRoutingProtocolModel
is being run on devices that do not have BGP configuration which is not the actual behavior of eos_validate_state. #3189Component(s) name
arista.avd.eos_validate_state
Proposed changes
eos_validate_state_runner.py
is an action plugin to run the ANTA framework. It calls theget_anta_results
function to grab the test results.get_anta_results.py
is responsible of creating the ANTA tests catalog and the other required objects to run ANTA.httpapi
connection plugin.anta_results
variable in Ansible.eos_validate_state
tasks/main.yml
and taggedanta
to keep the legacyeos_validate_state
working.tasks/reports.yml
to generate ANTA results, leveragingyaml_templates_to_facts
plugin andtemplate/generate_anta_report_results.j2
template specific to ANTA results but keeping the same format.How to test
pip install git+https://github.com/arista-netdevops-community/anta.git
eos_validate_state
can be used as usual, with--tags anta
if you want to run the role with ANTA:ansible-playbook playbooks/fabric-validate.yaml --tags anta
Not providing the
anta
tag will run the regulareos_validate_state
ansible-playbook playbooks/fabric-validate.yaml --tags anta,routing_table
The variable
skipped_tests
can now be used for running/skipping tests:You can also decide to skip specific subtests (ANTA test) for more granularity:
Checklist
User Checklist
Repository Checklist