[PR #7129/12b48aaa backport][stable-7] Adding SetSecureBoot to redfish_config (#7298)

Adding SetSecureBoot to redfish_config (#7129)

* Changing EnableSecureBoot to SetSecureBoot

* Sanity Fix

* Adding changelog fragment

* Update plugins/modules/redfish_config.py

Agreed

Co-authored-by: Felix Fontein <felix@fontein.de>

* Updating PR to just add SetSecureBoot command

* Update plugins/modules/redfish_config.py

Agreed

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Kushal <t-s.kushal@hpe.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 12b48aaa2d)

Co-authored-by: TSKushal <44438079+TSKushal@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2023-09-20 22:25:40 +02:00 committed by GitHub
parent 8f27ef76f5
commit bf54291500
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 2 deletions

View file

@ -3432,6 +3432,25 @@ class RedfishUtils(object):
return self.patch_request(self.root_uri + secure_boot_url, body, check_pyld=True)
def set_secure_boot(self, secure_boot_enable):
# This function enable Secure Boot on an OOB controller
response = self.get_request(self.root_uri + self.systems_uri)
if response["ret"] is False:
return response
server_details = response["data"]
secure_boot_url = server_details["SecureBoot"]["@odata.id"]
response = self.get_request(self.root_uri + secure_boot_url)
if response["ret"] is False:
return response
body = {}
body["SecureBootEnable"] = secure_boot_enable
return self.patch_request(self.root_uri + secure_boot_url, body, check_pyld=True)
def get_hpe_thermal_config(self):
result = {}
key = "Thermal"