Skip to main content

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).

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/*

Project details


Download files

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

Source Distribution

nautobot-device-resources-1.0.0.tar.gz (29.2 kB view hashes)

Uploaded Source

Built Distribution

nautobot_device_resources-1.0.0-py3-none-any.whl (36.3 kB view hashes)

Uploaded Python 3

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