ip-address filter modifiers (__ic, __nic) for "interface" not functioning #8467

Closed
opened 2025-12-29 20:37:08 +01:00 by adam · 1 comment
Owner

Originally created by @DCAuto on GitHub (Aug 14, 2023).

NetBox version

v3.4.5

Python version

3.9

Steps to Reproduce

using pynetbox module searching for all lo0 interfaces with a "." in them returns the "base" interface as well.

nb.ipam.ip_addresses.filter(device='TEST-DEVICE', interface__ic='lo0.')

The __ic and __nic modifiers do not function when filtering for assigned-interface-name

Expected Behavior

Returns a list of addresses associated with "lo0.0", "lo0.1", "lo0.2" but omits the base interface "lo0"

Observed Behavior

All 4 addresses are returned.

Originally created by @DCAuto on GitHub (Aug 14, 2023). ### NetBox version v3.4.5 ### Python version 3.9 ### Steps to Reproduce using pynetbox module searching for all lo0 interfaces with a "." in them returns the "base" interface as well. nb.ipam.ip_addresses.filter(device='TEST-DEVICE', interface__ic='lo0.') The __ic and __nic modifiers do not function when filtering for assigned-interface-name ### Expected Behavior Returns a list of addresses associated with "lo0.0", "lo0.1", "lo0.2" but omits the base interface "lo0" ### Observed Behavior All 4 addresses are returned.
adam closed this issue 2025-12-29 20:37:08 +01:00
Author
Owner

@kkthxbye-code commented on GitHub (Aug 14, 2023):

This is expected as it is documented:

https://docs.netbox.dev/en/stable/reference/filtering/#foreign-keys-other-fields

Certain other fields, namely foreign key relationships support just the negation expression

Closing as this is not a bug. A feature request would be needed to evaluate changing it.

@kkthxbye-code commented on GitHub (Aug 14, 2023): This is expected as it is documented: https://docs.netbox.dev/en/stable/reference/filtering/#foreign-keys-other-fields > Certain other fields, namely foreign key relationships support just the negation expression Closing as this is not a bug. A feature request would be needed to evaluate changing it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8467