All Projects → k01ek → netbox-plugin-skeleton

k01ek / netbox-plugin-skeleton

Licence: Apache-2.0 License
Skeleton for starting NetBox plugins

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to netbox-plugin-skeleton

netbox-paloalto
NetBox plugin for listing firewall rules (from a Palo Alto Networks firewall/Panorama) associated with a NetBox object.
Stars: ✭ 27 (+80%)
Mutual labels:  netbox, netbox-plugin
netbox-bgp
NetBox plugin for BGP related objects documentation
Stars: ✭ 135 (+800%)
Mutual labels:  netbox, netbox-plugin
ntc-netbox-plugin-metrics-ext
NetBox Plugin to improve the instrumentation of NetBox and expose additional metrics (Application Metrics, RQ Worker).
Stars: ✭ 32 (+113.33%)
Mutual labels:  netbox, netbox-plugin
netbox-vcenter
vCenter integration plugin for NetBox
Stars: ✭ 36 (+140%)
Mutual labels:  netbox, netbox-plugin
ttl255-netbox-plugin-bgppeering
Example NetBox plugin - Tracking BGP Peering connections
Stars: ✭ 29 (+93.33%)
Mutual labels:  netbox-plugin
scala-basic-skeleton
Starting point if you want to bootstrap a project in Scala
Stars: ✭ 16 (+6.67%)
Mutual labels:  skeleton
hunt-skeleton
hunt framework project template.
Stars: ✭ 20 (+33.33%)
Mutual labels:  skeleton
laravel-skeleton
Скелет приложения на базе Laravel 5.3/5.4
Stars: ✭ 48 (+220%)
Mutual labels:  skeleton
MagicMirror-Module-Template
Template module for MagicMirror
Stars: ✭ 54 (+260%)
Mutual labels:  skeleton
navigation-skeleton
This component allows you to show skeletons of pages during navigation process.
Stars: ✭ 16 (+6.67%)
Mutual labels:  skeleton
laravel-dashboard-skeleton-tile
A skeleton you can use to package up a tile for laravel-dashboard
Stars: ✭ 19 (+26.67%)
Mutual labels:  skeleton
SkeletonBridgeRecon
The code for CVPR2019 Oral paper "A Skeleton-bridged Deep Learning Approach for Generating Meshes of Complex Topologies from Single RGB Images"
Stars: ✭ 72 (+380%)
Mutual labels:  skeleton
brunch-chicken-and-waffles
Brunch skeleton with CoffeeScript, LESS, Angular, and AngularUI with Bootstrap 3
Stars: ✭ 13 (-13.33%)
Mutual labels:  skeleton
packager
Laravel Package Skeleton Generator - https://youtu.be/kQRQWzDEbGk
Stars: ✭ 20 (+33.33%)
Mutual labels:  skeleton
react-interval-rerender
render props component that rerenders its children at regular intervals
Stars: ✭ 16 (+6.67%)
Mutual labels:  skeleton
MTG-Card-Reader-Web
MTG-Card-Reader 2.0, built as a webpage.
Stars: ✭ 21 (+40%)
Mutual labels:  skeleton
pkgkitten
Create simple packages which pass R CMD check
Stars: ✭ 31 (+106.67%)
Mutual labels:  skeleton
p3arsec
Parallel Patterns Implementation of PARSEC Benchmark Applications
Stars: ✭ 12 (-20%)
Mutual labels:  skeleton
Skeleton-Bones
Library for dynamically generating skeleton loader drawables for Layouts and Views
Stars: ✭ 78 (+420%)
Mutual labels:  skeleton
Angular-Gulp-Boilerplate
Clean but full-featured AngularJS boilerplate using Gulp workflow and best practices
Stars: ✭ 30 (+100%)
Mutual labels:  skeleton

NetBox Plugin Skeleton

The skeleton for Netbox plugin.
Basically, it's a Django app skeleton, which contains all necessary (and unnecessary) files for building a new plugin.

Instructions

Donwload repositioriy

You can get this skeleton in two ways:

  1. Create your own GitHub repository using that one as a template HowTo
  2. Clone this repo or download it as an archive

Replace the name of the plugin in files and filenames with your new name

Use repren script for replacing name. Set the new name of your plugin as an argument to the script.
Example:

