All checks were successful
Build and Push Docker Images / build (push) Successful in 6s
22 lines
922 B
Python
22 lines
922 B
Python
# =============================================================================
|
|
# NetBox Local Settings for netbox-branching plugin
|
|
# =============================================================================
|
|
# This file configures DynamicSchemaDict required by netbox-branching.
|
|
# It imports DATABASE from the NetBox Docker configuration and wraps it.
|
|
# Placed in /etc/netbox/config/ alongside configuration.py
|
|
# =============================================================================
|
|
|
|
from netbox_branching.utilities import DynamicSchemaDict
|
|
from .configuration import DATABASE
|
|
|
|
# Wrap DATABASES with DynamicSchemaDict for dynamic schema support
|
|
# This is required for netbox-branching plugin to function correctly
|
|
DATABASES = DynamicSchemaDict({
|
|
'default': DATABASE,
|
|
})
|
|
|
|
# Employ the custom database router for branch-aware queries
|
|
DATABASE_ROUTERS = [
|
|
'netbox_branching.database.BranchAwareRouter',
|
|
]
|