mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-18 16:31:26 -07:00
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:
parent
c4009deeb1
commit
12b48aaa2d
3 changed files with 45 additions and 2 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue