feat: get_system_identity for matching a host to its BMC (0.7.0)
Mixes in napalm-device-types 4.9's SystemIdentityMixin: the host's SMBIOS system UUID, product serial and board serial, read as root on an exec channel, vendor placeholders empty. netOrk links a server's BMC to the host on these.
This commit is contained in:
1 parent
350e3a6d6e
commit
c98dd928e6
4 files changed
+49
-2
No files matched your search
@@ -43,6 +43,7 @@ from napalm_device_types import (
|
||||
ListeningSocketsMixin,
|
||||
OpenSshServerMixin,
|
||||
OSDriver,
|
||||
SystemIdentityMixin,
|
||||
SystemdServicesMixin,
|
||||
SystemdUnavailable,
|
||||
VirtualIpsMixin,
|
||||
@@ -245,6 +246,7 @@ class LinuxDriver(
|
||||
KernelFactsMixin,
|
||||
ListeningSocketsMixin,
|
||||
VirtualIpsMixin,
|
||||
SystemIdentityMixin,
|
||||
OpenSshServerMixin,
|
||||
SystemdServicesMixin,
|
||||
HostStatusMixin,
|
||||
@@ -1131,6 +1133,11 @@ class LinuxDriver(
|
||||
"""
|
||||
return self.run_command(command, privileged=privileged, timeout=60).stdout
|
||||
|
||||
def _run_system_identity_command(self, command: str, *, privileged: bool) -> str:
|
||||
"""The transport for ``SystemIdentityMixin.get_system_identity``: an exec channel,
|
||||
as root, since ``product_uuid`` and ``product_serial`` are root's."""
|
||||
return self.run_command(command, privileged=privileged, timeout=30).stdout
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# OSDriver – package management
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user