Plugin to manage site, circuit and device diagrams and documents in Netbox

Overview

Netbox Documents Plugin

A plugin designed to faciliate the storage of site, circuit and device specific documents within NetBox

Note: Netbox v3.2+ is required. This plugin will not work on an earlier release of Netbox.

Installation

A working installation of Netbox 3.2+ is required - see official documentation.

Package Installation from PyPi

Activate your virtual env and install via pip:

$ source /opt/netbox/venv/bin/activate
(venv) $ pip install netbox-documents

To ensure the Netbox Documents plugin is automatically re-installed during future upgrades, add the package to your local_requirements.txt :

# echo netbox-documents >> local_requirements.txt

Enable the Plugin

In the Netbox configuration.py configuration file add or update the PLUGINS parameter, adding netbox_documents:

PLUGINS = [
    'netbox_documents',
]

(Optional) Add or update a PLUGINS_CONFIG parameter in configuration.py to configure plugin settings. Options shown below are the configured defaults:

PLUGINS_CONFIG = {
     'netbox_documents': {
         # Enable the management of site specific documents (True/False)
         'enable_site_documents': True,
         # Enable the management of circuit specific documents (True/False)
         'enable_circuit_documents': True,
         # Enable the management of device specific documents (True/False)
         'enable_device_documents': True,
         # Enable the global menu options (True/False)
         'enable_navigation_menu': True,
         # Location to inject the document widget in the site view (left/right)
         'site_documents_location': 'left',
         # Location to inject the document widget in the device view (left/right
         'circuit_documents_location': 'left',
         # Location to inject the document widget in the circuit view (left/right
         'device_documents_location': 'left'
     }
}

(Optional) Add or replace the built-in Document Type choices via Netbox's FIELD_CHOICES configuration parameter:

FIELD_CHOICES = {
    'netbox_documents.DocTypeChoices.site+': (
        ('mydocument', 'My Custom Site Document Type', 'green'),
    ),
    'netbox_documents.DocTypeChoices.device+': (
        ('mydocument', 'My Custom Device Document Type', 'green'),
    ),
    'netbox_documents.DocTypeChoices.circuit+': (
        ('mydocument', 'My Custom Circuit Document Type', 'green'),
    )
}

Apply Database Migrations

Apply database migrations with Netbox manage.py:

(venv) $ python manage.py migrate

Restart Netbox

Restart the Netbox service to apply changes:

sudo systemctl restart netbox

Screenshots

Site Document View Add Circuit Document Site Document List Device Document List

