Skip to content

Commit

Permalink
Added check for iDRAC creds validation
Browse files Browse the repository at this point in the history
  • Loading branch information
texroemer authored Mar 1, 2021
1 parent 025b968 commit 8a07bbd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Redfish Python/GetRemoteServicesAPIStatusREDFISH.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# GetRemoteServicesAPIStatusREDFISH. Python script using Redfish API with OEM extension to get the server remote services status
#
# _author_ = Texas Roemer <[email protected]>
# _version_ = 1.0
# _version_ = 2.0
#
# Copyright (c) 2019, Dell, Inc.
#
Expand Down Expand Up @@ -43,6 +43,9 @@ def check_supported_idrac_version():
except:
print("\n- FAIL, either incorrect iDRAC username / password passed in or iDRAC user doesn't have correct privileges")
sys.exit()
if response.status_code == 401:
print("\n- WARNING, status code 401 detected, check iDRAC username / password credentials")
sys.exit()
if response.status_code != 200:
print("\n- WARNING, iDRAC version installed does not support this feature using Redfish API")
sys.exit()
Expand Down

0 comments on commit 8a07bbd

Please sign in to comment.