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

89 Commits

Author SHA1 Message Date
c382ba0ae0 Refactor REST API serializers to avoid circular imports 2024-02-27 13:26:43 -05:00
c146f5e1b5 Replace nested serializers with primary serializers where possible 2024-02-26 16:49:30 -05:00
d042e6f69d Closes #15238: Include description field in brief mode 2024-02-26 11:39:31 -05:00
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
3ddacf4b88 Merge branch 'develop' into feature 2024-02-21 16:24:23 -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
040dbcc875 Fixes #15070: Fix inclusion of config_template field on REST API serializer for virtual machines 2024-02-08 09:10:24 -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
549b0ea107 Closes #8356: Add virtual disk to Virtual Machines (#14087)
* 8356 add virtual disk model

* 8356 add supplemental forms

* 8356 add menu

* 8356 cleanup views

* 8356 virtual machine tab

* 8356 migrations

* 8356 vm disk tables

* 8356 cleanup

* 8356 graphql

* 8356 graphql

* 8356 add components button

* 8356 bulk add on virtualmachine

* 8356 bulk add fixes

* 8356 api tests

* 8356 news tests add rename

* 8356 VirtualDiskCreateForm

* 8356 fix test

* 8356 add todo to remove disk from vm

* 8356 review changes

* 8356 fix test

* 8356 deprecate disk field

* 8356 review changes

* 8356 fix test

* 8356 fix test

* Simplify view actions

* 8356 review changes

* 8356 split trans tag

* 8356 add total virtual disk size to api

* 8356 add virtual disk list to virtual machine detail view

* 8356 move virtual disk size to property

* 8356 revert property

* Tweak display of deprecated disk field

* 8356 render single disk field

* 8356 update serializer

* 8356 model property

* 8356 fix test

* 8356 review changes

* Revert disk space annotation

* Use existing disk field to store aggregate virtual disk size

* Introduce abstract ComponentModel for VM components

* Add search index for VirtualDisk

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-17 15:02:56 -05:00
752e26c7de Adds config template to vm model (#13450)
* adds config template to vm model #12461

* Add translation tags; collapse config data

* i18n cleanup

* Establish parity with DeviceRenderConfigView

* Move config_template field to RenderConfigMixin

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-14 15:43:28 -04:00
149a496011 6347 Cache the number of each component type assigned to devices/VMs (#12632)
---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-25 09:39:05 -04:00
47f3023401 Fixes #12412: Device/VM interface MAC addresses can be nullified via REST API 2023-05-01 13:06:10 -04:00
15d80f4e1b 12195 remove incorrect null=True on choice fields 2023-04-21 12:23:07 -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
19da92b510 #11488: Additional cleanup 2023-01-17 10:26:34 -05:00
beb1f4e172 added missing description field on the api serializers 2023-01-17 10:20:34 -05:00
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
0b5478ad2d Fixes #9895: Change DictField serializers to JSONField 2022-08-29 08:02:38 +02:00
3eb6b6c07f Clean up core API imports 2022-07-13 16:18:55 -04:00
4d3278cb52 #8157: Clean up L2VPN assignment for VM interfaces 2022-07-06 13:31:31 -04:00
db42589cca Closes #5303: A virtual machine may be assigned to a site and/or cluster 2022-05-26 14:59:49 -04:00
b331f047af Closes #8222: Enable the assignment of a VM to a specific host device within a cluster 2022-05-25 16:01:10 -04:00
64146b8cb1 Closes #8471: Add status field to Cluster 2022-05-19 16:13:22 -04:00
a11abf87ec Refactor API serializers 2022-03-09 10:59:22 -05:00
3651ef53e3 #7852: Extend VRF assignment to VM interfaces 2022-02-07 09:54:00 -05:00
67c73768c1 Add count_fhrp_groups to interface serializers 2021-11-04 09:58:33 -04:00
e1e2c76ae1 Add bridge field to Interface, VMInterface models 2021-10-21 16:30:18 -04:00
cfb3897047 Add tags to organizational & nested group models 2021-10-21 10:51:02 -04:00
8375995680 Closes #1943: Relax uniqueness constraint on cluster names 2021-10-19 13:06:41 -04:00
b0573f88e6 Merge branch 'develop' into feature 2021-04-11 13:16:00 -04:00
a3721a94ce Closes #6121: Extend parent interface assignment to VM interfaces 2021-04-09 10:53:05 -04:00
e69251b21a Fixes #6070: Add missing 'count_ipaddresses' attribute to VMInterface serializer 2021-04-08 14:22:45 -04:00
fb48c1f6dd Add 'display' field to all REST API serializers 2021-03-16 10:06:25 -04:00
fca5accba8 Clean up base serializers 2021-03-12 13:31:28 -05:00
ac0c54cce4 #5401: Add custom field support for VMInterface 2021-03-10 13:49:10 -05:00
12fbd34962 Introduce NestedGroupModelSerializer 2021-02-25 17:15:42 -05:00
ed059d80d6 Introduce OrganizationalModelSerializer 2021-02-25 16:44:16 -05:00
664a39911c Add custom field support for organizational models to API serializers 2021-02-25 15:58:13 -05:00
5a4234fcb9 Standardize validation of interface VLAN assignments 2020-12-02 14:19:02 -05:00
c0c5f52ed9 Reorganize REST API components under netbox app 2020-10-13 15:57:21 -04:00
924f319343 Closes #4806: Add a url field to all API serializers 2020-07-06 16:41:08 -04:00
548127cc88 Rename VMInterface serializers 2020-06-23 15:46:20 -04:00
75354a8a78 Rename Interface to VMInterface 2020-06-23 13:21:44 -04:00
6cb31a274f Initial work on #4721 (WIP) 2020-06-22 13:10:56 -04:00
448dc1442c Replace TaggitSerializer and TagListSerializerField with TaggedObjectSerializer 2020-06-17 09:57:17 -04:00
cebe580484 Add a description field to all organizational models 2020-03-13 16:33:28 -04:00
7388fa3556 Fixes #4083: Permit nullifying applicable choice fields via API requests 2020-02-10 15:10:33 -05:00
fe490d144a Fixes #3868: Fix creation of interfaces for virtual machines 2020-01-09 14:54:25 -05:00
5ac4a3ba79 Omit default uniqueness validator from VirtualMachineSerializer, which implies required fields 2019-12-09 12:11:42 -05:00
ca11b9a2f5 VirtualMachine.status to slug 2019-12-04 20:40:18 -05:00