Return a single result with Pynetbox. #9230
AaronJamesMyers
started this conversation in
General
Replies: 2 comments 1 reply
-
Edit: I misread the post and thought you wanted to create a netbox script. |
Beta Was this translation helpful? Give feedback.
0 replies
-
and
or
To be clear, the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Im new to the Programming world. but ive made some headway here.
I'm trying to write a script that will autoassign the next available interface on a device using pynetbox.
uplinkports = nb.dcim.interfaces.filter(device=UplinkCLLI, connected="false")
I can iterate and print these results. But I can't find a way to just extract the first value from the Recordset.
Is there a filter option that will allow me to only return a single results, or a way to select the first returned value.
I can do this using the Netbox API, but was just wondering if i can save a few lines of code and do this with Pynetbox.
Beta Was this translation helpful? Give feedback.
All reactions