Commit Graph

627 Commits

Author SHA1 Message Date
jeremystretch
d9993c5b76 Move CustomFieldModelViewSet functionality into NetBoxModelViewSet 2022-03-09 11:44:55 -05:00
jeremystretch
b0621f7fca Refactor API views 2022-03-09 11:27:42 -05:00
jeremystretch
c813f56a27 Refactor API serializers 2022-03-09 10:59:22 -05:00
jeremystretch
510a5fbb69 Merge v3.1.7 2022-02-03 12:55:34 -05:00
jeremystretch
d0d6ae5d61 Fixes #8465: Accept empty string values for Interface rf_channel in REST API 2022-01-28 14:03:36 -05:00
Daniel Sheppard
617842b0fe Merge branch 'feature' of https://github.com/netbox-community/netbox into 7853-speed_duplex 2022-01-20 13:12:04 -06:00
jeremystretch
cd4b695f9d Merge v3.1.6 2022-01-17 11:12:54 -05:00
Jason Yates
1eaf7912a8 Fixes #8342
created & last_updated fields are missing from some REST API calls. Added missing fields to the following API calls

/api/dcim/virtual-chassis/
/api/dcim/cables/
/api/dcim/power-panels/
/api/dcim/rack-reservations/
/api/circuits/circuit-terminations/
/api/extras/webhooks/
/api/extras/custom-fields/
/api/extras/custom-links/
/api/extras/export-templates/
/api/extras/tags/
2022-01-13 19:13:28 -08:00
Daniel Sheppard
1f45732dca #7853 - Initial work on Speed/Duplex.
TODO: Documentation, Tests, Form order
2022-01-08 12:25:30 -06:00
jeremystretch
5f8f593eec Closes #7852: Enable assigning interfaces to VRFs 2022-01-07 14:57:43 -05:00
jeremystretch
d50b564257 Initial work on #8118 2021-12-29 15:37:01 -05:00
jeremystretch
0a6ec9a2e3 Initial work on #7846 2021-12-27 14:01:25 -05:00
jeremystretch
41afae5b0a #8037: Add role field to InventoryItem 2021-12-27 10:45:33 -05:00
jeremystretch
08fd357d27 #3087: Add InvetoryItemRole 2021-12-27 10:18:39 -05:00
jeremystretch
64dff2dd7d Merge branch 'develop' into feature 2021-12-23 08:32:40 -05:00
jeremystretch
f9c099efe1 Changelog & cleanup for #7246, #8097 2021-12-21 11:53:31 -05:00
rizlas
ddd1584a4e Update netbox/dcim/api/views.py
Test without decode_dict function

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2021-12-21 17:15:54 +01:00
jeremystretch
80fd3a48da Add position field for module bays 2021-12-20 09:51:55 -05:00
jeremystretch
0c6ff335d8 Add modules to device component serializers 2021-12-17 20:31:15 -05:00
jeremystretch
58fa729de1 Add Module model 2021-12-17 16:12:03 -05:00
jeremystretch
847b4a4dfd Add Module model 2021-12-17 12:18:37 -05:00
jeremystretch
5b4b067eea Add ModuleBay and ModuleBayTemplate models 2021-12-17 09:35:57 -05:00
rizlas
97f17b7495 Get_Environment from napalm should not need any decoding 2021-12-14 10:17:00 +01:00
jeremystretch
6ad3e50626 Closes #7743: Remove legacy ASN field from site model 2021-12-09 17:01:27 -05:00
jeremystretch
9d50f68496 Closes #7748: Remove legacy contact fields from site model 2021-12-09 16:23:39 -05:00
jeremystretch
3175c6033e Merge branch 'develop' into feature 2021-11-18 11:06:54 -05:00
jeremystretch
4800607b8f Fixes #7865: REST API should support null values for console port speeds 2021-11-18 09:34:41 -05:00
jeremystretch
6e43e4d68f Fixes #7864: power_port can be null when creating power outlets 2021-11-18 09:27:45 -05:00
Rhys Barrie
ee2e350725 netbox-community/netbox#7424: Add virtual_chassis field to device component filter form 2021-11-13 21:33:52 -05:00
jeremystretch
bad9f5bb57 Add nested FHRPGroupAssignment serializer; add missing API tests 2021-11-04 11:15:34 -04:00
jeremystretch
fa10c1dc69 Add count_fhrp_groups to interface serializers 2021-11-04 09:58:33 -04:00
jeremystretch
3061b6f083 Add wireless_lans to InterfaceSerializer; extend tests 2021-11-03 15:55:16 -04:00
jeremystretch
286e3cae53 Optimize interface REST API endpoints 2021-11-03 15:38:17 -04:00
jeremystretch
97b2c082c4 #6732: Add asns relationship to SiteSerializer and extend tests 2021-11-03 15:24:15 -04:00
Daniel Sheppard
dac86e6aec Merge branch 'feature' of https://github.com/netbox-community/netbox into 6732-asn-model 2021-10-28 11:55:20 -05:00
jeremystretch
7cb44d60da Closes #7606: Model transmit power for interfaces 2021-10-28 09:31:45 -04:00
Daniel Sheppard
d2bd335a73 #6732 - Serializers 2021-10-27 23:07:04 -05:00
Daniel Sheppard
0a76078d4b #6732 - Revert some changes to legacy ASN field on site model
* Re-instates ASN field on Site model
* Re-instates ASN field on Site view
* Re-instates ASN field on edit form and API, except for where forms instances are new (add site) or instance does not have any existing AS data
* Does not re-instate asn field on SiteBulkEditForm
* Does not re-instate ASN field on SiteTable
* Does not re-instate filter for filterset, but does allow filtering by query (q=34342)
* Does not include tests for ASN field on Site model due to planned deprecation
2021-10-27 22:25:31 -05:00
jeremystretch
e3520f909d Optimize config queries 2021-10-26 13:41:56 -04:00
jeremystretch
9851bc661c Add NAPALM config parameters 2021-10-26 11:53:46 -04:00
jeremystretch
edc69c75bf Introduce ConfigItem; add rack elevation parameters 2021-10-26 10:04:56 -04:00
jeremystretch
d741af0997 Cleanup & API changelog for #3979 2021-10-25 11:07:15 -04:00
Daniel Sheppard
a66c6dc27c Initial work on #6732 2021-10-24 23:42:47 -05:00
jeremystretch
2de9099bb6 Add bridge field to Interface, VMInterface models 2021-10-21 16:30:18 -04:00
jeremystretch
325ca76a86 Merge branch 'feature' into 3979-wireless 2021-10-21 13:19:52 -04:00
jeremystretch
bfc52b15bb Add tags to organizational & nested group models 2021-10-21 10:51:02 -04:00
jeremystretch
a3cc2bc3c7 Closes #7354: Relax uniqueness constraints on region, site group, and location names 2021-10-19 13:46:35 -04:00
jeremystretch
662007950b Clean up UniqueTogetherValidator workarounds 2021-10-19 13:32:43 -04:00
jeremystretch
3410fe123e Closes #6715: Add tenant assignment for cables 2021-10-19 12:33:17 -04:00
jeremystretch
b0047e2c98 Store channel frequency & width as independent values 2021-10-15 11:39:53 -04:00
jeremystretch
ebd5b86cd9 Remove choices from rf_channel_width 2021-10-15 10:06:49 -04:00
jeremystretch
1fdcd62230 Move wireless field choices to wireless app 2021-10-15 10:00:03 -04:00
jeremystretch
239fb6950b Merge branch 'feature' into 3979-wireless 2021-10-14 16:32:24 -04:00
jeremystretch
cace1d7ecf 3839: Add airflow field to Device 2021-10-14 16:15:08 -04:00
jeremystretch
de3c7eab5b 3839: Add airflow field to DeviceType 2021-10-14 15:45:36 -04:00
jeremystretch
d44c84fbd9 Add rf_role to Interface 2021-10-13 20:16:36 -04:00
jeremystretch
adafa80607 Add status field to WirelessLink 2021-10-13 14:31:30 -04:00
jeremystretch
d84dbcf02c Rename cable_peer fields to link_peer 2021-10-13 14:04:53 -04:00
jeremystretch
cdc7c701d2 Resolve test errors 2021-10-13 13:39:14 -04:00
jeremystretch
24f734c72a Add RF channel fields to Interface 2021-10-12 10:46:41 -04:00
jeremystretch
341b1087dd Closes #6874: Add tenant assignment for locations 2021-10-07 15:46:21 -04:00
jeremystretch
da8fb40ef4 Closes #1337: Add WWN field to interfaces 2021-10-07 15:09:42 -04:00
jeremystretch
f448258fd7 Fixes #7051: Fix permissions evaluation and improve error handling for connected device REST API endpoint 2021-10-07 13:15:59 -04:00
thatmattlove
65ec26c7f6 Fixes #7041: Properly format JSON config object returned from a NAPALM device 2021-09-01 00:03:53 -07:00
jeremystretch
151efbf94c Merge branch 'develop' into feature 2021-07-20 17:06:18 -04:00
jeremystretch
5d62586705 Fixes #6773: Add missing display field to rack unit serializer 2021-07-20 17:00:13 -04:00
jeremystretch
0262ae7546 Fix SVG rendering with unspecified width 2021-07-16 17:09:52 -04:00
jeremystretch
cb0f36658d Support specification of image width when rendering cable traces as SVG 2021-07-16 17:06:27 -04:00
jeremystretch
2191249351 Replace CSS-based cable trace diagrams with SVG images 2021-07-14 15:29:04 -04:00
jeremystretch
69ec4e069d Initial work on SVG support for cable tracing 2021-07-14 14:14:56 -04:00
jeremystretch
e906855e22 Closes #5223: Remove the console/power/interface connections REST API endpoints 2021-07-08 17:30:40 -04:00
jeremystretch
4af19267db Merge v2.11.9 2021-07-08 12:15:57 -04:00
jeremystretch
aea4dc0bc3 Fixes #6456: API schema type should be boolean for _occupied on cable termination models 2021-07-08 08:41:59 -04:00
jeremystretch
ae5f1b5a4f Closes #3682: Add color field to front and rear ports 2021-06-09 16:51:51 -04:00
jeremystretch
01ceb35626 Merge branch 'develop' into feature 2021-06-02 20:35:38 -04:00
jeremystretch
f34fb28d59 Fixes #6517: Fix assignment of user when creating rack reservations via REST API 2021-06-02 16:02:22 -04:00
jeremystretch
e1df1d3bf8 Closes #5991: Remove display_name attribute from serializers 2021-05-04 15:56:36 -04:00
jeremystretch
431cb2a0ad Rename FilterSet modules 2021-04-29 16:48:24 -04:00
jeremystretch
467709ec70 Fixes #6258: Fix parent assignment for SiteGroup API serializer 2021-04-23 09:37:22 -04:00
jeremystretch
09de059e42 Clean up stray references to old RackGroup model 2021-04-11 13:43:06 -04:00
jeremystretch
04bc5761f4 Merge branch 'develop' into feature 2021-04-11 13:16:00 -04:00
jeremystretch
2846d595ee #6081: Tweak queryset filtering 2021-04-08 14:18:07 -04:00
jeremystretch
ba1ea46b36 Fixes #6081: Fix interface connections REST API endpoint 2021-04-07 16:04:32 -04:00
jeremystretch
2bb1f60230 Location model cleanup 2021-04-05 11:09:33 -04:00
Jeremy Stretch
fa78fe7ca8 Merge branch 'develop' into feature 2021-03-25 16:09:28 -04:00
Jeremy Stretch
fdaa4a6eb8 Add 'display' field to all REST API serializers 2021-03-16 10:06:25 -04:00
Jeremy Stretch
ae80b4f5f4 Clean up base serializers 2021-03-12 13:31:28 -05:00
Jeremy Stretch
82bc4178e4 Closes #5950: Use TimeZoneSerializerField from django-timezone-field 2021-03-10 17:08:11 -05:00
Jeremy Stretch
a4944f2b97 Closes #5892: Introduce SiteGroup model (#5937)
* Initial work on #5892

