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.
Added to the documentation:
This generic custom script registration code has been adapted from #907 from @PrudhviChanda.