Open sugetha24 opened 8 months ago
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 15 days
Issues
7 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
Change Summary
Adding support for hostname with dots(s1-leaf.1.aristanetworks.com) to cv_device_v3 module.
Related Issue(s)
Fixes #654
Component(s) name
arista.cvp.cv_device_v3
Proposed changes
Previously,
get_device_by_name()
cvprac function was used to get info on a device. This was called for each device. Now,get_inventory()
is called once to get the entire CVP inventory and cache it.get_inventory()
reports all information, especiallyfqdn
andhostname
as opposed toget_device_by_name()
only returningfqdn
. The module no longer derivesehostname
fromfqdn
field. If the module is not providedhostname
as input, then we get it from the inventory. The schema now supportshostname
knob.How to test
NOTE: This PR is dependent on some changes to
get_inventory()
function on cvprac. While we wait for that change to merge into cvprac, please make sure to comment line #600-626 in the latest cvprac: https://github.com/aristanetworks/cvprac/blob/b5306b22770848a32d5927620e804bd1482932c1/cvprac/cvp_api.py#L600 and run the following playbookUse
search_key
knob to specify if you want to serach the inventory byhostname
orfqdn
. Note: ifsearch_key: hostname
, thenhostname
should be specified incvp_device
variable. Similarly, ifsearch_key: fqdn
, thenfqdn
should be specified incvp_device
variableChecklist
User Checklist
Repository Checklist