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

Fix(cv_device_v3): Allow cv_device_v3 to handle SN-based decomms #705

Merged
merged 4 commits into from
Aug 6, 2024

Conversation

alexeygorbunov
Copy link
Contributor

@alexeygorbunov alexeygorbunov commented Jul 24, 2024

Change Summary

Current cv_device_v3 code does not allow to decomm devices defined by serialNumber only. This change allows to dynamically trigger get_device_facts based on the used search_key/__search_by

Related Issue(s)

Fixes #704

Component(s) name

arista.cvp.cv_device_v3

Proposed changes

Dynamically assign device_lookup proper value based on the used search_key

How to test

  • Have CVP with at least one device
  • Engage task targeting arista.cvp.cv_device_v3 with search_key: serialNumber and pass into devices single or multiple device(s) with assigned serialNumber attribute and missing fqdn/hostname attribute

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. (check the box if not applicable)
  • I have updated molecule CI testing accordingly. (check the box if not applicable)

@github-actions github-actions bot requested a review from sugetha24 July 24, 2024 00:59
@github-actions github-actions bot added module: cv_device_v3 Issue related to cv_device module in v3 module_utils: cv_client cv_client implementation issue labels Jul 24, 2024
@alexeygorbunov alexeygorbunov changed the title Allow cv_device_v3 to handle SN-based decomms Fix(cv_device_v3): Allow cv_device_v3 to handle SN-based decomms Jul 24, 2024
@alexeygorbunov alexeygorbunov marked this pull request as ready for review July 26, 2024 01:45
Copy link
Contributor

@sugetha24 sugetha24 left a comment

Choose a reason for hiding this comment

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

LGTM!

@github-actions github-actions bot requested a review from sugetha24 July 31, 2024 01:23
Copy link
Contributor

@noredistribution noredistribution left a comment

Choose a reason for hiding this comment

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

LGTM +1 (tested in ATD on 2024.2.0 successfully)

Copy link

sonarcloud bot commented Aug 6, 2024

@sugetha24 sugetha24 merged commit 5788952 into aristanetworks:devel Aug 6, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: cv_device_v3 Issue related to cv_device module in v3 module_utils: cv_client cv_client implementation issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Device decomm fails if search_key == serialNumber
3 participants