netOrk keeps one list of NTP servers per site and aligns a device that
differs (NetOrk/netork#2360). A BMC takes part through Redfish's
ManagerNetworkProtocol: NTP.NTPServers is read, and written with a
PATCH that carries the resource's @odata.etag as If-Match, so a change
made on the BMC in between is refused instead of overwritten.
BMCs give the array a fixed length and show the unused slots as empty
strings (three on an iDRAC 9, two on an iLO 5). Such an array is filled
up with its empty value, and more servers than slots are refused before
anything is written. Servers of a disabled NTP are not in use: they read
as none, and the write turns NTP on. Servers the BMC already uses are
not written again, so a poll that aligns it every time does not churn.
get_ntp_servers() follows the same rule.
A BMC runs on UTC or an offset (DateTimeLocalOffset), not a zone, so
time_sync_writes is {"ntp_servers"} and the zone is read only where the
manager names an IANA zone (TimeZoneName). A BMC whose Redfish has no
NTP block (the Supermicro X10's v1_0_0) raises rather than claiming it
has no servers. The bmc driver has it over Redfish only; ipmi has none.
Needs napalm-device-types 4.35.0.
Refs NetOrk/netork#2367
- 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.