Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

148 Allow NetBox Scripts to run when a Branch is selected #184

Merged
merged 14 commits into from
Jan 30, 2025

Conversation

arthanson
Copy link
Contributor

Fixes: #148

See Also NetBox PR (netbox-community/netbox#18137)

  • Creates a BranchingBackend that NetBox can be configured to Call
  • Moves get_active_branch from middleware to utilities so we can call it
  • Adds Script instance detection to template_content to display a message if a script is being submitted to run when a branch is active.

@arthanson arthanson marked this pull request as ready for review December 2, 2024 21:33
jeremystretch
jeremystretch previously approved these changes Dec 16, 2024
@jeremystretch jeremystretch changed the base branch from develop to main January 22, 2025 15:11
@jeremystretch jeremystretch dismissed their stale review January 22, 2025 15:11

The base branch was changed.

@jeremystretch jeremystretch merged commit ba7e62f into main Jan 30, 2025
7 checks passed
@jeremystretch jeremystretch deleted the 148-script branch January 30, 2025 19:21
jeremystretch added a commit that referenced this pull request Feb 4, 2025
* 148 add message to script run form in NetBox

* 148 Add BranchingBackend to support running scripts

* 148 Add BranchingBackend to support running scripts

* 148 Add BranchingBackend to support running scripts

* 148 Fix instance check

* 148 change to use script context managers

* 148 remove incorrect checkin

* 148 add missing file

* 148 cleanup

* Adapt for dynamic registration of request processors in NetBox

* Remove activate_branch() from middleware to avoid duplicate call

* Require NetBox >= v4.1.9

* Move Script alert to a separate template extension

---------

Co-authored-by: Jeremy Stretch <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IntegrityError when running custom scripts inside branches
2 participants