mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 20:01:25 -07:00
[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:
parent
8f27ef76f5
commit
bf54291500
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