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 AttributeError for 'systems_uri' #54178

Merged
merged 1 commit into from Mar 21, 2019

Conversation

billdodd
Copy link
Contributor

SUMMARY

Fixed an AttributeError for attribute systems_uri in the IdracRedfishUtils class. This error was a side effect of the fix in PR #50854. The standard modules were updated in that PR to change the systems_uri string to systems_uris list of strings. But this OEM module did not get updated accordingly.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

idrac_redfish_command.py

ADDITIONAL INFORMATION

Run a playbook like this against an iDRAC Redfish service:

---
- hosts: idracmocks
  connection: local
  name: Create iDRAC BIOS config job
  gather_facts: False

  tasks:

  - name: Create iDRAC BIOS config job
    idrac_redfish_command:
      category: Systems
      command: CreateBiosConfigJob
      baseuri: "{{ baseuri }}"
      username: "{{ username }}"
      password: "{{ password }}"
    register: bios_config_job

Result:

PLAY [Create iDRAC BIOS config job] ********************************************

TASK [Create iDRAC BIOS config job] ********************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'IdracRedfishUtils' object has no attribute 'systems_uri'

fatal: [mockup-idrac]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/Users/bdodd/.ansible/tmp/ansible-tmp-1553179361.694477-73992695571697/AnsiballZ_idrac_redfish_command.py\", line 114, in <module>\n    _ansiballz_main()\n  File \"/Users/bdodd/.ansible/tmp/ansible-tmp-1553179361.694477-73992695571697/AnsiballZ_idrac_redfish_command.py\", line 106, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/Users/bdodd/.ansible/tmp/ansible-tmp-1553179361.694477-73992695571697/AnsiballZ_idrac_redfish_command.py\", line 49, in invoke_module\n    imp.load_module('__main__', mod, module, MOD_DESC)\n  File \"/var/folders/26/d5906nfx0rv7mgclxymgp5rw0000gn/T/ansible_idrac_redfish_command_payload_ZANrSM/__main__.py\", line 181, in <module>\n  File \"/var/folders/26/d5906nfx0rv7mgclxymgp5rw0000gn/T/ansible_idrac_redfish_command_payload_ZANrSM/__main__.py\", line 170, in main\n  File \"/var/folders/26/d5906nfx0rv7mgclxymgp5rw0000gn/T/ansible_idrac_redfish_command_payload_ZANrSM/__main__.py\", line 80, in create_bios_config_job\nAttributeError: 'IdracRedfishUtils' object has no attribute 'systems_uri'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

PLAY RECAP *********************************************************************
mockup-idrac               : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

After the fix, the AttributeError is resolved.

@ansibot
Copy link
Contributor

ansibot commented Mar 21, 2019

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. owner_pr This PR is made by the module's maintainer. remote_management Working Group: https://docs.ansible.com/ansible/latest/community/communication.html small_patch support:community This issue/PR relates to code supported by the Ansible community. traceback This issue/PR includes a traceback. labels Mar 21, 2019
@jose-delarosa
Copy link
Contributor

Thanks @billdodd, will test today.

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Mar 21, 2019
@jose-delarosa
Copy link
Contributor

Thanks @billdodd

shipit

@ansibot ansibot added automerge This PR was automatically merged by ansibot. shipit This PR is ready to be merged by Core and removed community_review In order to be merged, this PR must follow the community review workflow. labels Mar 21, 2019
@ansibot ansibot merged commit 384f4f1 into ansible:devel Mar 21, 2019
@ansible ansible locked and limited conversation to collaborators Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 automerge This PR was automatically merged by ansibot. bug This issue/PR relates to a bug. module This issue/PR relates to a module. owner_pr This PR is made by the module's maintainer. remote_management Working Group: https://docs.ansible.com/ansible/latest/community/communication.html shipit This PR is ready to be merged by Core small_patch support:community This issue/PR relates to code supported by the Ansible community. traceback This issue/PR includes a traceback.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants