Policy-driven change control and mandatory review for NetBox branches
change requests • policies • checks • comments
Documentation | Install | Policies | Checks | Changelog
This plugin builds on netbox-branching. A branch stages your changes; this plugin decides who must approve them and refuses the merge until they have.
The goal is change control that is policy driven: who must approve a change is decided by the objects it touches, not by whoever opened it. Around that sit two extension points, so the same gate can be driven by more than people. Pre-merge checks are pluggable, and an event fires on every status change, so a change request can call an external system, wait for a CI result, or ask a model to review the diff before anyone merges it. See writing your own checks, which includes an AI reviewer and a CI reporter.
It takes ideas from NetBox Labs change management, for policies and rules governing who must review a branch; from GitHub, for status checks that gate a merge independently of human approval and for review comments anchored to a specific change; and from Infrahub by OpsMill, for treating a proposed change as a first-class object that carries its own validation.
[!NOTE] Independent community plugin. Free, MIT licensed, not official, not certified and not endorsed by NetBox Labs. It bundles no netbox-branching code. You install that package yourself, and its own licence governs how you may use it.
No commercial support. If you need a supported product, use the NetBox Labs change management plugin.
[!WARNING] Not stable yet. The version is below 1.0. Models, settings and the REST API can still change between releases. Read the changelog before you upgrade.
How it works | Documentation | Features | Requirements | Quick install
How it works
- Someone creates a branch and makes their changes inside it, as normal for netbox-branching.
- They open a change request against that branch.
- The plugin reads which object types the branch touches and attaches every policy whose scope matches. A policy can narrow further on the values of the objects themselves. The author cannot remove them.
- Each policy contains rules. A rule says how many approvals it needs and who may give them.
- Reviewers approve, request changes, or comment. They can also comment on one specific changed object.
- Independently, the pre-merge checks named by those policies run. A required check that is not passing blocks the merge on its own.
- Once every rule is satisfied and every required check passes, the merge button appears.
- After the merge, the request is marked completed.
Two gates guard the merge and they are independent: the people gate (policies and reviews) and the machine gate (checks). A change can be approved by every reviewer and still be refused by a check.
Documentation
Full documentation is in docs/.
| Page | Covers |
|---|---|
| Installation and configuration | Requirements, installing, and every setting. |
| Policies and rules | Scoping a policy and writing rules. |
| Policy conditions | Narrowing a policy on object values. |
| Conflicts with main | What counts as a real conflict, and how to resolve one. |
| Change requests | The lifecycle, and what survives a branch deletion. |
| Reviews | Submitting reviews and commenting on individual changes. |
| Pre-merge checks | What checks are and which ship built in. |
| Writing your own checks | The registry, an AI reviewer, and reporting from CI. |
| Event rules | Firing a webhook or a script on a change request. |
| Merging, windows and auto-merge | Change windows and automatic merging. |
| Protecting main | Requiring a branch, optionally for part of NetBox only. |
| Automatic behaviours | Stale reviews, reevaluation, notifications. |
| Administration guide | Roles, the permission matrix, building policies, troubleshooting. |
| Permissions | The short reference for every permission name. |
| REST API | Every endpoint. |
| Extending this plugin | How another plugin adds content and checks. |
| Design | Why it is built this way. |
Features
| Feature | Status |
|---|---|
| Policies containing rules with a minimum approval count | Done |
| Rules naming reviewer groups and individual reviewers | Done |
| Policies attached automatically, scope-matched from the branch contents, following it as it changes, and not selectable by the author | Done |
| Policy conditions, narrowing a policy on the values of the changed objects | Done |
| Change requests with status and priority | Done |
| Reviews with approve, request changes, and comment | Done |
| Per-change comments on the branch diff, with threaded replies, in Markdown | Done |
| Merge button appears once approved | Done, on the change request and on the branch |
| Status set to completed after a successful merge | Done |
Pre-merge gate, enforced regardless of protect_main |
Done |
protect_main blocks direct edits outside a branch, optionally scoped |
Done, with a bypass permission |
| Stale review detection when the branch changes | Done |
| Approval invalidation when the branch changes after approval | Done |
| Policy reevaluation on rule, reviewer or group membership change | Done |
| Real conflicts with main, distinguished from a stale branching baseline | Done |
| Notifications to reviewers | Done, through NetBox's notification inbox |
| Pluggable pre-merge checks, in-process or reported over the REST API | Done |
| Change windows, with an override permission | Done |
| Automatic merge once every gate is satisfied | Done |
| Change request survives deletion of its branch | Done |
| REST API for every model | Done |
Requirements
| Component | Version |
|---|---|
| NetBox | >= 4.6.9, < 4.7 |
| netbox-branching | >= 1.1.3, < 1.2 |
| Python | >= 3.12 |
Quick install
# configuration/plugins.py
PLUGINS = [
'netbox_change_control',
'netbox_branching', # must stay last
]
PLUGINS_CONFIG = {
'netbox_branching': {
'exempt_models': ['netbox_change_control.*'], # required
},
}
./manage.py migrate netbox_change_control
See Installation and configuration for the detail, including why exempt_models is not optional.
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 netbox_change_control-0.3.0.tar.gz.
File metadata
- Download URL: netbox_change_control-0.3.0.tar.gz
- Upload date:
- Size: 145.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bc74eca6249148591b2620a6841da5f917e8d4130b535fa0ae71448a1582170
|
|
| MD5 |
3c096c20affe62bb4ae48182789fd77d
|
|
| BLAKE2b-256 |
c9a4f378ef7510ad5d41f09e1ae0969957bbda7424147097fdd31e5bd7af65ac
|
Provenance
The following attestation bundles were made for netbox_change_control-0.3.0.tar.gz:
Publisher:
release.yaml on antoinekh/netbox-change-control
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netbox_change_control-0.3.0.tar.gz -
Subject digest:
6bc74eca6249148591b2620a6841da5f917e8d4130b535fa0ae71448a1582170 - Sigstore transparency entry: 2673852131
- Sigstore integration time:
-
Permalink:
antoinekh/netbox-change-control@c10993077974b8229ebf12941d56a87440f0c650 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/antoinekh
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@c10993077974b8229ebf12941d56a87440f0c650 -
Trigger Event:
release
-
Statement type:
File details
Details for the file netbox_change_control-0.3.0-py3-none-any.whl.
File metadata
- Download URL: netbox_change_control-0.3.0-py3-none-any.whl
- Upload date:
- Size: 195.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d03813ea7baa88c248a0fe56eeb8d0c130896806b07fb3e0b173f676abfbc6dc
|
|
| MD5 |
c1aa685311188c964e66d71c76b84b80
|
|
| BLAKE2b-256 |
2ad278cb1007e5cf6372e1fbcb3552af3bb2790f16276c64852988cb894ce29f
|
Provenance
The following attestation bundles were made for netbox_change_control-0.3.0-py3-none-any.whl:
Publisher:
release.yaml on antoinekh/netbox-change-control
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netbox_change_control-0.3.0-py3-none-any.whl -
Subject digest:
d03813ea7baa88c248a0fe56eeb8d0c130896806b07fb3e0b173f676abfbc6dc - Sigstore transparency entry: 2673852145
- Sigstore integration time:
-
Permalink:
antoinekh/netbox-change-control@c10993077974b8229ebf12941d56a87440f0c650 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/antoinekh
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@c10993077974b8229ebf12941d56a87440f0c650 -
Trigger Event:
release
-
Statement type: