Commit Graph

627 Commits

Author SHA1 Message Date
Arthur Hanson
fe4ba2bc7a 12336 make region API calls atomic (#13942)
* 12336 make region API calls atomic

* 12336 switch to pg locks

* 12336 add locks to all views using mptt models

* 12336 fix ADVISORY_LOCK_KEYS reference

* 12336 review changes

* Tweak advisory lock numbering

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-10-17 10:35:01 -04:00
Abhimanyu Saharan
60c759592a removes napalm references #13628 2023-08-31 09:54:35 -04:00
Jeremy Stretch
7fc70779c0 #11305: Add latitude & longitude to DeviceWithConfigContextSerializer 2023-08-29 14:31:42 -04:00
Jeremy Stretch
5a5f05508d Merge branch 'develop' into feature 2023-08-29 10:45:55 -04:00
Abhimanyu Saharan
839a940fc1 adds missing status choicefield for vdc #13556 2023-08-25 09:40:04 -04:00
Jeremy Stretch
7eb94d050a #12175: Misc cleanup 2023-08-02 11:04:28 -04:00
Jeremy Stretch
d752fc744d #6391: Add device_role to DeviceWithConfigContextSerializer 2023-08-02 10:16:51 -04:00
Abhimanyu Saharan
2072edb19c Replaces device_role with role on device model (#13342)
* replaces device_role with role on device model #6391

* fixes lint issue #6391

* revert the database user

* revert test_runner comment

* changes as per review

* Update references to device_role column in UserConfigs

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-02 09:55:52 -04:00
Abhimanyu Saharan
b54e74e92b Adds tenant on power feed (#13300)
* adds tenant on power feed

* cleanup

* adds power feed count on tenant object view

* Misc cleanup; add filterset tests

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-31 08:20:48 -04:00
Abhimanyu Saharan
26b22b2962 Adds rf_role to interface template (#13199)
* adds rf_role to interface template #13170

* fixed migration file conflict

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-26 09:13:24 -04:00
Jeremy Stretch
e464f8be0f Closes #13269: Cache component template counts on device types 2023-07-25 16:38:05 -04:00
Jeremy Stretch
4198092032 Closes #10197: Add a cached counter field for virtual chassis members 2023-07-25 15:50:12 -04:00
Jamie (Bear) Murphy
44776b02c0 Oob ip (devices) (#13013)
* initial oob_ip support for devices

* add primary ip and oob ip checkmark to ip address view

* add oob ip to device view and device edit view

* pep8

* make is_oob_ip and is_primary_ip generic for other models

* refactor oob_ip

* fix oob ip signal

* string capitalisation

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-25 14:40:40 -04:00
Arthur Hanson
a77917b614 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
Jeremy Stretch
09795ead78 Merge branch 'develop' into feature 2023-07-11 10:09:26 -04:00
Abhimanyu Saharan
cebb1e5146 adds config_template to device serializer #13056 2023-07-06 16:04:21 -04:00
Jeremy Stretch
f28563ec04 Fixes #12975: Correct URL for VirtualDeviceContext API serializer 2023-06-23 15:23:40 -04:00
Abhimanyu Saharan
abaf20ae7b fixes device interface serializer #12533 2023-06-23 14:34:08 -04:00
Arthur
b7d5af3930 Merge branch 'develop' into feature 2023-06-14 16:32:56 -07:00
Arthur Hanson
a21bf5b3c1 11305 Add GPS coordinates to device (#12782)
* 11305 add lat/long to devices

* 11305 update docs

* 11305 update tests
2023-06-14 14:18:50 -04:00
Abhimanyu Saharan
4ed038f735 fix connected device api schema #12682 2023-06-14 15:45:07 +05:30
jeremystretch
2ee8e6c2bb Merge branch 'develop' into feature 2023-06-02 15:43:06 -04:00
Arthur Hanson
df4d314981 7503 do device validate-create in serial (#12222)
* 7503 do device validate-create in serial

* 7503 fix single instance

* 7503 atomic transaction

* 7503 fix return data for bulk operations

* 7503 add test

* Move sequential creation logic to a mixin

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-31 09:06:09 -04:00
Arthur
f40b8a6d55 12548 add prefetch_related for l2vpn and vdcs to interface api 2023-05-18 14:18:55 -04:00
jeremystretch
4f7e85ede9 Closes #12320: Remove obsolete fields napalm_driver and napalm_args from Platform 2023-05-16 09:35:27 -04:00
jeremystretch
c549285f06 Fixes #12412: Device/VM interface MAC addresses can be nullified via REST API 2023-05-01 13:06:10 -04:00
jeremystretch
1b7930907c Merge branch 'develop' into feature 2023-04-27 12:11:08 -04:00
Arthur
b8ff420993 11607 make CableSerializer WritableNestedSerializer for to_internal value instantiation 2023-04-26 13:27:55 -07:00
jeremystretch
afff19b8aa #11029: Cleanup & changelog 2023-04-10 10:40:56 -04:00
jeremystretch
e8325cb64f Fixes #12144: Ensure consistent treatment of context data when rendering config templates via UI & API 2023-04-03 09:50:07 -04:00
Arthur Hanson
cac9108f5b 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
e672146a43 #11559: Add device config API endpoint & cleanup 2023-03-21 17:00:06 -04:00
jeremystretch
7db15e9b32 #9653: Cleanup 2023-03-20 16:00:08 -04:00
jeremystretch
ab5956179a #8272: Cleanup & add filter for bridge_id 2023-03-20 11:40:45 -04:00
kkthxbye-code
82841d3767 Add bridge to InterfaceTemplate 2023-03-07 18:00:24 -05:00
Arthur Hanson
eb923e080e 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
86690d83a1 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
3f7b7d378a Fixes #9653 - Add default_platform to DeviceType 2023-02-19 20:09:51 -05:00
kkthxbye
21248f8b44 Add the enabled filed to InterfaceTemplate 2023-02-19 20:09:51 -05:00
jeremystretch
5bfa94397f #11488: Additional cleanup 2023-01-17 10:26:34 -05:00
Abhimanyu Saharan
cf05552fb2 added missing description field on the api serializers 2023-01-17 10:20:34 -05:00
jeremystretch
fa6ada961d #10371: Fix API serializer representation for module status 2022-12-12 16:14:18 -05:00
jeremystretch
c8686a2c6a #7854: Misc cleanup 2022-12-12 12:34:05 -05:00
jeremystretch
6c955b5e2a Closes #10675: Add max_weight field to track maximum load capacity for racks 2022-12-09 12:45:02 -05:00
jeremystretch
9065ec80b6 Closes #10371: Add operational status field for modules 2022-12-09 10:43:29 -05:00
jeremystretch
ef75940cde Cleanup for #7854 2022-11-15 11:24:36 -05:00
Arthur
b06845e666 10300 initial translation support use gettext 2022-11-11 08:47:29 -05:00
Daniel Sheppard
e0e38c63cf 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
acc750ad70 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
d994ee7b21 Merge branch 'develop' into feature 2022-11-01 17:13:11 -04:00