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

Merged
christianmanivong merged 1 commits from fix/no-config-replace into main 2026-11-13 21:39:08 +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.

test_load_replace_candidate_raises in tests/test_zyxel.py is replaced by the new test; the merge stub keeps its own test.

  • 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. `test_load_replace_candidate_raises` in `tests/test_zyxel.py` is replaced by the new test; the merge stub keeps its own test. - `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:45 +00:00
fix(driver): load_replace_candidate is None, not a stub that raises (NetOrk/netork#2503)
driver / standard (pull_request) Successful in 16s
driver / lint (pull_request) Successful in 11s
driver / test (3.12) (pull_request) Successful in 49s
driver / types (pull_request) Successful in 51s
driver / test (3.13) (pull_request) Successful in 45s
driver / lowest (pull_request) Successful in 22s
driver / build (pull_request) Successful in 26s
driver / security (pull_request) Successful in 56s
CI / driver (pull_request) Successful in 2m13s
driver / publish (pull_request) Skipped
a37802cf88
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 merged commit 06ece68de6 into main 2026-11-13 21:39:08 +00:00
christianmanivong deleted branch fix/no-config-replace 2026-11-13 21:39:08 +00:00
Sign in to join this conversation.