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

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

  • 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. - `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 15s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 50s
driver / test (3.12) (pull_request) Successful in 50s
driver / test (3.13) (pull_request) Successful in 46s
driver / lowest (pull_request) Successful in 23s
driver / build (pull_request) Successful in 27s
driver / security (pull_request) Successful in 58s
CI / driver (pull_request) Successful in 2m17s
driver / publish (pull_request) Skipped
23bc5f206a
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 d2a3f8c89d into main 2026-11-13 21:39:07 +00:00
christianmanivong deleted branch fix/no-config-replace 2026-11-13 21:39:07 +00:00
Sign in to join this conversation.