From 8a07bbd09930ad5c365f3d7eb7c1ada5693d77d5 Mon Sep 17 00:00:00 2001 From: texroemer <30351677+texroemer@users.noreply.github.com> Date: Mon, 1 Mar 2021 11:09:31 -0600 Subject: [PATCH] Added check for iDRAC creds validation --- Redfish Python/GetRemoteServicesAPIStatusREDFISH.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Redfish Python/GetRemoteServicesAPIStatusREDFISH.py b/Redfish Python/GetRemoteServicesAPIStatusREDFISH.py index 93303af7..a9e44993 100644 --- a/Redfish Python/GetRemoteServicesAPIStatusREDFISH.py +++ b/Redfish Python/GetRemoteServicesAPIStatusREDFISH.py @@ -2,7 +2,7 @@ # GetRemoteServicesAPIStatusREDFISH. Python script using Redfish API with OEM extension to get the server remote services status # # _author_ = Texas Roemer -# _version_ = 1.0 +# _version_ = 2.0 # # Copyright (c) 2019, Dell, Inc. # @@ -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()