Use different headers for each HTTP method (#55193)

This commit is contained in:
Jose Delarosa 2019-04-15 05:04:18 -05:00 committed by John R Barker
commit f88b2cbe59
4 changed files with 31 additions and 27 deletions

View file

@ -102,7 +102,7 @@ msg:
import json
import re
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.redfish_utils import RedfishUtils, HEADERS
from ansible.module_utils.redfish_utils import RedfishUtils
from ansible.module_utils._text import to_native
@ -141,7 +141,7 @@ class IdracRedfishUtils(RedfishUtils):
return {'ret': True, 'changed': False, 'msg': "Manager attribute already set"}
payload = {"Attributes": json.loads(manager_attr)}
response = self.patch_request(self.root_uri + self.manager_uri + "/" + key, payload, HEADERS)
response = self.patch_request(self.root_uri + self.manager_uri + "/" + key, payload)
if response['ret'] is False:
return response
return {'ret': True, 'changed': True, 'msg': "Modified Manager attribute %s" % attr['mgr_attr_name']}