dell / iDRAC-Redfish-Scripting

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

Missing Data From Redfish #20

Closed kgrvamsi closed 6 years ago

kgrvamsi commented 6 years ago

Can you please help me to fetch the following information from Redfish API

1)System Setup / iDRAC Settings / Power Configuration / Redundancy Policy 2)System Setup / iDRAC Settings / Power Configuration / Enable Hot Spare 3)System Setup / iDRAC Settings / Network / Enable IPMI Over Lan 4)System Setup / iDRAC Settings / Network / Common Settings / Static DNS Domain Name

Are these Values set at the boot time ?

texroemer commented 6 years ago

Hi,

Redundancy Policy and Enable Hot Spare attributes will be listed under URI "redfish/v1/Managers/System.Embedded.1/Attributes". These attributes will be reported as:

ServerPwr.1.PSRedPolicy (System Setup / iDRAC Settings / Power Configuration / Redundancy Policy) ServerPwr.1.PSRapidOn (System Setup / iDRAC Settings / Power Configuration / Enable Hot Spare)

Enable IPMI Over Lan and Static DNS Domain Name attributes will be listed under URI "redfish/v1/Managers/iDRAC.Embedded.1/Attributes". These attributes will be reported as:

IPMILan.1.Enable (System Setup / iDRAC Settings / Network / Enable IPMI Over Lan) NIC.1.DNSDomainName (System Setup / iDRAC Settings / Network / Common Settings / Static DNS Domain Name)

For the values getting set, this will get applied immediately once you make changes in any supported interface.

kgrvamsi commented 6 years ago

Thanks @texroemer for the above information and i overlooked these values and was confused before and on the other note are the below values also something we can fetch from the attribute list

System Setup / Device Settings / NIC to be used for PXE / NIC Configuration / Legacy Boot Protocol System Setup / Device Settings / All Remaining NICs / NIC Configuration / Legacy Boot Protocol

texroemer commented 6 years ago

Legacy Boot Protocol network attribute will only be exposed using Server Configuration Profile (SCP) feature (POST command on URI redfish/v1/Managers/iDRAC.Embedded.1/Actions/Oem/EID_674_Manager.ExportSystemConfiguration) to get network attributes. We support getting network properties based off the Redfish schema (URI redfish/v1/Systems/System.Embedded.1/NetworkAdapters/) but these properties are very limited and don't support LegacyBootProtocol setting.

Here's an example of using SCP feature to get only NIC attribute for my server:

_C:\Python27>ExportSystemConfigurationLocalREDFISH.py -ip 192.168.0.130 -u root -p calvin -t NIC

@odata.type: #Task.v1_1_1.Task Description: Server Configuration and other Tasks running on iDRAC are listed here TaskState: Running Messages: [{u'Message': u'Exporting Server Configuration Profile.', u'MessageId': u'SYS057', u'MessageArgs': [], u'MessageArgs@odata.count': 0}] @odata.id: /redfish/v1/TaskService/Tasks/JID_314234434988 @odata.context: /redfish/v1/$metadata#Task.Task TaskStatus: Ok Messages@odata.count: 1 StartTime: 2018-07-12T14:24:03-05:00 Oem: {u'Dell': {u'@odata.type': u'#DellJob.v1_0_0.DellJob', u'JobState': u'Running', u'Description': u'Job Instance', u'TargetSettingsURI': None, u'MessageArgs': [], u'CompletionTime': None, u'PercentComplete': 45, u'StartTime': u'TIME_NOW', u'MessageId': u'SYS057', u'Message': u'Exporting Server Configuration Profile.', u'EndTime': None, u'Id': u'JID_314234434988', u'JobType': u'ExportConfiguration', u'Name': u'Export Configuration'}} EndTime: 1969-12-31T18:00:00-06:00 Id: JID_314234434988 Name: Export: Server Configuration Profile

