Skip to main content

Nautobot Device Resources plugin

Plugin for Nautobot to provide device resources info (CPU, RAM, ...) to Nautobot (IPPlan) Device detail view.

This works by extending or replacing several core views to inject device resources information to various places with a goal of seamless integration and behaving as close to part of Nautobot Core as possible. It allows a user to interact with a Device and its Resources like it is a single model, completely removing any layering between Device and DeviceResources models.

The goal is to store data on Device HW configuration directly with a Device and to allow answers to questions like:

  • Which Devices have this CPU model?
  • How many Devices I have with more than 512GB RAM?
  • Which Devices have more than 16 cores?
  • When did we change disks configuration of this Device?

Please check the Screenshots section for detailed information on this plugin capabilities.

View replacements

This plugin replaces some core views. If there is another plugin with core view replacement, please check if there is not a conflict. Replacing same view from multiple sources does not work!

Views replaced:

  • dcim:device_add
  • dcim:device_edit
  • dcim:device_list
  • dcim:device_import
  • extras:objectchange

Screenshots

Device view is extended to show resources on the right side. If any field (for example GPU is empty, it does not show at all).

device_detail.png

Adding or editing device form is replaced to contain DeviceResources model fields at the very bottom.

device_edit.png

ObjectChange view shows any change to Device or its DeviceResources directly, behaving like single core model. Here is a change to both Device (status) and its DeviceResources showing like single change. In reality those are 2 changes but to user it looks like this in UI:

device_changelog.png

Each CPU has its own model, directly linked from Device. There is direct link to a parent Manufacturer of the CPU and all Devices with this CPU (Instances count is direct link to Device list with a filter for this CPU).

cpu_detail.png

Manufacturer detail is extended to show CPUs only when any CPU has this manufacturer (hidden otherwise). The Instances count is direct link to CPu list with this Manufacturer filter.

manufacturer_detail.png

CPUs can be added through UI, the form is accessible from Device menu under Device Components.

cpu_add.png

Device list view is replaced to have columns for all the resources fields plus it supports filtering by the resources.

device_list.png

All CPUs can be listed and filtered in a new separate CPU model view.

cpu_list.png

Accessing all this data is possible via GraphQL and REST API too, but it is not merged to the core Device model APIs as Nautobot does not allow replacing API views. In GraphQL there is a link directly from Device called resources which provides the information in nested way. In REST API there is a separate endpoint resources under the installed plugin.

graphql_device.png rest_api.png

Development

Have running Nautobot instance (preferably in Docker) with this plugin installed. Make sure you have TEST_USE_FACTORIES = True in you nautobot_config.py.

pip install -e .[all]
pre-commit run --all-files
nautobot-server migrate
nautobot-server test nautobot_device_resources

Build package

pip install build
python -m build --sdist --wheel
twine check dist/*

Metadata

Release files for nautobot-device-resources 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nautobot-device-resources 1.0.0
File Size Uploaded
nautobot-device-resources-1.0.0.tar.gz 29.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nautobot-device-resources 1.0.0
File Interpreter ABI Platform
nautobot_device_resources-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 65.5 kB

Release files / nautobot-device-resources-1.0.0.tar.gz

Download URL nautobot-device-resources-1.0.0.tar.gz
Size 29.2 kB
Tags Source
SHA-256 checksum
How to use checksums
85105c3bab65e2469e9829863161389f621c74fbf7083a4a892efbbab815eaf8
BLAKE2b-256 checksum
How to use checksums
044cc8c0e876924f33f66cef97c8177ce7351b78b28b0b61b77c51c9ebf82b51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / nautobot_device_resources-1.0.0-py3-none-any.whl

Download URL nautobot_device_resources-1.0.0-py3-none-any.whl
Size 36.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e13e8a375349ddc2deb1950d0059c43b1fa84d59bdcf065fe74091068cebe931
BLAKE2b-256 checksum
How to use checksums
ed20ad22637800a909f2745a7be79335a17eee276f6553ff95d6e0cca9c61769
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page