-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Missing lookup filters for interface object fields #16511
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
Comments
Thanks for reporting an unexpected behavior you've encountered in NetBox. While I was able to reproduce the behavior in the lab, the team consensus is that MAC addresses are not currently expected to be filterable in this way. Please close this issue and open a new one using the feature request template, and using the Proposed functionality and Use case sections of that template to explain why this feature matters to you. |
As already mentioned in #16261. We used this feature in versions prior to 4.0.x. The removal of this, perhaps unintended, feature is unfortunately a breaking change for us. With 3.7.6 the filtering of this field is possible with GraphQL. |
If you can demonstrate that this change represents a functional regression, I'm willing to reconsider the FR characterization. Please update your issue body as follows:
I'm asking for these extra hoops not to discourage you, but to enable the very small team of maintainers to spend their time tracking down and fixing defects rather than interpolating aspects of the report that may seem obvious from your perspective. |
@jeffgdotorg I've updated the issue above. |
Fixed in my branch here: fixed query: query vendor_query($mac_vendor: String!, $facility_name: String!, $device_role: String!) {
site_list(filters: {facility: {exact: $facility_name}}) {
name
devices(filters: {role: {slug: {exact: $device_role}}}) {
name
interfaces(filters: {mac_addresses: {mac_address: {i_contains: $mac_vendor}}}) {
name
mac_addresses {
mac_address
}
}
}
}
} results: {
"data": {
"site_list": [
{
"name": "DM-Akron",
"devices": [
{
"name": "dmi01-akron-rtr01",
"interfaces": [
{
"name": "GigabitEthernet0/0/0",
"mac_addresses": [
{
"mac_address": "DE:AD:BE:EF:00:69"
}
]
}
]
}
]
}
]
}
} If you'll assign this to me I'll tag it in my PR. |
…etbox-community#7598, Closes netbox-community#18126, Closes netbox-community#17681, Closes netbox-community#16511, Closes netbox-community#16305: GraphQL Filter Redesign
…etbox-community#7598, Closes netbox-community#18126, Closes netbox-community#17681, Closes netbox-community#16511, Closes netbox-community#16305: GraphQL Filter Redesign
Blocked by #7598 |
I believe this has been resolved by the work on #7598. For example, the following will include all LAG interfaces for each device in the query: {
device_list {
name
interfaces(filters:{type:TYPE_LAG}) {
name
}
}
} This change will be implemented in NetBox v4.3. |
Uh oh!
There was an error while loading. Please reload this page.
Deployment Type
Self-hosted
NetBox Version
v4.0.5
Python Version
3.11
Linked Issue
#16261
#16354
Steps to Reproduce
NetBox v4.0.x - Observed Behavior
Query:
Query Variables
NetBox v3.7.6 - Expected Behavior
Query:
Query Variables
The text was updated successfully, but these errors were encountered: