I got an escalation from our second level support that a customer would like to get MAC address information on a server via Redfish. This can be done with the FirmwareInventory endpoint. I can show the example, but I think it would be good to show some other examples for basic tasks as well so that you can use Fujitsu iRMC Redfish APIs with your scripts/applications.
Fujitsu iRMC Redfish API Examples
- Check the server power status
- Power on the server
- Power off the server
- Reset the server
- Reset iRMC
- Check BIOS and iRMC Firmware version
- Get the server model name and serial number
- Update BIOS
- Update iRMC Firmware
- Generate and download iRMC System Report When you have a hardware problem and Fujitsu support asks for a system report, you can use the following API to download the report, and send it to Fujitsu support.
- List MAC addresses on the server
1 2 | $ curl -s -k -u admin:admin -H "Content-type: application/json" -X GET https: //irmc_address/redfish/v1/Systems/0/ |jq -r '.PowerState' On |
1 | $ curl -k -u admin:admin -H "Content-type: application/json" -X POST https: //irmc_address/redfish/v1/Systems/0/Actions/Oem/FTSComputerSystem .Reset --data-binary $ '{"FTSResetType":"PowerOn"}' |
1 | $ curl -k -u admin:admin -H "Content-type: application/json" -X POST https: //irmc_address/redfish/v1/Systems/0/Actions/Oem/FTSComputerSystem .Reset --data-binary $ '{"FTSResetType":"PowerOff"}' |
1 | $ curl -k -u admin:admin -H "Content-type: application/json" -X POST https: //irmc_address/redfish/v1/Systems/0/Actions/Oem/FTSComputerSystem .Reset --data-binary $ '{"FTSResetType":"ImmediateReset"}' |
1 | $ curl -k -u admin:admin -H "Content-type: application/json" -X POST https: //irmc_address/redfish/v1/Managers/iRMC/Actions/Manager .Reset |
1 2 3 4 5 6 | $ curl -s -k -u admin:admin -H "Content-type: application/json" -X GET https: //irmc_address/redfish/v1/Systems/0/Oem/ts_fujitsu/FirmwareInventory |jq '{SystemBIOS, BMCFirmware, SDRRVersion}' { "SystemBIOS" : "V5.0.0.12 R1.18.0 for D3383-A1x" , "BMCFirmware" : "1.25P" , "SDRRVersion" : "3.38" } |
1 2 3 4 5 | $ curl -s -k -u admin:admin -H "Content-type: application/json" -X GET https: //irmc_address/redfish/v1/Systems/0/ |jq '{Model, SerialNumber}' { "Model" : "PRIMERGY RX2530 M4" , "SerialNumber" : "MABQ000000" } |
1 | $ curl -k -u admin:admin –H "Content-type: multiplart/form-data" –H "Accept: application/json" -X POST -F "data=@RX2530M4_R1180.UPC" https: //irmc_address/redfish/v1/Systems/0/Bios/Actions/Oem/FTSBios .BiosUpdate |
1 | $ curl -k -u admin:admin –H "Content-type: multiplart/form-data" –H "Accept: application/json" -X POST -F "data=@RX2530M4_125Psdr0338.bin" https: //irmc_address/redfish/v1/Managers/iRMC/Actions/Oem/FTSManager .FWUpdate |
1 2 | $ curl -k -u admin:admin –H "Accept: application/json" -X POST https: //irmc_address/redfish/v1/Systems/0/Actions/Oem/FTSComputerSystem .SystemReportGenerate $ curl -k -u admin:admin –H "Accept: application/json" -H "Content-Type: application/octet-stream" -X POST https: //irmc_address/redfish/v1/Systems/0/Actions/Oem/FTSComputerSystem .SystemReportDownload --output iRMCSystemReport.xml |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | $ curl -s -k -u admin:admin -H "Content-type: application/json" -X GET https: //irmc_ip_address/redfish/v1/Systems/0/Oem/ts_fujitsu/FirmwareInventory/NIC |jq '.Ports[] | {SlotId, PortId, ManufacturerMacAddress}' { "SlotId" : 0, "PortId" : 0, "ManufacturerMacAddress" : "90:1b:0e:ad:11:6f" } { "SlotId" : 0, "PortId" : 1, "ManufacturerMacAddress" : "90:1b:0e:ad:11:70" } { "SlotId" : 11, "PortId" : 0, "ManufacturerMacAddress" : "3c:fd:fe:a1:6e:c4" } { "SlotId" : 11, "PortId" : 1, "ManufacturerMacAddress" : "3c:fd:fe:a1:6e:c5" } |