No code yet. The README explains why one Redfish driver with vendor quirk modules beats a Supermicro-only IPMI driver, and keeps IPMI over LAN as a read-only fallback. docs/ holds a draft for a new ManagementController role base in napalm-device-types, the getter-to-resource map, the first test device (Supermicro X10DRL-i, Redfish firmware 3.91), the security points (IPMI RAKP hash disclosure, power control, credentials) and the test plan with DMTF mockups and fixtures to record.
2.5 KiB
2.5 KiB
Testing
Without hardware
- DMTF mockups (DSP2043). Complete Redfish service trees as static JSON, published by
the DMTF with each Redfish release (download from the Redfish standards page). They cover
the current schema:
ThermalSubsystem,PowerSubsystem,Sensors, storage, logs, and actions. - DMTF Redfish-Mockup-Server. Serves a mockup over HTTP (
127.0.0.1:8000by default), also as a Docker imagedmtf/redfish-mockup-server. Good for integration tests of the transport (sessions, collections, actions). - OpenStack sushy-tools. An emulator that serves mockups or drives libvirt VMs via Redfish,
so
set_power_statecan be tested against something that actually changes state. - DMTF Redfish-Mockup-Creator. Records a live service into a mockup. It is the tool to turn the X10DRL-i into a complete fixture set in one go.
Unit tests use recorded JSON responses directly; the mockup server is for a small set of integration tests.
Fixtures to record from the X10DRL-i
Store under tests/fixtures/supermicro-x10drl-i-3.91/, one file per request path, plus
COMMANDS.txt with the paths and the machine's state (powered on/off, fans present).
Scrub serial numbers, UUIDs, MACs and IPs before committing.
GET /redfish/v1/(without login)GET /redfish/v1/Systemsand each memberGET /redfish/v1/Systems/1/Processorsand each memberGET /redfish/v1/Systems/1/Memoryand each memberGET /redfish/v1/Systems/1/StorageorSimpleStorage, whichever existsGET /redfish/v1/Systems/1/EthernetInterfacesand each memberGET /redfish/v1/Systems/1/LogServicesand the entries of eachGET /redfish/v1/Chassisand each memberGET /redfish/v1/Chassis/1/ThermalGET /redfish/v1/Chassis/1/PowerGET /redfish/v1/Managers/1GET /redfish/v1/Managers/1/EthernetInterfacesand each memberGET /redfish/v1/Managers/1/NetworkProtocolGET /redfish/v1/Managers/1/LogServicesand the entries of eachGET /redfish/v1/AccountServiceandAccountService/AccountsGET /redfish/v1/UpdateService/FirmwareInventoryand each memberPOST /redfish/v1/SessionService/Sessionsresponse headers (token redacted)- the error body of a request without credentials and of a wrong path
ResetType@Redfish.AllowableValuesfromSystems/1- IPMI: FRU, sensor list, chassis status, SEL (via
ipmitoolfor comparison withpyghmi)
Or run the Redfish-Mockup-Creator once against the BMC and keep its output.