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>
This commit is contained in:
TSKushal 2023-09-21 01:32:42 +05:30 committed by GitHub
parent c4009deeb1
commit 12b48aaa2d
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"