When using the nb_lookup plugin for Ansible, when querying a prefix out of NetBox, based on a role attribute, people sometimes forget that while role is a string parameter in the REST API, it is not the Name attribute of the role, but actually the slug attribute.
This code doesn't work, and causes developer confusion
"msg": "An unhandled exception occurred while running the lookup plugin 'netbox.netbox.nb_lookup'.
Error was a <class 'pynetbox.core.query.RequestError'>, original message:
The request failed with code 400 Bad Request: {'role': ['Select a valid choice. NSX-T Virtual Edge Tep is not one of the available choices.']}"
So, it would be helpful if the NetBox UI listed the slug attribute in each object detail page, so that I don't have to log into netbox, find the prefix, and click the "Edit" button so I can see the slug
NetBox version
v2.11.7
Feature type
Change to existing functionality
Proposed functionality
Include the
slug
field in object detailsUse case
When using the
nb_lookup
plugin for Ansible, when querying a prefix out of NetBox, based on arole
attribute, people sometimes forget that whilerole
is a string parameter in the REST API, it is not theName
attribute of the role, but actually theslug
attribute.This code doesn't work, and causes developer confusion
Using the role's
slug
value works.So, it would be helpful if the NetBox UI listed the
slug
attribute in each object detail page, so that I don't have to log into netbox, find the prefix, and click the "Edit" button so I can see the slugDatabase changes
No response
External dependencies
No response