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

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.
This commit is contained in:
Christian Manivong committed 2026-11-13 21:45:23 +01:00
1 parent 5f6595d160
commit c9a9d532aa
4 files changed
+25 -3

No files matched your search

+3 -2
View File
@@ -1009,8 +1009,9 @@ class LinuxDriver(
def load_merge_candidate(self, filename: str = None, config: str = None) -> None: # type: ignore[override]
raise NotImplementedError("Config management is not supported for Linux hosts")
def load_replace_candidate(self, filename: str = None, config: str = None) -> None: # type: ignore[override]
raise NotImplementedError("Config management is not supported for Linux hosts")
#: No config replace: switched off rather than a stub that raises, so asking
#: whether the driver has one says no (NetOrk/netork#2503).
load_replace_candidate = None # type: ignore[assignment]
def compare_config(self) -> str:
raise NotImplementedError("Config management is not supported for Linux hosts")