Nautobot Device Resources plugin
Project description
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).
Adding or editing device form is replaced to contain DeviceResources model fields at the very bottom.
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:
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).
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.
CPUs can be added through UI, the form is accessible from Device menu under Device Components
.
Device list view is replaced to have columns for all the resources fields plus it supports filtering by the resources.
All CPUs can be listed and filtered in a new separate CPU model view.
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.
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/*
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
Built Distribution
File details
Details for the file nautobot-device-resources-1.0.0.tar.gz
.
File metadata
- Download URL: nautobot-device-resources-1.0.0.tar.gz
- Upload date:
- Size: 29.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85105c3bab65e2469e9829863161389f621c74fbf7083a4a892efbbab815eaf8 |
|
MD5 | 5518b2521378c9153e2f7c43912d1848 |
|
BLAKE2b-256 | 044cc8c0e876924f33f66cef97c8177ce7351b78b28b0b61b77c51c9ebf82b51 |
File details
Details for the file nautobot_device_resources-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: nautobot_device_resources-1.0.0-py3-none-any.whl
- Upload date:
- Size: 36.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e13e8a375349ddc2deb1950d0059c43b1fa84d59bdcf065fe74091068cebe931 |
|
MD5 | b4113ce6d24abe27db18d6a90fbf65d2 |
|
BLAKE2b-256 | ed20ad22637800a909f2745a7be79335a17eee276f6553ff95d6e0cca9c61769 |