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/netbox-documents@Add-Device-Type)
    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
Provide Prometheus url_sd compatible API Endpoint with data from Netbox

netbox-plugin-prometheus-sd Provide Prometheus http_sd compatible API Endpoint with data from Netbox. HTTP SD is a new feature in Prometheus and not a

Felix Peters 66 Dec 19, 2022
CALPHAD tools for designing thermodynamic models, calculating phase diagrams and investigating phase equilibria.

CALPHAD tools for designing thermodynamic models, calculating phase diagrams and investigating phase equilibria.

pycalphad 189 Dec 13, 2022
Python module for creating the circuit simulation definitions for Elmer FEM

elmer_circuitbuilder Python module for creating the circuit simulation definitions for Elmer FEM. The circuit definitions enable easy setup of coils (

null 5 Oct 3, 2022
Async Python Circuit Breaker implementation

aiocircuitbreaker This is an async Python implementation of the circuitbreaker library. Installation The project is available on PyPI. Simply run: $ p

null 5 Sep 5, 2022
Simple package to make requests throughout Tor with circuit renewal.

AutoTor Table of Contents About the Project Contents Dependencies Getting Started Installation Coding Contributing About the Project Simple package to

Salvador Belenguer 6 Jan 1, 2023
Render reMarkable documents to PDF

rmrl: reMarkable Rendering Library rmrl is a Python library for rendering reMarkable documents to PDF files. It takes the original PDF document and th

Robert Schroll 95 Dec 25, 2022
A refresher for PowerBI Desktop documents

PowerBI_Refresher-NPP Informació Per executar el programa s'ha de tenir instalat el python versio 3 o mes. Requeriments a requirements.txt. El fitxer

Nil Pujol 1 May 2, 2022
Easily map device and application controls to a midi controller

pymidicontroller Introduction Easily map device and application controls to a midi controller

Tane Barriball 24 May 16, 2022
This application demonstrates IoTVAS device discovery and security assessment API integration with the Rapid7 InsightVM.

Introduction This repository hosts a sample application that demonstrates integrating Firmalyzer's IoTVAS API with the Rapid7 InsightVM platform. This

Firmalyzer BV 4 Nov 9, 2022
tidevice can be used to communicate with iPhone device

h 该工具能够用于与iOS设备进行通信, 提供以下功能 截图 获取手机信息 ipa包的安装和卸载 根据bundleID 启动和停止应用 列出安装应用信息 模拟Xcode运行XCTest,常用的如启动WebDriverAgent测试

Alibaba 1.8k Dec 30, 2022
Simple utlity for sniffing decrypted HTTP/HTTPS traffic on a jailbroken iOS device into an HAR format.

Description iOS devices contain a hidden feature for sniffing decrypted HTTP/HTTPS traffic from all processes using the CFNetwork framework into an HA

null 83 Dec 25, 2022
AndroidEnv is a Python library that exposes an Android device as a Reinforcement Learning (RL) environment.

AndroidEnv is a Python library that exposes an Android device as a Reinforcement Learning (RL) environment.

DeepMind 814 Dec 26, 2022
An AI-powered device to stop people from stealing my packages.

Package Theft Prevention Device An AI-powered device to stop people from stealing my packages. Installation To install on a raspberry pi, clone the re

rydercalmdown 157 Nov 24, 2022
Simple Python-based web application to allow UGM students to fill their QR presence list without having another device in hand.

Praesentia Praesentia is a simple Python-based web application to allow UGM students to fill their QR presence list without having another device in h

loncat 20 Sep 29, 2022
Script for resizing MTD partitions on a QNAP device in order to be available to upgrade from buster to bullseye

QNAP partitions resize for kirkwood devices. As explained by Marin Michlmayr, Debian bullseye support on kirkwood QNAP devices was dropped due to [mai

Arnaud Mouiche 26 Jan 5, 2023
CDM Device Checker for python

CDM Device Checker for python

zackmark29 79 Dec 14, 2022
Easy installer for running Amazon AVS Device SDK on Raspberry Pi

avs-device-sdk-pi Scripts to enable Alexa voice activation using Picovoice Porcupine If you like the work, find it useful and if you would like to get

null 4 Nov 14, 2022
Turn a raspberry pi into a Bluetooth Midi device

PiBluetoothMidSetup This will change serveral system wide packages/configurations Do not run this on your primary machine or anything you don't know h

MyLab6 40 Sep 19, 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