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.3 or later
- PostgreSQL 12 or later
Installation
Brief installation instructions are provided below. For a complete installation guide, please refer to the included documentation.
- Grant PostgreSQL permission for the NetBox database user to create schemas:
GRANT CREATE ON DATABASE $database TO $user;
- Activate the NetBox virtual environment:
$ source /opt/netbox/venv/bin/activate
- Install the plugin from PyPI:
$ pip install netboxlabs-netbox-branching
- Add
netbox_branchingto the end ofPLUGINSinconfiguration.py. Note thatnetbox_branchingMUST be the last plugin listed.
PLUGINS = [
# ...
'netbox_branching',
]
- 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',
]
- Run NetBox migrations:
$ ./manage.py migrate
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netboxlabs_netbox_branching-0.6.1.tar.gz.
File metadata
- Download URL: netboxlabs_netbox_branching-0.6.1.tar.gz
- Upload date:
- Size: 39.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0018882f7193e7072c9f2e9eaef074828b92bcd6ad7c814b8e6301b495f58bad
|
|
| MD5 |
0b21d6d0b37face141d506401bb37e7a
|
|
| BLAKE2b-256 |
bdfaaf739af8802ccd7b998c6aa046b8bceb097ce2060d17c9817a0ace9d6e0a
|
Provenance
The following attestation bundles were made for netboxlabs_netbox_branching-0.6.1.tar.gz:
Publisher:
release.yaml on netboxlabs/netbox-branching
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netboxlabs_netbox_branching-0.6.1.tar.gz -
Subject digest:
0018882f7193e7072c9f2e9eaef074828b92bcd6ad7c814b8e6301b495f58bad - Sigstore transparency entry: 326065902
- Sigstore integration time:
-
Permalink:
netboxlabs/netbox-branching@a344502b1e45687ae5140d5e086a08ac3d533f20 -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/netboxlabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@a344502b1e45687ae5140d5e086a08ac3d533f20 -
Trigger Event:
release
-
Statement type:
File details
Details for the file netboxlabs_netbox_branching-0.6.1-py3-none-any.whl.
File metadata
- Download URL: netboxlabs_netbox_branching-0.6.1-py3-none-any.whl
- Upload date:
- Size: 56.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e6cc0c9aace2659987549e914a87daabca06e7ea0f0108e20fa1ad1766d1aef
|
|
| MD5 |
d1c18df3dc1dfe6814dabda20c06f6a5
|
|
| BLAKE2b-256 |
abc86071b19e335c50c029b0540763cb845094297dc04161f2cd1bcccba32d82
|
Provenance
The following attestation bundles were made for netboxlabs_netbox_branching-0.6.1-py3-none-any.whl:
Publisher:
release.yaml on netboxlabs/netbox-branching
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netboxlabs_netbox_branching-0.6.1-py3-none-any.whl -
Subject digest:
4e6cc0c9aace2659987549e914a87daabca06e7ea0f0108e20fa1ad1766d1aef - Sigstore transparency entry: 326065916
- Sigstore integration time:
-
Permalink:
netboxlabs/netbox-branching@a344502b1e45687ae5140d5e086a08ac3d533f20 -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/netboxlabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@a344502b1e45687ae5140d5e086a08ac3d533f20 -
Trigger Event:
release
-
Statement type: