Project Structure
Project Structure¶
This document provides an overview of the NetBox LibreNMS Plugin's codebase organization.
Main Directories¶
netbox_librenms_plugin/— Main plugin codeviews/— Custom views for devices, mappings, VMs, etc.base/— Abstract base views for shared logic (interfaces, cables, IP addresses, VLANs)object_sync/— Per-model sync views registered as tabs on Device/VM detail pagessync/— POST-only views that apply sync changes (interfaces, cables, IP addresses, VLANs, devices)
models.py— Database modelsforms.py— Custom formstables/— Table definitions for UItemplates/— Custom templatesnetbox_librenms_plugin/— Main template directoryinc/— Shared template fragments (e.g., paginator)
api/— API serializers, views, and URLsimport_utils/— Import pipeline logic, split into focused modulesdevice_operations.py— Device validation, single-device import, filtered fetchvm_operations.py— VM creation and import logicbulk_import.py— Multi-device / bulk import orchestrationfilters.py— LibreNMS device filtering and retrievalpermissions.py— User permission checking helperscache.py— Cache key generationvirtual_chassis.py— Virtual chassis data helpers
import_validation_helpers.py— Validation state mutation during import (role/cluster/rack assignment, issue removal, status recalculation)migrations/— Django migrationsutils.py— Utility functionsnavigation.py— Menu/navigation integrationstatic/— Static assets (JS, CSS)netbox_librenms_plugin/— Plugin-specific static filesjs/— JavaScript files
tests/— Test suitedocs/— Documentation