feat(hardening): install_cpu_microcode through CpuMicrocodeMixin, 0.24.0 (NetOrk/netork#2838)
driver / lint (pull_request) Successful in 16s
driver / standard (pull_request) Successful in 22s
driver / lowest (pull_request) Successful in 36s
driver / types (pull_request) Successful in 59s
driver / test (3.12) (pull_request) Successful in 58s
driver / build (pull_request) Successful in 25s
driver / test (3.13) (pull_request) Successful in 1m11s
driver / security (pull_request) Successful in 1m22s
CI / driver (pull_request) Successful in 2m20s
driver / publish (pull_request) Skipped
driver / lint (pull_request) Successful in 16s
driver / standard (pull_request) Successful in 22s
driver / lowest (pull_request) Successful in 36s
driver / types (pull_request) Successful in 59s
driver / test (3.12) (pull_request) Successful in 58s
driver / build (pull_request) Successful in 25s
driver / test (3.13) (pull_request) Successful in 1m11s
driver / security (pull_request) Successful in 1m22s
CI / driver (pull_request) Successful in 2m20s
driver / publish (pull_request) Skipped
LinuxHardeningMixin carries napalm-device-types' CpuMicrocodeMixin (4.53.0): the CPU vendor's microcode on a host that runs on its own CPU, Debian's firmware component added to Debian's sources first. OpenMediaVault and QNAP inherit it; QNAP's os IDs name no package, so it refuses there.
This commit is contained in:
1 parent
8b09d5a713
commit
3e41122dfe
5 files changed
+82
-5
No files matched your search
@@ -1,5 +1,9 @@
|
||||
"""How the host is hardened: napalm-device-types' ``HardeningMixin`` (NetOrk/netork#2706).
|
||||
|
||||
With it ``CpuMicrocodeMixin``, the one fix the reading leads to: the CPU vendor's
|
||||
microcode on a host that runs on its own CPU, over the driver's ``ensure_package``,
|
||||
apt transports and ``refresh_available_updates``.
|
||||
|
||||
The command and its parse are napalm-device-types'; this is only how the command
|
||||
reaches the host. An exec channel, since ``aa-status --json`` prints one line longer
|
||||
than the PTY netmiko holds reliably takes. Read-only either way; root only for
|
||||
@@ -10,14 +14,14 @@ from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from napalm_device_types import CommandResult, HardeningMixin
|
||||
from napalm_device_types import CommandResult, CpuMicrocodeMixin, HardeningMixin
|
||||
|
||||
#: Seconds the reading may take: a handful of small files and two quick tools.
|
||||
_READ_TIMEOUT = 60
|
||||
|
||||
|
||||
class LinuxHardeningMixin(HardeningMixin):
|
||||
"""The transport for ``get_hardening``."""
|
||||
class LinuxHardeningMixin(HardeningMixin, CpuMicrocodeMixin):
|
||||
"""The transport for ``get_hardening``, and ``install_cpu_microcode``."""
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover - the driver's own, declared for type checkers
|
||||
|
||||
|
||||
Reference in new issue
Block a user