IpmiDriver.set_power_state sends an IPMI chassis control: On, GracefulShutdown, ForceOff and ForceRestart. get_power_state now offers what fits the server's state: On when it is off, the other three when it is on. IPMI has no graceful restart and pyghmi offers no power cycle, so neither is offered. The driver still does not reset the BMC. For boards that offer nothing but IPMI, such as a Supermicro X10 without a Redfish license.
3.3 KiB
3.3 KiB
Getters mapped to Redfish resources
Paths use the usual single-member IDs (Systems/1, Managers/1, Chassis/1); the driver
must follow the collections instead of assuming IDs, because vendors differ (Dell uses
System.Embedded.1, HPE uses 1, Supermicro uses 1).
Authentication
- Session:
POST /redfish/v1/SessionService/Sessionswith user and password returns anX-Auth-Tokenheader and the session's URI. Use the token,DELETEthe session on close. BMCs allow few concurrent sessions, so leaking them locks out the web UI. - Basic auth works on most services and is the fallback.
- Self-signed certificates are the norm; verification is configurable per device.
NAPALM getters
| Getter | Resource | Fields |
|---|---|---|
get_facts |
Systems/{id}, Managers/{id} |
Manufacturer, Model, SerialNumber, HostName; BMC FirmwareVersion as os_version. uptime is not in Redfish (return -1). interface_list from Managers/{id}/EthernetInterfaces |
get_interfaces |
Managers/{id}/EthernetInterfaces/* |
BMC ports: MACAddress, SpeedMbps, LinkStatus, InterfaceEnabled |
get_interfaces_ip |
same | IPv4Addresses, IPv6Addresses |
get_environment |
Chassis/{id}/Thermal (Temperatures[], Fans[]), Chassis/{id}/Power (PowerSupplies[], PowerControl[].PowerConsumedWatts) |
Newer services move these to ThermalSubsystem, PowerSubsystem and Sensors; read whichever exists. CPU and memory of the host OS are unknown to a BMC |
get_users |
AccountService/Accounts/* |
UserName, RoleId, Enabled |
get_ntp_servers |
Managers/{id}/NetworkProtocol |
NTP.NTPServers (newer schema versions only) |
get_snmp_information |
Managers/{id}/NetworkProtocol |
SNMP.ProtocolEnabled (details vary) |
get_config |
n/a | A BMC has no configuration file. Not implemented |
Role methods (draft, see role.md)
| Method | Resource |
|---|---|
get_power_state |
Systems/{id}: PowerState |
set_power_state |
POST Systems/{id}/Actions/ComputerSystem.Reset with ResetType; allowed values from ResetType@Redfish.AllowableValues (or the ActionInfo resource) |
reboot_host (the BMC) |
POST Managers/{id}/Actions/Manager.Reset |
get_hardware_inventory |
Systems/{id} (ProcessorSummary, MemorySummary), Systems/{id}/Processors/*, Systems/{id}/Memory/*, Systems/{id}/Storage/* (older: SimpleStorage), Chassis/{id}/Power PSUs, Systems/{id}/EthernetInterfaces/* |
get_event_log |
Systems/{id}/LogServices/*/Entries or Managers/{id}/LogServices/*/Entries (where the SEL lives varies by vendor) |
get_firmware_inventory |
UpdateService/FirmwareInventory/*: Name, Version, Updateable |
get_management_protocols |
Managers/{id}/NetworkProtocol: HTTP, HTTPS, SSH, IPMI, SNMP, KVMIP, VirtualMedia, SSDP, each with ProtocolEnabled and Port |
IPMI fallback (ipmi entry point)
Via pyghmi: device ID and FRU data for get_facts, sensor data repository for
get_environment, chassis status for get_power_state, SEL for get_event_log.
set_power_state sends a chassis control (On → power up, GracefulShutdown → soft off
via ACPI, ForceOff → power down, ForceRestart → hard reset). IPMI has no graceful
restart, and pyghmi offers no power cycle, so get_power_state never offers those two.
No BMC reset over IPMI.