feat(updates): the update history before PVE 9.3 from apt's log over SSH (NetOrk/netork#2728)

Below 9.3 get_update_history reads apt's history log over the node's SSH session
with napalm-device-types' AptHistoryMixin, which names a transaction as
GET /nodes/{node}/apt/history does, so the ids stay when the node moves to 9.3.
A node without an SSH login still raises NotImplementedError. Requires
napalm-device-types 4.47.0.
This commit is contained in:
Christian Manivong committed 2026-11-26 23:07:22 +01:00
1 parent dc0d6345a8
commit 707b24748b
5 files changed
+123 -17

No files matched your search

+4
View File
@@ -251,6 +251,10 @@ class ProxmoxBase:
f"Cannot run a command on {self.hostname} over SSH: {exc}"
) from exc
def _has_ssh_login(self) -> bool:
"""Whether the driver has something to log in to the node's SSH with."""
return bool(self._ssh_password or self.password or self._ssh_key)
def _node_ssh(self) -> Any: # paramiko.SSHClient; paramiko is imported lazily
"""The SSH session to the node on port 22, opened once.