From e701b5a4127f114c0f20ac5160c2577e73f0b39a Mon Sep 17 00:00:00 2001 From: Jose Delarosa Date: Thu, 13 Sep 2018 22:14:21 -0500 Subject: [PATCH] Fixes HTTP redirect issue (#45513) --- lib/ansible/module_utils/redfish_utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/redfish_utils.py b/lib/ansible/module_utils/redfish_utils.py index b76232cb61f..42c095673d5 100644 --- a/lib/ansible/module_utils/redfish_utils.py +++ b/lib/ansible/module_utils/redfish_utils.py @@ -27,7 +27,8 @@ class RedfishUtils(object): url_username=self.creds['user'], url_password=self.creds['pswd'], force_basic_auth=True, validate_certs=False, - timeout=10, use_proxy=False) + follow_redirects='all', + use_proxy=False) data = json.loads(resp.read()) except HTTPError as e: return {'ret': False, 'msg': "HTTP Error: %s" % e.code} @@ -45,6 +46,7 @@ class RedfishUtils(object): url_username=self.creds['user'], url_password=self.creds['pswd'], force_basic_auth=True, validate_certs=False, + follow_redirects='all', use_proxy=False) except HTTPError as e: return {'ret': False, 'msg': "HTTP Error: %s" % e.code} @@ -62,6 +64,7 @@ class RedfishUtils(object): url_username=self.creds['user'], url_password=self.creds['pswd'], force_basic_auth=True, validate_certs=False, + follow_redirects='all', use_proxy=False) except HTTPError as e: return {'ret': False, 'msg': "HTTP Error: %s" % e.code} @@ -79,6 +82,7 @@ class RedfishUtils(object): url_username=self.creds['user'], url_password=self.creds['pswd'], force_basic_auth=True, validate_certs=False, + follow_redirects='all', use_proxy=False) except HTTPError as e: return {'ret': False, 'msg': "HTTP Error: %s" % e.code}