feat: CPU & RAM per server with a catalogue of Intel and AMD server CPUs

Devices get a CPU & RAM panel: CPU model from a built-in catalogue of
over 700 Intel Xeon and AMD Opteron/EPYC server CPUs since 2012 (cores,
threads, base/turbo clock, TDP, socket, year, max sockets; checked against
Intel ARK, AMD and server vendor data), CPU count and RAM with modules,
type and speed. The catalogue is loaded by migration 0011, can be edited
and extended in the UI and refreshed with netbox_utilities_cpu_catalog.

Virtualization: clusters show their capacity (cores, threads and RAM of
the hosts against the vCPUs and memory of the VMs, vCPU:core ratio, RAM
allocation, N+1 reserve) with a per-host table, hosts list their VMs and
VMs show the CPU of their host. Optional columns for the device and
cluster lists, CSV import, REST API, GraphQL and search are included.
The plugin menu is now called "Hardware".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
MrBlakeandClaude Opus 5.5 committed 2026-10-29 10:53:36 +01:00
1 parent 8396b7c64a
commit c8b581089c
31 files changed
+2849 -17

No files matched your search

+47
View File
@@ -21,6 +21,7 @@ from .navigation_helpers import (
)
from .runtime import (
connection_vlans_enabled,
hardware_enabled,
navigation_customization_enabled,
offline_svg_export_enabled,
tenant_filter_enabled,
@@ -110,6 +111,9 @@ class DeviceUtilitiesContent(PluginTemplateExtension):
return self.render("netbox_utilities/device_bulk_module_button.html")
def right_page(self):
return self._hardware_panel() + self._rack_width_panel()
def _rack_width_panel(self):
placement = DeviceRackPlacement.objects.filter(device=self.context["object"]).first()
if placement is None:
return ""
@@ -121,6 +125,47 @@ class DeviceUtilitiesContent(PluginTemplateExtension):
},
)
def _hardware_panel(self):
request, device = self.context["request"], self.context["object"]
if not hardware_enabled() or not request.user.has_perm("netbox_utilities.view_devicehardware"):
return ""
from . import hardware
from .hardware_views import device_hardware_context
context = device_hardware_context(request, device)
if context["record"] is None and not hardware.supports_hardware(device):
return ""
return self.render("netbox_utilities/device_hardware_panel.html", context)
class ClusterHardwareContent(PluginTemplateExtension):
models = ["virtualization.cluster"]
def full_width_page(self):
request = self.context["request"]
if not hardware_enabled() or not request.user.has_perm("netbox_utilities.view_devicehardware"):
return ""
from .hardware_views import cluster_capacity_context
return self.render(
"netbox_utilities/cluster_capacity_panel.html", cluster_capacity_context(request, self.context["object"])
)
class VirtualMachineHardwareContent(PluginTemplateExtension):
models = ["virtualization.virtualmachine"]
def right_page(self):
request = self.context["request"]
if not hardware_enabled() or not request.user.has_perm("netbox_utilities.view_devicehardware"):
return ""
from .hardware_views import vm_host_context
vm = self.context["object"]
if vm.device_id is None and vm.cluster_id is None:
return ""
return self.render("netbox_utilities/vm_host_panel.html", vm_host_context(request, vm))
class ConnectionVLANContent(PluginTemplateExtension):
models = ["dcim.cable", "wireless.wirelesslink"]
@@ -174,4 +219,6 @@ template_extensions = [
DeviceUtilitiesContent,
ConnectionVLANContent,
RackUtilitiesContent,
ClusterHardwareContent,
VirtualMachineHardwareContent,
]