fix(driver): load_replace_candidate is None, not a stub that raises (NetOrk/netork#2503) #81

Merged
christianmanivong merged 2 commits from fix/no-config-replace into main 2026-11-13 21:39:04 +00:00
Owner

For NetOrk/netork#2503 (netOrk PR NetOrk/netork#2510).

The driver cannot replace a device's configuration and said so with a load_replace_candidate that raised NotImplementedError. A method that only raises still looks like a replace to anyone who asks whether the driver has one, so netOrk offered a config restore for these devices that could only fail.

load_replace_candidate = None is how a driver switches off a method (napalm-device-types' convention, which netOrk's capability checks follow), so asking now says no. Nothing in the driver or in netOrk calls it directly except netOrk's restore, which asks first.

napalm-openmediavault and napalm-qnap-qts inherit from this driver and define no load_replace_candidate of their own, so they get None too, which is right for them as well.

  • tests/test_config_replace.py (new, written first): the class has no callable load_replace_candidate.
  • README and CHANGELOG (Unreleased → Changed).
For NetOrk/netork#2503 (netOrk PR NetOrk/netork#2510). The driver cannot replace a device's configuration and said so with a `load_replace_candidate` that raised `NotImplementedError`. A method that only raises still looks like a replace to anyone who asks whether the driver has one, so netOrk offered a config restore for these devices that could only fail. `load_replace_candidate = None` is how a driver switches off a method (napalm-device-types' convention, which netOrk's capability checks follow), so asking now says no. Nothing in the driver or in netOrk calls it directly except netOrk's restore, which asks first. napalm-openmediavault and napalm-qnap-qts inherit from this driver and define no `load_replace_candidate` of their own, so they get `None` too, which is right for them as well. - `tests/test_config_replace.py` (new, written first): the class has no callable `load_replace_candidate`. - README and CHANGELOG (Unreleased → Changed).
christianmanivong added 1 commit 2026-11-13 20:45:43 +00:00
fix(driver): load_replace_candidate is None, not a stub that raises (NetOrk/netork#2503)
driver / lint (pull_request) Successful in 19s
driver / standard (pull_request) Failing after 27s
driver / types (pull_request) Successful in 3m34s
driver / test (3.13) (pull_request) Successful in 3m12s
driver / test (3.12) (pull_request) Successful in 3m23s
driver / lowest (pull_request) Successful in 35s
driver / build (pull_request) Successful in 35s
driver / security (pull_request) Successful in 1m15s
CI / driver (pull_request) Failing after 4m54s
driver / publish (pull_request) Skipped
c9a9d532aa
The driver cannot replace a device's configuration, and said so with a
load_replace_candidate that raised NotImplementedError. A method that only
raises still looks like a replace to anyone who asks whether the driver has
one: netOrk offered a config restore for these devices that could only fail.

None is how a driver switches off a method, the convention netOrk's
capability checks and napalm-device-types follow, so asking now says no.
Nothing in the driver calls it.
christianmanivong added 1 commit 2026-11-13 20:50:25 +00:00
style: one comment line, so linux.py keeps its recorded length
driver / standard (pull_request) Successful in 15s
driver / lint (pull_request) Successful in 12s
driver / types (pull_request) Successful in 55s
driver / test (3.12) (pull_request) Successful in 55s
driver / test (3.13) (pull_request) Successful in 50s
driver / lowest (pull_request) Successful in 27s
driver / build (pull_request) Successful in 27s
driver / security (pull_request) Successful in 56s
CI / driver (pull_request) Successful in 2m18s
driver / publish (pull_request) Skipped
de91b1a918
christianmanivong merged commit 4db8b05ab4 into main 2026-11-13 21:39:04 +00:00
christianmanivong deleted branch fix/no-config-replace 2026-11-13 21:39:04 +00:00
Sign in to join this conversation.