Closed alachyankar closed 4 years ago
@alachyankar, You are using a wrong version of the Python OneView SDK. Uninstall the Python SDK( 4.8.0) and run pip install -r requirements.txt from the OneView-Ansible directory.
Thanks for that, tried installing with pip without version. Closing issue now.
Scenario/Intent
Trouble when uploading new server hardware
Environment Details
Steps to Reproduce
Tried to add a server to the instance with the following task and run into a runtime error.
Data -> Hostname is the IP address
Expected Result
Expected result from the module execution
Actual Result
Error during running resulting in an Attribute error in line 285 of oneview_server_hardware.py file in the __present file.
Attaching the full traceback
The full traceback is: Traceback (most recent call last): File "/home/maintenance/.ansible/tmp/ansible-tmp-1574712871.86-266267585603416/AnsiballZ_oneview_server_hardware.py", line 114, in <module> _ansiballz_main() File "/home/maintenance/.ansible/tmp/ansible-tmp-1574712871.86-266267585603416/AnsiballZ_oneview_server_hardware.py", line 106, in _ansiballz_main invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS) File "/home/maintenance/.ansible/tmp/ansible-tmp-1574712871.86-266267585603416/AnsiballZ_oneview_server_hardware.py", line 49, in invoke_module imp.load_module('__main__', mod, module, MOD_DESC) File "/tmp/ansible_oneview_server_hardware_payload_LBVi6a/__main__.py", line 352, in <module> File "/tmp/ansible_oneview_server_hardware_payload_LBVi6a/__main__.py", line 348, in main File "/tmp/ansible_oneview_server_hardware_payload_LBVi6a/ansible_oneview_server_hardware_payload.zip/ansible/module_utils/oneview.py", line 445, in run File "/tmp/ansible_oneview_server_hardware_payload_LBVi6a/__main__.py", line 252, in execute_module File "/tmp/ansible_oneview_server_hardware_payload_LBVi6a/__main__.py", line 285, in __present AttributeError: 'ServerHardware' object has no attribute 'get_by_name'