Skip to content

Conversation

@miaow2
Copy link
Contributor

@miaow2 miaow2 commented Apr 12, 2025

Fixes: #19110

Add filters by IP addresses to PrimaryIPFilterSet

@jnovinger jnovinger requested review from a team and jnovinger and removed request for a team April 14, 2025 13:00
params = {'primary_ip6_id': [addresses[2].pk]}
self.assertEqual(self.filterset(params, self.queryset).qs.count(), 0)
params = {'primary_ip6': [str(addresses[2].address)]}
self.assertEqual(self.filterset(params, self.queryset).qs.count(), 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miaow2 , can you please update these same tests in dcim.tests.test_filtersets.py:DeviceTestCase and dcim.tests.test_filtersets.py:VirtualDeviceContextTestCase

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jnovinger Hi, I've updated tests dcim.tests.test_filtersets.py:DeviceTestCase and dcim.tests.test_filtersets.py:VirtualDeviceContextTestCase

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@miaow2 miaow2 requested a review from jnovinger April 17, 2025 10:42
@jnovinger jnovinger added this to the v4.2.9 milestone Apr 23, 2025
@jnovinger jnovinger merged commit 2c3fe97 into netbox-community:main Apr 23, 2025
3 checks passed
@jnovinger jnovinger removed this from the v4.2.9 milestone Apr 23, 2025
@miaow2 miaow2 deleted the 19110-primaryip-filters branch April 23, 2025 14:54
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow VirtualMachine and Device filter by IP address from Primary IP

2 participants