Merge pull request 'docs: no services restart reading on OpenWrt, and a test that keeps it so (NetOrk/netork#2750)' (#52) from docs/no-services-restart into main
driver / standard (push) Successful in 19s
driver / lint (push) Successful in 18s
driver / types (push) Successful in 1m4s
driver / test (3.13) (push) Successful in 57s
driver / test (3.12) (push) Successful in 1m14s
driver / lowest (push) Successful in 33s
driver / build (push) Successful in 36s
driver / security (push) Successful in 1m7s
CI / driver (push) Successful in 2m54s
driver / publish (push) Skipped
driver / standard (push) Successful in 19s
driver / lint (push) Successful in 18s
driver / types (push) Successful in 1m4s
driver / test (3.13) (push) Successful in 57s
driver / test (3.12) (push) Successful in 1m14s
driver / lowest (push) Successful in 33s
driver / build (push) Successful in 36s
driver / security (push) Successful in 1m7s
CI / driver (push) Successful in 2m54s
driver / publish (push) Skipped
This commit was merged in pull request #52.
This commit is contained in:
commit
ecf8c427fc
2 files changed
+17
No files matched your search
@@ -72,6 +72,7 @@ device.close()
|
|||||||
| `get_ntp_servers` / `get_ntp_peers` | ✅ | `system.ntp.server` in UCI, every server of the list; none while `system.ntp.enabled` is off -- the same list as `get_time_sync()` |
|
| `get_ntp_servers` / `get_ntp_peers` | ✅ | `system.ntp.server` in UCI, every server of the list; none while `system.ntp.enabled` is off -- the same list as `get_time_sync()` |
|
||||||
| `get_time_sync()` | ✅ | napalm-device-types `TimeSyncMixin`: the servers as above, the zone from `zonename` where the rule in `timezone` is that zone's (else the one zone with that rule, or none); `synchronized` is not readable (None) |
|
| `get_time_sync()` | ✅ | napalm-device-types `TimeSyncMixin`: the servers as above, the zone from `zonename` where the rule in `timezone` is that zone's (else the one zone with that rule, or none); `synchronized` is not readable (None) |
|
||||||
| `get_firmware_offer()` | ✅ | napalm-device-types `FirmwareOfferMixin`: the newest release of the device's own line on the attended sysupgrade server (see *Firmware upgrade*) |
|
| `get_firmware_offer()` | ✅ | napalm-device-types `FirmwareOfferMixin`: the newest release of the device's own line on the attended sysupgrade server (see *Firmware upgrade*) |
|
||||||
|
| `get_services_need_restart()` | ❌ | deliberately not offered (NetOrk/netork#2750): an upgrade writes the new files to the overlay while the old ones stay in the read-only image, and `/proc/<pid>/maps` can name those by their `/rom` or `/overlay/upper` path rather than as deleted (Linux before 6.8 shows an overlay file's real path). napalm-device-types' `/proc` scan could then read clean exactly after an upgrade; without the method the caller shows the reading as not made. A reading of OpenWrt's own is #51 |
|
||||||
|
|
||||||
## Configuration management
|
## Configuration management
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
"""No ``get_services_need_restart`` on OpenWrt (NetOrk/netork#2750).
|
||||||
|
|
||||||
|
napalm-device-types' ``ServicesRestartMixin`` finds replaced code as deleted files in
|
||||||
|
``/proc/<pid>/maps``. On OpenWrt an upgrade leaves the old files in the read-only image,
|
||||||
|
and the kernel can name them by their ``/rom`` or ``/overlay/upper`` path (Linux
|
||||||
|
before 6.8 shows an overlay file's real path), so that scan could read clean right
|
||||||
|
after an upgrade. The driver does not offer it,
|
||||||
|
and the caller shows the reading as not made.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from napalm_openwrt.openwrt import OpenWrtDriver
|
||||||
|
|
||||||
|
|
||||||
|
def test_it_is_not_offered():
|
||||||
|
assert not hasattr(OpenWrtDriver, "get_services_need_restart")
|
||||||
|
assert not hasattr(OpenWrtDriver, "_run_services_restart_command")
|
||||||
Reference in new issue
Block a user