Comments
  • Feature Request add Document to device-types

    Feature Request add Document to device-types

    each Device-Type has specific HowTos, Installation Sheets, etc. Please add the documentation feature also to DEVICES -> Device Types

    Thank you in advance. Martin

    opened by AS-MBN 2
  • FeatureRequest

    FeatureRequest

    This is Awesome!

    It's allowed me to attach service contract docs to my device inventory items. :)

    Would it be possible to have this function available for the DeviceType as well?

    That would allow model-specific documents (user manuals, EoL docs etc) to be linked to the model instead of having to link to each instance of the device-type.

    Thanks for the great add-on for Netbox, let me know if you want a test-case.

    opened by brianvessey 2
  • Where are document files stored?

    Where are document files stored?

    I'm just wondering where are the document files stored, so when I run a Netbox or plugin upgrade I can copy it to the new folder and make a proper migration.

    Also, is there a proper way to backup or export documents?

    opened by joaolucasmacedo 2
  • Import error in routers.py

    Import error in routers.py

    I just came across this awesome plugin and wanted to give it a try in my new v3.2-beta2 installation but ran into an error right of the gate

    ImportError: cannot import name 'NetBoxRouter' from 'netbox.api.routers' (/opt/netbox/netbox/netbox/api/routers.py)
    
    Traceback (most recent call last):
      File "/opt/netbox/netbox/./manage.py", line 10, in <module>
        execute_from_command_line(sys.argv)
      File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 425, in execute_from_command_line
        utility.execute()
      File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute
        self.fetch_command(subcommand).run_from_argv(self.argv)
      File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/base.py", line 373, in run_from_argv
        self.execute(*args, **cmd_options)
      File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/base.py", line 412, in execute
        self.check()
      File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/management/base.py", line 438, in check
        all_issues = checks.run_checks(
      File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/checks/registry.py", line 77, in run_checks
        new_errors = check(app_configs=app_configs, databases=databases)
      File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/checks/urls.py", line 13, in check_url_config
        return check_resolver(resolver)
      File "/opt/netbox/venv/lib/python3.9/site-packages/django/core/checks/urls.py", line 23, in check_resolver
        return check_method()
      File "/opt/netbox/venv/lib/python3.9/site-packages/django/urls/resolvers.py", line 448, in check
        for pattern in self.url_patterns:
      File "/opt/netbox/venv/lib/python3.9/site-packages/django/utils/functional.py", line 48, in __get__
        res = instance.__dict__[self.name] = self.func(instance)
      File "/opt/netbox/venv/lib/python3.9/site-packages/django/urls/resolvers.py", line 634, in url_patterns
        patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
      File "/opt/netbox/venv/lib/python3.9/site-packages/django/utils/functional.py", line 48, in __get__
        res = instance.__dict__[self.name] = self.func(instance)
      File "/opt/netbox/venv/lib/python3.9/site-packages/django/urls/resolvers.py", line 627, in urlconf_module
        return import_module(self.urlconf_name)
      File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
      File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 855, in exec_module
      File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
      File "/opt/netbox/netbox/netbox/urls.py", line 9, in <module>
        from extras.plugins.urls import plugin_admin_patterns, plugin_patterns, plugin_api_patterns
      File "/opt/netbox/netbox/extras/plugins/urls.py", line 35, in <module>
        urlpatterns = import_object(f"{plugin_path}.api.urls.urlpatterns")
      File "/opt/netbox/netbox/extras/plugins/utils.py", line 31, in import_object
        spec.loader.exec_module(module)
      File "/opt/netbox/venv/lib/python3.9/site-packages/netbox_documents/api/urls.py", line 1, in <module>
        from netbox.api.routers import NetBoxRouter
    ImportError: cannot import name 'NetBoxRouter' from 'netbox.api.routers' (/opt/netbox/netbox/netbox/api/routers.py)
    
    opened by abhi1693 2
  • Linkify the related objects

    Linkify the related objects

    I have uploaded a few documents and when viewing them from the plugin side, I would like to directly click on the related objects to open those pages up

    Here, I would prefer if I could click on the Site DUBLIN image

    Maybe the filename should also be made clickable to view it?

    opened by abhi1693 1
  • Add device type and Fix

    Add device type and Fix

    • Add device type
    • Fix Color Dokument Type Quote (bg_braun is not supported in Netbox CSS)
    • Add default Dokument Type Entrys (other, manual)
    • Renamen readme.md to README.md (Otherwise a branch cannot be installed via --> pip install git+https://github.com/LHBL2003/[email protected])
    opened by LHBL2003 0
  • Copy extension to device type untested

    Copy extension to device type untested

    Hello @jasonyates

    I would like to support you with this basic framework. To implement a documentation for device types.

    It has not been tested, as I would need to see how to create plugins first.

    But since your programme is clearly structured. It is easy to see which parts you have to copy.

    I have therefore tried to prepare as much as possible without testing and checking.

    Maybe it will motivate you to make the documentation for Device Type possible?

    Thanks a lot :)

    Otherwise I'll have to see how it all works :D

    opened by LHBL2003 0
  • Feature Request: Link to online document option

    Feature Request: Link to online document option

    It would be great if there was a radio button to enable you to paste in a link to a shared document (i.e. Google Docs or online user manual) as opposed to uploading an actual file.

    opened by dutchman80 0
  • Consolidate all the various models into 1 model

    Consolidate all the various models into 1 model

    It would be nice to convert all the various models into 1 model called documents. Then you would just need to "activate" new model relationships as you see fit instead of creating a new model for each model you want to add documents to.

    I do something similar in my unreleased plugin, which @dansheps pointed me to.

    Adding documents to new models would just require an updated to the constants and a new GenericRelation.

    When I get some down time, I'd be able to help.

    opened by ryanmerolle 0
  • Feature: Create a global documents section in the navbar

    Feature: Create a global documents section in the navbar

    1. Create a centralized view for all documents no matter the attached model.
    2. Allow people to sort and filter the table like any other model view similar to how devices can be viewed, filtered, and searched in the main devices page which shows a table view.
    opened by ryanmerolle 0
  • Feature: Enable more models with documents

    Feature: Enable more models with documents

    It might be better to define a way to look up all models and allow for documents per model as opposed to hardcoding some of these config variables.

    Regardless it would be useful to enable the plugin options for:

    • locations (important if a site has multiple cages and the cages have their own documentation)
    • provider networks (for the same reason as circuits)
    • providers
    • devicetypes
    • moduletypes
    • manufacturers
    • tenants
    • tenant groups
    opened by ryanmerolle 8
Releases(v0.4.4)
  • v0.4.4(Jan 4, 2023)

    What's Changed

    • Add deviceType support by @LHBL2003 in https://github.com/jasonyates/netbox-documents/pull/16
    • Fix for #10 bg_brown not supported by @LHBL2003 in https://github.com/jasonyates/netbox-documents/pull/16
    • Fixing #9 - Files are not deleted from disk by @jasonyates in https://github.com/jasonyates/netbox-documents/pull/17

    New Contributors

    • @LHBL2003 made their first contribution in https://github.com/jasonyates/netbox-documents/pull/16

    Full Changelog: https://github.com/jasonyates/netbox-documents/compare/v0.3.1...v0.4.4

    Source code(tar.gz)
    Source code(zip)
  • v0.3.1(Apr 6, 2022)

    • Adds help text to add/edit forms
    • Updating table view to link to the document object view
    • Adds button to document widget to link to the document object view
    • Adds a link to the associated parent objet from the document object view
    • Adds a link to uploaded document from the document object view
    • Updates document_type to render as a badge on document object view and document widget
    Source code(tar.gz)
    Source code(zip)
  • v0.3(Apr 4, 2022)

  • v0.2.1(Apr 4, 2022)

  • v0.2(Apr 4, 2022)

Owner
Jason Yates
Jason Yates
India's own RPA Platform Python Powered

Welcome to My-AutoPylot , Made in India with ❤️ What is My-AutoPylot? PyBots is an Indian firm based in Vadodara, Gujarat. My-AutoPylot is a product d

PyBots Pvt Ltd 28 Sep 12, 2022
Stopmagic gives you the power of creating amazing Stop Motion animations faster and easier than ever before.

Stopmagic gives you the power of creating amazing Stop Motion animations faster and easier than ever before. This project is maintained by Aldrin Mathew.

Aldrin's Art Factory 67 Dec 31, 2022
Convert Photoshop curves (acv) to xmp presets for Lightroom

acv2xmp Convert Photoshop curves (acv) to Lightroom preset (xmp) acv2xmp.py Basic command prompt that relies on standard library only and can be used

5 Feb 06, 2022
A simple program to recolour simple png icon-like pictures with just one colour + transparent or white background. Resulting images all have transparent background and a new colour.

A simple program to recolour simple png icon-like pictures with just one colour + transparent or white background. Resulting images all have transparent background and a new colour.

Anna Tůmová 0 Jan 30, 2022
Some Python scripts that fx(hash) users might find useful.

fx_hash_utils Some Python scripts that fx(hash) users might find useful. get_images This script downloads all the static images of the tokens generate

30 Oct 05, 2022
A tool for checking if the external data used in Flatpak manifests is still up to date

Flatpak External Data Checker This is a tool for checking for outdated or broken links of external data in Flatpak manifests. Motivation Flatpak apps

Flathub 76 Dec 24, 2022
A Powerful Tool For Making Combo List(All possible modes)

ComboMaker A Powerful Tool For Making Combo List Introduction Check out all possible Combo list build modes with this tool =) How to Install Open the

