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.

See the compatibility matrix for supported NetBox versions.

[!TIP] To use NetBox Branching with NetBox Docker, click here

Installation

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

  1. Grant PostgreSQL permission for the NetBox database user to create schemas:
GRANT CREATE ON DATABASE $database TO $user;
  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. Configure the database and router in configuration.py:
from netbox_branching.utilities import DynamicSchemaDict

DATABASES = DynamicSchemaDict({
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'netbox',               # Database name
        'USER': 'netbox',               # PostgreSQL username
        'PASSWORD': 'password',         # PostgreSQL password
        'HOST': 'localhost',            # Database server
        'PORT': '',                     # Database port (leave blank for default)
        'CONN_MAX_AGE': 300,            # Max database connection age
    }
})

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-1.0.5.tar.gz (77.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netboxlabs_netbox_branching-1.0.5-py3-none-any.whl (103.0 kB view details)

Uploaded Python 3

File details

Details for the file netboxlabs_netbox_branching-1.0.5.tar.gz.

File metadata

File hashes

Hashes for netboxlabs_netbox_branching-1.0.5.tar.gz
Algorithm Hash digest
SHA256 e4b1658fd69ba18b49a16ed78a4ee98c19b1aae21221aaee48c5ddb782055d65
MD5 ae82306fba8a09b94f3f23066fb679ff
BLAKE2b-256 99b5aeef3e537b1370e84614b205f70a5d9110be33cd4f3890115528c491974e

See more details on using hashes here.

Provenance

The following attestation bundles were made for netboxlabs_netbox_branching-1.0.5.tar.gz:

Publisher: release.yaml on netboxlabs/netbox-branching

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file netboxlabs_netbox_branching-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for netboxlabs_netbox_branching-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cf6f4ee87456a9019c979799a0f5c54b1f5a601bc9a228ac0a3c6c71faeec367
MD5 fd0e2fc7c98b66ca0c76fab766b0f9a8
BLAKE2b-256 b1cb30ae6e7101bbd62cf68f0d877a144622af7d63b1e5964f5ae7b26b28c909

See more details on using hashes here.

Provenance

The following attestation bundles were made for netboxlabs_netbox_branching-1.0.5-py3-none-any.whl:

Publisher: release.yaml on netboxlabs/netbox-branching

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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