Skip to content

Add IP address filters for services #11585

@jeremystretch

Description

@jeremystretch

NetBox version

v3.4.3

Feature type

New functionality

Proposed functionality

Extend the Service model filterset to support filtering services by IP address or IP address ID:

    ipaddress_id = django_filters.ModelMultipleChoiceFilter(
        field_name='ipaddresses',
        queryset=IPAddress.objects.all(),
        label=_('IP address (ID)'),
    )
    ipaddress = django_filters.ModelMultipleChoiceFilter(
        field_name='ipaddresses__address',
        queryset=IPAddress.objects.all(),
        to_field_name='address',
        label=_('IP address'),
    )

Use case

Enables filtering services by IP address, and allows us to use an embedded table showing assigned services when displaying an IP address.

Database changes

No response

External dependencies

No response

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions