Plugins(feature): Add Optional Warning or Error to Defined test #951
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Summary
Add Optional Warning or Error to Defined test
Types of changes
Related Issue(s)
Fixes #943 since that was caused by running the playbook for only a subset of devices.
Component(s) name
arista.avd.eos_designs
arista.avd.defined
Proposed changes
defined test
Optionally the test can emit warnings or errors if the test fails.
Syntax:
Warnings or Errors can be emitted with the optional arguments
fail_action
andvar_name
:Added warnings to EVPN EBGP overlay.
Warn if
switch
facts are not set for a fabric device, since this can potentially result in incomplete or incorrect config.How to test
By running a playbook with
--limit
for a device with overlay config will produce warnings.Ex. for a two-dc scenario run the playbook for only one of the DCs.
Checklist:
pre-commit
,make linting
andmake sanity-lint
).