feat: report the virtual IPs vip-manager and keepalived declare
CI / test (3.10) (pull_request) Successful in 43s
CI / test (3.11) (pull_request) Successful in 53s
CI / test (3.12) (pull_request) Successful in 53s
CI / test (3.10) (push) Successful in 44s
CI / test (3.11) (push) Successful in 40s
CI / test (3.12) (push) Successful in 38s

LinuxDriver mixes in napalm-device-types' VirtualIpsMixin (4.2.0) and
carries its command on the exec channel: with the awk filter it is about
4 kB, past the line the PTY netmiko holds reliably takes. Root first,
then without it (NetOrk/netork#829).

Version 0.4.0.
This commit is contained in:
Christian Manivong
2026-10-08 12:38:03 +02:00
parent 3a76b6d47f
commit a78daccb56
4 changed files with 121 additions and 2 deletions
+11
View File
@@ -44,6 +44,7 @@ from napalm_device_types import (
OSDriver,
SystemdServicesMixin,
SystemdUnavailable,
VirtualIpsMixin,
parse_apt_upgradable,
open_stream_on_transport,
parse_dnf_security,
@@ -206,6 +207,7 @@ def _arm_vendor_from_model(model: str) -> str:
class LinuxDriver(
KernelFactsMixin,
ListeningSocketsMixin,
VirtualIpsMixin,
SystemdServicesMixin,
HostStatusMixin,
ContainerEngineMixin,
@@ -1022,6 +1024,15 @@ class LinuxDriver(
return self._run_privileged(command, 60)
return self._send(command, read_timeout=60)
def _run_virtual_ips_command(self, command: str, *, privileged: bool) -> str:
"""The transport for ``VirtualIpsMixin.get_virtual_ips``: an exec channel.
The command carries its awk program and is about 4 kB, past the line the
PTY netmiko holds reliably takes. Read-only either way; root only because
the configuration may be root's alone.
"""
return self.run_command(command, privileged=privileged, timeout=60).stdout
# ------------------------------------------------------------------
# OSDriver – package management
# ------------------------------------------------------------------