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
Stack BOF Protection Bypass Techniques

Stack Buffer Overflow - Protection Bypass Techniques

ommadawn46 18 Dec 28, 2022
A Notifier Program that Notifies you to relax your eyes Every 15 Minutes👀

Every 15 Minutes is an application that is used to Notify you to Relax your eyes Every 15 Minutes, This is fully made with Python and also with the us

Ashely Sato 1 Nov 02, 2021
Automated moth pictures for biodiversity research

Automated moth pictures for biodiversity research

Ludwig Kürzinger 1 Dec 16, 2021
CMPE 204 Modelling Project

CISC/CMPE 204 Modelling Project Welcome to the major project for CISC/CMPE 204 (Fall 2021)! Change this README.md file to summarize your project (few

totallyrin 2 May 16, 2022
solsim is the Solana complex systems simulator. It simulates behavior of dynamical systems—DeFi protocols, DAO governance, cryptocurrencies, and more—built on the Solana blockchain

solsim is the Solana complex systems simulator. It simulates behavior of dynamical systems—DeFi protocols, DAO governance, cryptocurrencies, and more—built on the Solana blockchain

William Wolf 12 Jul 13, 2022
Um sistema de llogin feito em uma interface grafica.

Interface-para-login Um sistema de login feito com JSON. Utilizando a biblioteca Tkinter, eu criei um sistema de login, onde guarda a informações de l

Mobben 1 Nov 28, 2021
A Microsoft reward automator, designed to work headless on a raspberry pi

MsReward A Microsoft reward automator, designed to work headless on a raspberry pi. Tested with a pi 3b+ and a pi 4 2Gb . Using a discord bot to log e

10 Dec 21, 2022
Prop-based map editor for the Apex Legends mod, R5Reloaded

R5R Map Editor A tool to build maps out of props in the Apex Legends mod, R5Reloaded Instuctions Install R5R Download this program Get the prop spawne

7 Dec 16, 2022
Source for the Fedora Silverblue and Kinoite variants.

Source for the Fedora Silverblue and Kinoite variants.

Fedora Kinoite 7 Aug 20, 2022
Make pack up python files easier.

python-easy-pack make pack up python files easier. 目前只提供了中文环境 如何使用? 将index.py复制到你的项目文件夹,或者把.py文件拷贝到这个文件夹。 打开你的cmd或者powershell 切换到程序所在目录,输入python index

2 Dec 15, 2021
A set of decks and notebooks with exercises for use in a hands-on causal inference tutorial session

intro-to-causal-inference A introduction to causal inference using common tools from the python data stack Table of Contents Getting Started Install g

Roni Kobrosly 15 Dec 07, 2022
A place where the most basic, basic of python coding exists

python-basics A place where the most basic, basic of python coding exists As you can see, there are four folders and the best order to read is: appeti

Chuqin 2 Oct 05, 2022
A simple armature retargeting tool for Blender

Simple-Retarget-Tool-Blender A simple armature retargeting tool for Blender Update V2: Set Rest Pose to easily apply rest pose. Preset Import/Export.

Fahad Hasan Pathik 74 Jan 04, 2023
Check COVID locations of interest against Google location history

Location of Interest Checker Script to compare COVID locations of interest to Google location history. The script produces a map plot (as shown below)

9 Mar 30, 2022
Controller state monitor plugin for EVA ICS

eva-plugin-cmon Controller status monitor plugin for EVA ICS Monitors connected controllers status in SFA and pushes measurements into an external Inf

Altertech 1 Nov 06, 2021
Framework To Ease Operating with Quantum Computers

QType Framework To Ease Operating with Quantum Computers Concept # define an array of 15 cubits:

Antonio Párraga Navarro 2 Jun 06, 2022
Integration between the awesome window manager and the firefox web browser.

Integration between the awesome window manager and the firefox web browser.

contribuewwt 3 Feb 02, 2022
✨ Udemy Coupon Finder For Discord. Supports Turkish & English Language.

Udemy Course Finder Bot | Udemy Kupon Bulucu Botu This bot finds new udemy coupons and sends to the channel. Before Setup You must have python = 3.6

Penguen 4 May 04, 2022
This is the community maintained fork of ungleich's cdist (after f061fb1).

cdist This is the community maintained fork of ungleich's cdist (after f061fb1). Work is split between three repositories: cdist - implementation of t

cdist community edition 0 Aug 02, 2022
Time python - Códigos para auxiliar e mostrar formas de como fazer um relógio e manipular o seu tempo

Time_python Códigos para auxiliar e mostrar formas de como fazer um relógio e manipular o seu tempo. Bibliotecas Nestes foram usadas bibliotecas nativ

Eduardo Henrique 1 Jan 03, 2022