feat: fix routines as templates with the caller's values; deprecate run_device_action (4.13.0)
CI / test (3.10) (push) Successful in 34s
CI / test (3.11) (push) Successful in 31s
CI / test (3.12) (push) Successful in 31s
CI / test (3.13) (push) Successful in 27s
CI / test (3.10) (pull_request) Successful in 27s
CI / test (3.11) (pull_request) Successful in 28s
CI / test (3.12) (pull_request) Successful in 28s
CI / test (3.13) (pull_request) Successful in 27s
CI / test (3.10) (push) Successful in 34s
CI / test (3.11) (push) Successful in 31s
CI / test (3.12) (push) Successful in 31s
CI / test (3.13) (push) Successful in 27s
CI / test (3.10) (pull_request) Successful in 27s
CI / test (3.11) (pull_request) Successful in 28s
CI / test (3.12) (pull_request) Successful in 28s
CI / test (3.13) (pull_request) Successful in 27s
run_device_action was a string dispatch drivers filled with an application's remediations, values hard-coded inside (community "public", the caller's address, a /24 firewall rule). napalm_device_types.fixes declares them as templates instead. A template runs declared steps in order and stops at the first failure (run_fix_steps); the driver implements the steps, or overrides the whole method where its device takes the change in one call; every value comes from the caller. - SnmpAgentMixin.configure_snmp_agent(settings): install, configure, firewall, start. The caller verifies with its own SNMP client. get_management_peer() (optional) says the address the device sees the management connection come from, for choosing allowed_sources. - EnsurePackageMixin.ensure_package(name): install only what is missing. - PackageProxyMixin.configure_package_proxy(url): declared. - ContainerEngineMixin.grant_container_engine_access(user): declared. None is mixed into a role base, so a capability check stays truthful. Closes #33
This commit is contained in:
1 parent
b4c4ec0b0b
commit
9324a5b8f1
8 files changed
+398
-2
No files matched your search
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "napalm-device-types"
|
||||
version = "4.12.0"
|
||||
version = "4.13.0"
|
||||
description = "Abstract device-type base classes for NAPALM drivers"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
|
||||
Reference in new issue
Block a user