sas_logical_jbod_facts module missing get_by_name and get_by_uri
jvlien opened this issue · comments
JulienV commented
Hello,
when I'm gathering JBOD facts with a name or an uri I have the following error:
The error was: AttributeError: 'SasLogicalJbods' object has no attribute 'get_by_name'
or The error was: AttributeError: 'SasLogicalJbods' object has no attribute 'get_by_uri'
playbook example:
- name: Gathering facts for all JBODs
hpe.oneview.oneview_sas_logical_jbod_facts:
config: "{{ config }}"
sessionID: "{{ session.ansible_facts.session }}"
delegate_to: localhost
- debug: var=sas_logical_jbods|length
- name: Gathering facts for one JBOD
hpe.oneview.oneview_sas_logical_jbod_facts:
config: "{{ config }}"
sessionID: "{{ session.ansible_facts.session }}"
#name: "{{ myJBODname }}"
uri: '/rest/sas-logical-jbods/00d36799-e4ac-4e6a-b021-1dbadab85cc0'
delegate_to: localhost
- debug: var=sas_logical_jbods|length
output
TASK [Gathering facts for all JBODs] ***************************************************************************************************************************************************
ok: [localhost -> localhost]
TASK [debug] ***************************************************************************************************************************************************************************
ok: [localhost] => {
"sas_logical_jbods|length": "18"
}
TASK [Gathering facts for one JBOD] ****************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'SasLogicalJbods' object has no attribute 'get_by_uri'
fatal: [localhost -> localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/home/gs0506/.ansible/tmp/ansible-tmp-1678282687.6112778-1315872-165115628412751/AnsiballZ_oneview_sas_logical_jbod_facts.py\", line 100, in <module>\n _ansiballz_main()\n File \"/home/gs0506/.ansible/tmp/ansible-tmp-1678282687.6112778-1315872-165115628412751/AnsiballZ_oneview_sas_logical_jbod_facts.py\", line 92, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/gs0506/.ansible/tmp/ansible-tmp-1678282687.6112778-1315872-165115628412751/AnsiballZ_oneview_sas_logical_jbod_facts.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible_collections.hpe.oneview.plugins.modules.oneview_sas_logical_jbod_facts', init_globals=dict(_module_fqn='ansible_collections.hpe.oneview.plugins.modules.oneview_sas_logical_jbod_facts', _modlib_path=modlib_path),\n File \"/usr/lib64/python3.8/runpy.py\", line 207, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib64/python3.8/runpy.py\", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/usr/lib64/python3.8/runpy.py\", line 87, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_hpe.oneview.oneview_sas_logical_jbod_facts_payload_c5soqjky/ansible_hpe.oneview.oneview_sas_logical_jbod_facts_payload.zip/ansible_collections/hpe/oneview/plugins/modules/oneview_sas_logical_jbod_facts.py\", line 188, in <module>\n File \"/tmp/ansible_hpe.oneview.oneview_sas_logical_jbod_facts_payload_c5soqjky/ansible_hpe.oneview.oneview_sas_logical_jbod_facts_payload.zip/ansible_collections/hpe/oneview/plugins/modules/oneview_sas_logical_jbod_facts.py\", line 184, in main\n File \"/tmp/ansible_hpe.oneview.oneview_sas_logical_jbod_facts_payload_c5soqjky/ansible_hpe.oneview.oneview_sas_logical_jbod_facts_payload.zip/ansible_collections/hpe/oneview/plugins/modules/oneview_sas_logical_jbod_facts.py\", line 153, in __init__\n File \"/tmp/ansible_hpe.oneview.oneview_sas_logical_jbod_facts_payload_c5soqjky/ansible_hpe.oneview.oneview_sas_logical_jbod_facts_payload.zip/ansible_collections/hpe/oneview/plugins/module_utils/oneview.py\", line 670, in set_resource_object\nAttributeError: 'SasLogicalJbods' object has no attribute 'get_by_uri'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
Regards
Julien.
Alisha K commented
Hi @jvlien,
SasLogicalJBOD is part of upcoming release OV8.2. You are getting this error as it is not available in your existing hpeOneView. Kindly check the same after the next release and please make sure you are using latest version of hpeOneView.
Thanks
JulienV commented
Hi @alisha-k-kalladassery
Thank you for your answer.
Regards