dell / iDRAC-Redfish-Scripting

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

Set-IdracLcSystemAttributesREDFISH does not work on iDRAC8 #296

Closed javalidapesada closed 1 month ago

javalidapesada commented 3 months ago

please help to find a solution, cant get this working on IDRAC8

texroemer commented 3 months ago

Hi @javalidapesada

iDRAC 7/8 does not support OEM extension to set individual iDRAC attributes with Redfish, you must leverage Server Configuration Profile (SCP) feature to set iDRAC attributes (scripts below).

Set-ExportServerConfigurationProfileLocalREDFISH Set-ImportServerConfigurationProfileLocalREDFISH Set-ImportServerConfigurationProfileLocalFilenameREDFISH

Can you let me know what attributes you're trying to set so i can send you a workflow example.

Thanks Tex

javalidapesada commented 3 months ago

Hi Tex, thanks for the rapid reply.

I need to be able to Disable\Enable the attribute EmailAlert.1.Enable.

I am running this on IDRAC9 with success:

Set-IdracLcSystemAttributesREDFISH -idrac_ip -idrac_username root -idrac_password calvin -attribute_names "EmailAlert.1.Enable" -attribute_group idrac -attribute_values "Disabled"

Should have a way to do it on iDRAC8 as it has the same option under alerts.

Thanks for your help. Daniel

texroemer commented 3 months ago

Example below using SCP to set attribute EmailAlert.1.Enable to Disabled. Please copy SCP file contents below to create XML file and run the cmdlet. I also left other email alert attributes in the SCP file incase you want to configure them. If not please edit the SCP file and either remove them or comment out.

PS C:\> type .\SCP_file.xml
<SystemConfiguration>
<Component FQDD="iDRAC.Embedded.1">
 <Attribute Name="EmailAlert.1#Enable">Disabled</Attribute>
 <Attribute Name="EmailAlert.1#Address"/>
 <Attribute Name="EmailAlert.1#CustomMsg"/>
 <Attribute Name="EmailAlert.2#Enable">Disabled</Attribute>
 <Attribute Name="EmailAlert.2#Address"/>
 <Attribute Name="EmailAlert.2#CustomMsg"/>
 <Attribute Name="EmailAlert.3#Enable">Disabled</Attribute>
 <Attribute Name="EmailAlert.3#Address"/>
 <Attribute Name="EmailAlert.3#CustomMsg"/>
 <Attribute Name="EmailAlert.4#Enable">Disabled</Attribute>
 <Attribute Name="EmailAlert.4#Address"/>
 <Attribute Name="EmailAlert.4#CustomMsg"/>
</Component>
</SystemConfiguration>

PS C:\> Set-ImportServerConfigurationProfileLocalFilenameREDFISH -idrac_ip 192.168.0.120 -idrac_username root -idrac_password calvin -Target IDRAC -FileName SCP_file.xml
5

- PASS, statuscode 202 returned to successfully create import server configuration profile (SCP) job: JID_116824721214

- INFO, import job ID not marked completed, current job status: Running
- INFO, import job ID not marked completed, current job status: Running
- INFO, import job ID not marked completed, current job status: Running
- INFO, import job ID not marked completed, current job status: Running
- INFO, import job ID not marked completed, current job status: Completed

- INFO, JID_116824721214 job ID marked as completed
- INFO, job completed in @{Minutes=0; Seconds=3}

- Detailed final job status and configuration results for import job ID 'JID_116824721214' -

{"@odata.context":"/redfish/v1/$metadata#Task.Task"
"@odata.id":"/redfish/v1/TaskService/Tasks/JID_116824721214"
"@odata.type":"#Task.v1_7_1.Task"
"Description":"Server Configuration and other Tasks running on iDRAC are listed here"
"EndTime":"2024-03-28T22:21:15-05:00"
"Id":"JID_116824721214"
"Messages":[{"Message":"The operation successfully completed."
"MessageID":"SYS413"
"Oem":{"Dell":{"@odata.type":"#DellManager.v1_0_0.ServerConfigurationProfileResults"
"DisplayValue":"Enable Email Alerts"
"ErrCode":"0"
"FQDD":"iDRAC.Embedded.1"
"Name":"EmailAlert.1#Enable"
"NewValue":"Disabled"
"OldValue":"Enabled"
"Status":"Success"}}
"Severity":"OK"}
{"Message":"Successfully imported and applied Server Configuration Profile."
"MessageArgs":[]
"MessageArgs@odata.count":0
"MessageId":"IDRAC.2.9.SYS053"}]
"Messages@odata.count":2
"Name":"Import Configuration"
"Oem":{"Dell":{"@odata.type":"#DellJob.v1_5_0.DellJob"
"CompletionTime":"2024-03-28T22:21:15"
"Description":"Job Instance"
"EndTime":null
"Id":"JID_116824721214"
"JobState":"Completed"
"JobType":"ImportConfiguration"
"Message":"Successfully imported and applied Server Configuration Profile."
"MessageArgs":[]
"MessageId":"IDRAC.2.9.SYS053"
"Name":"Configure: Import Server Configuration Profile"
"PercentComplete":100
"StartTime":"TIME_NOW"
"TargetSettingsURI":null}}
"PercentComplete":100
"TaskState":"Completed"
"TaskStatus":"OK"}