dell / iDRAC-Redfish-Scripting

Python and PowerShell scripting for Dell EMC PowerEdge iDRAC REST API with DMTF Redfish
GNU General Public License v2.0
600 stars 278 forks source link

set security banner using BiosSetAttributeREDFISH.py? #173

Closed transce closed 3 years ago

transce commented 3 years ago

Hello,

I am trying to figure out how to set the security banner via REDFISH. I'm assuming that BiosSetAttributeREDFISH.py would be the correct script to use as an example. But I'm not sure what attribute I need to set. Any advice would be appreciated. The iDRAC 9 documents say it's available via REDFISH, but I can't find anything beyond that.

texroemer commented 3 years ago

Hi @transce

PATCH on URI "redfish/v1/Managers/iDRAC.Embedded.1/Attributes", in the body pass in attribute "GUI.1.SecurityPolicyMessage" with your custom string value.

Example:

C:\Python39>SetIdracLcSystemAttributesREDFISH.py -ip 192.168.0.120 -u root -p calvin -s idrac -an GUI.1.SecurityPolicyMessage -av "test security message"

- INFO, configuring "IDRAC" attributes
- Attribute Name: GUI.1.SecurityPolicyMessage, setting new value to: test security message
- PASS, PATCH command passed to successfully set "IDRAC" attribute(s), status code 200 returned
- INFO, getting new attribute current values
- Attribute Name: GUI.1.SecurityPolicyMessage, Attribute Value: test security message

C:\Python39>GetIdracLcSystemAttributesREDFISH.py -ip 192.168.0.120 -u root -p calvin -g idrac -an GUI.1.SecurityPolicyMessage

- Attribute Name: GUI.1.SecurityPolicyMessage, Current Value: test security message
transce commented 3 years ago

Thank you! That did the trick. I was able to perform the security banner via redfish.