python3 develop/repren.py my_new_plugin 
Found 29 files in: .
- modify: ./Makefile: 3 matches
- modify: ./MANIFEST.in: 1 matches
- modify: ./setup.py: 1 matches
- modify: ./README.me: 1 matches
- modify: ./develop/configuration.py: 1 matches
- modify: ./develop/docker-compose.yml: 4 matches
- rename: ./netbox_newplugin/signals.py -> ./my_new_plugin/signals.py
- rename: ./netbox_newplugin/version.py -> ./my_new_plugin/version.py
- rename: ./netbox_newplugin/tamplate_content.py -> ./my_new_plugin/tamplate_content.py
- rename: ./netbox_newplugin/models.py -> ./my_new_plugin/models.py
- modify: ./netbox_newplugin/__init__.py: 1 matches
- rename: ./netbox_newplugin/__init__.py -> ./my_new_plugin/__init__.py
- rename: ./netbox_newplugin/forms.py -> ./my_new_plugin/forms.py
- rename: ./netbox_newplugin/admin.py -> ./my_new_plugin/admin.py
- rename: ./netbox_newplugin/tables.py -> ./my_new_plugin/tables.py
- modify: ./netbox_newplugin/navigation.py: 1 matches
- rename: ./netbox_newplugin/navigation.py -> ./my_new_plugin/navigation.py
- rename: ./netbox_newplugin/urls.py -> ./my_new_plugin/urls.py
- rename: ./netbox_newplugin/filters.py -> ./my_new_plugin/filters.py
- rename: ./netbox_newplugin/middleware.py -> ./my_new_plugin/middleware.py
- rename: ./netbox_newplugin/views.py -> ./my_new_plugin/views.py
- modify: ./netbox_newplugin/api/serializers.py: 1 matches
- rename: ./netbox_newplugin/api/serializers.py -> ./my_new_plugin/api/serializers.py
- rename: ./netbox_newplugin/api/__init__.py -> ./my_new_plugin/api/__init__.py
- rename: ./netbox_newplugin/api/urls.py -> ./my_new_plugin/api/urls.py
- modify: ./netbox_newplugin/api/views.py: 1 matches
- rename: ./netbox_newplugin/api/views.py -> ./my_new_plugin/api/views.py
- rename: ./netbox_newplugin/templates/netbox_newplugin/example -> ./my_new_plugin/templates/my_new_plugin/example
Found 29 files in: .
- modify: ./README.me: 1 matches
- modify: ./my_new_plugin/__init__.py: 2 matches

Fix LICENSE file if you want

Fill in other information about the plugin

Set name, url, author, description, etc in README, setup.py, and __init__.py

Commit changes

If the repo was cloned, just remove .git folder

rm -rf .git

and set your own repo like this

git init
git add .
git commit -m 'init'

Helpfulness

Useful tools for developing the plugin you can find in the develop folder of this repo. Use Makefile to run a new development environment with docker in 3 commands. (docker and docker-compose required).

  1. Set PYTHON_VER and NETBOX_VER in Makefile or environment
PYTHON_VER?=3.7
NETBOX_VER?=v2.10.3
  1. Build netbox container
make cbuild
docker-compose -f ./develop/docker-compose.yml \
		-p my_new_plugin build \
		--build-arg netbox_ver=v2.10.3 \
		--build-arg python_ver=3.7
postgres uses an image, skipping
redis uses an image, skipping
Building netbox
[+] Building 1.7s (15/15) FINISHED                                                                                                              
...
Successfully built ec6e8aabbaddb7c4386aef8f779d9ae7e8562f521e9041b7c20a3233f4c3a6d9
Building worker
[+] Building 0.2s (15/15) FINISHED                                                                                                              
...
Successfully built ec6e8aabbaddb7c4386aef8f779d9ae7e8562f521e9041b7c20a3233f4c3a6d9
  1. Run netbox container
make debug
  1. Add django superuser
make adduser
docker-compose -f ./develop/docker-compose.yml -p my_new_plugin run netbox python manage.py createsuperuser
Creating my_new_plugin_netbox_run ... done
Username (leave blank to use 'root'): admin
Email address: 
Password: 
Password (again): 
Superuser created successfully.

Notes

If you got the error with git after change plugin name like this:
fatal: unknown index entry format 0x196e0000
use following commands to fix it

rm -f .git/index
git reset
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].