diff --git a/docs/additional-features/napalm.md b/docs/additional-features/napalm.md index d2d69fc3c..957a5a214 100644 --- a/docs/additional-features/napalm.md +++ b/docs/additional-features/napalm.md @@ -2,6 +2,13 @@ NetBox supports integration with the [NAPALM automation](https://napalm-automation.net/) library. NAPALM allows NetBox to serve a proxy for operational data, fetching live data from network devices and returning it to a requester via its REST API. Note that NetBox does not store any NAPALM data locally. +The NetBox UI will display tabs for status, LLDP neighbors, and configuration under the device view if the following conditions are met: + +* Device status is "Active" +* A primary IP has been assigned to the device +* A platform with a NAPALM driver has been assigned +* The authenticated user has the `dcim.napalm_read_device` permission + !!! note To enable this integration, the NAPALM library must be installed. See [installation steps](../../installation/3-netbox/#napalm) for more information. diff --git a/docs/release-notes/version-2.10.md b/docs/release-notes/version-2.10.md index 2b47faec0..d9eb9b668 100644 --- a/docs/release-notes/version-2.10.md +++ b/docs/release-notes/version-2.10.md @@ -2,6 +2,10 @@ ## v2.10.9 (FUTURE) +### Enhancements + +* [#6054](https://github.com/netbox-community/netbox/issues/6054) - Display NAPALM-enabled device tabs only when relevant + ### Bug Fixes * [#6073](https://github.com/netbox-community/netbox/issues/6073) - Permit users to manage their own REST API tokens without needing explicit permission diff --git a/netbox/templates/dcim/device/base.html b/netbox/templates/dcim/device/base.html index 8f488b284..f2f8202a1 100644 --- a/netbox/templates/dcim/device/base.html +++ b/netbox/templates/dcim/device/base.html @@ -153,16 +153,17 @@ {% endif %} {% endwith %} - {% if perms.dcim.napalm_read_device %} - {% if object.status != 'active' %} - {% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='Device must be in active status' %} - {% elif not object.platform %} - {% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='No platform assigned to this device' %} - {% elif not object.platform.napalm_driver %} - {% include 'dcim/inc/device_napalm_tabs.html' with disabled_message='No NAPALM driver assigned for this platform' %} - {% else %} - {% include 'dcim/inc/device_napalm_tabs.html' %} - {% endif %} + {% if perms.dcim.napalm_read_device and object.status == 'active' and object.primary_ip and object.platform.napalm_driver %} + {# NAPALM-enabled tabs #} + + + {% endif %} {% if perms.extras.view_configcontext %} - - -{% else %} - - - -{% endif %}