From dc21c0c0b09144340b0ba159998184eded0f7aa1 Mon Sep 17 00:00:00 2001 From: Jose Delarosa Date: Wed, 7 Nov 2018 13:52:41 -0600 Subject: [PATCH] Do not reboot after updating BIOS configuration (cherry picked from commit 2b74a1799638be5fcf5b967c0d20d6c5842ce2c9) --- ...48317-do-not-auto-reboot-with-redfish_config-bios-changes | 2 ++ lib/ansible/module_utils/redfish_utils.py | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/48317-do-not-auto-reboot-with-redfish_config-bios-changes diff --git a/changelogs/fragments/48317-do-not-auto-reboot-with-redfish_config-bios-changes b/changelogs/fragments/48317-do-not-auto-reboot-with-redfish_config-bios-changes new file mode 100644 index 00000000000..e6c11b4c810 --- /dev/null +++ b/changelogs/fragments/48317-do-not-auto-reboot-with-redfish_config-bios-changes @@ -0,0 +1,2 @@ +bugfixes: + - redfish_config - do not automatically reboot when scheduling a BIOS configuration job diff --git a/lib/ansible/module_utils/redfish_utils.py b/lib/ansible/module_utils/redfish_utils.py index 7ee5f0a1c61..d6b81069da7 100644 --- a/lib/ansible/module_utils/redfish_utils.py +++ b/lib/ansible/module_utils/redfish_utils.py @@ -745,7 +745,7 @@ class RedfishUtils(object): data = response['data'] set_bios_attr_uri = data["@Redfish.Settings"]["SettingsObject"]["@odata.id"] - payload = {"TargetSettingsURI": set_bios_attr_uri, "RebootJobType": "PowerCycle"} + payload = {"TargetSettingsURI": set_bios_attr_uri} response = self.post_request(self.root_uri + self.manager_uri + "/" + jobs, payload, HEADERS) if response['ret'] is False: return response @@ -753,7 +753,8 @@ class RedfishUtils(object): response_output = response['resp'].__dict__ job_id = response_output["headers"]["Location"] job_id = re.search("JID_.+", job_id).group() - return {'ret': True, 'msg': 'Config job created', 'job_id': job_id} + # Currently not passing job_id back to user but patch is coming + return {'ret': True, 'msg': "Config job %s created" % job_id} def get_fan_inventory(self): result = {}