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

266 idrac_network.py fails with AttributeError: 'NoneType' object has no attribute 'iDRAC' #268

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions plugins/modules/dellemc_configure_idrac_eventing.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ def run_idrac_eventing_config(idrac, module):
module.params['share_user'],
module.params['share_password']))

if not upd_share.IsValid:
module.fail_json(msg="Unable to access the share. Ensure that the share name, "
"share mount, and share credentials provided are correct.")

set_liason = idrac.config_mgr.set_liason_share(upd_share)
if set_liason['Status'] == "Failed":
try:
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/dellemc_configure_idrac_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ def run_idrac_services_config(idrac, module):
module.params['share_password'])
)

if not upd_share.IsValid:
module.fail_json(msg="Unable to access the share. Ensure that the share name, "
"share mount, and share credentials provided are correct.")

set_liason = idrac.config_mgr.set_liason_share(upd_share)
if set_liason['Status'] == "Failed":
try:
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/dellemc_idrac_lc_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ def run_setup_idrac_csior(idrac, module):
module.params['share_password'])
)

if not upd_share.IsValid:
module.fail_json(msg="Unable to access the share. Ensure that the share name, "
"share mount, and share credentials provided are correct.")

set_liason = idrac.config_mgr.set_liason_share(upd_share)
if set_liason['Status'] == "Failed":
try:
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/dellemc_system_lockdown_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ def run_system_lockdown_mode(idrac, module):
module.params['share_password'])
)

if not upd_share.IsValid:
module.fail_json(msg="Unable to access the share. Ensure that the share name, "
"share mount, and share credentials provided are correct.")

set_liason = idrac.config_mgr.set_liason_share(upd_share)
if set_liason['Status'] == "Failed":
try:
Expand Down
8 changes: 7 additions & 1 deletion plugins/modules/idrac_bios.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
import tempfile
import json
from ansible.module_utils.six.moves.urllib.error import URLError, HTTPError
from ansible.module_utils.urls import open_url, ConnectionError, SSLValidationError
from ansible.module_utils.urls import ConnectionError, SSLValidationError
from ansible_collections.dellemc.openmanage.plugins.module_utils.dellemc_idrac import iDRACConnection
from ansible.module_utils.basic import AnsibleModule
try:
Expand All @@ -259,6 +259,12 @@ def run_server_bios_config(idrac, module):
module.params['share_user'],
module.params['share_password'])
)

if not upd_share.IsValid:
if not upd_share.IsValid:
module.fail_json(msg="Unable to access the share. Ensure that the share name, "
"share mount, and share credentials provided are correct.")

if module.params['boot_sources']:
_validate_params(module.params['boot_sources'])
if module.check_mode:
Expand Down
Loading