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
$ curl -s -k -u admin:admin -H"Content-type: application/json" -X GET https://irmc_address/redfish/v1/Systems/0/ |jq -r '.PowerState' On
$ 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"}'
$ 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"}'
$ 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"}'
$ curl -k -u admin:admin -H"Content-type: application/json" -X POST https://irmc_address/redfish/v1/Managers/iRMC/Actions/Manager.Reset
$ 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" }
$ 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" }
$ 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
$ 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
$ 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
$ 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" }