* Add site group selection to object edit forms

* Add documentation for site groups

* Changelog for #5892

* Finish application of site groups to config context
2021-03-08 13:28:53 -05:00
Jeremy Stretch
70a039f6eb Add parent field to Interface 2021-03-05 13:49:41 -05:00
Jeremy Stretch
d1eeee3085 Closes #4971: Allow assigning devices to locations without a rack 2021-03-03 14:28:07 -05:00
Jeremy Stretch
f7d6275959 Closes #5895: Rename RackGroup to Location 2021-03-03 13:30:33 -05:00
Jeremy Stretch
8749ed06e2 Closes #5375: Add 'speed' attribute to console port models 2021-03-03 10:20:08 -05:00
Jeremy Stretch
9581d72f9d Closes #3648: Mark cable termination models as connected without attaching a cable 2021-03-01 21:34:42 -05:00
Jeremy Stretch
8cc9685322 Closes #5901: Add 'created' and 'last_updated' fields to device component models 2021-03-01 15:42:39 -05:00
Jeremy Stretch
eeb9d92d6f Add custom field support for device component models 2021-03-01 13:07:25 -05:00
Jeremy Stretch
8de5fa0ae2 Introduce NestedGroupModelSerializer 2021-02-25 17:15:42 -05:00
Jeremy Stretch
c43f595e93 Introduce OrganizationalModelSerializer 2021-02-25 16:44:16 -05:00
Jeremy Stretch
ec5da40a4a Add custom field support for organizational models to API serializers 2021-02-25 15:58:13 -05:00
Jeremy Stretch
1ffc5f32e4 Closes #5549: Eliminate extraneous database queries when using brief API calls 2020-12-29 11:41:44 -05:00
Jeremy Stretch
68eafb180a Rename get_subquery() to count_related() 2020-12-17 14:47:49 -05:00
Jeremy Stretch
cfbe7ec948 Call Coalesce() inside get_queryset() 2020-12-17 14:45:50 -05:00
Jeremy Stretch
bb69f9aee9 Fixes #5486: Optimize retrieval of config context data for device/VM REST API views 2020-12-17 14:03:10 -05:00
Daniel Sheppard
b3999381f9 Fixes: #5450 - Added Coalesce to viewsets for the _count functions 2020-12-15 12:50:28 -06:00
Jeremy Stretch
89ec24caa2 Include nested representation of nodes within each CablePath 2020-12-02 14:30:05 -05:00
Jeremy Stretch
1037e78f18 Standardize validation of interface VLAN assignments 2020-12-02 14:19:02 -05:00
Jeremy Stretch
84fe653306 Merge branch 'develop' into develop-2.10 2020-12-01 11:42:55 -05:00
Jeremy Stretch
0b8eb6e329 Closes #4865: Replace all Count() annotations with subqueries (#5385)
* Convert circuits to use subqueries

