Closed an0wak closed 2 years ago
Hi @an0wak
Please see script "InstallFromRepositoryREDFISH.py" for performing repository updates using Redfish.
Example below shows executing script "InstallFromRepositoryREDFISH.py" which i'll first use to the script to verify what packages are available to update from the repository. This is optional to do but recommended if you first want to check the repository to see what devices and versions are listed before applying updates. Second i will then apply the updates which will update BIOS, iDRAC and storage controller firmware.
C:\Python39>InstallFromRepositoryREDFISH.py -ip 192.168.0.120 -u root -p calvin --install --shareip 192.168.0.130 --sharetype NFS --sharename nfs_share_vm/R940_repo --applyupdate False
- PASS: POST command passed for method "InstallFromRepository", status code 202 returned
- PASS, job ID JID_608789389397 successfully created
- INFO, Job ID JID_608789389397 not marked completed, current status: "Downloading the Catalog.xml update package.", job polling time: "0:00:02"
- PASS, job ID JID_608789389397 successfully marked completed
Final detailed job results -
@odata.type: #DellJob.v1_0_1.DellJob
JobState: Completed
Description: Job Instance
TargetSettingsURI: None
@odata.id: /redfish/v1/Managers/iDRAC.Embedded.1/Jobs/JID_608789389397
@odata.context: /redfish/v1/$metadata#DellJob.DellJob
MessageArgs: [u'NA']
CompletionTime: 2019-06-18T12:29:05
PercentComplete: 100
StartTime: TIME_NOW
MessageId: RED001
Message: Job completed successfully.
EndTime: None
Id: JID_608789389397
JobType: RepositoryUpdate
Name: Repository Update
- INFO, "ApplyUpdate = False" selected, execute script with -r agrument to view the repo update list which will report devices detected for firmware updates
C:\Python39>InstallFromRepositoryREDFISH.py -ip 192.168.0.120 -u root -p calvin --get-repo-list
- PASS: POST command passed to get repo update list, status code 200 returned
Repo Based Update List in XML format:
<?xml version="1.0"?>
<CIM xmlns:fo="http://www.w3.org/1999/XSL/Format" CIMVERSION="2.0" DTDVERSION="2.0">
<MESSAGE ID="4711" PROTOCOLVERSION="1.0">
<SIMPLEREQ>
<VALUE.NAMEDINSTANCE>
<INSTANCENAME CLASSNAME="DCIM_RepoUpdateSWID"><PROPERTY NAME="Criticality" TYPE="string"><VALUE>1</VALUE></PROPERTY><PROPERTY NAME="DisplayName" TYPE="string"><VALUE>PERC 10.3 RAID Controller Firmware, 50.5.1-2633, A07</VALUE></PROPERTY><PROPERTY NAME="BaseLocation" TYPE="string"><VALUE/></PROPERTY><PROPERTY NAME="PackagePath" TYPE="string"><VALUE>SAS-RAID_Firmware_FJHK3_WN64_50.5.1-2633_A07.EXE</VALUE></PROPERTY><PROPERTY NAME="PackageName" TYPE="string"><VALUE>SAS-RAID_Firmware_FJHK3_WN64_50.5.1-2633_A07.EXE</VALUE></PROPERTY><PROPERTY NAME="PackageVersion" TYPE="string"><VALUE>50.5.1-2633</VALUE></PROPERTY><PROPERTY NAME="RebootType" TYPE="string"><VALUE>HOST</VALUE></PROPERTY><PROPERTY NAME="JobID" TYPE="string"><VALUE/></PROPERTY>
<PROPERTY NAME="Target" TYPE="string"><VALUE>DCIM:INSTALLED#301_C_RAID.Slot.1-1</VALUE></PROPERTY><PROPERTY NAME="ComponentID" TYPE="string"><VALUE>104893</VALUE></PROPERTY><PROPERTY NAME="ComponentType" TYPE="string"><VALUE>FRMW</VALUE></PROPERTY><PROPERTY.ARRAY NAME="ComponentInfoValue" TYPE="string"><VALUE.ARRAY><VALUE>1000:0016:1028:1FCB</VALUE></VALUE.ARRAY></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInfoName" TYPE="string"><VALUE.ARRAY><VALUE>VendorID:DeviceID:SubVendorID:SubDeviceID</VALUE></VALUE.ARRAY></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInfoTarget" TYPE="string"><VALUE.ARRAY><VALUE>DCIM:INSTALLED#301_C_RAID.Slot.1-1</VALUE></VALUE.ARRAY></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInstalledVersion" TYPE="string"><VALUE.ARRAY><VALUE>50.5.0-1750</VALUE></VALUE.ARRAY></PROPERTY.ARRAY>
</INSTANCENAME>
</VALUE.NAMEDINSTANCE>
<VALUE.NAMEDINSTANCE>
<INSTANCENAME CLASSNAME="DCIM_RepoUpdateSWID"><PROPERTY NAME="Criticality" TYPE="string"><VALUE>1</VALUE></PROPERTY><PROPERTY NAME="DisplayName" TYPE="string"><VALUE>Dell EMC Server PowerEdge BIOS R740/R740xd/R640/R940/7920R Version 2.2.10</VALUE></PROPERTY><PROPERTY NAME="BaseLocation" TYPE="string"><VALUE/></PROPERTY><PROPERTY NAME="PackagePath" TYPE="string"><VALUE>BIOS_WG5H6_WN64_2.2.10.EXE</VALUE></PROPERTY><PROPERTY NAME="PackageName" TYPE="string"><VALUE>BIOS_WG5H6_WN64_2.2.10.EXE</VALUE></PROPERTY><PROPERTY NAME="PackageVersion" TYPE="string"><VALUE>2.2.10</VALUE></PROPERTY><PROPERTY NAME="RebootType" TYPE="string"><VALUE>HOST</VALUE></PROPERTY><PROPERTY NAME="JobID" TYPE="string"><VALUE/></PROPERTY>
<PROPERTY NAME="Target" TYPE="string"><VALUE>DCIM:INSTALLED#741__BIOS.Setup.1-1</VALUE></PROPERTY><PROPERTY NAME="ComponentID" TYPE="string"><VALUE>159</VALUE></PROPERTY><PROPERTY NAME="ComponentType" TYPE="string"><VALUE>BIOS</VALUE></PROPERTY><PROPERTY.ARRAY NAME="ComponentInfoValue" TYPE="string"><VALUE.ARRAY/></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInfoName" TYPE="string"><VALUE.ARRAY/></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInfoTarget" TYPE="string"><VALUE.ARRAY><VALUE>DCIM:INSTALLED#741__BIOS.Setup.1-1</VALUE></VALUE.ARRAY></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInstalledVersion" TYPE="string"><VALUE.ARRAY><VALUE>1.6.12</VALUE></VALUE.ARRAY></PROPERTY.ARRAY>
</INSTANCENAME>
</VALUE.NAMEDINSTANCE>
<VALUE.NAMEDINSTANCE>
<INSTANCENAME CLASSNAME="DCIM_RepoUpdateSWID"><PROPERTY NAME="Criticality" TYPE="string"><VALUE>1</VALUE></PROPERTY><PROPERTY NAME="DisplayName" TYPE="string"><VALUE>iDRAC with Lifecycle Controller,3.32.32.32, A00</VALUE></PROPERTY><PROPERTY NAME="BaseLocation" TYPE="string"><VALUE/></PROPERTY><PROPERTY NAME="PackagePath" TYPE="string"><VALUE>iDRAC-with-Lifecycle-Controller_Firmware_VRYKT_WN64_3.32.32.32_A00.EXE</VALUE></PROPERTY><PROPERTY NAME="PackageName" TYPE="string"><VALUE>iDRAC-with-Lifecycle-Controller_Firmware_VRYKT_WN64_3.32.32.32_A00.EXE</VALUE></PROPERTY><PROPERTY NAME="PackageVersion" TYPE="string"><VALUE>3.32.32.32</VALUE></PROPERTY><PROPERTY NAME="RebootType" TYPE="string"><VALUE>IDRAC</VALUE></PROPERTY><PROPERTY NAME="JobID" TYPE="string"><VALUE/></PROPERTY>
<PROPERTY NAME="Target" TYPE="string"><VALUE>DCIM:INSTALLED#iDRAC.Embedded.1-1#IDRACinfo</VALUE></PROPERTY><PROPERTY NAME="ComponentID" TYPE="string"><VALUE>25227</VALUE></PROPERTY><PROPERTY NAME="ComponentType" TYPE="string"><VALUE>FRMW</VALUE></PROPERTY><PROPERTY.ARRAY NAME="ComponentInfoValue" TYPE="string"><VALUE.ARRAY/></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInfoName" TYPE="string"><VALUE.ARRAY/></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInfoTarget" TYPE="string"><VALUE.ARRAY><VALUE>DCIM:INSTALLED#iDRAC.Embedded.1-1#IDRACinfo</VALUE></VALUE.ARRAY></PROPERTY.ARRAY><PROPERTY.ARRAY NAME="ComponentInstalledVersion" TYPE="string"><VALUE.ARRAY><VALUE>3.30.30.30</VALUE></VALUE.ARRAY></PROPERTY.ARRAY>
</INSTANCENAME>
</VALUE.NAMEDINSTANCE>
</SIMPLEREQ>
</MESSAGE>
</CIM>
- INFO, get repo based update list data is also copied to file "repo_based_update_list.xml"
C:\Python39>InstallFromRepositoryREDFISH.py -ip 192.168.0.120 -u root -p calvin --install --shareip 192.168.0.130 --sharetype NFS --sharename nfs_share_vm/R940_repo --applyupdate True --rebootneeded True
- PASS: POST command passed for method "InstallFromRepository", status code 202 returned
- PASS, job ID JID_608892918527 successfully created
- INFO, Job ID JID_608892918527 not marked completed, current status: "Downloading the Catalog.xml update package.", job polling time: "0:00:01"
- INFO, Job ID JID_608892918527 not marked completed, current status: "Package successfully downloaded.", job polling time: "0:00:06"
- INFO, Job ID JID_608892918527 not marked completed, current status: "Package successfully downloaded.", job polling time: "0:00:11"
- INFO, Job ID JID_608892918527 not marked completed, current status: "Package successfully downloaded.", job polling time: "0:00:17"
- INFO, Job ID JID_608892918527 not marked completed, current status: "Package successfully downloaded.", job polling time: "0:01:23"
- INFO, Job ID JID_608892918527 not marked completed, current status: "Package successfully downloaded.", job polling time: "0:02:11"
- INFO, Job ID JID_608892918527 not marked completed, current status: "Package successfully downloaded.", job polling time: "0:02:38"
- PASS, job ID JID_608892918527 successfully marked completed
Final detailed job results -
@odata.type: #DellJob.v1_0_1.DellJob
JobState: Completed
Description: Job Instance
TargetSettingsURI: None
@odata.id: /redfish/v1/Managers/iDRAC.Embedded.1/Jobs/JID_608892918527
@odata.context: /redfish/v1/$metadata#DellJob.DellJob
MessageArgs: [u'NA']
CompletionTime: 2019-06-18T15:33:57
PercentComplete: 100
StartTime: TIME_NOW
MessageId: RED001
Message: Job completed successfully.
EndTime: None
Id: JID_608892918527
JobType: RepositoryUpdate
Name: Repository Update
- INFO, repository update job marked completed. Checking now to see if any update jobs were created due to different firmware versions detected
- PASS, job ID JID_608892983799 successfully marked completed
Final detailed job results -
@odata.type: #DellJob.v1_0_1.DellJob
JobState: Completed
Description: Job Instance
TargetSettingsURI: None
@odata.id: /redfish/v1/Managers/iDRAC.Embedded.1/Jobs/JID_608892983799
@odata.context: /redfish/v1/$metadata#DellJob.DellJob
MessageArgs: []
CompletionTime: 2019-06-18T15:33:54
PercentComplete: 100
StartTime: TIME_NOW
MessageId: PR19
Message: The specified job has completed successfully.
EndTime: TIME_NA
Id: JID_608892983799
JobType: FirmwareUpdate
Name: update:DCIM:INSTALLED#741__BIOS.Setup.1-1
- PASS, job ID JID_608893194634 successfully marked completed
Final detailed job results -
@odata.type: #DellJob.v1_0_1.DellJob
JobState: Completed
Description: Job Instance
TargetSettingsURI: None
@odata.id: /redfish/v1/Managers/iDRAC.Embedded.1/Jobs/JID_608893194634
@odata.context: /redfish/v1/$metadata#DellJob.DellJob
MessageArgs: []
CompletionTime: 2019-06-18T15:33:54
PercentComplete: 100
StartTime: TIME_NOW
MessageId: PR19
Message: Job completed successfully.
EndTime: TIME_NA
Id: JID_608893194634
JobType: FirmwareUpdate
Name: update:DCIM:INSTALLED#301_C_RAID.Slot.1-1
- INFO, Job ID JID_608900371405 not marked completed, current status: "Lifecycle Controller in use. This job will start when Lifecycle Controller is available.", job polling time: "0:00:02"
- INFO, Job ID JID_608900371405 not marked completed, current status: "Lifecycle Controller in use. This job will start when Lifecycle Controller is available.", job polling time: "0:00:05"
- INFO, Job ID JID_608900371405 not marked completed, current status: "Lifecycle Controller in use. This job will start when Lifecycle Controller is available.", job polling time: "0:00:11"
- INFO, Job ID JID_608900371405 not marked completed, current status: "Downloading the iDRAC-with-Lifecycle-Controller_Firmware_VRYKT_WN64_3.32.32.32_A00.EXE update package.", job polling time: "0:00:17"
- INFO, Job ID JID_608900371405 not marked completed, current status: "Downloading the iDRAC-with-Lifecycle-Controller_Firmware_VRYKT_WN64_3.32.32.32_A00.EXE update package.", job polling time: "0:00:24"
- INFO, Job ID JID_608900371405 not marked completed, current status: "Downloading the iDRAC-with-Lifecycle-Controller_Firmware_VRYKT_WN64_3.32.32.32_A00.EXE update package.", job polling time: "0:00:30"
- INFO, Job ID JID_608900371405 not marked completed, current status: "Downloading the iDRAC-with-Lifecycle-Controller_Firmware_VRYKT_WN64_3.32.32.32_A00.EXE update package.", job polling time: "0:00:36"
- INFO, Job ID JID_608900371405 not marked completed, current status: "Downloading the iDRAC-with-Lifecycle-Controller_Firmware_VRYKT_WN64_3.32.32.32_A00.EXE update package.", job polling time: "0:00:41"
- INFO, Job ID JID_608900371405 not marked completed, current status: "Downloading the iDRAC-with-Lifecycle-Controller_Firmware_VRYKT_WN64_3.32.32.32_A00.EXE update package.", job polling time: "0:00:47"
- INFO, Job ID JID_608900371405 not marked completed, current status: "Downloading the iDRAC-with-Lifecycle-Controller_Firmware_VRYKT_WN64_3.32.32.32_A00.EXE update package.", job polling time: "0:00:53"
- INFO, Job ID JID_608900371405 not marked completed, current status: "Downloading the iDRAC-with-Lifecycle-Controller_Firmware_VRYKT_WN64_3.32.32.32_A00.EXE update package.", job polling time: "0:00:59"
- INFO, Job ID JID_608900371405 not marked completed, current status: "Downloading the iDRAC-with-Lifecycle-Controller_Firmware_VRYKT_WN64_3.32.32.32_A00.EXE update package.", job polling time: "0:01:05"
- PASS, job ID JID_608900371405 successfully marked completed
Final detailed job results -
@odata.type: #DellJob.v1_0_1.DellJob
JobState: Completed
Description: Job Instance
TargetSettingsURI: None
@odata.id: /redfish/v1/Managers/iDRAC.Embedded.1/Jobs/JID_608900371405
@odata.context: /redfish/v1/$metadata#DellJob.DellJob
MessageArgs: []
CompletionTime: 2019-06-18T15:36:19
PercentComplete: 100
StartTime: TIME_NOW
MessageId: RED001
Message: Job completed successfully.
EndTime: None
Id: JID_608900371405
JobType: FirmwareUpdate
Name: update:DCIM:INSTALLED#iDRAC.Embedded.1-1#IDRACinfo
Excellent, I was looking through the PowerShell scripts and could not find one. Appreciate the quick response
Hi,
Wondering if there is a way to update systems using a catalogue file instead of individual DUP files.
RACADM has the following command: racadm -r -u -p update -f catalog.xml -l :/repository -a TRUE -t NFS
Is there something similar?
Regards