This repository provides a simple template for setting up a NetBox plugin development container using Visual Studio Code Remote - Containers, also delivering a basic Netbox plugin that is correctly configured within the Dev Container.
It allows you to define a consistent development environment using Docker, that is ready to go allowing focus to be put on the plugin development rather than the environment setup.
This repository is a GitHub template repository, making it easy to create your own repository using this as the base.
For more information see NetBox Plugin Development Tutorial
- Pre-configured development environment using Docker
- Supports Visual Studio Code Remote - Containers
- A working instance of NetBox using the netboxcommunity/netbox:latestDocker image
- Sample plugin that is fully configured within the DevContainer
Make sure you have the following installed:
- Docker
- Visual Studio Code
- Remote - Containers extension
- GitHub CLI - https://cli.github.com/
- 
Create a plugin repository: gh repo create my_plugin --template craiglemon/netbox-plugin-template --private 
- 
Rename the default \plugins\netbox_demo_plugin folder(s) as required to suit your plugin name 
- 
Edit the following files to match your plugin and description: - \plugins<plugin_name>\setup.py
- \plugins<plugin_name><plugin_name>\plugin.py
- \plugins<plugin_name><plugin_name>_init_.py
 
- 
Edit the NetBox configuration.py file located at: \netbox\configuration.py - Change the name of your plugin in the PLUGINSandPLUGINS_CONFIGsections
 PLUGINS = [ 'my_plugin' ] # Plugin config (optional example) PLUGINS_CONFIG = { 'my_plugin': { } } 
- Change the name of your plugin in the 
Note: Changes to files within the \plugins folder result in a restart/reload of NetBox to pick up the changes automatically
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Submit a pull request