MasterBurnt 7 Jan 07, 2023
A very terrible python-based programming language that uses folders instead of text files

PYFolders by Lewis L. Foster PYFolders is a very terrible python-based programming language that uses folders instead of regular text files. In this r

Lewis L. Foster 5 Jan 08, 2022
An example of Connecting a MySQL Database with Python Code

An example of Connecting And Query Data a MySQL Database with Python Code And How to install Table of contents General info Technologies Setup General

Mohammad Hosseinzadeh 1 Nov 23, 2021
An After Effects render queue for ShotGrid Toolkit.

AEQueue An After Effects render queue for ShotGrid Toolkit. Features Render multiple comps to locations defined by templates in your Toolkit config. C

Brand New School 5 Nov 20, 2022
Addons like multipages for streamlit webapp

streamlit_pages Installation $ pip install streamlit-pages Features Adding multiple pages to streamlit Sharing specific pages Usage import streamlit

36 Dec 25, 2022
Repo created for the purpose of adding any kind of programs and projects

Programs and Project Repository A repository for adding programs and projects of any kind starting from beginners level to expert ones Contributing to

Unicorn Dev Community 3 Nov 02, 2022
Blender 2.80+ Timelapse Capture Tool Addon

SimpleTimelapser Blender 2.80+ Timelapse Capture Tool Addon Developed for Blender 3.0.0, tested working on 2.80.0 It's no ZBrush undo history but it's

4 Jan 19, 2022
Package pyVHR is a comprehensive framework for studying methods of pulse rate estimation relying on remote photoplethysmography (rPPG)

Package pyVHR (short for Python framework for Virtual Heart Rate) is a comprehensive framework for studying methods of pulse rate estimation relying on remote photoplethysmography (rPPG)

PHUSE Lab 261 Jan 03, 2023
Make your functions return something meaningful, typed, and safe!

Make your functions return something meaningful, typed, and safe! Features Brings functional programming to Python land Provides a bunch of primitives

dry-python 2.5k Jan 03, 2023
A domonic-like wrapper around selectolax

A domonic-like wrapper around selectolax

byteface 3 Jun 23, 2022
CircuitPython Driver for Adafruit 24LC32 I2C EEPROM Breakout 32Kbit / 4 KB

Introduction CircuitPython driver for Adafruit 24LC32 I2C EEPROM Breakout Dependencies This driver depends on: Adafruit CircuitPython Bus Device Regis

Adafruit Industries 4 Oct 03, 2022
A web UI for managing your 351ELEC device ROMs.

351ELEC WebUI A web UI for managing your 351ELEC device ROMs. Requirements Python 3 or Python 2.7 are required. If the ftfy package is installed, it w

Ben Phelps 5 Sep 26, 2022
Python bindings for Basler's VisualApplets TCL script generation

About visualapplets.py The Basler AG company provides a TCL scripting engine to automatize the creation of VisualApplets designs (a former Silicon Sof

Jürgen Hock 2 Dec 07, 2022
It's like Forth but in Python

It's like Forth but written in Python. But I don't actually know for sure since I never programmed in Forth, I only heard that it's some sort of stack-based programming language. Porth is also stack-

Tsoding 619 Dec 21, 2022