Replies: 1 comment 1 reply
-
Firstly, you can filter on a list, which simplifies the query a lot:
It's better to use the constants, because then you can't accidentally pick an invalid one:
Then you can use the pre-defined choice sets to get the whole set of interfaces of a particular type:
That doesn't give you all "wired" interfaces (it won't include FibreChannel, Infiniband, ATM etc). If you really want all non-wireless:
Of course, you're hoping that Netbox will never change the human-readable labels on the choice sets, but I think that's as good as you can get. There's an Interface Kind but I can't see any way that's associated to the interface type. |
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.
-
How can I filter for wired (non-wireless) interfaces? The
is_wired
property does not seem to be available as a filter. The only way I thought of is to useQ
with a list of all wired types, which is very unwieldy:Beta Was this translation helpful? Give feedback.
All reactions