The redfish and bmc drivers take part in netOrk's time sync (NetOrk/netork#2360) through napalm-device-types' TimeSyncMixin, over Managers/{id}/NetworkProtocol. ipmi has no NTP settings and does not offer it.
Changes
get_time_sync(): NTP.NTPServers in the BMC's order, with empty slots dropped. While NTP.ProtocolEnabled is false the servers are not in use and read as none. timezone is the manager's TimeZoneName (Manager v1.10) where that is an IANA zone, else None, because DateTimeLocalOffset is an offset and not a zone. synchronized and daemon are None. A NetworkProtocol without an NTP block (the Supermicro X10's v1_0_0) raises RedfishError, so netOrk does not try to write a BMC that cannot take it.
configure_time_sync(ntp_servers=[...]): PATCH NetworkProtocol with {"NTP": {"NTPServers": [...]}}, plus "ProtocolEnabled": true where NTP is off. The resource's @odata.etag goes along as If-Match, so a change made on the BMC in between is refused (412) instead of overwritten. time_sync_writes is {"ntp_servers"}.
Array length: an array that shows empty slots ("" or null; three on an iDRAC 9, two on an iLO 5) has a fixed length. The servers fill it, the rest keep the BMC's empty value, and more servers than slots are refused before the PATCH. An array without placeholders gets exactly the servers. A BMC that wants something else answers with an error, and that error becomes the step's output.
Servers the BMC already uses (case-insensitive, same order) are not written again.
get_ntp_servers() now also reports none while NTP is off, consistent with get_time_sync().
bmc: time sync goes over Redfish only. Over IPMI the read raises NotImplementedError and the write fails its step, naming Redfish.
RedfishTransport.patch(ref, body, etag=None). The method dispatch moved out of _request (complexity 14 → 13, baseline lowered).
napalm-device-types>=4.35.0. docs/redfish-map.md and the CHANGELOG are updated. The test MockupServer also serves PATCH and takes callbacks (answer).
Second commit, fix(tests): textfsm 2.1.1 (released 2026-11-10 and installed through napalm) puts a top-level package tests into site-packages. That package shadowed this repo's tests directory, so from tests.conftest import ... failed and every CI test job failed, main included. The helpers are now imported as conftest and test_ipmi, the way test_driver.py already did.
pytest: 269 passed, coverage 94.6% (floor 94). The new tests/test_time_sync.py runs against the DMTF rackmount mockup, with the public-telemetry mockup's NTP block and with the fixed-slot shapes iDRAC and iLO use, which a callback PATCHes in place for verify. tests/test_transport.py covers PATCH with and without an ETag, and a 412.
ruff format, ruff check, mypy, napalm-standard check and ratchet, and bandit are clean.
Not run against a BMC.
## Summary
The `redfish` and `bmc` drivers take part in netOrk's time sync (NetOrk/netork#2360) through napalm-device-types' `TimeSyncMixin`, over `Managers/{id}/NetworkProtocol`. `ipmi` has no NTP settings and does not offer it.
## Changes
- `get_time_sync()`: `NTP.NTPServers` in the BMC's order, with empty slots dropped. While `NTP.ProtocolEnabled` is false the servers are not in use and read as none. `timezone` is the manager's `TimeZoneName` (Manager v1.10) where that is an IANA zone, else `None`, because `DateTimeLocalOffset` is an offset and not a zone. `synchronized` and `daemon` are `None`. A `NetworkProtocol` without an `NTP` block (the Supermicro X10's `v1_0_0`) raises `RedfishError`, so netOrk does not try to write a BMC that cannot take it.
- `configure_time_sync(ntp_servers=[...])`: `PATCH NetworkProtocol` with `{"NTP": {"NTPServers": [...]}}`, plus `"ProtocolEnabled": true` where NTP is off. The resource's `@odata.etag` goes along as `If-Match`, so a change made on the BMC in between is refused (412) instead of overwritten. `time_sync_writes` is `{"ntp_servers"}`.
- Array length: an array that shows empty slots (`""` or null; three on an iDRAC 9, two on an iLO 5) has a fixed length. The servers fill it, the rest keep the BMC's empty value, and more servers than slots are refused before the PATCH. An array without placeholders gets exactly the servers. A BMC that wants something else answers with an error, and that error becomes the step's output.
- Servers the BMC already uses (case-insensitive, same order) are not written again.
- `get_ntp_servers()` now also reports none while NTP is off, consistent with `get_time_sync()`.
- `bmc`: time sync goes over Redfish only. Over IPMI the read raises `NotImplementedError` and the write fails its step, naming Redfish.
- `RedfishTransport.patch(ref, body, etag=None)`. The method dispatch moved out of `_request` (complexity 14 → 13, baseline lowered).
- `napalm-device-types>=4.35.0`. `docs/redfish-map.md` and the CHANGELOG are updated. The test `MockupServer` also serves PATCH and takes callbacks (`answer`).
- Second commit, `fix(tests)`: textfsm 2.1.1 (released 2026-11-10 and installed through napalm) puts a top-level package `tests` into site-packages. That package shadowed this repo's `tests` directory, so `from tests.conftest import ...` failed and every CI test job failed, `main` included. The helpers are now imported as `conftest` and `test_ipmi`, the way `test_driver.py` already did.
## Related Issue
Part of NetOrk/netork#2367 (epic NetOrk/netork#2360)
## Testing
- `pytest`: 269 passed, coverage 94.6% (floor 94). The new `tests/test_time_sync.py` runs against the DMTF rackmount mockup, with the public-telemetry mockup's NTP block and with the fixed-slot shapes iDRAC and iLO use, which a callback PATCHes in place for `verify`. `tests/test_transport.py` covers PATCH with and without an ETag, and a 412.
- `ruff format`, `ruff check`, `mypy`, `napalm-standard check` and `ratchet`, and `bandit` are clean.
- Not run against a BMC.
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
textfsm 2.1.1 (2026-11-10, through napalm) installs a top-level package
"tests" into site-packages. It shadows this repo's tests directory, which
is no package, so "from tests.conftest import ..." found textfsm's and
test_bmc_driver.py and test_x10_redfish.py failed to import: every test
run on CI fails since that release, main included.
The helpers are imported as conftest and test_ipmi, the way
test_driver.py already does; pytest puts tests/ on the path for them.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
The
redfishandbmcdrivers take part in netOrk's time sync (NetOrk/netork#2360) through napalm-device-types'TimeSyncMixin, overManagers/{id}/NetworkProtocol.ipmihas no NTP settings and does not offer it.Changes
get_time_sync():NTP.NTPServersin the BMC's order, with empty slots dropped. WhileNTP.ProtocolEnabledis false the servers are not in use and read as none.timezoneis the manager'sTimeZoneName(Manager v1.10) where that is an IANA zone, elseNone, becauseDateTimeLocalOffsetis an offset and not a zone.synchronizedanddaemonareNone. ANetworkProtocolwithout anNTPblock (the Supermicro X10'sv1_0_0) raisesRedfishError, so netOrk does not try to write a BMC that cannot take it.configure_time_sync(ntp_servers=[...]):PATCH NetworkProtocolwith{"NTP": {"NTPServers": [...]}}, plus"ProtocolEnabled": truewhere NTP is off. The resource's@odata.etaggoes along asIf-Match, so a change made on the BMC in between is refused (412) instead of overwritten.time_sync_writesis{"ntp_servers"}.Array length: an array that shows empty slots (
""or null; three on an iDRAC 9, two on an iLO 5) has a fixed length. The servers fill it, the rest keep the BMC's empty value, and more servers than slots are refused before the PATCH. An array without placeholders gets exactly the servers. A BMC that wants something else answers with an error, and that error becomes the step's output.Servers the BMC already uses (case-insensitive, same order) are not written again.
get_ntp_servers()now also reports none while NTP is off, consistent withget_time_sync().bmc: time sync goes over Redfish only. Over IPMI the read raisesNotImplementedErrorand the write fails its step, naming Redfish.RedfishTransport.patch(ref, body, etag=None). The method dispatch moved out of_request(complexity 14 → 13, baseline lowered).napalm-device-types>=4.35.0.docs/redfish-map.mdand the CHANGELOG are updated. The testMockupServeralso serves PATCH and takes callbacks (answer).Second commit,
fix(tests): textfsm 2.1.1 (released 2026-11-10 and installed through napalm) puts a top-level packagetestsinto site-packages. That package shadowed this repo'stestsdirectory, sofrom tests.conftest import ...failed and every CI test job failed,mainincluded. The helpers are now imported asconftestandtest_ipmi, the waytest_driver.pyalready did.Related Issue
Part of NetOrk/netork#2367 (epic NetOrk/netork#2360)
Testing
pytest: 269 passed, coverage 94.6% (floor 94). The newtests/test_time_sync.pyruns against the DMTF rackmount mockup, with the public-telemetry mockup's NTP block and with the fixed-slot shapes iDRAC and iLO use, which a callback PATCHes in place forverify.tests/test_transport.pycovers PATCH with and without an ETag, and a 412.ruff format,ruff check,mypy,napalm-standard checkandratchet, andbanditare clean.