* Convert dcim to use subqueries

* Convert extras to use subqueries

* Convert ipam to use subqueries

* Convert secrets to use subqueries

* Convert virtualization to use subqueries

* Update global search view to use subqueries where appropriate

* Remove extraneous order_by() calls
2020-11-25 15:49:18 -05:00
Jeremy Stretch
2977e80b16 Add support for tracing split paths 2020-11-16 15:49:07 -05:00
Jeremy Stretch
e77d851426 Merge branch 'develop' into develop-2.10 2020-11-09 20:58:59 -05:00
Jeremy Stretch
d45f06fde4 Closes #5327: Be more strict when capturing anticipated ImportError exceptions 2020-11-09 16:49:05 -05:00
Jeremy Stretch
124a43b63f Merge branch 'develop' into develop-2.10 2020-10-30 10:38:05 -04:00
John Anderson
ffe01cb42b move get_queryset() to common mixin 2020-10-30 02:56:43 -04:00
John Anderson
152fe800c7 add support for regions and vms 2020-10-23 01:18:04 -04:00
John Anderson
cdd1948721 initial work on config context performance improvements 2020-10-20 01:07:22 -04:00
Jeremy Stretch
219d07f997 Reorganize REST API components under netbox app 2020-10-13 15:57:21 -04:00
Jeremy Stretch
11cd595f23 Handle split paths 2020-10-08 14:01:47 -04:00
Jeremy Stretch
a52cf93b2f Add /trace API endpoints for CircuitTermination and PowerFeed 2020-10-08 13:55:29 -04:00
Jeremy Stretch
2e55470d5e Standardize cable/connection field ordering 2020-10-08 11:23:24 -04:00
Jeremy Stretch
94ad5be480 Replace connection_status with connected_endpoint_reachable on InterfaceConnectionSerializer 2020-10-08 11:15:09 -04:00
Jeremy Stretch
318d3bf81b Add cable paths API detail view for pass-through ports 2020-10-08 10:32:17 -04:00
Jeremy Stretch
c9cb0540d7 Correct serializer field lists 2020-10-06 15:27:40 -04:00
Jeremy Stretch
056285dcd2 Include cable_peer on CableTermination serializers 2020-10-06 14:30:46 -04:00
Jeremy Stretch
3fee32ef6e Prefetch path & destination for API views 2020-10-06 10:41:52 -04:00
Jeremy Stretch
72700f7996 PowerFeedSerializer should subclass ConnectedEndpointSerializer 2020-10-05 11:39:17 -04:00
Jeremy Stretch
bc41a9dd97 Rename connection_status to connected_endpoint_reachable 2020-10-05 11:32:39 -04:00
Jeremy Stretch
8c3a6b6fc5 Rename CablePath.is_connected to is_active 2020-10-05 11:13:33 -04:00
Jeremy Stretch
89ca56a975 Remove legacy connection_status fields 2020-10-05 10:47:41 -04:00
Jeremy Stretch
865a2d5c77 Remove legacy connected endpoint fields 2020-10-05 09:56:46 -04:00
Jeremy Stretch
4c4a09ae1b Replace legacy trace() method 2020-10-02 14:54:16 -04:00
Jeremy Stretch
f07aaccb84 Capture path end-to-end status in CablePath 2020-10-01 16:42:57 -04:00
Jeremy Stretch
57c0de3ed9 Drop support for split paths 2020-10-01 14:24:34 -04:00
Jeremy Stretch
42b17aa9a4 Closes #1846: Enable MPTT for InventoryItem hierarchy 2020-09-18 10:18:03 -04:00
Jeremy Stretch
6f437ea97d Fixes #5146: Add custom fields support for cables, power panels, rack reservations, and virtual chassis 2020-09-17 14:22:14 -04:00
Jeremy Stretch
dd06bbcaf6 Closes #4349: Drop support for embedded graphs 2020-08-21 11:57:46 -04:00
Jeremy Stretch
61d2692029 Closes #4997: Introduce OrderedDefaultRouter; move root API views to views.py 2020-08-13 12:49:49 -04:00
Jeremy Stretch
f3f4c38b07 Closes #4994: Add cable attribute to PowerFeed API serializer 2020-08-13 10:30:28 -04:00
Jeremy Stretch
29c77acf87 Fixes #4903: Fix member count when searching for virtual chassis 2020-08-07 08:54:02 -04:00
Jeremy Stretch
e4d78608c8 Fixes #4950: Include inventory item label in API serializer, UI view 2020-08-05 10:11:38 -04:00
Jeremy Stretch
fdf2dc8912 Closes #4940: Added an occupied field to rack unit representations for rack elevation views 2020-08-03 13:37:32 -04:00
Jeremy Stretch
3ad3e9146f Fixes #4921: Render non-viewable devices as unavailable space in rack elevations 2020-07-29 09:43:13 -04:00
Jeremy Stretch
05e7af702b Remove restriction enforcement from RestrictedQuerySet 2020-07-23 12:48:03 -04:00
Jeremy Stretch
96d058c231 Merge branch 'develop' into develop-2.9 2020-07-21 12:57:02 -04:00
Jeremy Stretch
43a4590014 Closes #4871: Specify ordering for querysets using annotate() to count related objects 2020-07-20 12:07:19 -04:00
Josh VanDeraa
754ff4a599 Moves location of the IP address / hostname check and assignment 2020-07-13 08:36:15 -05:00
Josh VanDeraa
ee4e5ad525 Adds verification of device.name configured 2020-07-10 16:18:58 -05:00
Josh VanDeraa
b8169778be Adds to NAPALM, name lookup if no primary IP address for device 2020-07-10 15:12:25 -05:00
Jeremy Stretch
7b94ea92ef Merge branch 'develop' into develop-2.9 2020-07-09 16:38:37 -04:00
Jeremy Stretch
1a6267e89a Closes #4837: Use dynamic form widget for relationships to MPTT objects 2020-07-09 09:50:01 -04:00
Sander Steffann
3affd467e1 Fix typo in format string 2020-07-08 22:20:20 +02:00