-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to Get Computed Fields #20
Comments
Also not in the platform itself, where the web UI has it:
|
This is because computed fields are not provided by default. |
Agreed. So we need to be able to provide this as an option. Do we have a method to do so? |
There is not currently an interface for grabbing fields excluded by the Serializer |
Makes sense. So to use this, should we look to have Nautobot move this? |
It would be good for pynautobot to have an option to specify custom query parameters in order to support this as well as other such use cases - for example I have a plugin under development where there's a custom |
I think it's already working, I was able to query some computed fields with the current version of pynautobot >>> import pynautobot
>>> nautobot = pynautobot.api( url="https://demo.nautobot.com/", token="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
>>>
>>> intf = nautobot.dcim.interfaces.filter(device="ams01-edge-01", name="Ethernet1/1", include="computed_fields")[0]
>>> intf.computed_fields.ntc_description
'peer=ams01-edge-02 | peer_intf=Ethernet1/1 | peer_role=edge' The only thing is that |
IMO, that is pretty hacky. It should also work with the |
New in 1.1.0 is computed fields. There should be an object endpoint to see the computed fields.
I would anticipate that there should be computed fields showing up here in the same way
local_context_data
does.The text was updated successfully, but these errors were encountered: