Commit Graph

695 Commits

Author SHA1 Message Date
jeremystretch
9ce29f9edc #9653: Cleanup 2023-03-20 16:00:08 -04:00
jeremystretch
0455654f71 #8272: Cleanup & add filter for bridge_id 2023-03-20 11:40:45 -04:00
kkthxbye-code
a74ae46f86 Add bridge to InterfaceTemplate 2023-03-07 18:00:24 -05:00
Arthur Hanson
36771e821c
10520 remove Napalm code references (#11768)
* 10520 remove all Napalm code references

* 10520 remove lldp

* 10520 remove config, status - rebuild js

* 10520 re-add config parameters

* 10520 re-add serializer

* 10520 update docs
2023-02-24 15:38:50 -05:00
Jeremy Stretch
73a7a2d27a Closes #11559: Implement config template rendering (#11769)
* WIP

* Add config_template field to Device

* Pre-fetch referenced templates

* Correct up_to_date callable

* Add config_template FK to Device

* Update & merge migrations

* Add config_template FK to Platform

* Add tagging support for ConfigTemplate

* Catch exceptions when rendering device templates in UI

* Refactor ConfigTemplate.render()

* Add support for returning plain text content

* Add ConfigTemplate model documentation

* Add feature documentation for config rendering
2023-02-19 20:09:52 -05:00
kkthxbye-code
81b8046d1d Fixes #9653 - Add default_platform to DeviceType 2023-02-19 20:09:51 -05:00
kkthxbye
8e94eb67d2 Add the enabled filed to InterfaceTemplate 2023-02-19 20:09:51 -05:00
jeremystretch
19da92b510 #11488: Additional cleanup 2023-01-17 10:26:34 -05:00
Abhimanyu Saharan
beb1f4e172 added missing description field on the api serializers 2023-01-17 10:20:34 -05:00
jeremystretch
e338f7cfe3 #10371: Fix API serializer representation for module status 2022-12-12 16:14:18 -05:00
jeremystretch
13d39a28ce #7854: Misc cleanup 2022-12-12 12:34:05 -05:00
jeremystretch
0b100b8fc8 Closes #10675: Add max_weight field to track maximum load capacity for racks 2022-12-09 12:45:02 -05:00
jeremystretch
97aa40f7a8 Closes #10371: Add operational status field for modules 2022-12-09 10:43:29 -05:00
jeremystretch
6f8a7fdbe3 Cleanup for #7854 2022-11-15 11:24:36 -05:00
Arthur
6eba5d4d96 10300 initial translation support use gettext 2022-11-11 08:47:29 -05:00
Daniel Sheppard
b374351154
Closes: #7854 - Add VDC/Instances/etc (#10787)
* Work on #7854

* Move to new URL scheme.

* Fix PEP8 errors

* Fix PEP8 errors

* Add GraphQL and fix primary_ip missing

* Fix PEP8 on GQL Type

* Fix missing NestedSerializer.

* Fix missing NestedSerializer & rename VDC to VDCs

* Fix migration

* Change Validation for identifier

* Fix missing migration

* Rebase to feature

* Post-review changes

* Remove VDC Type
* Remove M2M Enforcement logic

* Interface related changes

* Add filter fields to filterset for Interface filter
* Add form field to filterset form for Interface filter
* Add VDC display to interface detail template

* Remove VirtualDeviceContextTypeChoices

* Accommodate recent changes in feature branch

* Add tests
Add missing search()

* Update tests, and fix model form

* Update test_api

* Update test_api.InterfaceTest create_data

* Fix issue with tests

* Update interface serializer

* Update serializer and tests

* Update status to be required

* Remove error message for constraint

* Remove extraneous import

* Re-ordered devices menu to place VDC below virtual chassis

* Add helptext for `identifier` field

* Fix breadcrumb link

* Remove add interface link

* Add missing tenant and status fields

* Changes to tests as per Jeremy

* Change for #9623

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>

* Update filterset form for status field

* Remove Rename View

* Change tabs to spaces

* Update netbox/dcim/tables/devices.py

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>

* Update netbox/dcim/tables/devices.py

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>

* Fix tenant in bulk_edit

* Apply suggestions from code review

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>

* Add status field to table.

* Re-order table fields.

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2022-11-11 07:55:49 -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
aa7f04bf1b Fixes #10809: Permit nullifying site time_zone via REST API 2022-11-01 16:45:32 -04:00
jeremystretch
d773f4e62a Closes #9832: Add mounting_depth field to rack model 2022-10-27 10:50:54 -04:00
Arthur Hanson
204c10c053
9654 device weight (#10448)
* 9654 add weight fields to devices

* 9654 changes from code review

* 9654 change _abs_weight to grams

* Resolve migrations conflict

* 9654 code-review changes

* 9654 total weight on devices

* Misc cleanup

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2022-09-30 16:31:04 -04:00
Zachary Clark
ace66eab61 Fixes #10305: Allows null master in VirtualChassis APIs 2022-09-13 19:54:39 -04:00
Andreas Nieß
4f7287fec5 Add _occupied as BooleanField for nested serializers 2022-08-29 08:03:28 +02:00
Andreas Nieß
0b5478ad2d Fixes #9895: Change DictField serializers to JSONField 2022-08-29 08:02:38 +02:00
jeremystretch
482b4b6e95 Fixes #10147: Permit the creation of 0U device types via REST API 2022-08-25 08:37:43 -04:00
jeremystretch
29a611c729 Closes #9896: Discontinue arbitrary use of OrderedDict 2022-08-01 16:51:44 -04:00
jeremystretch
262a0cf397 Fixes #9789: Fix rendering of cable traces ending at provider networks 2022-08-01 13:29:39 -04:00
jeremystretch
2c43c8d077 Closes #9793: Add PoE attributes to interface templates 2022-07-28 15:20:25 -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
jeremystretch
0b86326435 #9102: Enable creating terminations in conjunction with cables via REST API 2022-07-13 15:35:37 -04:00
jeremystretch
f386ec82ae Fix CablePath serialization for pass-through port paths 2022-07-08 13:55:13 -04:00
jeremystretch
d444aa1110 Fix support for tracing across bridge relationships 2022-07-07 14:35:02 -04:00
jeremystretch
9a7f3f8c1a Cleanup for #9102 2022-07-07 12:48:44 -04:00
jeremystretch
af14bfdd84 Rename LinkTermination to CabledObjectModel 2022-07-06 15:56:10 -04:00
jeremystretch
ba079b9ee5 Merge branch 'feature' into 9102-cabling 2022-07-06 14:09:25 -04:00
jeremystretch
4d3278cb52 #8157: Clean up L2VPN assignment for VM interfaces 2022-07-06 13:31:31 -04:00
Jeremy Stretch
5fd3eb82cd
Merge pull request #9631 from netbox-community/8157-l2vpn
Closes: #8157 - Add L2VPN support
2022-07-06 13:14:21 -04:00
Daniel Sheppard
3be9f6c4f3 #8157 - Final work on L2VPN model 2022-06-29 16:01:20 -05:00
jeremystretch
cd3111ca8d Merge branch 'develop' into feature 2022-06-28 16:55:49 -04:00
jeremystretch
8bbc592261 Add SVG rendering to cable path tests 2022-06-27 15:53:34 -04:00
jeremystretch
25ed3390cb Merge branch 'feature' into 9102-cabling 2022-06-27 12:12:34 -04:00
jeremystretch
fc02e15fb1 Closes #4434: Enable highlighting devices within rack elevations 2022-06-24 11:04:38 -04:00
Hunter Johnston
6cb8b9110e
Closes #9396: Query modules by module bay & display installed_modules for module_bay REST API endpoint (#9574)
* Closes #9396 - Added ability to query modules by module bay & installed_modules for module bay REST API endpoint

* Closes #9396 - Added ability to query modules by module bay & installed_modules for module bay REST API endpoint

* Closes #9396 - Added ability to query modules by module bay & installed_modules for module bay REST API endpoint
2022-06-23 13:28:36 -04:00
jeremystretch
e4aa933d57 Closes #7744: Add status field to Location 2022-06-22 13:33:19 -04:00
jeremystretch
4587b83d85 Closes #1099: Add PoE mode & type for interfaces 2022-06-21 21:22:24 -04:00
jeremystretch
9c214622a1 Closes #4350: Illustrate reservations vertically alongside rack elevations 2022-06-21 16:30:27 -04:00
jeremystretch
440dfabefe Merge branch 'feature' into 9102-cabling 2022-06-20 15:04:55 -04:00
jeremystretch
84f0561712 Initial work on half-height RUs 2022-06-20 12:05:06 -04:00
kkthxbye-code
8ef74192ec Implement a custom paginator for DeviceViewSet
Running count on the annotated query for loading config_context is slow. The custom paginator removes the annotation before getting the count.
2022-06-13 20:45:08 +02:00
jeremystretch
3362bc3106 Remove link peer fields from cable termination models 2022-06-01 16:48:56 -04:00
jeremystretch
9ef9443969 Add REST API endpoint for CableTermination 2022-05-16 16:21:15 -04:00
jeremystretch
1505369133 Update Cable API serializer 2022-05-16 15:33:57 -04:00
jeremystretch
906c3dca8b Tests cleanup 2022-05-13 16:29:19 -04:00
jeremystretch
6ff2e55ce4 Add origins, destinations properties on CablePath 2022-05-13 15:05:38 -04:00
jeremystretch
4c51dbba80 Update connected_endpoint serializer field to support multiple objects 2022-05-13 11:04:38 -04:00
jeremystretch
3a461d0279 Update Cable instantiations to match new signature 2022-05-13 09:33:00 -04:00
jeremystretch
82706eb3a6 Migrate CablePath to use two-dimensional array 2022-05-12 16:08:44 -04:00
jeremystretch
5d37f9f975 Update cable connection forms 2022-05-12 16:08:44 -04:00
jeremystretch
4bb9b6ee26 Extend Cable model to support multiple A/B terminations 2022-05-12 16:08:44 -04:00
jeremystretch
bdb21da26e Fixes #9330: Add missing module_type field to REST API serializers for modular device component templates 2022-05-11 08:57:19 -04:00
jeremystretch
bddc35bbc7 Closes #8496: Enable assigning multiple ASNs to a provider 2022-03-30 17:17:36 -04:00
jeremystretch
ce87e0dfa4 Merge branch 'develop' into feature 2022-03-22 12:57:23 -04:00
jeremystretch
e6980626d8 Fixes #8932: Fix error when setting null value for interface rf_role via REST API 2022-03-22 09:37:57 -04:00
jeremystretch
8d53b46e82 Merge branch 'develop' into feature 2022-03-18 13:17:11 -04:00
jeremystretch
faba6c9bdc Fixes #8850: Show airflow field on device REST API serializer when config context data is included 2022-03-14 09:54:11 -04:00
jeremystretch
59aba52b03 Rename OrderedDefaultRouter to NetBoxRouter & document for plugins 2022-03-11 15:59:03 -05:00
jeremystretch
bbdeae0ed9 Move CustomFieldModelViewSet functionality into NetBoxModelViewSet 2022-03-09 11:44:55 -05:00
jeremystretch
efd5a73a18 Refactor API views 2022-03-09 11:27:42 -05:00
jeremystretch
a11abf87ec Refactor API serializers 2022-03-09 10:59:22 -05:00
jeremystretch
478eefb74c Merge v3.1.7 2022-02-03 12:55:34 -05:00
jeremystretch
19fdd5e151 Fixes #8465: Accept empty string values for Interface rf_channel in REST API 2022-01-28 14:03:36 -05:00
Daniel Sheppard
375a140343 Merge branch 'feature' of https://github.com/netbox-community/netbox into 7853-speed_duplex 2022-01-20 13:12:04 -06:00
jeremystretch
3e3880823b Merge v3.1.6 2022-01-17 11:12:54 -05:00
Jason Yates
0181a25d70 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
0f58faaddb #7853 - Initial work on Speed/Duplex.
TODO: Documentation, Tests, Form order
2022-01-08 12:25:30 -06:00
jeremystretch
3e277de82d Closes #7852: Enable assigning interfaces to VRFs 2022-01-07 14:57:43 -05:00
jeremystretch
4c15f4a84f Initial work on #8118 2021-12-29 15:37:01 -05:00
jeremystretch
99d5013de3 Initial work on #7846 2021-12-27 14:01:25 -05:00
jeremystretch
6e9afccfd7 #8037: Add role field to InventoryItem 2021-12-27 10:45:33 -05:00
jeremystretch
04fb5e544d #3087: Add InvetoryItemRole 2021-12-27 10:18:39 -05:00
jeremystretch
2dd165bbef Merge branch 'develop' into feature 2021-12-23 08:32:40 -05:00
jeremystretch
d275538116 Changelog & cleanup for #7246, #8097 2021-12-21 11:53:31 -05:00
rizlas
39a0b15df4
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
eaa1165611 Add position field for module bays 2021-12-20 09:51:55 -05:00
jeremystretch
ed6a160372 Add modules to device component serializers 2021-12-17 20:31:15 -05:00
jeremystretch
7777922bef Add Module model 2021-12-17 16:12:03 -05:00
jeremystretch
7c60e3c0ff Add Module model 2021-12-17 12:18:37 -05:00
jeremystretch
e529d7fd3b Add ModuleBay and ModuleBayTemplate models 2021-12-17 09:35:57 -05:00
rizlas
2ec64a2ea2 Get_Environment from napalm should not need any decoding 2021-12-14 10:17:00 +01:00
jeremystretch
7d99e15dc3 Closes #7743: Remove legacy ASN field from site model 2021-12-09 17:01:27 -05:00
jeremystretch
d2d2978288 Closes #7748: Remove legacy contact fields from site model 2021-12-09 16:23:39 -05:00
jeremystretch
f16c6d81cf Merge branch 'develop' into feature 2021-11-18 11:06:54 -05:00
jeremystretch
9ae5865c2d Fixes #7865: REST API should support null values for console port speeds 2021-11-18 09:34:41 -05:00
jeremystretch
c2d0cfdfc0 Fixes #7864: power_port can be null when creating power outlets 2021-11-18 09:27:45 -05:00
Rhys Barrie
6b21c8453f netbox-community/netbox#7424: Add virtual_chassis field to device component filter form 2021-11-13 21:33:52 -05:00
jeremystretch
3f0a98acbd Add nested FHRPGroupAssignment serializer; add missing API tests 2021-11-04 11:15:34 -04:00
jeremystretch
67c73768c1 Add count_fhrp_groups to interface serializers 2021-11-04 09:58:33 -04:00
jeremystretch
96cde7d4af Add wireless_lans to InterfaceSerializer; extend tests 2021-11-03 15:55:16 -04:00
jeremystretch
ea39c8a4c1 Optimize interface REST API endpoints 2021-11-03 15:38:17 -04:00
jeremystretch
7a55832a22 #6732: Add asns relationship to SiteSerializer and extend tests 2021-11-03 15:24:15 -04:00
Daniel Sheppard
033db83068 Merge branch 'feature' of https://github.com/netbox-community/netbox into 6732-asn-model 2021-10-28 11:55:20 -05:00
jeremystretch
a173083e5b Closes #7606: Model transmit power for interfaces 2021-10-28 09:31:45 -04:00
Daniel Sheppard
9b5f45aee1 #6732 - Serializers 2021-10-27 23:07:04 -05:00
Daniel Sheppard
8235b339ee #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
fbf91dda7d Optimize config queries 2021-10-26 13:41:56 -04:00
jeremystretch
41ff1d0fc9 Add NAPALM config parameters 2021-10-26 11:53:46 -04:00
jeremystretch
7c0f32e8ee Introduce ConfigItem; add rack elevation parameters 2021-10-26 10:04:56 -04:00
jeremystretch
68081fb9a2 Cleanup & API changelog for #3979 2021-10-25 11:07:15 -04:00
Daniel Sheppard
a01068949c Initial work on #6732 2021-10-24 23:42:47 -05:00
jeremystretch
e1e2c76ae1 Add bridge field to Interface, VMInterface models 2021-10-21 16:30:18 -04:00
jeremystretch
3a3ed8bf64 Merge branch 'feature' into 3979-wireless 2021-10-21 13:19:52 -04:00
jeremystretch
cfb3897047 Add tags to organizational & nested group models 2021-10-21 10:51:02 -04:00
jeremystretch
7c56b21095 Closes #7354: Relax uniqueness constraints on region, site group, and location names 2021-10-19 13:46:35 -04:00
jeremystretch
8d0ed99bcd Clean up UniqueTogetherValidator workarounds 2021-10-19 13:32:43 -04:00
jeremystretch
0afd3e6189 Closes #6715: Add tenant assignment for cables 2021-10-19 12:33:17 -04:00
jeremystretch
075f4907ef Store channel frequency & width as independent values 2021-10-15 11:39:53 -04:00
jeremystretch
b7317bfe29 Remove choices from rf_channel_width 2021-10-15 10:06:49 -04:00
jeremystretch
01d3c062f2 Move wireless field choices to wireless app 2021-10-15 10:00:03 -04:00
jeremystretch
6af5a884cd Merge branch 'feature' into 3979-wireless 2021-10-14 16:32:24 -04:00
jeremystretch
33ea8763d5 3839: Add airflow field to Device 2021-10-14 16:15:08 -04:00
jeremystretch
2c2c2e9060 3839: Add airflow field to DeviceType 2021-10-14 15:45:36 -04:00
jeremystretch
438b4b4758 Add rf_role to Interface 2021-10-13 20:16:36 -04:00
jeremystretch
95ed07a95e Add status field to WirelessLink 2021-10-13 14:31:30 -04:00
jeremystretch
ac2cd552b9 Rename cable_peer fields to link_peer 2021-10-13 14:04:53 -04:00
jeremystretch
1c73bd5079 Resolve test errors 2021-10-13 13:39:14 -04:00
jeremystretch
8e1535f7ec Add RF channel fields to Interface 2021-10-12 10:46:41 -04:00
jeremystretch
5a6190e321 Closes #6874: Add tenant assignment for locations 2021-10-07 15:46:21 -04:00
jeremystretch
18c3bb673f Closes #1337: Add WWN field to interfaces 2021-10-07 15:09:42 -04:00
jeremystretch
00328226ec Fixes #7051: Fix permissions evaluation and improve error handling for connected device REST API endpoint 2021-10-07 13:15:59 -04:00
thatmattlove
14d87a3584 Fixes #7041: Properly format JSON config object returned from a NAPALM device 2021-09-01 00:03:53 -07:00
jeremystretch
803f9b6913 Merge branch 'develop' into feature 2021-07-20 17:06:18 -04:00
jeremystretch
61fe0e81cd Fixes #6773: Add missing display field to rack unit serializer 2021-07-20 17:00:13 -04:00
jeremystretch
443172197b Fix SVG rendering with unspecified width 2021-07-16 17:09:52 -04:00
jeremystretch
8cf9f0d5bc Support specification of image width when rendering cable traces as SVG 2021-07-16 17:06:27 -04:00
jeremystretch
9f615cde79 Replace CSS-based cable trace diagrams with SVG images 2021-07-14 15:29:04 -04:00
jeremystretch
ce7fa95546 Initial work on SVG support for cable tracing 2021-07-14 14:14:56 -04:00
jeremystretch
bc812e4937 Closes #5223: Remove the console/power/interface connections REST API endpoints 2021-07-08 17:30:40 -04:00
jeremystretch
38d7b83ed0 Merge v2.11.9 2021-07-08 12:15:57 -04:00
jeremystretch
28ca815c88 Fixes #6456: API schema type should be boolean for _occupied on cable termination models 2021-07-08 08:41:59 -04:00
jeremystretch
b3ed545d6a Closes #3682: Add color field to front and rear ports 2021-06-09 16:51:51 -04:00
jeremystretch
2d44bade4b Merge branch 'develop' into feature 2021-06-02 20:35:38 -04:00
jeremystretch
1935f8b27f Fixes #6517: Fix assignment of user when creating rack reservations via REST API 2021-06-02 16:02:22 -04:00
jeremystretch
5856275347 Closes #5991: Remove display_name attribute from serializers 2021-05-04 15:56:36 -04:00
jeremystretch
1024782b9e Rename FilterSet modules 2021-04-29 16:48:24 -04:00
jeremystretch
1901e93b1e Fixes #6258: Fix parent assignment for SiteGroup API serializer 2021-04-23 09:37:22 -04:00
jeremystretch
0bce1da4e3 Clean up stray references to old RackGroup model 2021-04-11 13:43:06 -04:00
jeremystretch
b0573f88e6 Merge branch 'develop' into feature 2021-04-11 13:16:00 -04:00
jeremystretch
f096c4a5d0 #6081: Tweak queryset filtering 2021-04-08 14:18:07 -04:00