Skip to main content

A git-like branching implementation for NetBox

Project description

NetBox Branching

This NetBox plugin introduces branching functionality. A branch is a discrete, static snapshot of the NetBox database which can be modified independently and later merged back into the main database. This enables users to make "offline" changes to objects within NetBox and avoid interfering with its integrity as the network source of truth. It also provides the opportunity to review changes in bulk prior to their application.

Requirements

  • NetBox v4.1 or later
  • PostgreSQL 12 or later

Installation

Brief installation instructions are provided below. For a complete installation guide, please refer to the included documentation.

  1. Activate the NetBox virtual environment:
$ source /opt/netbox/venv/bin/activate
  1. Install the plugin from PyPI:
$ pip install netboxlabs-netbox-branching
  1. Add netbox_branching to PLUGINS in configuration.py:
PLUGINS = [
    # ...
    'netbox_branching',
]
  1. Create local_settings.py to override the DATABASES & DATABASE_ROUTERS settings. This enables dynamic schema support.
from netbox_branching.utilities import DynamicSchemaDict
from .configuration import DATABASE

# Wrap DATABASES with DynamicSchemaDict for dynamic schema support
DATABASES = DynamicSchemaDict({
    'default': DATABASE,
})

# Employ our custom database router
DATABASE_ROUTERS = [
    'netbox_branching.database.BranchAwareRouter',
]
  1. Run NetBox migrations:
$ ./manage.py migrate

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netboxlabs-netbox-branching-0.3.1.tar.gz (29.4 kB view details)

Uploaded Source

File details

Details for the file netboxlabs-netbox-branching-0.3.1.tar.gz.

File metadata

File hashes

Hashes for netboxlabs-netbox-branching-0.3.1.tar.gz
Algorithm Hash digest
SHA256 dc13d9956ffe002269489aeef736a61a4c552d7c44ac288f9b2e7920403c5fd6
MD5 394815ef9213603b09b81e1ce320f8a2
BLAKE2b-256 5a79b34d2fa7313f0afb0c2bbeb97ae82e08c77163f12daa57aa1211bff01ce5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page