SystemConfiguration Model="PowerEdge R740xd" ServiceTag="CDZZR71" TimeStamp="Thu Jul 12 14:24:05 2018" Export type is Normal,XML,Selective Exported configuration may contain commented attributes. Attributes may be commented due to dependency, destructive nature, preserving server identity or for security reasons. Component FQDD="NIC.Integrated.1-2-1" Attribute Name="BlnkLeds"0/Attribute Attribute Name="VirtMacAddr"00:00:00:00:00:00/Attribute Attribute Name="VirtualizationMode"NONE/Attribute Attribute Name="LegacyBootProto"PXE/Attribute Attribute Name="WakeOnLan"Enabled/Attribute Attribute Name="VLanId"0/Attribute Attribute Name="NumberVFAdvertised"64/Attribute Attribute Name="TcpIpViaDHCP"Enabled/Attribute Attribute Name="IscsiViaDHCP"Enabled/Attribute Attribute Name="ChapAuthEnable"Disabled/Attribute Attribute Name="ChapMutualAuth"Disabled/Attribute Attribute Name="IscsiInitiatorIpAddr"0.0.0.0/Attribute Attribute Name="IscsiInitiatorSubnet"0.0.0.0/Attribute Attribute Name="IscsiInitiatorGateway"0.0.0.0/Attribute Attribute Name="IscsiInitiatorName"/Attribute Attribute Name="IscsiInitiatorChapId"/Attribute Attribute Name="IscsiInitiatorChapPwd"/Attribute Attribute Name="FirstTgtIpAddress"0.0.0.0/Attribute Attribute Name="FirstTgtTcpPort"3260/Attribute Attribute Name="FirstTgtBootLun"0/Attribute Attribute Name="FirstTgtIscsiName"/Attribute Attribute Name="FirstTgtChapPwd"/Attribute /Component Component FQDD="NIC.Integrated.1-1-1" Attribute Name="BlnkLeds"0/Attribute Attribute Name="VirtMacAddr"00:00:00:00:00:00/Attribute Attribute Name="VirtualizationMode"NONE/Attribute Attribute Name="LegacyBootProto"NONE/Attribute Attribute Name="WakeOnLan"Disabled/Attribute Attribute Name="VLanId"100/Attribute Attribute Name="NumberVFAdvertised"64/Attribute Attribute Name="TcpIpViaDHCP"Disabled/Attribute Attribute Name="IscsiViaDHCP"Disabled/Attribute Attribute Name="ChapAuthEnable"Disabled/Attribute Attribute Name="ChapMutualAuth"Disabled/Attribute Attribute Name="IscsiInitiatorIpAddr"192.168.0.130/Attribute Attribute Name="IscsiInitiatorSubnet"255.0.0.0/Attribute Attribute Name="IscsiInitiatorGateway"0.0.0.0/Attribute Attribute Name="IscsiInitiatorName"/Attribute Attribute Name="IscsiInitiatorChapId"/Attribute Attribute Name="IscsiInitiatorChapPwd"/Attribute Attribute Name="FirstTgtIpAddress"0.0.0.0/Attribute Attribute Name="FirstTgtTcpPort"3260/Attribute Attribute Name="FirstTgtBootLun"0/Attribute Attribute Name="FirstTgtIscsiName"/Attribute Attribute Name="FirstTgtChapPwd"/Attribute /Component Component FQDD="NIC.Integrated.1-3-1" Attribute Name="BlnkLeds"0/Attribute Attribute Name="VirtMacAddr"00:00:00:00:00:00/Attribute Attribute Name="LegacyBootProto"PXE/Attribute Attribute Name="LnkSpeed"AutoNeg/Attribute Attribute Name="WakeOnLan"Disabled/Attribute Attribute Name="VLanId"0/Attribute Attribute Name="TcpIpViaDHCP"Enabled/Attribute Attribute Name="IscsiViaDHCP"Enabled/Attribute Attribute Name="ChapAuthEnable"Disabled/Attribute Attribute Name="ChapMutualAuth"Disabled/Attribute Attribute Name="IscsiInitiatorIpAddr"0.0.0.0/Attribute Attribute Name="IscsiInitiatorSubnet"0.0.0.0/Attribute Attribute Name="IscsiInitiatorGateway"0.0.0.0/Attribute Attribute Name="IscsiInitiatorName"/Attribute Attribute Name="IscsiInitiatorChapId"/Attribute Attribute Name="IscsiInitiatorChapPwd"/Attribute Attribute Name="FirstTgtIpAddress"0.0.0.0/Attribute Attribute Name="FirstTgtTcpPort"3260/Attribute Attribute Name="FirstTgtBootLun"0/Attribute Attribute Name="FirstTgtIscsiName"/Attribute Attribute Name="FirstTgtChapPwd"/Attribute /Component Component FQDD="NIC.Integrated.1-4-1" Attribute Name="BlnkLeds"0/Attribute Attribute Name="VirtMacAddr"00:00:00:00:00:00/Attribute Attribute Name="LegacyBootProto"PXE/Attribute Attribute Name="LnkSpeed"AutoNeg/Attribute Attribute Name="WakeOnLan"Disabled/Attribute Attribute Name="VLanId"0/Attribute Attribute Name="TcpIpViaDHCP"Enabled/Attribute Attribute Name="IscsiViaDHCP"Enabled/Attribute Attribute Name="ChapAuthEnable"Disabled/Attribute Attribute Name="ChapMutualAuth"Disabled/Attribute Attribute Name="IscsiInitiatorIpAddr"0.0.0.0/Attribute Attribute Name="IscsiInitiatorSubnet"0.0.0.0/Attribute Attribute Name="IscsiInitiatorGateway"0.0.0.0/Attribute Attribute Name="IscsiInitiatorName"/Attribute Attribute Name="IscsiInitiatorChapId"/Attribute Attribute Name="IscsiInitiatorChapPwd"/Attribute Attribute Name="FirstTgtIpAddress"0.0.0.0/Attribute Attribute Name="FirstTgtTcpPort"3260/Attribute Attribute Name="FirstTgtBootLun"0/Attribute Attribute Name="FirstTgtIscsiName"/Attribute Attribute Name="FirstTgtChapPwd"/Attribute /Component /SystemConfiguration

@odata.type: #DellJob.v1_0_0.DellJob JobState: Completed Description: Job Instance TargetSettingsURI: None @odata.id: /redfish/v1/Managers/iDRAC.Embedded.1/Jobs/JID_314234434988 @odata.context: /redfish/v1/$metadata#DellJob.DellJob MessageArgs: [] CompletionTime: 2018-07-12T14:24:07 PercentComplete: 100 StartTime: TIME_NOW MessageId: SYS043 Message: Successfully exported Server Configuration Profile EndTime: None Id: JID_314234434988 JobType: ExportConfiguration Name: Export Configuration

Exported attributes also saved in file: 2018-7-12_14248export.xml

Also since you requested earlier about iDRAC settings, you can also get / set these iDRAC attributes using SCP feature too. In the example above i passed in a target of "NIC" only but you can pass in a target of "ALL" which will get all settings for your server into one file.

kgrvamsi commented 6 years ago

Thanks for the info