1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

222 Commits

Author SHA1 Message Date
313e63622b Extend logic for validating filter class 2024-03-11 15:35:40 -04:00
b36a70d236 Add missing filters for reverse many-to-many relationships 2024-03-11 14:39:34 -04:00
6085e0bb0b Test for missing ManyToManyField filters 2024-03-11 14:39:34 -04:00
5cb7af88d4 Fix remaining tests 2024-03-11 14:39:34 -04:00
6af12b1814 Add tests for missing FilterSet filters 2024-03-11 14:39:34 -04:00
d042e6f69d Closes #15238: Include description field in brief mode 2024-02-26 11:39:31 -05:00
b3f25a400b Closes #15087: Support for specifying a subset of API serializer fields (#15122)
* Enable dynamic field inclusion for REST API serializers

* Recurse through nested serializer when resolving prefetches

* Remove obsolete calls to prefetch_related() for API views

* Remove support for brief_prefetch_fields viewset attribute

* Rename query parameter

* Fixes #15133: Fix FHRP group representation on assignments endpoint under brief mode (#15134)

* Fixes #15133: Fix FHRP group representation on assignments endpoint under brief mode

* Update API test

* Restore get_queryset() on BriefModeMixin, minus prefetch logic

* get_prefetches_for_serializer() should reference serializer field source if set
2024-02-14 09:28:37 -05:00
d5c1cb0ef6 Merge branch 'develop' into feature 2023-12-28 14:20:04 -05:00
3ef2db81e8 Closes #14629: Add filter tests for all q and description filters 2023-12-28 13:53:16 -05:00
1f2f0860fe Merge branch 'develop' into feature 2023-12-27 16:34:38 -05:00
8dfec7e2b2 Closes #14538 - Add available_at_site filter (#14541)
* Closes #14538 - Add available_at_site filter

* Add tests

* Fix tests
2023-12-21 15:40:57 -05:00
a233dc91fe Closes #14536: Enable ENFORCE_GLOBAL_UNIQUE by default 2023-12-20 11:09:40 -05:00
d2fea4edc4 Closes #14311: Move L2VPN models from ipam to vpn (#14358)
* Move L2VPN and L2VPNTermination models from ipam to vpn

* Move L2VPN resources from ipam to vpn

* Extend migration to update content types

* Misc cleanup
2023-11-28 13:45:00 -05:00
e5c38e0829 Closes #13022: Add IP assignment support when bulk importing services (#14230)
* issue 13022 resolved, ipaddress added into bulk_import form

* validation of ip address for device and virtual machine

* error message modified

* error message modified

* error message modified

* Fix form validation

* Extend bulk import test

---------

Co-authored-by: yash-pal1 <ypal@onemindservices.com>
Co-authored-by: yash-pal1 <ypal@onemindservies.com>
2023-11-09 10:55:55 -05:00
1203d761f4 Adds mask length filters on ipaddress (#14218)
* adds mask length filters on ipaddress #14101

* Change IPaddress mask_length filter to multi-value; extend tests

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-09 08:46:14 -05:00
db40119faa 13130 dont allow reassigning ipaddress assigned object if primary ip (#13893)
* 13130 dont allow reassigning ipaddress assigned object if primary ip

* 13130 add tests fix parent check

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-26 15:16:02 -04:00
2a4e3dd09f Merge branch 'develop' into feature 2023-08-29 10:45:55 -04:00
8d8f57e8b8 Adds parent filter on iprange (#13568)
* adds parent filter on iprange #13313

* lint fix

* adds filterset test

* Filter should match both start & end of IP range

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-28 09:05:43 -04:00
914588f55d Merge branch 'develop' into feature 2023-08-09 15:31:21 -04:00
57860f26b7 Adds assigned bool for IP address API (#13301)
* adds assigned bool for ip address API #13151

* Add filterset test

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-02 15:45:09 -04:00
0bb86f1e7d Replaces device_role with role on device model (#13342)
* replaces device_role with role on device model #6391

* fixes lint issue #6391

* revert the database user

* revert test_runner comment

* changes as per review

* Update references to device_role column in UserConfigs

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-02 09:55:52 -04:00
0e873a01b8 Closes #12622: Fix assigning VLAN without site to Prefix (#12784)
* Issue #12622: Fix creating Prefix using VLAN without site

* Issue #12622: Fix importing Prefix using VLAN without site

This commit also adds tests to verify the import changes implemented
in this commit.

* Issue #12622: Cleanup code to filter allowed VLANs on a prefix import

* Closes #12622: Switch to VLAN selector dialog when creating Prefix
2023-06-14 13:49:00 -04:00
08017c51f6 Merge branch 'develop' into feature 2023-04-07 13:00:00 -04:00
2bf9acfb19 Closes #12193: Clean up tests (#12197)
* Fix skipped API tests

* Remove invalid tests

* Correct logger name
2023-04-06 16:35:27 -04:00
0ddd7b0e45 Disable bulk update test for L2VPN terminations 2023-03-17 10:09:57 -04:00
2a9178af12 Merge branch 'develop' into feature 2023-03-13 11:58:37 -04:00
6640fc9eb7 Fixes #11470: Validation and user friendly message on invalid address query param (#11858)
* Fixes #11470: Validation and user friendly message on invalid address query param

* Update invalid input handling to return empty set instead of raising exception
2023-03-01 16:49:40 -05:00
7994073687 Closes #8550: Implement ASN ranges (#11835)
* Move ASN to a separate module

* Move ASNField from dcim to ipam

* Introduce ASNRange model

* Add relationship from ASN to ASNRange

* Add an available-asns API endpoint

* Add RIR assignment for ASNRange

* Add standard tests

* Move child ASNs to a tabbed view

* Remove FK on ASN to ASNRange

* Add tests for provisioning available ASNs

* Add docs for ASNRange
2023-02-27 16:36:05 -05:00
c031951f4b Closes #11110: Add start_address and end_address filters for IP ranges 2023-02-17 16:50:10 -05:00
9cb75e9834 Closes #11585: Add IP address filters for services 2023-01-25 21:25:25 -05:00
5a77791f9d Merge branch 'develop' into feature 2022-12-08 09:31:22 -05:00
780997a568 Closes #11119: Enable filtering L2VPNs by slug 2022-12-06 15:48:22 -05:00
d4a231585a Clean up tests 2022-11-17 10:50:05 -05:00
93e7457e0d 4347 Add JSON/YAML import support for all objects (#10367)
* 4347 initial code for json import

* 4347 initial code for json import

* Clean up form processing logic

* Consolidate import forms

* Consolidate object import/update logic

* Clean up bulk import view

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-11-10 11:01:52 -05:00
cb815ede60 7961 CSV bulk update (#10715)
* 7961 add csv bulk update

* temp checkin - blocked

* 7961 bugfix and cleanup

* 7961 change to id, add docs

* 7961 add tests cases

* 7961 fix does not exist validation error

* 7961 fix does not exist validation error

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 make test cases more explicit

* 7961 make test cases more explicit

* 7961 make test cases more explicit

* 7961 make test cases more explicit

* 7961 make test cases more explicit

* 7961 make test cases more explicit

* 7961 make test cases more explicit

* 7961 optimize loading csv test data

* 7961 update tests remove redundant code

* 7961 avoid MPTT issue in test cases
2022-10-27 13:10:18 -04:00
3eeb31d577 9892 doh - fix tests 2022-09-26 11:49:51 -07:00
e11d594122 9892 add supporting tests, form fields 2022-09-26 11:39:43 -07:00
de17a651e6 Closes #10043: Add support for 'limit' query parameter to available VLANs API endpoint 2022-08-30 15:16:34 -04:00
bfbf97aec9 Closes #10031: Enforce 'application/json' content type for REST API requests 2022-08-24 15:49:36 -04:00
2baf06e012 Add unique slugs to L2VPNs in relevant tests 2022-08-24 14:46:42 -04:00
37c4f1a7d3 Fix up a few minor mistakes. Add tests. 2022-08-02 13:38:17 -05:00
53372a7471 #8157: General cleanup & fix tests 2022-07-11 21:51:39 -04:00
29eb37857c Merge branch 'develop' into feature 2022-07-08 16:06:27 -04:00
6e983d1542 Fix up some PEP errors 2022-06-29 16:14:30 -05:00
3be9f6c4f3 #8157 - Final work on L2VPN model 2022-06-29 16:01:20 -05:00
03f1584d3a L2VPN Clean Tree 2022-06-27 23:24:50 -05:00
8a4c808be5 Closes #8882: Support filtering IP addresses by multiple parent prefixes 2022-06-07 11:00:14 -04:00
cffc064a33 Add device & vm to FHRPGroupAssignmentFilterSet (#9314)
* Add device & vm to `FHRPGroupAssignmentFilterSet`

* Apply suggestions from code review

* Update netbox/ipam/tests/test_filtersets.py

* Update netbox/ipam/filtersets.py

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2022-05-11 10:27:50 -04:00
ffef78d426 Merge pull request #9112 from sc68cal/rfc_4291
Closes #4264: Do not allocate subnet router anycast for IPv6 prefixes
2022-04-27 15:30:05 -04:00
b5613a2cc6 Do not allocate subnet router anycast in certain IPv6 prefixes 2022-04-26 14:54:52 -04:00