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
Simple Python script I use to manage and build my Reflux themes.

Simple Python script I use to manage and build my Reflux themes. Built for personal use, but anyone can easily fork and tweak to suit thier needs.

Ire 3 Jan 25, 2022
Information about a signed UEFI Shell that can be used when Secure Boot is enabled.

SignedUEFIShell During our research of the BootHole vulnerability last year, we tried to find as many signed bootloaders as we could. We searched all

Mickey 61 Jan 03, 2023
Learn to code in any language. If

Learn to Code It is an intiiative undertaken by Student Ambassadors Club, Jamshoro for students who are absolute begineers in programming and want to

Student Ambassadors' Club at Mehran UET 15 Oct 19, 2022
A calculator to test numbers against the collatz conjecture

The Collatz Calculator This is an algorithm custom built by Kyle Dickey, used to test numbers against the simple rules of the Collatz Conjecture.

Kyle Dickey 2 Jun 14, 2022
Reconhecimento de voz, em português, com python

Speech_recognizer Reconhecimento de voz, em português, com python O ato de falar nada mais é que criar vibrações no ar. Por meio de um conversor analó

Marcus Vinícius Ribeiro Andrade 1 Dec 14, 2021
PORTSCANNING-IN-PYTHON - A python threaded portscanner to scan websites and ipaddresses

PORTSCANNING-IN-PYTHON This is a python threaded portscanner to scan websites an

1 Feb 16, 2022
Wrapper around anjlab's Android In-app Billing Version 3 to be used in Kivy apps

IABwrapper Wrapper around anjlab's Android In-app Billing Version 3 to be used in Kivy apps Install pip install iabwrapper Important ( Add these into

Shashi Ranjan 8 May 23, 2022
resultados (data) de elecciones 2021 y código para extraer data de la ONPE

elecciones-peru-2021-ONPE Resultados (data) de elecciones 2021 y código para extraer data de la ONPE Data Licencia liberal, pero si vas a usarlo por f

Ragi Yaser Burhum 21 Jun 14, 2021
Multtable is a collection of multiplication table generators in various languages.

Multtable Multtable is a collection of multiplication table generators in various languages. This project was created as a joke based on one of my bro

pollen__ 7 Mar 05, 2022
RFDesign - Protein hallucination and inpainting with RoseTTAFold

RFDesign: Protein hallucination and inpainting with RoseTTAFold Jue Wang (juewan

139 Jan 06, 2023
Linux Pressure Stall Information (PSI) Status App

Linux Pressure Stall Information (PSI) Status App psistat is a simple python3 program to display the PSIs and to capture/display exception events. psi

Joe D 3 Sep 18, 2022
Basit bir cc generator'ü.

Basit bir cc generator'ü. Setup What To Do; Python Installation We install python from CLICK Generator Board After installing the file and python, we

Lâving 7 Jan 09, 2022
Project repository of Apache Airflow, deployed on Docker in Amazon EC2 via GitLab.

Airflow on Docker in EC2 + GitLab's CI/CD Personal project for simple data pipeline using Airflow. Airflow will be installed inside Docker container,

Ammar Chalifah 13 Nov 29, 2022
My Analysis of the VC4 Assembly Code from the RPI4

My Analysis of the VC4 Assembly Code from the RPI4

Nicholas Starke 31 Jul 13, 2022
Simple control of Thorlabs Elliptec devices from Python.

Elliptec Simple control of Thorlabs Elliptec devices. No docs yet » Get started · Report a bug · Request a feature About The Project ThorLabs Elliptec

David Roesel 8 Sep 22, 2022
This is a Python program I wrote to simulate the solar system with 79 lines of code.

Solar System With Python This is a Python program I wrote to simulate the solar system with 79 lines of code. Required modules tkinter, math, time Why

Mehmet Aydoğmuş 1 Oct 26, 2021
Contains the code of my learning of Python OOP.

OOP Python This repository contains the code of my learning of Python OOP. All the code: is following PEP 8 ✅ has proper concept illustrations and com

Samyak Jain 2 Jan 15, 2022
A community based economy bot with python works only with python 3.7.8 as web3 requires cytoolz

A community based economy bot with python works only with python 3.7.8 as web3 requires cytoolz has some issues building with python 3.10

4 Jan 01, 2022
Automatically unpin old messages so you can always pin more!

PinRotate Automatically unpin old messages so you can always pin more! Installation You will need to install poetry to run this bot locally for develo

3 Sep 18, 2022
Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls

password-generator Built with Python programming language and QT library and Guess the number in three easy, medium and hard rolls Password generator

Amir Hussein Sharifnezhad 3 Oct 09, 2021