How to use vlan_vid__empty to fetch prefixes? #17703
Replies: 1 comment
-
I agree with you that the
You could raise a bug report for this (more details below).
I think the nearest you can do is:
That will find prefixes which are associated with a VLAN object where that VLAN object has a VID assigned, which is not exactly what you asked for, but may be sufficient if all your VLAN objects have VIDs (i.e. 802.1q tags). Since any non-empty VID must be between 1 and 4094, this is pretty much equivalent to The
Based on that code, I don't think I can't find any other filter that would do exactly what you want, and it seems like a reasonable feature request to ask for, e.g. Looking into the issue with
and there are a couple of test cases in
but I guess it hasn't been tested with actual REST API calls to ensure the string value is converted appropriately. |
Beta Was this translation helpful? Give feedback.
-
Hello there,
I am trying to fetch all prefixes which are associated with a VLAN.
For that I found the
vlan_vid__empty
filter set to do so. However I am not sure how to use this filter.As per the OpenAPI docs, the value should be an integer with a range from 1 to 4094 which I find strange for an isnull kind of filter.
If I enter a integer, I got the error
The QuerySet value for an isnull lookup must be True or False.
which again sounds correct, but I can also not enter a boolean value. Doing so results in the errorEnter a number.
I am using Netbox community version 4.1.3 on Rocky Linux.
Beta Was this translation helpful? Give feedback.
All reactions