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

140 Commits

Author SHA1 Message Date
3ddacf4b88 Merge branch 'develop' into feature 2024-02-21 16:24:23 -05:00
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
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
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
25e67eb555 Merge branch 'develop' into feature 2023-12-15 16:52:42 -05:00
e59ee3e01e Fixes #14397: Pass a mutable copy of request data when provisioning available IPs 2023-12-07 11:20:03 -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
72f01b3e89 Fix #14026: Only get the needed amount of objects 2023-10-13 09:25:12 -04:00
d03859b27b 13746 fix available ips API for posting custom-fields (#13889) 2023-10-05 15:53:57 -04:00
44f8a777df Merge branch 'develop' into feature 2023-08-15 11:04:03 -04:00
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
837be4d45f Merge branch 'develop' into feature 2023-07-11 10:09:26 -04:00
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
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
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
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
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
8001694a4c 10282 fix race condition in API IP creation 2022-11-01 17:09:55 -04:00
de17a651e6 Closes #10043: Add support for 'limit' query parameter to available VLANs API endpoint 2022-08-30 15:16:34 -04:00
0004b834fb Commit fixes Jeremy suggested
Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2022-07-06 08:17:50 -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
bddc35bbc7 Closes #8496: Enable assigning multiple ASNs to a provider 2022-03-30 17:17:36 -04:00
bbdeae0ed9 Move CustomFieldModelViewSet functionality into NetBoxModelViewSet 2022-03-09 11:44:55 -05:00
efd5a73a18 Refactor API views 2022-03-09 11:27:42 -05:00
97e7ef9a3f Introduce ServiceTemplate 2022-01-12 16:42:28 -05:00
e0cfd5e49b Closes #2658: Avalable VLANs API endpoint for VLAN groups 2021-12-23 10:14:28 -05:00
7c14c0812b Fixes #7519: Return a 409 status for unfulfillable available prefix/IP requests 2021-12-10 15:11:45 -05:00
91fe158c26 Restore endpoint schema documentation 2021-12-10 13:23:49 -05:00
661b3c4bfb Fix queryset restrictions 2021-12-10 12:52:48 -05:00
35eabc0353 Move available IPs endpoints to separate views 2021-12-10 12:37:55 -05:00
ef5bbdb1e2 Move available prefixes endpoint to its own view 2021-12-10 11:40:57 -05:00
5f59f458f4 Fixes #7880: Include assigned IP addresses in FHRP group object representation 2021-11-19 11:34:59 -05:00
db2d71ed9e Merge branch 'feature' into 6732-asn-model 2021-11-03 08:37:11 -05:00
131e433880 Rename FHRPGroupAssignment object to interface 2021-11-02 15:10:02 -04:00
264652f2c3 REST API optimizations 2021-11-02 14:08:36 -04:00
bb4f3e1789 Initial work on #6235 2021-11-01 16:56:30 -04:00
3991115ae5 #6732 - Fix imports and other small items 2021-10-29 14:54:55 -05:00
033db83068 Merge branch 'feature' of https://github.com/netbox-community/netbox into 6732-asn-model 2021-10-28 11:55:20 -05:00
a01068949c Initial work on #6732 2021-10-24 23:42:47 -05:00
cfb3897047 Add tags to organizational & nested group models 2021-10-21 10:51:02 -04:00
0fe1a426c0 Add available IPs REST API endpoint for IP ranges 2021-07-19 09:32:04 -04:00
747c065213 Move available IP/prefix endpoints to API view mixins 2021-07-16 14:48:42 -04:00
11a14927c9 Initial work on IP ranges 2021-07-16 13:35:52 -04:00
1024782b9e Rename FilterSet modules 2021-04-29 16:48:24 -04:00
4dae781be0 Change VLANGroup site to scope (GFK) 2021-03-09 16:18:59 -05:00
664a39911c Add custom field support for organizational models to API serializers 2021-02-25 15:58:13 -05:00
b392502b9b Fixes #5841: Disallow the creation of available prefixes/IP addresses in violation of assigned permission constraints 2021-02-24 14:21:42 -05:00
aabc1a8265 Fixes: #5232 - Corrects swagger definition 2021-01-26 10:42:01 -06:00
4a066a1913 Rename get_subquery() to count_related() 2020-12-17 14:47:49 -05:00