Skip to main content

Netbox plugin to manage attachments for any model

Reason this release was yanked:

Contains bug with serializer

Project description

NetBox Attachments Plugin

Netbox plugin for attaching files to any model.

Features

This plugin provide following Models:

  • NetBoxAttachment

Compatibility

Netbox Plugin
>= 3.3.4 0.0.0 <-> 0.0.5
>= 3.4.0 0.0.6 <-> 1.0.6
>= 3.4.3 1.0.7 <-> 1.1.X
>= 3.5.0 2.0.0
>= 3.6.0 3.0.0
>= 3.7.0 4.0.0
>= 4.0.0 5.0.0

Installation

The plugin is available as a Python package in pypi and can be installed with pip

pip install netbox-attachments

Enable the plugin in configuration.py:

PLUGINS = ['netbox_attachments']

Restart NetBox and add netbox-attachments to your local_requirements.txt

See NetBox Documentation for details

Configuration

The following options are available:

  • apps:
    • Type: List
    • Default: ['dcim', 'ipam', 'circuits', 'tenancy', 'virtualization', 'wireless']
    • Description: Display Attachments feature on all models definded under the app label. Attachmets are displayed on right_page of the detail-view of model.
  • display_default:
    • Type: String
    • Default: "additional_tab"
    • Options: "left_page", "right_page", "full_width_page", "additional_tab"
    • Description: Setup default setting of where attachments should be displayed under the models
  • display_setting:
    • Type: Dict
    • Default: {}
    • Options: {<app_label.model>: <prefeered_display>}
    • Example: {'dcim.devicerole': 'full_width_page', 'dcim.device': 'left_page', 'ipam.vlan': 'additional_tab'}
    • Description: Set display setting for concrete model
    • Tip: Proper app_label and model names could be found at API <your_netbox_url>/api/extras/content-types/

Warning additional_tab does not work for Plugin models

Configuration Example:

PLUGINS_CONFIG = {
    'netbox_attachments': {
        'apps': ['dcim', 'ipam', 'circuits', 'tenancy', 'virtualization', 'wireless', 'inventory_monitor'],
        'display_default': "right_page",
        'display_setting': {'ipam.vlan': "left_page", 'dcim.device': "full_width_page", 'dcim.devicerole': "full_width_page", 'inventory_monitor.probe': "additional_tab"}
    }
}

Enable Attachments for custom plugin (models)

  • Append your plugin to configuration list
    • apps: ['<plugin_name>']
  • Extend detail templates
    •   # At the TOP
        {% load plugins %}
        # Under a comments section
        {% plugin_right_page object %}
        # add the left_page and full_width for future extension
      

Screenshots

  • Model View Platform attachments
  • List View List View
  • Detail View Detail View

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netbox_attachments-5.0.1.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

netbox_attachments-5.0.1-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file netbox_attachments-5.0.1.tar.gz.

File metadata

  • Download URL: netbox_attachments-5.0.1.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for netbox_attachments-5.0.1.tar.gz
Algorithm Hash digest
SHA256 425a97888bc06ac0cb47b594eeef943cda8f61b8376264c2fbce8b91bc90570a
MD5 daaba6e47d2229996f22acb01739609f
BLAKE2b-256 f88dbb9643dc0f3522e330aae2b31c10dd4a1ef3fe51d7c6979dae3856197145

See more details on using hashes here.

File details

Details for the file netbox_attachments-5.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for netbox_attachments-5.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 319ead78d410c924ebb55005b7e1a22978727cfff418104f993343a6551dba19
MD5 f9e0bb82578a04be8f06064c36dd6e70
BLAKE2b-256 cd91198a255f788e02fc9c8734705e2d4aa48d88d56aca355c648d10787bc625

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page