Skip to content
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

Merged
merged 4 commits into from
Dec 13, 2021

Conversation

xaviramon
Copy link
Contributor

@xaviramon xaviramon commented Nov 30, 2021

Change Summary

Currently, if XCVR manufacturer is not in the following list, the test is failing, while the interface may be working as expected:

  • 'Not Present'
  • 'Arastra, Inc.'
  • 'Arista Networks'

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:

validation_role:
  xcvr_own_manufacturers:
    - Manufacturer 1
    - Manufacturer 2

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

  • N/A

Repository Checklist

  • My code has been rebased from devel before I start
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation and documentation have been updated accordingly.
  • I have updated molecule CI testing accordingly. (check the box if not applicable)

@xaviramon xaviramon changed the title Allowing configurable xcvr manufacturers Feat(eos_validate_state): Allowing configurable xcvr manufacturers Nov 30, 2021
@xaviramon xaviramon marked this pull request as ready for review December 1, 2021 11:44
Copy link
Contributor

@tgodaA tgodaA left a comment

Choose a reason for hiding this comment

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

LGTM!

@xaviramon
Copy link
Contributor Author

Implemented changes and changed the behaviour.

@xaviramon xaviramon requested a review from tgodaA December 7, 2021 15:43
Copy link
Contributor

@onurgashi onurgashi left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@tgodaA tgodaA left a comment

Choose a reason for hiding this comment

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

LGTM!

@ClausHolbechArista ClausHolbechArista merged commit 1d70f25 into aristanetworks:devel Dec 13, 2021
@carlbuchmann carlbuchmann added this to the v3.2.0 milestone Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

eos_validate_state role whitelist transceiver vendors
5 participants