Add netbox_rack_concept plugin: rack blueprint planning

Introduces a NetBox 4.6 plugin for planning rack layouts (RackConcept,
ConceptDevice) without creating real dcim.Rack/dcim.Device objects, so
blueprints never appear in rack/device lists, utilization reports, or
IPAM.

Features:
- Copy paths: real rack -> concept, concept -> concept (clone), and
  concept -> one or more real racks (deploy, with name patterning and
  dry-run support)
- Manual concept creation via a dedicated "Rack Concepts" nav menu
- Tenant and tenant group assignment on concepts and planned devices
- Partial-width device placement (1/1-1/4) with slot-based collision
  detection, matching netbox_utilities' partial-width feature
- Custom drag-and-drop elevation (netbox-reorder-rack operates on real
  Device querysets, which concepts don't have) with server-side
  validation of every move
- Full REST API, filtering, CSV import, bulk edit, search integration
- Optional, config-driven interop with netbox_utilities (partial-width
  field mapping) and netbox-reorder-rack, degrading gracefully when
  either plugin is absent

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-16 09:00:26 +02:00
co-authored by Claude Sonnet 5
commit 17cf94ac0d
34 changed files with 3821 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
from netbox.plugins import PluginConfig
__version__ = '0.1.0'
class RackConceptConfig(PluginConfig):
name = 'netbox_rack_concept'
verbose_name = 'Rack Concepts'
description = 'Rack blueprints: plan racks and their equipment without creating real racks or devices'
version = __version__
author = 'Louis'
base_url = 'rack-concepts'
min_version = '4.6.0'
max_version = '4.6.99'
menu = 'netbox_rack_concept.navigation.menu'
template_extensions = 'netbox_rack_concept.template_content.template_extensions'
default_settings = {
# Defaults used when a concept is created from scratch.
'default_u_height': 42,
'default_width': 19,
# Show the "Copy to concept" button on the dcim.Rack detail page.
'enable_rack_tab': True,
# Status assigned to the objects created when a concept is deployed.
'deployed_rack_status': 'planned',
'deployed_device_status': 'planned',
# Mapping onto the partial-width implementation of netbox_utilities.
# Adjust these if that plugin renames its fields; set 'enabled' to False
# to never write partial-width data during deployment.
'partial_width': {
'enabled': True,
'model': 'netbox_utilities.RackDevicePosition',
'device_field': 'device',
'fraction_field': 'width_fraction',
'position_field': 'horizontal_position',
},
}
def ready(self):
super().ready()
from . import search # noqa: F401
config = RackConceptConfig