-
Notifications
You must be signed in to change notification settings - Fork 220
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): Allowing configurable xcvr manufacturers #1373
Feat(eos_validate_state): Allowing configurable xcvr manufacturers #1373
Conversation
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!
ansible_collections/arista/avd/roles/eos_validate_state/defaults/main.yml
Outdated
Show resolved
Hide resolved
Implemented changes and changed the behaviour. |
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
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!
Change Summary
Currently, if XCVR manufacturer is not in the following list, the test is failing, while the interface may be working as expected:
This PR allows the user to configure a list of accepted XCVR manufacturers to avoid failing these tests.
Related Issue(s)
Fixes #997
Component(s) name
arista.avd.eos_validate_state
Proposed changes
Task in hardware.yml file is modified to validate output of XCVR manufacturer agains a list defined in eos_validate_state/defaults/main.yml.
This list is either the user-defined list under validation_role.xcvr_own_manufacturers variable OR the defined default (Arastra, Arista Networks). The variable is defined at fabric level:
The ansible task is only validating the manufacturer of the XCVR when it is present, so no need of defining the manufacturer "Not Present". This also eliminates noise in the results file, since we do not consider "Not present" as a successful test, we simply do not consider it and this can be catch in different tests (ie P2P ping test) if it should be installed.
This leads to a validation of the result.failed variable when building the CSV file, as the ansible task is executed but is does not fail.
Also, the report in CSV is piped with
| arista.avd.natural_sort
to print all interfaces in order, making it more "human readable".How to test
Generate a playbook with the testing devices included and run the eos_validate_state role against it.
Device should have a XCVR different from the above list.
Checklist
User Checklist
Repository Checklist