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
OB_Template is a vault template reference for using Obsidian.

Obsidian Template OB_Template is a vault template reference for using Obsidian. If you've tested out Obsidian. and worked through the "Obsidian Help"

323 Dec 27, 2022
This repo is related to Google Coding Challenge, given to Bright Network Internship Experience 2021.

BrightNetworkUK-GCC-2021 This repo is related to Google Coding Challenge, given to Bright Network Internship Experience 2021. Language used here is py

Dareer Ahmad Mufti 28 May 23, 2022
propuestas electorales de los candidatos a constituyentes, Chile 2021

textos-constituyentes propuestas electorales de los candidatos a constituyentes, Chile 2021 Programas descargados desde https://elecciones2021.servel.

Sergio Lucero 6 Nov 19, 2021
用于导出墨墨背单词的词库,并生成适用于 List 背单词,不背单词,欧陆词典等的自定义词库

maimemo-export 用于导出墨墨背单词的词库,并生成适用于 List 背单词,欧陆词典,不背单词等的自定义词库。 仓库内已经导出墨墨背单词所有自带词库(暂不包括云词库),多达 900 种词库,可以在仓库中选择需要的词库下载(下载单个文件的方法),也可以去 蓝奏云(密码:666) 下载打包好

ourongxing 293 Dec 29, 2022
Tracking stock volatility.

SP500-highlow-tracking Track stock volatility. Being a useful indicator of the stock price volatility, High-Low gap represents the price range of the

Thong Huynh 13 Sep 07, 2022
Sailwind Mod Manager

Sailwind Mod Manager The Sailwind Mod Manager is an open source mod manager for the Sailwind community. It currently allows you to browse and download

Max 3 Jul 15, 2022
Automation of VASP DFT workflows with ASE - application scripts

This repo contains a library that aims at automatizing some Density Functional Theory (DFT) workflows in VASP by using the ASE toolkit.

Frank Niessen 5 Sep 06, 2022
Paimon is a pixie (or script) who was made for anyone from {EPITECH} who are struggling with the Coding Style.

Paimon Paimon is a pixie (or script) who was made for anyone from {EPITECH} who are struggling with the Coding Style. Her goal is to assist you in you

Lyy 2 Oct 17, 2021
A function decorator for enforcing function signatures

A function decorator for enforcing function signatures

Emmanuel I. Obi 0 Dec 08, 2021
Replite - An embeddable REPL powered by JupyterLite

replite An embeddable REPL, powered by JupyterLite. Usage To embed the code cons

Jeremy Tuloup 47 Nov 09, 2022
A simple countdown timer in eazy code to show timer with python

Countdown_Timer The simple CLI countdown timer in eazy code to show timer How Work First you fill the input by int-- (Enter the time in Seconds:) for

Yasin Rezvani 3 Nov 15, 2022
This repository containing cross-section cut and fill calculations using Python programming language.

cross-section This repository is containing cut and fill calculations for cross-section using Python programming language. This codes is made to calcu

3 Jun 15, 2022
A Python package for searching journal publications and researchers

scholarpy A python package for searching journal publications and researchers Free software: MIT license Documentation: https://giswqs.github.io/schol

Qiusheng Wu 8 Mar 12, 2022
Source-o-grapher is a tool built with the aim to investigate software resilience aspects of Open Source Software (OSS) projects.

Source-o-grapher is a tool built with the aim to investigate software resilience aspects of Open Source Software (OSS) projects.

Aristotle University 5 Jun 28, 2022
Certipy is a Python tool to enumerate and abuse misconfigurations in Active Directory Certificate Services (AD CS).

Certipy Certipy is a Python tool to enumerate and abuse misconfigurations in Active Directory Certificate Services (AD CS). Based on the C# variant Ce

ollypwn 1.3k Jan 01, 2023
Web-based Sudoku solver built using Python. A demonstration of how backtracking works.

Sudoku Solver A web-based Sudoku solver built using Python and Python only The motivation is to demonstrate how Backtracking algorithm works. Some of

Jerry Ng 2 Dec 31, 2022
Check if Python package names are available on PyPI.

😻 isavailable Can I haz this Python package on PyPI? Check if Python package names are available on PyPI. Usage $ isavailable checks whether your des

Felipe S. S. Schneider 3 May 18, 2022
A dog facts python module

A dog facts python module

Fayas Noushad 3 Nov 28, 2021
MiniJVM is simple java virtual machine written by python language, it can load class file from file system and run it.

MiniJVM MiniJVM是一款使用python编写的简易JVM,能够从本地加载class文件并且执行绝大多数指令。 支持的功能 1.从本地磁盘加载class并解析 2.支持绝大多数指令集的执行 3.支持虚拟机内存分区以及对象的创建 4.支持方法的调用和参数传递 5.支持静态代码块的初始化 不支

keguoyu 60 Apr 01, 2022
Hashcrack - A non-object oriented open source, Software for Windows/Linux made in Python 3

Multi Force This project is a non-object oriented open source, Software for Wind

Radiationbolt 3 Jan 02, 2023