feat: get_system_identity for matching a node to its BMC (0.2.0)
Mixes in napalm-device-types 4.9's SystemIdentityMixin over the exec path, which runs as root: the node's SMBIOS system UUID, product serial and board serial, vendor placeholders empty. pve-dual, a Supermicro X10DRL-i, reports the product serial 0123456789; its board serial and UUID are what tie it to its BMC.
This commit is contained in:
1 parent
363f93c895
commit
98df0e21ca
5 files changed
+44
-2
No files matched your search
@@ -41,6 +41,7 @@ from napalm_device_types import (
|
||||
KernelFactsMixin,
|
||||
ListeningSocketsMixin,
|
||||
PortSpec,
|
||||
SystemIdentityMixin,
|
||||
SystemdServicesMixin,
|
||||
)
|
||||
from napalm.base.exceptions import ConnectionException
|
||||
@@ -86,6 +87,7 @@ class ProxmoxDriver(
|
||||
ProxmoxSystemMixin,
|
||||
KernelFactsMixin,
|
||||
ListeningSocketsMixin,
|
||||
SystemIdentityMixin,
|
||||
SystemdServicesMixin,
|
||||
HostStatusMixin,
|
||||
HypervisorDriver,
|
||||
|
||||
@@ -235,6 +235,11 @@ class ProxmoxSystemMixin:
|
||||
# Listening sockets (ListeningSocketsMixin supplies get_listening_sockets)
|
||||
# ------------------------------------------------------------------ #
|
||||
|
||||
def _run_system_identity_command(self, command: str, *, privileged: bool) -> str:
|
||||
"""The transport for ``SystemIdentityMixin.get_system_identity``: the exec path,
|
||||
which runs as root either way."""
|
||||
return str(self._exec_ssh_command(command))
|
||||
|
||||
def _run_listening_sockets_command(self, command: str, *, privileged: bool) -> str:
|
||||
"""The transport for ``ListeningSocketsMixin.get_listening_sockets``:
|
||||
the exec path, which runs as root either way."""
|
||||
|
||||
Reference in new issue
Block a user