Closed jvanderaa closed 3 years ago
Does this not already work by passing kwargs with exclude="config_context"
?
We are not able to do that on the filter, nor the all() endpoints if I'm not mistaken.
Filtered that does work, but all() does not.
In [4]: nb.dcim.devices.all(exclude="config_context")
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-4-f085f07e5fed> in <module>
----> 1 nb.dcim.devices.all(exclude="config_context")
TypeError: all() got an unexpected keyword argument 'exclude'
With that, I can move the inventory to use filter everywhere with exclude.
ya, I wouldn't expect it to work on all()
, but was pretty sure that it would for filter()
; can this be closed?
There are a few params that would be nice to be able to pass through on the endpoints, for
filter()
andall()
if possible. We should add the ability to exclude config contexts and to include computed fields.On the config contexts part, it is known that this is an expensive query to make. The nornir-nautobot inventory with REST API is using pynautobot to make this call. This is causing some timeouts at times on larger instances. Would like to have this capability to remove the call to get config contexts.
On the computed fields front, a new parameter was added. This would be good to add into the capabilities as long as params are being edited and looked at in the same light as excluding config contexts.