-
Notifications
You must be signed in to change notification settings - Fork 91
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
exos_facts error : 'Cli' object has no attribute 'send_requests' #460
Comments
Hello, i just setup my environment. I was able to replicate this and will see what needs to be change din the code in order to make it work. |
hello folks, thanks for reporting this! @LindsayHill @ujwalkomarla @rdvencioneck @hlrichardson @JayalakshmiV you're authors/maintainers of related modules, if you take a look, it'd be great |
I took a look at this issue, because i wanted to use the facts gathered using gather_network_resources. Workaround would be to add - exos_facts:
gather_subset: "!all"
gather_network_resources: all
vars:
ansible_connection: ansible.netcommon.httpapi As you can see for example in: community.network/plugins/module_utils/network/exos/facts/lldp_global/lldp_global.py Line 59 in 312b5d8
the API path is hardcoded and it only imports/calls the send_requests function in every subset class. ansible.netcommon.network_cli only implements run_commands ,ansible.netcommon.httpapi supports both run_commands and send_requests.Using the HTTP/REST API is much cleaner and simpler than parsing command output. The later is more complex and error prone. I don't know if there are use cases that only allow for using network_cli and not httpapi, so i have not yet taken the time to look into implementing gather_network_resources for network_cli. I will add a commit to my PR #558 to clarify that in the module documentation. |
SUMMARY
When using exos_facts module with gather_network_resources parameter (whatever the value is) with ansible_connection: ansible.netcommon.network_cli and network_os: community.network.exos the following error happens :
'Cli' object has no attribute 'send_requests'
ISSUE TYPE
COMPONENT NAME
exos_facts.py
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Ubuntu 20.04 on WSL2
Extreme EXOS version 22.7.1.2 & 30.7.1.1 & 31.7.1.4
STEPS TO REPRODUCE
EXPECTED RESULTS
The module should work and return/set network_resources facts for the host
ACTUAL RESULTS
An error stops the module from working and triggers a fatal error
The text was updated successfully, but these errors were encountered: