19 Commits
Author SHA1 Message Date
Christian Manivong b08ae66318 chore(release): 0.6.0
driver / standard (pull_request) Successful in 13s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 46s
driver / test (3.10) (pull_request) Successful in 51s
driver / test (3.11) (pull_request) Successful in 50s
driver / test (3.12) (pull_request) Successful in 50s
driver / test (3.13) (pull_request) Successful in 45s
driver / lowest (pull_request) Successful in 24s
driver / security (pull_request) Successful in 49s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Successful in 6m1s
driver / publish (pull_request) Skipped
2026-10-23 10:29:00 +02:00
Christian Manivong 8dac2e67dd chore: adopt the NAPALM driver standard
driver / standard (pull_request) Successful in 13s
driver / lint (pull_request) Successful in 11s
driver / types (pull_request) Successful in 46s
driver / test (3.10) (pull_request) Successful in 51s
driver / test (3.11) (pull_request) Successful in 55s
driver / test (3.12) (pull_request) Successful in 49s
driver / test (3.13) (pull_request) Successful in 43s
driver / lowest (pull_request) Successful in 26s
driver / security (pull_request) Successful in 49s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Successful in 6m5s
driver / publish (pull_request) Skipped
- CI arrives in .gitea/workflows/ci.yml and calls the shared driver
  workflow of NAPALM/driver-standard; the repo had none before.
- setuptools>=77 and the SPDX license string PEP 639 wants, without the
  License classifier; py.typed; Repository, Issues and Changelog links on
  git.netork.io; napalm-device-types>=4.21.1 from PyPI.
- True floors, found by running the tests at them: redfish>=3.4.1 (older
  releases return no response with max_retry=0) and pyghmi>=1.5.1 (1.5.0
  imports python-dateutil without declaring it).
- The test extra becomes the dev extra of the standard, plus responses,
  which the tests mock the BMC with. pytest puts the repo root on the
  path, so tests.conftest also imports under a bare pytest.
- mypy strict; exempt for now (50 errors, most of them getters returning
  dicts where the role declares TypedDicts): napalm_redfish.bmc, .driver,
  .ipmi, .transport and parsers.common, .environment, .manager, .system.
  They are recorded in tests/quality_baseline.json with seven functions
  over complexity 10.
- Coverage floor 94 % (measured 94.27 %).
- The README's development steps install from PyPI.
2026-10-23 08:46:19 +02:00
Christian Manivong 01b2a2ae58 fix: what bandit and the remaining lint rules found
- ipmi: a failed logout on close is logged at debug level instead of
  passed over (B110); the session still times out on the BMC.
- ipmi: the pyghmi imports are this driver's protocol, the fallback for
  BMCs without Redfish, documented as insecure in the module and in
  docs/security.md (nosec B415).
- parsers.accounts: the empty password is NAPALM's get_users field;
  Redfish never returns one (nosec B105).
2026-10-23 08:40:23 +02:00
Christian Manivong 09029ca0a4 style: ruff format and the lint rules of the driver standard
Mechanical: ruff format, and ruff check --fix with the rule set every NAPALM
driver uses (E, F, I, UP, B at line length 100, Python 3.10). Mapping and
Iterable come from collections.abc, imports are sorted. What ruff cannot
fix comes in the next commit.
2026-10-23 08:39:45 +02:00
Christian Manivong 5b24675a12 feat: report the licenses a BMC asks for as facts (0.5.0)
get_licenses (napalm-device-types LicenseMixin, 4.15) on redfish and bmc,
for NetOrk/netork#1111.

- A BMC that refuses Redfish altogether reports each license it names as
  missing, with its message.
- One that answers but withholds parts reports the license with withholds,
  e.g. DCMS withholding drives and the firmware inventory on an X10 with
  only SFT-OOB-LIC.
- ipmi knows no licenses.

get_device_warnings keeps its two codes until netOrk derives them.
2026-10-17 11:32:59 +02:00
Christian Manivong e9ad7951cd feat: a bmc driver that takes the best of Redfish and IPMI (0.4.0)
bmc (napalm_redfish.bmc:BmcDriver) reads a BMC over Redfish where it
answers. A BMC that refuses Redfish (no license) is read and switched over
IPMI. A getter that fails over Redfish is asked over IPMI where IPMI has it;
IPMI is opened only then. Power control goes over Redfish when it answers,
and a refusal is final. The BMC is reset over Redfish only. Same account
for both; ipmi_port in optional_args.

Discovery suggests bmc for a BMC it finds: the fingerprint rules moved from
RedfishDriver to BmcDriver.
2026-10-17 10:34:20 +02:00
Christian Manivong adf152ee12 fix: read a Supermicro X10 with only the OOB license over Redfish (0.3.1)
First run against real hardware over Redfish: an X10DRL-i (BMC 3.91) with
SFT-OOB-LIC. Its Redfish tree is recorded under
tests/fixtures/supermicro-x10drl-i-3.91/redfish, scrubbed.

- A resource refused for want of a further license (403 OemLicenseNotPassed)
  no longer fails the getter. Storage then falls back to SimpleStorage. The
  firmware list falls back to the BMC and BIOS versions when UpdateService
  is withheld.
- get_device_warnings reports bmc_license_partial with the licenses and the
  withheld parts (drives, firmware inventory).
- A placeholder system model ("Super Server") is replaced by the board
  (PartNumber, else the chassis model).
2026-10-17 09:32:09 +02:00
Christian Manivong 6c60f7ac60 feat: switch the server's power over IPMI (0.3.0)
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.
2026-10-17 01:04:43 +02:00
Christian Manivong 2090b1cf8c Release 0.1.0 2026-10-13 05:13:45 +00:00
Christian Manivong 05731d4b0f Require napalm-device-types 4.7 2026-10-13 05:10:02 +00:00
Christian Manivong 42940d7e90 Add RedfishDriver on ManagementControllerDriver
The redfish driver implements get_facts, get_interfaces, get_interfaces_ip, get_environment, get_users, get_ntp_servers and get_snmp_information for the BMC, and the role methods get_power_state, set_power_state, get_hardware_inventory, get_event_log, get_firmware_inventory and get_management_protocols for the managed server. reboot_host resets the BMC through Manager.Reset, never the server.

Registered as the napalm.drivers entry point redfish; depends on napalm and napalm-device-types >= 4.6.
2026-10-13 05:02:58 +00:00
Christian Manivong 7c366955bb Add mockup files for the driver tests
UpdateService, the system's EthernetInterfaces and all chassis Sensors from public-rackmount1, unmodified.
2026-10-13 05:02:58 +00:00
Christian Manivong 209537a793 Extend parsers for the driver
parse_power_supply also reads items of the legacy Power.PowerSupplies array, parse_ethernet_interface exposes the raw LinkStatus, and parse_network_protocol reports protocols that carry a Port without a ProtocolEnabled flag.
2026-10-13 05:02:58 +00:00
Christian Manivong 8b512b6e0d Update README and references for the transport and parsers 2026-10-12 23:42:14 +00:00
Christian Manivong cab1c84cba Add parsers for the Redfish resources in redfish-map.md
Pure functions for ServiceRoot, ComputerSystem (facts, power state, reset action and ActionInfo), Processors, Memory, Storage/Drives/SimpleStorage, Chassis Thermal and Power as well as ThermalSubsystem/PowerSubsystem/Sensors (with environment_sources to pick whichever exists), Manager, EthernetInterfaces, ManagerNetworkProtocol, accounts, firmware inventory and log services/entries.
2026-10-12 23:42:14 +00:00
Christian Manivong 8998e1342e Add Redfish transport
Session login through the SessionService with X-Auth-Token, the session deleted on close (also on errors and when the DELETE fails), basic auth as fallback only when the service cannot create sessions, never after a rejected password. Certificate verification is on by default and configurable per device; True passes the requests CA bundle explicitly because the redfish library disables verification without a CA file.

Collections are followed by @odata.id, including expanded members and nextLink pages. Links to other hosts are refused so the session token stays on the BMC.
2026-10-12 23:42:14 +00:00
Christian Manivong c8bcd5ace1 Add DMTF mockup fixtures and test helpers
Unmodified files from DMTF Redfish-Publications (public-rackmount1, public-localstorage, public-telemetry), only those the tests use, each set with DMTF's BSD-3-Clause license and a COMMANDS.txt naming the source commit and request paths.

conftest.py loads them by request path and serves a mockup over mocked HTTP, with a SessionService that hands out a token, for the transport tests.
2026-10-12 23:42:14 +00:00
Christian Manivong 17d515d035 Add package skeleton
pyproject.toml (Apache-2.0, Python >= 3.10, depends on the DMTF redfish library) and an empty napalm_redfish package. No napalm.drivers entry point yet: the driver class waits for the ManagementControllerDriver role base.
2026-10-12 23:42:14 +00:00
Christian Manivong 5f8a4ef975 docs: design notes for a Redfish/IPMI BMC driver
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.
2026-10-13 01:15:57 +02:00