Skip to content

allow users to provide custom netbox scripts to be automatically registered on startup #954

Description

@mmguero

Added to the documentation:

NetBox's functionality can be also extended with custom scripting "to provide a way for users to execute custom logic from within the NetBox UI" (see also the "Getting Started with NetBox Custom Scripts").

When Malcolm's NetBox container [starts up]({{ site.github.repository_url }}/blob/{{ site.github.build_revision }}/netbox/scripts/netbox_init.py), it registers any NetBox scripts (ending with a .py extension) found in ./netbox/custom-scripts/ in the Malcolm installation directory. NetBox scripts can be run and managed in the NetBox UI under Scripts in the Customization menu.

The following warning is quoted from the NetBox documentation:

Only install trusted scripts. Custom scripts have unrestricted access to change anything in the database and are inherently unsafe and should only be installed and run from trusted sources. You should also review and set permissions for who can run scripts if the script can modify any data.

This generic custom script registration code has been adapted from #907 from @PrudhviChanda.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestnetboxRelated to Malcolm's use of NetBox

Fields

No fields configured for Feature.

Projects

Status
Released

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions