Jeremy Stretch
46bd62fdc9
Merge branch 'develop' into feature
2024-04-22 13:23:42 -04:00
Arthur
94c31622ac
15588 set readonly nullable fields as allow_null=True
2024-04-19 16:17:28 -04:00
Jeremy Stretch
78e284c14f
Initialize dynamically-resolved serializers with nested=True
2024-02-27 14:56:36 -05:00
Jeremy Stretch
ca56c8b9ef
Add dynamic nesting support to SerializedPKRelatedField
2024-02-27 14:00:42 -05:00
Jeremy Stretch
c382ba0ae0
Refactor REST API serializers to avoid circular imports
2024-02-27 13:26:43 -05:00
Jeremy Stretch
c146f5e1b5
Replace nested serializers with primary serializers where possible
2024-02-26 16:49:30 -05:00
Jeremy Stretch
d042e6f69d
Closes #15238 : Include description field in brief mode
2024-02-26 11:39:31 -05:00
Jeremy Stretch
3f3bcc5eb5
Closes #15235 : Use primary serializers for REST API "brief" mode ( #15246 )
...
* Use primary serializers for brief mode
* Remove BriefModeMixin
* Correct ModuleBayTest brief_fields (see #15243 )
2024-02-23 14:21:25 -05:00
Jeremy Stretch
3ddacf4b88
Merge branch 'develop' into feature
2024-02-21 16:24:23 -05:00
Arthur Hanson
af27bf5eff
15094 Add missing gettext to error strings for internationalization ( #15155 )
...
* 15049 add missing gettext to error strings
* 15049 add missing gettext to error strings
* 15094 review change
* 15094 review change
* Formatting cleanup
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com >
2024-02-20 09:44:02 -05:00
Jeremy Stretch
7abb2b2ab5
Closes #15131 : Dynamic queryset annotations for REST API endpoints ( #15152 )
...
* Introduce RelatedObjectCountField
* Introduce get_annotations_for_serializer() and enable dynamic annotations
* Add RelatedObjectCountFields to serializers; remove static annotations from querysets
* Remove annotations cleanup logic from BriefModeMixin
* Annotate type for RelatedObjectCountField
* Remove redundant field on TagSerializer
* Add missing reverse relationship for power feeds to rack
* Refactor RelatedObjectCountField to take a single relationship name
2024-02-15 14:49:27 -05:00
Jeremy Stretch
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
Jeremy Stretch
12d830bcf2
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
2024-02-13 11:29:53 -05:00
Jeremy Stretch
25e67eb555
Merge branch 'develop' into feature
2023-12-15 16:52:42 -05:00
Jeremy Stretch
e59ee3e01e
Fixes #14397 : Pass a mutable copy of request data when provisioning available IPs
2023-12-07 11:20:03 -05:00
Jeremy Stretch
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
Tobias Genannt
72f01b3e89
Fix #14026 : Only get the needed amount of objects
2023-10-13 09:25:12 -04:00
Arthur Hanson
d03859b27b
13746 fix available ips API for posting custom-fields ( #13889 )
2023-10-05 15:53:57 -04:00
Arthur Hanson
bb6b4d01c1
12553 prefix serializer to IPAddress ( #13592 )
...
* 12553 prefix serializer to IPAddress
* Introduce IPNetworkField to handle prefix serialization
---------
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com >
2023-09-06 10:49:40 -04:00
Jeremy Stretch
44f8a777df
Merge branch 'develop' into feature
2023-08-15 11:04:03 -04:00
Arthur Hanson
9fd07b594c
11578 mark swagger available- apis to accept lists in post ( #13445 )
...
* 11578 change swagger for available-ips to accept lists
* 11578 change swagger for available-xxx to accept lists
2023-08-11 09:49:03 -04:00
Jeremy Stretch
837be4d45f
Merge branch 'develop' into feature
2023-07-11 10:09:26 -04:00
Jeremy Stretch
7419a8e112
Closes #11738 : Annotate utilization on VLAN groups ( #13108 )
...
* Update serializers.py
* Update vlans.py
* Update vlans.py
* Update vlangroup.html
* Update vlans.py
* Update vlans.py
* Update serializers.py
* adds db annotation to calculate utilization
* optimize queries
* merge fix
* adds round function for utilization to limit decimal
* fixed object view annotation
* consolidated queryset for utilization
* lint fixes
* Renamed manager method to annotate_utilization() for consistency with other managers
---------
Co-authored-by: Abhimanyu Saharan <desk.abhimanyu@gmail.com >
2023-07-06 14:51:28 -04:00
Jeremy Stretch
bace24b68e
12180 available objects api ( #12935 )
...
* Introduce AvailableObjectsView and refactor 'available objects' API views
* Restore advisory PostgreSQL locks
* Move get_next_available_prefix()
* Apply OpenAPI decorators for get() and post()
2023-06-20 15:04:10 -04:00
Arthur Hanson
55385dd0db
12278 add ipaddressfield serializer for OpenAPI spectacular typing ( #12285 )
...
* #12278 add serializer for ipaddressfield to remove spectacular warnings
* #12278 add ipaddressfieldserializer to nested serializers
* #12278 fix to_internal_value to_representation in serializer
* #12278 to_internal_value is called before validation! need to raise validation error if incorrect format
* #12278 to_internal_value needs to return value doh
* #12278 move IPAddressField to field_serializers
* #12278 remove old import
* 12278 remove validator
2023-04-21 12:41:03 -04:00
Arthur
15d80f4e1b
12195 remove incorrect null=True on choice fields
2023-04-21 12:23:07 -04:00
Jeremy Stretch
d470848b29
Closes #12246 : General cleanup of utilities modules
...
* Clean up base modules
* Clean up forms modules
* Clean up templatetags modules
* Replace custom simplify_decimal filter with floatformat
* Misc cleanup
* Merge ReturnURLForm into ConfirmationForm
* Clean up import statements for utilities.forms
* Fix field class references in docs
2023-04-14 10:33:53 -04:00
Arthur Hanson
ecd0c56554
Closes #9608 : Move from drf-yasg to spectacular
...
Co-authored-by: arthanson <worldnomad@gmail.com >
Co-authored-by: jeremystretch <jstretch@netboxlabs.com >
2023-03-30 14:32:59 -04:00
jeremystretch
536b46158a
Add mark_utilized to IPRange
2023-03-01 09:27:06 -05:00
Jeremy Stretch
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
Jeremy Stretch
bc6b5bc4be
Closes #10545 : Standardize description & comment fields on primary models ( #10834 )
...
* Standardize description & comments fields on primary models
* Update REST API serializers
* Update forms
* Update tables
* Update templates
2022-11-04 08:28:09 -04:00
jeremystretch
0b24d3d892
Merge branch 'develop' into feature
2022-11-01 17:13:11 -04:00
jeremystretch
aaf1ea52b7
Fixes #10791 : Permit nullifying VLAN group scope_type via REST API
2022-11-01 15:38:10 -04:00
Arthur
867af61875
10282 fix race condition in API IP creation
2022-10-31 15:04:43 -04:00
Arthur
e11d594122
9892 add supporting tests, form fields
2022-09-26 11:39:43 -07:00
Andreas Nieß
b11fa53519
Closes #10231 : Add missing serializer annotations
2022-09-01 17:18:09 +02:00
jeremystretch
de17a651e6
Closes #10043 : Add support for 'limit' query parameter to available VLANs API endpoint
2022-08-30 15:16:34 -04:00
Andreas Nieß
0b5478ad2d
Fixes #9895 : Change DictField serializers to JSONField
2022-08-29 08:02:38 +02:00
jeremystretch
29a611c729
Closes #9896 : Discontinue arbitrary use of OrderedDict
2022-08-01 16:51:44 -04:00
jeremystretch
abf11fbcb8
Merge branch 'develop' into feature
2022-07-20 12:20:33 -04:00
jeremystretch
e07dd3ddcb
Define NESTED_SERIALIZER_PREFIX constant
2022-07-15 15:31:42 -04:00
jeremystretch
3eb6b6c07f
Clean up core API imports
2022-07-13 16:18:55 -04:00
Daniel Sheppard
30350e3b40
More fixes as a result of code review
2022-07-06 08:57:15 -05:00
Daniel Sheppard
0004b834fb
Commit fixes Jeremy suggested
...
Co-authored-by: Jeremy Stretch <jstretch@ns1.com >
2022-07-06 08:17:50 -05:00
Daniel Sheppard
8e39e7f830
Change API urls to plural form
...
Co-authored-by: Jeremy Stretch <jstretch@ns1.com >
2022-07-06 08:03:07 -05:00
Daniel Sheppard
aa856e75e8
Change Virtual Circuits to L2VPN
...
Co-authored-by: Jeremy Stretch <jstretch@ns1.com >
2022-07-06 08:02:44 -05:00
Daniel Sheppard
b1729f2127
Change Virtual Circuits to L2VPN
...
Co-authored-by: Jeremy Stretch <jstretch@ns1.com >
2022-07-06 08:02:29 -05:00
Daniel Sheppard
6e983d1542
Fix up some PEP errors
2022-06-29 16:14:30 -05:00
Daniel Sheppard
3be9f6c4f3
#8157 - Final work on L2VPN model
2022-06-29 16:01:20 -05:00
Daniel Sheppard
03f1584d3a
L2VPN Clean Tree
2022-06-27 23:24:50 -05:00