Compare commits

...

2278 Commits

Author SHA1 Message Date
Jeremy Stretch
426805cd24 Merge pull request #15048 from netbox-community/develop
Release v3.7.2
2024-02-05 14:10:13 -05:00
Jeremy Stretch
a331ba65cb Release v3.7.2 2024-02-05 13:56:52 -05:00
Smixi
4ba0ec78cf fix: performance for get__available_ips for prefix (#15041) 2024-02-05 13:30:59 -05:00
Jeremy Stretch
93edf74f7c Fixes #14945: Fix "select all" button for device type components (#15027) 2024-02-05 13:05:25 -05:00
Jeremy Stretch
8a77ec70f2 Fixes #15015: Pre-populate assigned tenant when allocating next available IP address under prefix view 2024-02-05 12:59:50 -05:00
Daniel Sheppard
0eba3acdb8 Closes: #14570 - Remove extra query for job under scripts and reports detailed view (#14998)
* Closes: #14570 - Remove extra query for job under scripts and reports detailed view

* Add report.result back as it is used by report.html
2024-02-05 12:13:03 -05:00
Daniel Sheppard
32083e58c0 Fixes: #14840 - Forces API to use django user model instead of proxy model (#14881)
* Fixes: #14840 - Forces API to use proxy model

* Update tests to use proxy model

* Revert "Update tests to use proxy model"

This reverts commit 1d784cfe5d.

* Revert "Fixes: #14840 - Forces API to use proxy model"

This reverts commit df85cc967c.

* More realistic change to resole issue with netboxusers-list

* Revert "More realistic change to resole issue with netboxusers-list"

This reverts commit 15df8082aa.

* Fixes: #14840 - Better fix for netboxusers-list

* Swap model for serializer from proxy model
2024-02-05 11:57:30 -05:00
Arthur Hanson
8e8d302850 15020 Update assigned VMs site when move cluster (#15031)
* 15020 Update assigned VMs site when move cluster

* 15020 call super

* 15020 change to use denormalized
2024-02-05 11:41:33 -05:00
Jeremy Stretch
fde9c1664a Closes #13729: Censor sensitive data source parameters in change log (#15032) 2024-02-05 11:35:12 -05:00
Daniel Sheppard
1a9149d7d4 Fixes: #14839 - Check for tunnel termination type in data and instance in addition to intially passed data. (#14995)
* Fixes: #14839 - Check for tunnel termination type in additional instances

* Incorporate recommended changes
2024-02-05 09:59:24 -05:00
Arthur Hanson
31fb6961e9 14947 fix for missing changelog if only update m2m (#14986)
* 14947 fix for missing changelog if only update m2m

* 14947 review change

* 14947 DRY save logic

* 14947 DRY save logic

* Refactor logic

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-02-05 09:52:10 -05:00
Jeremy Stretch
b408beaed5 Changelog for #14962, #14999, #15025 2024-02-02 16:36:35 -05:00
Arthur
1b6fc49a3e 14999 fix FHRP create and add another 2024-02-02 14:52:38 -05:00
Jeremy Stretch
9f25289ce2 Fixes #15025: can_add() template filter should accept a model (not an instance) 2024-02-02 11:59:44 -05:00
ChrisPortman
59510b4bd0 Issue #14962 VM to merge directly related site context (#14992)
* Issue #14962 VM to merge directly related site context

* Cleanup & rewrite test

---------

Co-authored-by: Chris Carter <chris.carter@spinlocksecurity.com>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-02-02 10:16:07 -05:00
teapot
1b9e6bed55 Fixes #14960: Correct typo in label 2024-01-29 08:48:02 -05:00
Mattias L
ba755221bb Improved docs for how to register dashboard widgets (#14913) 2024-01-26 14:15:28 -05:00
Abhimanyu Saharan
b9cac97b73 remove GIT_PATH #14942 2024-01-25 17:26:32 -05:00
Abhimanyu Saharan
3dc43861c5 fixed typo in cluster bulk edit #14936 2024-01-25 17:24:58 -05:00
Jeremy Stretch
b9b4b8ae62 Add warning concerning AI-generated content 2024-01-25 13:58:23 -05:00
Jeremy Stretch
98c9f7fbbd Changelog for #14511, #14703, #14838, #14920 2024-01-25 12:55:22 -05:00
teapot
441e24bca7 Fixes #14934: Correct typo in label 2024-01-25 12:20:21 -05:00
Arthur
c8fb948a91 14511 Fix connected endpoints for GraphQL 2024-01-25 08:47:32 -05:00
Arthur Hanson
a141f7f771 14691 add documentation for gunicorn bug (#14924)
* 14691 add documentation for gunicorn bug

* Update docs/installation/4-gunicorn.md

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-01-25 08:41:01 -05:00
Arthur
f26ac3e7cb 14920 add help to status field in virtual device context import 2024-01-25 08:31:40 -05:00
Jeremy Stretch
487f1ccfde Fixes #14703: Catch exceptions when rendering dashboard and revert to default 2024-01-24 17:19:07 -05:00
Jeremy Stretch
481d16de08 Fixes #14838: JSONField should treat initial form data as JSON 2024-01-24 17:18:17 -05:00
Jeremy Stretch
23e201cec6 Fixes #14905: Fix miscellaneous errors with string translations 2024-01-24 17:05:02 -05:00
Jeremy Stretch
fea8efa149 Closes #14611, #14808: Add Japanese & Turkish translations 2024-01-23 12:48:15 -05:00
Jeremy Stretch
0df7ca4309 Update translation sources 2024-01-22 16:18:20 -05:00
Jeremy Stretch
e4188b5bde Changelog for #14572, #14847, #14879, #14885, #14892 2024-01-22 16:00:56 -05:00
Jeremy Stretch
cd8e977418 Fixes #14879: Include custom fields in REST API representation of data sources 2024-01-22 15:54:26 -05:00
Jeremy Stretch
88e4559b5a Fixes #14885: Add missing 'group' field to tunnel creation form 2024-01-22 15:53:29 -05:00
Jeremy Stretch
d606749335 Fixes #14892: Omit username when running report/script via command line 2024-01-22 15:52:03 -05:00
Jeremy Stretch
ff752dac07 Closes #14862: Add note to date & time configs regarding localization 2024-01-22 15:12:01 -05:00
Jeremy Stretch
3aaf370d4a Closes #14889: Update source path for DataBackend class 2024-01-22 14:54:02 -05:00
Daniel Sheppard
fd5392563f Fixes #14572 - Constrains JobView (and related views) badge to specific named job (#14754)
* Fixes #14572 - Constrains JobView (and related views) badge to specific named job

* Adjust report views to resolve same problem

* Fixed PEP8 error

* Update netbox/templates/extras/script/base.html

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

* Move function to method on PythonModuleMixin

* Update netbox/extras/views.py

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

* Update netbox/extras/views.py

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

* Update netbox/extras/views.py

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

* Update netbox/extras/views.py

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

* Update to mixin and view

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-01-22 14:01:53 -05:00
Martin
79e0d3ae67 Fixes #14847: Relax requirement for IKE policy (#14878)
* Fixes #14847: Relax requirement for IKE policy

* Docs tweak

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-01-22 13:27:55 -05:00
Jeremy Stretch
1d15ba56b9 Grant permission to modify discussions 2024-01-20 23:02:55 -05:00
Jeremy Stretch
2b4ec9dc20 Update migration file for dummy plugin 2024-01-19 16:12:50 -05:00
Jeremy Stretch
1651a307c8 #14872: Permit makemigrations --check without setting DEVELOPER=True 2024-01-19 16:08:58 -05:00
Jeremy Stretch
93a05289ad Closes #14872: Extend CI workflow to check for missing Django migrations 2024-01-19 15:59:06 -05:00
Jeremy Stretch
04575aa0f8 Automatically lock inactive GitHub discussions after 180 days 2024-01-19 15:51:22 -05:00
Jeremy Stretch
d5733a1e89 Changelog for #14645, #14755, #14851 2024-01-19 15:46:38 -05:00
Julio Oliveira at Encora
48168de4ff Fixes #14755: ValueError in web UI after REST API accepts invalid cus… (#14804)
* Fixes #14755: ValueError in web UI after REST API accepts invalid custom-field choice-set data

* PR Comments Addressed

* Set max_length=2 on extra_choices items; remove custom validation logic

* Move test for invalid choices to CustomFieldChoiceSetTest

* Omit unused imports

---------

Co-authored-by: julio.oliveira <julio.oliveira@alertmedia.com>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-01-19 15:24:08 -05:00
Abhimanyu Saharan
a87d76ad17 Fixes user delete when they have a bookmark (#14867)
* fixes user delete when they have a bookmark #14851

* Include migration for user field

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-01-19 15:23:20 -05:00
Abhimanyu Saharan
749fc31bc4 limits ip addresses on interface tables #14645 2024-01-19 14:53:24 -05:00
Jeremy Stretch
ebf6ce1b01 PRVB 2024-01-17 15:02:23 -05:00
Jeremy Stretch
b871a6c7a6 Merge pull request #14830 from netbox-community/develop
Release v3.7.1
2024-01-17 15:00:06 -05:00
Jeremy Stretch
61739a0bc5 Release v3.7.1 2024-01-17 14:37:27 -05:00
Jeremy Stretch
66db4f3874 Fixes #14827: Ensure all matching event rules are processed in response to an event 2024-01-17 14:09:06 -05:00
Jeremy Stretch
5de2dea8a6 Fixes #14816: Ensure default contact assignment ordering is consistent 2024-01-17 13:29:04 -05:00
Jeremy Stretch
621c3ccfa4 Fixes #14817: Relax required fields for IKE & IPSec models on bulk import 2024-01-17 13:28:27 -05:00
bluikko
530a15e906 Closes 14655: Document raw text configuration render
Also fix a missing character typo.
2024-01-17 10:37:52 -05:00
Jeremy Stretch
1235b496b4 Changelog for #13844, #14778, #14791, #14793 2024-01-16 13:24:55 -05:00
Jeremy Stretch
70dd8f17b6 Fixes #14778: Allow null values in CustomFieldSerializer object_type & choice_set fields 2024-01-16 13:08:02 -05:00
Jeremy Stretch
c173c26e35 Fixes #14791: Do not annotate available IPs when searching 2024-01-16 13:07:13 -05:00
Daniel Sheppard
bb806e21f7 Fixes: #13844 - Change site filter to use available_at_site instead of site_id 2024-01-16 11:28:46 -05:00
Jorik Jonker
c5cbb99bf0 fix: add missing DH group 15 (3072)
DH group 15 was not selectable in the UI, and I strongly suspect this
patch will fix that, as that particular choices was missing in
`choices.py`.

Signed-off-by: Jorik Jonker <jorik@kippendief.biz>

Fixes #14793
2024-01-16 11:05:21 -05:00
Markku Leiniö
3d941411d4 Fixes #14722: Change references to admin UI to Admin menu (#14743)
* Change references to admin UI to Admin menu

* Change also for reports and custom scripts

* Minor tweaks to help text flow better

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-01-10 16:04:46 -05:00
mmahacek
c4c1ddf68d 14660: Update webhook docs (#14661)
* 14660: Update webhook docks

* Update docs/integrations/webhooks.md

Co-authored-by: Jeff Gehlbach <jeffg@jeffg.org>

* #14660: Doc note about webhook receiver on Docker

* Cleanup & remove Docker reference (out of scope for docs)

---------

Co-authored-by: Jeff Gehlbach <jeffg@jeffg.org>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-01-10 15:20:36 -05:00
Jeremy Stretch
3645bd770f Add link to Transifex platform 2024-01-10 14:28:38 -05:00
Jeremy Stretch
0f4c25fe49 Changelog for #14663, #14706, #14709, #14749 2024-01-10 14:21:49 -05:00
Jeremy Stretch
2221a9d71f Fixes #14749: Remove errant translation wrapper from DeviceBay installed_device 2024-01-10 14:18:46 -05:00
Jeremy Stretch
edc2e3809d Closes #14765: Add developer documentation for updating translations 2024-01-10 14:03:25 -05:00
Jeremy Stretch
9603644ca2 Update README & UI screenshots (#14763)
* Refresh README content

* Formatting cleanup

* Add badge links

* More cleanup

* Update getting started section

* Add reference architecture diagram

* Add intro docs link

* Rearrange & expand text

* More restructuring

* Update screenshots

* Tweak image widths

* Tweak screenshots

* Add NetBox Cloud logo

* Fix wrapping

* Add titles for screenshots

* Jumping through more formatting hoops

* Final cleanup

* Add links for plugin resources
2024-01-10 13:05:01 -05:00
Jeremy Stretch
e1e198ec4f Fixes #14706: Relax one-to-one mapping of tunnel termination to IP address 2024-01-08 12:32:02 -05:00
Jeremy Stretch
5223486fd8 Fixes #14709: Correct typo in TYPE_VIRTUALMACHINE 2024-01-08 12:31:31 -05:00
Jeremy Stretch
ea5d33f358 Fixes #14663: Fix terminating to a VM interface when creating a new tunnel 2024-01-08 12:31:31 -05:00
Jeremy Stretch
c78a792ccc #14132: Annotate WebhooksMixin renaming under breaking changes 2024-01-03 10:59:32 -05:00
Abraham Vegh
109daca203 Add missing word 2024-01-02 09:01:39 -05:00
Jeremy Stretch
982ef3045d PRVB 2023-12-29 10:06:51 -05:00
Jeremy Stretch
7b90481fc9 Merge pull request #14636 from netbox-community/develop
Release v3.7.0
2023-12-29 10:02:38 -05:00
Jeremy Stretch
d99e6510e1 Release v3.7.0 2023-12-29 09:43:09 -05:00
Jeremy Stretch
7c4b939b59 Revise v3.7 release notes 2023-12-29 09:36:29 -05:00
Jeremy Stretch
c1ff74894c #14036: Update import paths in example plugin code 2023-12-29 09:21:06 -05:00
Jeremy Stretch
33af942571 Closes #14624: Add action object column to EventRuleTable 2023-12-28 15:56:22 -05:00
Jeremy Stretch
224484ebb6 Closes #14434: Add termination object filters for cables (#14617)
* Add termination object filters for cables

* Add tests for new filters
2023-12-28 15:39:14 -05:00
Jeremy Stretch
d9c1ba8972 Add translations to changelog 2023-12-28 14:58:19 -05:00
Jeremy Stretch
d930c4e36e Apply filterset & test changes for #14631 & #14629 2023-12-28 14:43:08 -05:00
Jeremy Stretch
d5c1cb0ef6 Merge branch 'develop' into feature 2023-12-28 14:20:04 -05:00
Jeremy Stretch
0c0672550a Merge pull request #14633 from netbox-community/develop
Release v3.6.9
2023-12-28 14:13:25 -05:00
Jeremy Stretch
199685d98b Release v3.6.9 2023-12-28 13:58:34 -05:00
Jeremy Stretch
3ef2db81e8 Closes #14629: Add filter tests for all q and description filters 2023-12-28 13:53:16 -05:00
Jeremy Stretch
3bacee16bd Closes #14631: Ensure description filters are available on all relevant models 2023-12-28 13:53:16 -05:00
Daniel Sheppard
45c646dcec Fixes #14482 - Fix validation error when primary IP is moved (#14514)
* Fix validation when primary IP is moved.

* Fix views test

* Work on excluding assigned_objects

* Modify clean() on model and form to properly catch error

* Fix test failure

* Fix test to check for PK

* Remove model_form check
2023-12-28 13:28:05 -05:00
Jeremy Stretch
fedcbaf4c8 Fixes #14620: Permit setting device type U height to 0 during bulk edit 2023-12-28 10:06:25 -05:00
MengYX
359c0cf3a0 Fix typo in filtersets.py
fix typo which causing exception `Cannot resolve keyword 'description_icontains' into field`
2023-12-28 08:47:43 -05:00
Jeremy Stretch
11bc460551 Update release notes 2023-12-27 17:22:04 -05:00
Jeremy Stretch
1f2f0860fe Merge branch 'develop' into feature 2023-12-27 16:34:38 -05:00
Jeremy Stretch
46b933a5aa Merge pull request #14616 from netbox-community/develop
Release v3.6.8
2023-12-27 16:12:13 -05:00
Jeremy Stretch
07da3f6d33 Release v3.6.8 2023-12-27 16:00:16 -05:00
Jeremy Stretch
4eadc8cfe4 Closes #14240: Increase min/max validation values for custom fields 2023-12-27 15:41:26 -05:00
Jeremy Stretch
0613e8e95c Fixes #14613: Fix display of current configuration parameters 2023-12-27 15:32:11 -05:00
Jeremy Stretch
113c60a44a Fixes #13909: Ignore empty choices when populating dynamic choice fields from initial data 2023-12-27 14:32:40 -05:00
Jeremy Stretch
8a237561ef Closes #14596: Match against description field when searching for devices 2023-12-27 13:49:39 -05:00
Jeremy Stretch
cc0fc03ec3 Changelog for #11039, #11816, #12731, #13606, #13649, #13812, #14532 2023-12-27 13:45:06 -05:00
Jeremy Stretch
b955751349 Fixes #14517: Ensure reservations tab is always displayed under rack view 2023-12-27 13:42:26 -05:00
Jeremy Stretch
d6c8d1581c Closes #11039: List parent prefixes under IP range view 2023-12-27 12:53:30 -05:00
Jeremy Stretch
e6642b5f5b Fixes #11816: Detach group/site validation error from group field 2023-12-27 12:51:51 -05:00
Jeremy Stretch
a67236fc3c Fixes #13812: Record data source sync failure when run via syncdatasource command 2023-12-27 12:51:03 -05:00
Jeremy Stretch
634681a72e Fixes #13606: Fix filtering by null for multiselect custom fields 2023-12-27 12:49:31 -05:00
Jeremy Stretch
031b7540b3 Fixes #13741: Update docs to correctly reflect inventory item uniqueness requirements 2023-12-26 13:35:03 -05:00
Jeremy Stretch
43909ee33f Fixes #13649: Permit zero-length cables 2023-12-26 09:27:58 -05:00
Jeremy Stretch
99467e8f66 Fixes #12731: Support custom validation for many-to-many fields (#14516)
* WIP

* Enforce custom validators during bulk edit

* Add bulk edit M2M validation test

* Clean up tests

* Add custom validation test for bulk import

* Misc cleanup
2023-12-22 10:01:05 -05:00
Jeremy Stretch
00807d1e52 Fixes #14550: Fix changing event rule action type from webhook to script (#14571)
* Fixes #14550: Fix changing event rule action type from webhook to script

* Remove action_parameters from form; set on instance under save()
2023-12-22 09:54:08 -05:00
Jeremy Stretch
0d08205ab1 Fixes #14532: Device/VM change record should accurately reflect when primary/OOB IP is deleted 2023-12-22 08:47:51 -05:00
Jeremy Stretch
c289dda649 Changelog for #14507, #14538, #14549, #14560, #14575 2023-12-21 16:36:24 -05:00
Daniel Sheppard
169207058f Update search to add note 2023-12-21 16:27:43 -05:00
Jeremy Stretch
e5c565cbf4 Closes #14119: Remove redundant check for to_objectchange() 2023-12-21 16:26:20 -05:00
Jeremy Stretch
f0b9008529 Fixes #14575: Fix display of the tags column under VDC table 2023-12-21 16:00:44 -05:00
Daniel Sheppard
8dfec7e2b2 Closes #14538 - Add available_at_site filter (#14541)
* Closes #14538 - Add available_at_site filter

* Add tests

* Fix tests
2023-12-21 15:40:57 -05:00
Markku Leiniö
c1cf037eaf Print NetBox version in upgrade.sh (#14547) 2023-12-21 15:13:40 -05:00
Azmodeszer
3f4a65cc5c added ! to safe characters 2023-12-21 15:10:38 -05:00
Jeremy Stretch
58f925c261 Closes #14503: Include additional display attributes for search indexers 2023-12-21 14:36:42 -05:00
Jeremy Stretch
326b54b7e0 Closes #14579: Add user language preference 2023-12-21 14:27:52 -05:00
Jeremy Stretch
3905ddf163 Add initial message maps for es, fr, pt, and ru 2023-12-21 13:31:16 -05:00
Jeremy Stretch
3cd2432aa1 Rebuild source messages 2023-12-21 12:58:45 -05:00
Prince Kumar
12beac4f1a fix the result of script jobs #14549 2023-12-20 15:15:02 -05:00
Jeremy Stretch
a233dc91fe Closes #14536: Enable ENFORCE_GLOBAL_UNIQUE by default 2023-12-20 11:09:40 -05:00
Jeremy Stretch
b794bd6fb8 Fixes #14499: Relax requirements for encryption/auth algorithms on IKE & IPSec proposals 2023-12-19 14:44:22 -05:00
Jeremy Stretch
96878cfca6 Closes #14551: Show assigned tunnel (if any) under interface view 2023-12-19 10:31:18 -05:00
Jeremy Stretch
25e67eb555 Merge branch 'develop' into feature 2023-12-15 16:52:42 -05:00
Jeremy Stretch
ec245b968f PRVB 2023-12-15 16:46:53 -05:00
Jeremy Stretch
f1d4011b40 Merge pull request #14542 from netbox-community/develop
Release v3.6.7
2023-12-15 16:44:46 -05:00
Jeremy Stretch
4cdc30a7c5 Release v3.6.7 2023-12-15 16:25:24 -05:00
kkthxbye
8d39181842 Fixes #12751 - Usability improvements for object selector (#14387)
* Usability improvements for object selector:
* Adds preselected filters
* Applies the filter on selection instead of requiring the search button to be pushed

* Declare selector_fields on base form class

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-12-15 16:07:15 -05:00
Jeremy Stretch
3068f2a075 Changelog for #14147, #14424, #14436, #14458 2023-12-15 15:21:38 -05:00
Arthur Hanson
224d64007a 14147 Prevent logging to Change Log when no changes are made (#14477)
* 14147 Prevent logging to Change Log when no changes are made

* 14147 add test

* 14147 add exclude_fields to serialize_object

* 14147 make skip empty default to True

* 14147 remove override of to_objectchange

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-12-15 15:17:45 -05:00
Jeremy Stretch
c81869c795 Fixes #14533: Fix quick search under VLAN group VLANs list 2023-12-15 13:59:31 -05:00
Jeremy Stretch
929d4d2c95 Fixes #14522: Fix filtering contact assignments by group 2023-12-15 13:58:50 -05:00
Jeremy Stretch
d14e4ab52b Changelog for #13983, #14081, #14148, #14467, #14505, #14512, #14515 2023-12-14 17:12:29 -05:00
Daniel Sheppard
8a4233aca1 Update create_userconfig to receive signals from NetBoxUser model in addition to User model. 2023-12-14 17:07:57 -05:00
Jeremy Stretch
5508e125ba Fixes #14512: Omit unused queryset annotations for REST API requests using brief mode 2023-12-14 16:49:18 -05:00
Arthur Hanson
69bf1472d2 13983 Add nested arrays for extra_choices in CustomFieldChoiceSet (#14470)
* 13983 split array fields in CSV data for CustomFieldChoices

* 13983 fix help text

* 13983 update tests

* 13983 use re for split

* 13983 replace escaped chars

* 13983 fix escape handling

* 13983 fix escape handling

* 13983 fix escape handling
2023-12-14 15:18:56 -05:00
Arthur Hanson
b93735861d Fixes #14081: Fix cached counters on delete for parent-child items (#14131)
* 14081 fixed cached counters on delete for parent-child items

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-12-12 16:53:04 -05:00
Arthur Hanson
6939ae4a47 14467 change ChoiceField separator from comma to colon (#14469)
* 14467 change ChoiceField separator from comma to colon

* 14467 fix test

* 14467 fix test

* 14467 use regex for colon detection

* 14467 update tests
2023-12-12 14:31:39 -05:00
Prince Kumar
81fa4265da add tags field in L2VPN Termination 2023-12-12 14:23:16 -05:00
Arthur Hanson
965f2de34b 14424 Remove ChangeLoggedModel from StagedChange (#14476)
* 14424 remove ChangeLoggedModel from StagedChange

* 14424 rename migration
2023-12-11 10:50:07 -05:00
Jeremy Stretch
35be4f05ef Add note to bug reports section 2023-12-11 10:10:28 -05:00
Jeremy Stretch
d428dd172c Fixes #14472: Fix display of hidden custom fields in object edit forms 2023-12-08 08:45:03 -05:00
Jeremy Stretch
2ef023a160 Changelog for #14249, #14390, #14392, #14397, #14401, #14432, #14448 2023-12-07 16:34:49 -05:00
Jeremy Stretch
9d7192202d Fixes #14392: Fix admin UI bulk actions 2023-12-07 16:31:21 -05:00
Jeremy Stretch
95a8415e2d Add deployment type to bug report template 2023-12-07 16:21:15 -05:00
Jeremy Stretch
b532435a6d Closes #14436: Add indexes for all GenericForeignKey fields (#14463)
* Closes #14436: Add PostgreSQL indexes for all GenericForeignKeys

* Add note about GFK indexes to developer docs
2023-12-07 14:02:51 -05:00
Jeremy Stretch
2d1f882724 Closes #14458: Remove the clearcache management command 2023-12-07 13:45:50 -05:00
Jeremy Stretch
e59ee3e01e Fixes #14397: Pass a mutable copy of request data when provisioning available IPs 2023-12-07 11:20:03 -05:00
Jeremy Stretch
5d2f499ffb Fixes #14432: Fix hyperlinks for global search result attributes 2023-12-07 09:52:40 -05:00
Abhimanyu Saharan
92bdaa2120 Fixes IPv6 detection from headers (#14456)
* fixes client ip detection for v6

* adds test for get_client_ip

* Employ urlparse() to strip port numbers from IPs

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-12-07 09:45:30 -05:00
Jeremy Stretch
fe3f21105c Fixes #14448: Fix exception when creating a power feed with rack and panel in different sites 2023-12-06 15:28:47 -05:00
Jeremy Stretch
32264ac3e3 Fixes #14322: Populate default custom field values when instantiating templated device components 2023-12-06 15:21:34 -05:00
Arthur
b34daeaacb 14401 review changes - remove migration 2023-12-06 15:16:03 -05:00
Arthur
d2c3a39ebb 14401 validate rack startion position > 0 2023-12-06 15:16:03 -05:00
Jeremy Stretch
d10ac9b4a7 Closes #12623: Document need for core.sync_datasource permission 2023-12-05 14:03:38 -05:00
Abhimanyu Saharan
b21ed6a334 adds optional classes parameter #14390 2023-12-05 13:51:28 -05:00
Jeremy Stretch
f58d80643c Release v3.7-beta1 2023-12-05 08:25:48 -05:00
Jeremy Stretch
1afac47178 Documentation cleanup 2023-12-05 08:05:44 -05:00
Jeremy Stretch
8db1093fdc #9816: Add TunnelGroup 2023-12-04 15:44:52 -05:00
Jeremy Stretch
9f1283f0fa Upgrade django-taggit to v5.0.1 2023-12-04 13:43:58 -05:00
Jeremy Stretch
2b7cc1e6fa Upgrade Markdown to v3.5.1 2023-12-04 13:39:04 -05:00
Jeremy Stretch
115111df9e #14132: Fix documentation link 2023-12-04 11:15:13 -05:00
Jeremy Stretch
deadde8700 #14132: Extend EventRule template 2023-12-04 11:12:20 -05:00
Jeremy Stretch
5d57e9863d #14132: Simplify form logic for script EventRules 2023-12-04 10:57:29 -05:00
Jeremy Stretch
cfc20f910e #14132: Fix migration 2023-12-04 10:21:37 -05:00
Jeremy Stretch
625825d482 Fixes #14402: Avoid nullifying disk value when editing a VM with disk(s) attached 2023-12-04 10:03:47 -05:00
Jeremy Stretch
c0512e2c36 #14311: Update model documentation 2023-12-04 09:29:43 -05:00
Jeremy Stretch
5b0b366b82 #9816: Promote IKE & IPSec proposals and policies to primary models 2023-12-04 09:28:29 -05:00
Jeremy Stretch
3faf4857cb #9816: Misc cleanup 2023-12-04 09:19:25 -05:00
Jeremy Stretch
42ab8ee0a2 #14153: Import proxy ContentType for nbshell 2023-12-01 11:50:48 -05:00
Jeremy Stretch
bf182158a7 #13794: Fix alphabetical ordering of related models 2023-12-01 11:23:38 -05:00
Jeremy Stretch
e893ffcee4 #13550: Clean up bulk view docstrings 2023-12-01 11:08:09 -05:00
Jeremy Stretch
0c9919a5e8 #13334: Capture exception class when recording job error 2023-12-01 10:54:46 -05:00
Jeremy Stretch
0340a5e8d6 #13299: Clean up custom field form field help text 2023-12-01 10:24:12 -05:00
Jeremy Stretch
7a63e11a70 #13299: Fix display of empty string values 2023-12-01 10:23:38 -05:00
Jeremy Stretch
dcd3f098ce #13230: Tweak field description 2023-12-01 10:10:44 -05:00
Jeremy Stretch
7cec4e9e22 #12135: Elegantly handle ProtectedError/RestrictedError exceptions 2023-12-01 09:51:54 -05:00
Jeremy Stretch
e4824db40b Improve rendering of JSON data 2023-12-01 09:24:23 -05:00
Jeremy Stretch
2ed261e9c2 Update developer model docs 2023-12-01 08:47:31 -05:00
Jeremy Stretch
dea5f94d97 Finish draft release notes 2023-12-01 08:37:20 -05:00
Jeremy Stretch
85ab7adca6 Closes #14395: Move & rename process_webhook() 2023-12-01 08:25:01 -05:00
Jeremy Stretch
4fc0a999ea Closes #14365: Introduce job_start and job_end signals (#14393)
* Introduce job_start and job_end signals, and receivers to process event rules

* Complete signals documentation
2023-11-30 19:36:41 -05:00
Jeremy Stretch
b812a50ca2 Closes #14361: Add a description field to Webhook (#14380) 2023-11-30 17:02:45 -05:00
Arthur Hanson
a38a38218b 14132 Add EventRule - change webhook and add in script processing to events (#14267)
---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-30 16:36:33 -05:00
Jeremy Stretch
b83fcc6077 Merge branch 'develop' into feature 2023-11-29 20:25:44 -05:00
Jeremy Stretch
9d09916f6e PRVB 2023-11-29 19:32:45 -05:00
Jeremy Stretch
28080e9b14 Merge pull request #14386 from netbox-community/develop
Release v3.6.6
2023-11-29 19:30:47 -05:00
Jeremy Stretch
04fd45581d Release v3.6.6 2023-11-29 19:16:30 -05:00
Jeremy Stretch
0a8eb7fcbe Update changelog 2023-11-29 17:25:10 -05:00
Jeremy Stretch
ac3fc25dfd Fixes #14239: Fix CustomFieldChoiceSet search filter 2023-11-29 17:20:18 -05:00
Jeremy Stretch
82591ad8a1 Fixes #14056: Record a pre-change snapshot when bulk editing objects via CSV 2023-11-29 17:19:35 -05:00
Jeremy Stretch
6dddb6c9d2 Fixes #14199: Fix jobs count for reports with a custom name 2023-11-29 17:19:02 -05:00
Abhimanyu Saharan
290aae592d Raises validation error if file path and root are not unique (#14232)
* raises validation error if file path and root are not unique #14187

* review changes #14187
2023-11-29 16:25:16 -05:00
Abhimanyu Saharan
ff021a8e4e Adds region hierarchy in templates (#14213)
* initial work to render hierarchical region #13735

* adds site display #13735

* cleanup #13735

* adds display region tag #13735

* refactored region hierarchy #13735

* refactored region hierarchy #13735

* renamed display_region to nested_tree #13735

* Make render_tree suitable for generic use

* Remove errant item from __all__

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-29 16:20:59 -05:00
Vincent Simonin
3a3d43911c Fixed password was not hashed on REST API update (#14340)
* Fixed password was not hashed on REST API update

* When we updated a user password with a REST API call the password was
  stored in clear in plain text in the database.

* Following code review

* Move test on UserTest class
* Call `super().update()` in overriding `update` method

* Return directly the result of `super().update()`
2023-11-29 15:59:54 -05:00
Josef Johansson
c43c63a817 14346 fix missing function call convert
In PR #13958 (commit 8224644) _get_report was modified to do the call on the variable without changing the call later on.

This commit fixes that and removes the call on the variable.

Signed-off-by: Josef Johansson <josef@oderland.se>
2023-11-29 15:58:14 -05:00
Jeremy Stretch
792b353f64 Fixes #14363: Fix bulk editing of interfaces assigned to VM with no cluster 2023-11-29 15:23:35 -05:00
Jeremy Stretch
01ba4ce129 Fixes #14242: Enable export templates for contact assignments 2023-11-29 15:22:41 -05:00
Jeremy Stretch
fc7d6e1387 Fixes #14325: Ensure expanded numeric arrays are ordered (#14370)
* Fixes #14325: Ensure expanded numeric arrays are ordered

* Remove redundant casting to
2023-11-28 17:04:10 -05:00
Jeremy Stretch
080da68b6a Fixes #14349: Fix custom validation support for DataSource 2023-11-28 17:02:52 -05:00
Jeremy Stretch
7d413ea3c2 Fixes #14343: Set order_by accessor for asn_asdot column (#14369) 2023-11-28 17:02:07 -05:00
Arthur Hanson
40763b58bd 14299 change webhook timestamp to isoformat (#14331)
* 14299 change timestamp to isoformat

* Omit redundant str() casting

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-28 17:01:03 -05:00
Jeremy Stretch
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
Jeremy Stretch
8e7146cd06 v3.7 documentation updates 2023-11-28 13:11:30 -05:00
Jeremy Stretch
e4989300de Draft v3.7 release notes 2023-11-28 13:11:00 -05:00
Jeremy Stretch
6678880db5 Closes #9816: VPN tunnel support (#14276)
- Introduces a new `vpn` app with the following models:
    - Tunnel
    - TunnelTermination
    - IKEProposal
    - IKEPolicy
    - IPSecProposal
    - IPSecPolicy
    - IPSecProfile
2023-11-27 16:17:15 -05:00
Jeremy Stretch
975a647d9a Closes #14312: Move ConfigRevision to core (#14328)
* Move ConfigRevision model & write migrations

* Move ConfigRevision resources from extras to core

* Extend migration to update original content type for ConfigRevision
2023-11-27 16:09:05 -05:00
Jeremy Stretch
18422e1d26 Closes #14326: Move form mixins (#14327)
* Move form mixins from extras app to netbox app

* Remove obsolete extras/admin.py
2023-11-22 13:49:26 -05:00
Jeremy Stretch
a73ba00aa0 Closes #13299: Improve options for controlling custom field visibility (#14289)
* Add ui_visible and ui_editable fields

* Extend migration to map new visible/editable values

* Remove ui_visibility field

* Update docs
2023-11-20 13:06:34 -05:00
Arthur Hanson
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
Pavel Korovin
e13bf48a35 Add /api/virtualization/virtual-machines/{id}/render-config/ endpoint (#14287)
* Add /api/virtualization/virtual-machines/{id}/render-config/ endpoint

* Update Docstring "Device" -> "Virtual Machine"

Docstring should mention "..this Virtual Machine" instead of "...this Device", thanks @LuPo!

* Move config rendering logic to new RenderConfigMixin

* Add tests for render-config API endpoint

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-17 08:32:58 -05:00
Jeremy Stretch
e767fec5cc Closes #14173: Enable plugins to register columns on core tables (#14265)
* Closes #14173: Enable plugins to register columns on core tables

* Support translation for column name

* Document new registry store
2023-11-16 12:16:35 -05:00
Jeremy Stretch
e15647a2ce Closes #14153: Filter ContentTypes by supported feature (#14191)
* WIP

* Remove FeatureQuery

* Standardize use of proxy ContentType for models

* Remove TODO

* Correctly filter BookmarksWidget object_types choices

* Add feature-specific object type validation
2023-11-16 12:12:51 -05:00
Jeremy Stretch
69a4c31072 Closes #13794: Dynamically populate related objects list under tenant view (#14196)
* Closes #13794: Dynamically populate related objects list under tenant view

* get_related_models() should sort models alphabetically by default

* Reference Meta.related_objects instead of calling get_fields()
2023-11-16 12:02:32 -05:00
Jeremy Stretch
840b7d804c Closes #13645: Make Sentry integration optional (#14197) 2023-11-09 16:33:35 -05:00
Jeremy Stretch
3d20276f55 Closes #14134: Display additional object attributes in global search results (#14154)
* WIP

* Add display_attrs for all indexers

* Linkify object attributes

* Clean up prefetch logic

* Use tooltips for display attributes

* Simplify template code

* Introduce get_indexer() utility function

* Add  to examples in docs

* Use tooltips to display long strings
2023-11-09 16:21:09 -05:00
Jeremy Stretch
2562c8745c Closes #14156: Add custom field support for contact assignments 2023-11-09 16:10:14 -05:00
Jeremy Stretch
ac91d4e5e5 Merge branch 'develop' into feature 2023-11-09 16:06:26 -05:00
Jeremy Stretch
d52a6d3b10 PRVB 2023-11-09 16:04:38 -05:00
Jeremy Stretch
6ac25eeb65 Merge pull request #14238 from netbox-community/develop
Release v3.6.5
2023-11-09 16:00:56 -05:00
Jeremy Stretch
41eae1bc19 Release v3.6.5 2023-11-09 15:45:49 -05:00
Jeremy Stretch
351aaf8397 Changelog for #12741, #13022, #13587, #13936, #14085, #14117, #14166, #14182, #14195, #14221 2023-11-09 15:20:24 -05:00
Abhimanyu Saharan
5c27d29b08 Adds unit to the power port draw (#14208)
* adds unit to the power port draw #13587

* review changes #13587

* moved units to header #13587

* Abbreviate unit for consistency with e.g. PowerFeedTable available_power column

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-09 15:09:16 -05:00
Abhimanyu Saharan
e1bedb8350 restores config revision during cache clear #14182 2023-11-09 14:50:45 -05:00
Abhimanyu Saharan
dd5e20aa1a allow login and logout in maintenance mode #14166 2023-11-09 14:45:47 -05:00
Abhimanyu Saharan
217a9edb4c handles the port in the ip #14085 2023-11-09 14:43:36 -05:00
Abhimanyu Saharan
ad95760ead adds contact group on contact assignment table #14221 2023-11-09 14:12:10 -05:00
Abhimanyu Saharan
57bf2a2f00 fix asn view under asn range #14195 2023-11-09 10:58:28 -05:00
Jeremy Stretch
e5c38e0829 Closes #13022: Add IP assignment support when bulk importing services (#14230)
* issue 13022 resolved, ipaddress added into bulk_import form

* validation of ip address for device and virtual machine

* error message modified

* error message modified

* error message modified

* Fix form validation

* Extend bulk import test

---------

Co-authored-by: yash-pal1 <ypal@onemindservices.com>
Co-authored-by: yash-pal1 <ypal@onemindservies.com>
2023-11-09 10:55:55 -05:00
Artem Kotik
6b89da2233 Closes #13936: Add primary_ip4 and primary_ip6 filters to VirtualMachine and VirtualDeviceContext filtersets (#14203)
* Add primary_ip4 and primary_ip6 filters for VirtualMachine and VirtualDeviceContext filtersets (#13936)

* Add PrimaryIPFilterSet to __all__

---------

Co-authored-by: Artem I. Kotik <artem.i.kotik@ringcentral.com>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-09 09:56:43 -05:00
Prince Kumar
092f2b06ab Enhance Virtual Machine and Device Platform Filter with Manufacturer Information (#14047)
* Add manufacturer for filters in the virtual machine and device #12741

* reverse the filtersets of device and vm

* revert the filtersets of vm

* add advance selector in platform

* remove manufacture from imports
2023-11-09 09:55:44 -05:00
Jeremy Stretch
6900097e2d Fixes #14117: Validate the number of front ports to be created 2023-11-09 09:50:54 -05:00
Jeremy Stretch
5000564430 Changelog for #13669, #13723, #13743, #13951, #14033, #14101, #14112, #14113, #14220, #14220 2023-11-09 09:19:49 -05:00
Abhimanyu Saharan
95519b42a0 Adds device and vm to service filter form (#14215)
* adds device and vm to service filter form #13951

* Tweak labels

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-09 09:13:46 -05:00
Chris Mills
dfef89ab88 Fix ordering on JobTable. #14223 2023-11-09 08:50:15 -05:00
Abhimanyu Saharan
0603dd1be4 Adds inventory item children view (#14217)
* adds inventory item children view #14112

* Use existing child_items relation

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-09 08:47:24 -05:00
Abhimanyu Saharan
1203d761f4 Adds mask length filters on ipaddress (#14218)
* adds mask length filters on ipaddress #14101

* Change IPaddress mask_length filter to multi-value; extend tests

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-09 08:46:14 -05:00
Abhimanyu Saharan
d2c727c0a2 review changes #13743 2023-11-09 08:36:39 -05:00
Abhimanyu Saharan
ac4b46b502 adds site column to power feeds #13743 2023-11-09 08:36:39 -05:00
Abhimanyu Saharan
6e8ee9db89 review changes #14113 2023-11-09 08:34:41 -05:00
Abhimanyu Saharan
94858ac13f adds parent to inventory item table #14113 2023-11-09 08:34:41 -05:00
Abhimanyu Saharan
b0f2de5bd7 order available columns #14219 2023-11-09 08:07:17 -05:00
Abhimanyu Saharan
60e98324c3 adds inventory items to interface #13723 2023-11-08 12:57:22 -05:00
Abhimanyu Saharan
66b9cdf141 adds import button on the contact assignment table #13669 2023-11-08 12:37:13 -05:00
Jeremy Stretch
8dcbd66de6 Closes #13427: Public model registration (#14152)
* Initial work on #13427

* Clarify documentation

* Reference public models registry when populating models for ConfigTemplate context
2023-11-03 10:32:59 -04:00
Kenny Y
22e474ff96 Update attr in conditions example 2023-11-02 10:22:54 -04:00
Arthur Hanson
b3fb393490 14033 raise validation error if A and B term go to same object (#14050)
* 14033 raise validation error if A and B term go to same object

* 14033 move check to cable model clean

* 14033 fix tests
2023-11-01 16:30:10 -04:00
Jamie (Bear) Murphy
f6338abf14 Closes #13690: List all objects to be deleted (#14089)
* show objects that would be deleted by cascade

* some items were not showing (eg ips on devices)

* dont include the item being deleted in the list of related items

* Revert "dont include the item being deleted in the list of related items"

This reverts commit 298a7860b2.

* cleanup

- migrate code to use collector directly instead of the NestedObjects wrapper from admin.utils

- adjust object names and text output

* requested adjustments

* remove comma from end of list

* linting

* refactor, add accordion

* migrate to defaultdict, use title for capitalisation of accordian titles

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-11-01 15:13:45 -04:00
Jeremy Stretch
944008d475 Closes #12135: Prevent the deletion of interfaces with children (#14091)
* Closes #12135: Prevent the deletion of interfaces with children

* Change PROTECT to RESTRICT

* Extend handle_protectederror() to also handle RestrictedError

* Fix string translation

* Update migrations

* Support bulk removal of parent interfaces via UI if all children are included

* Add support for the bulk deletion of restricted objects via REST API
2023-11-01 13:47:14 -04:00
Jeremy Stretch
c2d1988cb3 Closes #14035: Order global search results of equivalent weight by value (#14140) 2023-11-01 11:56:14 -04:00
Jeremy Stretch
77208bf5f3 Fix migrations 2023-10-31 08:41:24 -04:00
Jeremy Stretch
7323668dd0 Closes #13334: Record error message on failed jobs (#14106) 2023-10-31 08:34:57 -04:00
Jeremy Stretch
edc4a35296 Initial work on #10244: Protection rules (#14097) 2023-10-30 14:36:56 -04:00
Jeremy Stretch
c4e765c4a8 Closes #14141: translation cleanup (#14143)
* Translations cleanup

* Tweak variable names; misc string cleanup

* Misc cleanup
2023-10-30 13:38:03 -04:00
Jeremy Stretch
30ce9edf1c Closes #13381: Enable plugins to register custom data backends (#14095)
* Initial work on #13381

* Fix backend type display in table column

* Fix data source type choices during bulk edit

* Misc cleanup

* Move backend utils from core app to netbox

* Move backend type validation from serializer to model
2023-10-24 11:35:53 -04:00
Arthur Hanson
7274e75b26 13230 Allow Devices to be excluded from Rack utilization (#14099)
* 13230 add exclusion flag to device type

* 13230 forms, detail views

* 13230 add tests

* 13230 extraneous model field

* 13230 extraneous form field

* Update netbox/dcim/forms/bulk_edit.py

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

* 13230 review feedback

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-10-24 11:29:24 -04:00
Arthur Hanson
ae447bd187 12216 Add color to circuit-type and add to SVG rendering (#14098)
* 12216 add color to model

* 12216 add forms, serializers for color

* 12216 color to detail view, add type to svg

* 12216 add color to svg

* 12216 review changes
2023-10-24 08:19:04 -04:00
Jeremy Stretch
450790ab4a Closes #13550: Refactor view action mappings (#14062)
* Merge actions and action_perms into a single mapping

* Update obsolete permission maps

* Update obsolete action lists

* Normalize empty permission mappings

* Cleanup

* Add deprecation warnings

* Introduce DEFAULT_ACTION_PERMISSIONS constant
2023-10-20 15:08:09 -04:00
Jeremy Stretch
3f40ee5501 Closes #14036: Move extras.plugins to netbox.plugins (#14086)
* Move extras.plugins to netbox.plugins & add deprecation warnings

* Move plugin template tags from extras to utilities

* Move plugins tests from extras to netbox

* Add TODO reminders for v4.0
2023-10-20 11:24:08 -04:00
Jeremy Stretch
5b2f29480a Tweak translation issue form 2023-10-18 11:57:21 -04:00
Jeremy Stretch
809b049590 YAML fix 2023-10-18 11:29:31 -04:00
Jeremy Stretch
2a0a7d45aa Add GitHub issue template for translations 2023-10-18 11:24:14 -04:00
Jeremy Stretch
7efbfabc0b PRVB 2023-10-17 13:07:29 -04:00
Jeremy Stretch
d195f9c6ea Merge pull request #14057 from netbox-community/develop
Release v3.6.4
2023-10-17 13:04:39 -04:00
Jeremy Stretch
de298224f1 Pin django-mptt to v0.14.0, for Python 3.8 2023-10-17 12:48:42 -04:00
Jeremy Stretch
3fd8e48fac Release v3.6.4 2023-10-17 12:37:14 -04:00
Jeremy Stretch
ab9de43447 Changelog for #12336, #13957, #13962, #13972, #14025, #14042 2023-10-17 12:25:49 -04:00
Jeremy Stretch
51ef4fb920 Closes #13962: Add a copy-to-clipboard button to the key field of the API token creation form 2023-10-17 11:34:37 -04:00
Arthur Hanson
7983c2590e 14025 fix script name checking (#14030)
* 14025 fix script name checking

* 14025 fix script name checking

* 14025 add file extension validation and simplify get logic

* 14025 match start of string with regex

* 14025 backout changes to model_forms

* 14025 add filepatch checking to reports
2023-10-17 10:57:50 -04:00
Arthur Hanson
d77d45e795 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
Arthur Hanson
a24864bc6d 14042 mptt cache count (#14048)
* 14042 fix cache count for mptt child delete

* 14042 add test

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-10-17 10:31:58 -04:00
Prince Kumar
c671ac2f28 Add dns_name filter on the IP Address page (#14046)
* Add dns_name filter on the IP Address page #13957

* add dns_name field in the filterset field and remove extra method
2023-10-17 10:06:33 -04:00
Arthur Hanson
18a813aa39 13972 allow filtering of cables if have terminations (#13949)
* 10769 allow filtering of cables if have terminations

* 10769 change to termianted

* 10769 add test case

* 10769 review cleanup
2023-10-17 09:32:42 -04:00
Jeremy Stretch
14447befb9 Changelog for #12872, #14013, #14023, #14026 2023-10-13 14:01:08 -04:00
Daniel Sheppard
06ed7ac8a5 Fixes: #14023 - Fixes bulk disconnecting with multiple components attached to the same cable (#14029)
* Fixes: #14023 - Fixes bulk disconnecting with multiple components attached to the same cable

* Update netbox/dcim/views.py

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

* Update netbox/dcim/views.py

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

* Update netbox/dcim/views.py

Co-authored-by: Daniel Sheppard <dans@dansheps.com>

* Code cleanup & i18n fix

* Restore original termination count logic

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-10-13 13:57:58 -04:00
Tobias Genannt
72f01b3e89 Fix #14026: Only get the needed amount of objects 2023-10-13 09:25:12 -04:00
Jeremy Stretch
2522056bd1 Closes #12872: Introduce DATA_UPLOAD_MAX_MEMORY_SIZE config parameter 2023-10-13 08:54:06 -04:00
Arthur
01c894e625 14013 fix device role filter 2023-10-13 08:51:22 -04:00
Jeremy Stretch
4286c1cde2 Closes #12831: Include circuit description in cable trace SVG image 2023-10-06 15:14:33 -04:00
Jeremy Stretch
383285fb94 Closes #13997: Update runner versions (#13998)
* Update runner versions

* Update stale & lock runners
2023-10-06 13:34:25 -04:00
Jeremy Stretch
e23b246d46 Changelog for #11987, #13440, #13746, #13876, #13950 2023-10-05 16:55:15 -04:00
Arthur
a543bd469a 11987 change cable bulk import to check if same cable 2023-10-05 16:48:48 -04:00
Arthur Hanson
d03859b27b 13746 fix available ips API for posting custom-fields (#13889) 2023-10-05 15:53:57 -04:00
Arthur Hanson
bbb133019d 13815 document view permissions for scripts (#13943)
* 13815 document view permissions for scripts

* Replicate permissions note for reports

* Remove duplicated text

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-10-05 15:15:50 -04:00
sleepinggenius2
285187542d Adds selection custom field labels to UI 2023-10-05 15:02:22 -04:00
Arthur
4d13f4d252 13850 add requests to requirements 2023-10-05 13:37:38 -04:00
Jeremy Stretch
e4a9cad756 Changelog for #12328, #13064, #13872, #13910, #13944 2023-10-04 14:11:28 -04:00
Jeremy Stretch
b93b331d86 Fixes #13966: Restore 'last login' column on users table 2023-10-04 14:09:29 -04:00
Jeremy Stretch
a46255ddda Fixes #13064: Ensure unchecked checkboxes do not revert to original values upon HTMX form refresh 2023-10-04 11:57:52 -04:00
Arthur Hanson
6093debb71 12328 update GFK object in clean (#13946)
* 12328 update GFK object in clean

* Add missing import statement

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-10-03 15:41:40 -04:00
yash-pal1
6dc560596d added device button under platform view pre-populated role field instead of platform field 2023-10-03 15:09:10 -04:00
Arthur
5cb1a6b790 13872 fix bulk import 2023-10-03 14:52:59 -04:00
Arthur
ef460a38ed 13944 fix report detail api 2023-10-03 14:39:46 -04:00
Jeremy Stretch
786f0cc7f3 PRVB 2023-09-26 16:31:33 -04:00
Jeremy Stretch
ccc9e89e1a Merge pull request #13907 from netbox-community/develop
Release v3.6.3
2023-09-26 16:26:29 -04:00
Jeremy Stretch
9e35cefaf2 Release v3.6.3 2023-09-26 15:48:03 -04:00
Jeremy Stretch
1a00765b72 Changelog for #11079, #11901, #13843, #13849, #13859, #13864 2023-09-26 15:27:44 -04:00
Jeremy Stretch
4dd229e73a Fixes #13864: Remove 'default' choice for dashboard widget color 2023-09-26 15:24:20 -04:00
Arthur Hanson
db40119faa 13130 dont allow reassigning ipaddress assigned object if primary ip (#13893)
* 13130 dont allow reassigning ipaddress assigned object if primary ip

* 13130 add tests fix parent check

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-26 15:16:02 -04:00
Daniel Sheppard
f65744faee Fixes: #11079 - Handle cables across multiple rear-port positions (#13337)
* Catch AssertionError's in signals.  Handle accordingly

* Alter cable logic to handle certain additional path types.

* Fix failures and add test

* More tests

* Remove not needed tests, add additional tests

* Finish tests, correct some behaviour

* Add check for mid-span device not allowed condition

* Remove excess import

* Remove logging import

* Remove logging import

* Minor tweaks based on Arthur's feedback

* Update netbox/dcim/tests/test_cablepaths.py

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

* Update netbox/dcim/models/cables.py

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

* Changes to account for required SVG rendering changes and based on feedback

* More tweaks for cable path checking

* Improve handling of links with multi-terminations

* Improved SVG rendering of multiple rear ports (with positions) per path trace.  Include asymmetric path detection

* Include missing assert to ensure links are same type.

* Clean up tests

* Remove unused objects from tests

* Changes requested to tests and update comments/doctstrings

* Fix parent reference

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-26 13:16:50 -04:00
Jeremy Stretch
1ad6d94dc3 Fixes #13843: Fix assignment of VLAN group scope during bulk edit (#13887)
* Update VLANGroup bulk edit form to support all scope types

* Fixes #13843: Fix scope assignment for VLAN groups during bulk edit

* Add missed static file

* Restore graphiql static assets
2023-09-26 13:09:20 -04:00
Jeremy Stretch
b759d694ee Fixes #13859: Fix valid response when no matching choice values are found 2023-09-26 12:08:05 -04:00
Jeremy Stretch
3cb41bbe3a Fixes #13849: Fix label resolution during serialization for removed field choices (#13867)
* Fixes #13849: Fix label resolution during serialization for removed field choices

* Cleanup
2023-09-26 12:06:47 -04:00
Jeremy Stretch
099aff5ebe Changelog for #12732, #13506, #13666, #13839, #13845, #13871, #13891 2023-09-26 10:56:16 -04:00
Jeremy Stretch
f9ceaad284 #13666: Add is_valid property to Report class 2023-09-26 10:53:38 -04:00
JCWasmx86
e67624f042 Fixes #13666: Fix behavior for reports without test methods (#13667) 2023-09-26 10:41:09 -04:00
Luke Anderson
27297c7556 Add Hide Disconnected Button to Interface Summary, Remove Unused Table Caption Descriptor - Close #12732 2023-09-26 09:56:33 -04:00
Arthur
685ac5f571 13891 fix primary ip assignment if assigning ip 2023-09-26 08:56:35 -04:00
Arthur Hanson
0ce2b1b779 13845 fix device type image save (#13851)
* 13845 check original image is null in save

* 13845 update delete image code
2023-09-25 13:41:21 -04:00
Olivier Desnoë
04796a6ac6 Fix creating config template using rest api (#13869)
* Fix creation of extras/config-templates objects using the REST API

* Update serializers.py
2023-09-25 13:33:01 -04:00
Jeremy Stretch
a8a4bd7c21 Revert "#13887: Rebuild static assets"
This reverts commit a0e5e69283.
2023-09-25 13:03:20 -04:00
Jeremy Stretch
a0e5e69283 #13887: Rebuild static assets 2023-09-25 12:30:50 -04:00
Arthur Hanson
df46198b91 13839 change color and spacing on alert code block (#13857)
* 13839 change color and spacing on alert code block

* 13839 update review changes
2023-09-25 12:01:33 -04:00
Jeremy Stretch
b670a1e22c Fixes #13871: Fix rack filtering for empty location during device bulk import 2023-09-25 11:59:19 -04:00
Jeremy Stretch
9b325f4b86 PRVB 2023-09-20 15:32:41 -04:00
Jeremy Stretch
952be24365 Merge pull request #13838 from netbox-community/develop
Release v3.6.2
2023-09-20 15:29:06 -04:00
Jeremy Stretch
b57a47475d Release v3.6.2 2023-09-20 15:05:29 -04:00
Jeremy Stretch
4f05cf55a5 Changelog for #11617, #12685, #13245, #13653, #13757, #13809, #13813, #13818 2023-09-20 14:47:47 -04:00
Jeremy Stretch
5dcf8502af Grammar fix 2023-09-20 14:44:04 -04:00
Jeremy Stretch
7a21541ed6 Plug NetBox Cloud in installation docs 2023-09-20 14:43:12 -04:00
Jeremy Stretch
ae4ea3443e Fixes #11617: Check for invalid CSV headers during bulk import (#13826)
* Fixes #11617: Check for invalid CSV headers during bulk import

* Add test for CSV import header validation
2023-09-20 14:40:27 -04:00
Arthur Hanson
f5dd7d853a 13809 fix ConfigRevision edit if custom validators (#13825)
* 13809 fix ConfigRevision edit, check if custom validator JSON serializable

* 13809 check json rendering for all fields

* Refactor field initialization logic to more cleanly handle statically configured values

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-20 14:11:25 -04:00
Arthur Hanson
a1e42dad10 13653 darken code color to work in light and dark modes (#13827)
* 13653 darken code color to work in light and dark modes

* 13809 changed to use mx-1 on code block
2023-09-20 14:08:12 -04:00
Arthur Hanson
6e4b4a553b 12685 use markdown for custom fields added to form (#13828)
* 12685 use markdown for custom fields added to form

* 13809 change markdown to use utilities

* Add help_text for CustomField description indicating Markdown support

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-20 14:06:04 -04:00
Arthur Hanson
7a410dfd00 13813 fix virtual chassis member count (#13823)
* 13813 fix virtual chassis member count

* 13813 add test
2023-09-20 13:57:35 -04:00
bluikko
6fb980349f 13245 add QSFP112 and OSFP-RHS interface choices 2023-09-20 10:10:51 -04:00
Arthur Hanson
8e251ac33c 13757 Fix ConfigContext reference to DeviceType (#13804)
* 13757 do prefetch to work around Django issue with vars in init (DeviceType)

* 13757 use self.__dict to access vars in init

* 13757 change test
2023-09-20 09:56:52 -04:00
Jeremy Stretch
35bcc2ce9d Revert "Fixes #13741: Enforce unique names for inventory items with no parent item"
This reverts commit 68966db23d.
2023-09-20 08:44:25 -04:00
Arthur
69215c411b 13818 add tags to l2vpntermination edit form 2023-09-19 17:42:19 -04:00
Jeremy Stretch
a08b5793f6 Correct example default dashboard config 2023-09-19 14:40:52 -04:00
Jeremy Stretch
252bf03525 Fixes #13802: Restore 'description' header text for custom fields 2023-09-18 13:35:54 -04:00
Jeremy Stretch
b9b9bb134f Changelog for #13741, #13745, #13756, #13782 2023-09-18 11:12:27 -04:00
Jeremy Stretch
68966db23d Fixes #13741: Enforce unique names for inventory items with no parent item 2023-09-18 11:10:00 -04:00
Jeremy Stretch
9aa7444bf9 Fixes #13782: Fix tag exclusion support for contact assignments 2023-09-18 11:08:49 -04:00
Arthur Hanson
b0541be107 13745 device type migration (#13747)
* 13745 update migrations to use batch_size

* 13745 update migrations to use subquery update

* 13745 refactor and update other counter migrations
2023-09-18 09:59:26 -04:00
Abhimanyu Saharan
3d1f668235 Disables module_status ordering (#13761)
* disables module_status ordering #13756

* Set accessor for module status value

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-18 09:09:29 -04:00
Jeremy Stretch
940c947d3f Changelog for #11209, #12219, #13727, #13563, #13767, #13791 2023-09-18 08:49:08 -04:00
Jeremy Stretch
c7dd4206c8 Fixes #13727: Fix exception when viewing rendered config for VM without a role assigned 2023-09-18 08:44:42 -04:00
Per von Zweigbergk
79bf12a8fe 13791 rename whitespace fix (#13793)
* Add test for bug #13791
https://github.com/netbox-community/netbox/issues/13791

* Fix #13791 by disabling striping on find and replace fields of BulkRenameForm
2023-09-18 08:33:29 -04:00
Jeremy Stretch
2dfbd72f10 Fixes #13767: Fix support for comments when creating a new service via web UI 2023-09-15 10:33:54 -04:00
Arthur
487827c776 13768 fix typo 2023-09-15 09:40:27 -04:00
Jeremy Stretch
6939bf8aed Fixes #12219: Ensure dashboard widget heading text has sufficient contrast (#13753)
* Fixes #12219: Ensure dashboard widget heading text has sufficient contrast in both light & dark modes

* Change foreground color for teal background
2023-09-13 10:56:03 -04:00
Daniel Sheppard
e4cb0c3cc2 Fixes #11209 - Fix PrefixIPAddress view with saved sort preferences (#12820)
* Fixes #11209 - Do not add available ips when IPAddressTable sort preferences are saved

* Refine check to account scenario right after clearing ordering string

* Introduce get_table_ordering() utility to determine intended ordering given a request

* Apply fix to VLAN ranges as well

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-13 10:51:24 -04:00
Daniel W. Anner
cf2f39a0a8 Documentation: LDAP Update for Active Directory (#13716)
* Adding documentation to 6-LDAP to display how to allow Active Directory logins with or without the user UPN suffix.

* Correcting misspellings and clarifying explanations

* Updating sections to include sample template

* Misc revisions

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-13 08:44:52 -04:00
Abhimanyu Saharan
b7cfb2f7d9 Adds csv dialect detection to bulk import view (#13563)
* adds csv dialect detection to bulk import view #13239

* adds sane delimiters for dialect detection #13239

* adds csv delimiter tests #13239

* adds csv delimiter on the form

* pass delimiter to clean_csv method #13239

* fix tests for csv import #13239

* fix tests for csv import #13239

* fix tests for csv import #13239

* fix tests for csv import #13239

* Improve auto-detection of import data format

* Misc cleanup

* Include tab as a supported delimiting character for auto-detection

* Move delimiting chars to a separate constant for easy reference

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-12 16:48:40 -04:00
Jeremy Stretch
39cb9c32d6 Clean up blocktrans template tags (i18n) 2023-09-11 16:17:02 -04:00
Jeremy Stretch
75b71890a4 Misc i18n cleanup 2023-09-11 15:59:50 -04:00
Jeremy Stretch
2ffa6d0188 Fixes #13701: Correct display of power feed legs under device view 2023-09-11 14:16:29 -04:00
Jeremy Stretch
026386db50 Fixes #13706: Restore extra filters dropdown on device interfaces list 2023-09-11 14:13:55 -04:00
Jeremy Stretch
b5125e512f Fixes #13721: Filter VLAN choices by selected site (if any) when creating a prefix 2023-09-11 13:52:19 -04:00
Jeremy Stretch
a8a36c0a8f PRVB 2023-09-06 14:26:19 -04:00
Jeremy Stretch
99ab054ea0 Merge pull request #13705 from netbox-community/develop
Release v3.6.1
2023-09-06 14:23:36 -04:00
Jeremy Stretch
90ab4b3c86 Release v3.6.1 2023-09-06 14:04:57 -04:00
Arthur Hanson
bb6b4d01c1 12553 prefix serializer to IPAddress (#13592)
* 12553 prefix serializer to IPAddress

* Introduce IPNetworkField to handle prefix serialization

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-06 10:49:40 -04:00
Daniel Sheppard
2d1457b94b Fixes: #13682 - Fix custom field exceptions and validation (#13685)
* Fixes: #13682 - Fix custom field exceptions and validation

* Add tests

* Remove default setting for multi-select/multi-object and return slice of choices and annotate.

* Remove redundant default choice valiadtion; introduce values property on CustomFieldChoiceSet

* Refactor test

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-06 10:47:18 -04:00
Arthur Hanson
9d851924c8 13674 fix ReportSerializer (#13688)
* 13674 fix ReportSerializer

* Remove test_methods attr from Report class

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-06 08:44:25 -04:00
Jeremy Stretch
9be5918c83 Fixes #13684: Enable modying the configuration when maintenance mode is enabled 2023-09-05 14:09:38 -04:00
Jeremy Stretch
6db6616892 Changelog for #12870, #13444, #13596, #13642, #13657 2023-09-01 17:14:59 -04:00
Abhimanyu Saharan
004daca862 Adds rename button on the list page for device components (#13564)
* adds interface rename button on the list page #13444

* adds rename view on all device components #13564

* Condense component views to a single template

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-09-01 16:58:31 -04:00
Jeremy Stretch
559f65f6b2 Add #12906 to v3.6.0 changelog 2023-09-01 13:22:07 -04:00
Jeremy Stretch
c38884fa11 Add description & expires fields to token test 2023-09-01 12:33:02 -04:00
Abhimanyu Saharan
7848beedce adds additional parameters for token provision api #12870 2023-09-01 12:33:02 -04:00
Jeremy Stretch
296166da95 Fixes #13656: Correct decoding of BinaryField content for Django 4.2 2023-09-01 11:06:19 -04:00
Jeremy Stretch
679cc8fdda Fixes #13596: Always display "render config" tab for devices & VMs 2023-08-31 14:36:03 -04:00
Jeremy Stretch
0cdc26e013 Fixes #13642: Move migration logic overrides from individual mgmt commands to core 2023-08-31 14:34:26 -04:00
Jeremy Stretch
2503568875 Changelog for #13619, #13620, #13622, #13628, #13632, #13638 2023-08-31 12:23:59 -04:00
Jeremy Stretch
78966e12a9 Fixes #13620: Show admin menu items only for staff users 2023-08-31 12:20:46 -04:00
Jeremy Stretch
f962fb3b53 Closes #13638: Add optional staff_only attribute to MenuItem (#13639)
* Closes #13638: Add optional staff_only attribute to MenuItem

* Add missing file

* Add release note
2023-08-31 11:23:44 -04:00
Jeremy Stretch
2544e2bf18 Fixes #13622: Fix exception when viewing current config and no revisions have been created 2023-08-31 11:11:56 -04:00
Jeremy Stretch
06f2c6f867 Fixes #13632: Avoid raising exception when checking if FHRP group IP address is primary 2023-08-31 11:09:49 -04:00
Abhimanyu Saharan
272d2c54d4 removes napalm references #13628 2023-08-31 09:54:35 -04:00
Jeremy Stretch
cb93abb0f4 Fixes #13626: Correct filtering of recent activity list under user view 2023-08-31 08:19:17 -04:00
Jeremy Stretch
316d991b33 Fixes #13630: Fix display of active status under user view 2023-08-31 08:16:11 -04:00
Jamie (Bear) Murphy
46f734eba2 fix error for is_oob_ip for non-device parents (#13621)
* fix error for is_oob_ip for non-device parents

* adjust oob_ip_id check to use hasattr
2023-08-31 07:57:14 -04:00
Jeremy Stretch
671a56100a PRVB 2023-08-30 14:57:16 -04:00
Jeremy Stretch
dfcfbe240d Merge pull request #13614 from netbox-community/develop
Release v3.6.0
2023-08-30 14:51:04 -04:00
Jeremy Stretch
b040fdcf2c Release v3.6.0 2023-08-30 14:27:07 -04:00
Jeremy Stretch
8525f994c0 Fix invalid links 2023-08-30 14:21:04 -04:00
Jeremy Stretch
eb9a804914 #12591: Add a dedicated view for the active config revision 2023-08-30 11:13:56 -04:00
Jeremy Stretch
210d7bb573 Display last_updated time only if defined 2023-08-30 11:13:02 -04:00
Jeremy Stretch
dc85476b9e Changelog for #11478, #13513, #13599, #13605 2023-08-30 09:36:44 -04:00
Daniel Sheppard
1854a6b76b Fix #11478 - Add vc_interfaces flag to control selection of VC interfaces (#13296)
* Add `vc_interfaces` flag to control interface queryset

* Fix test failure

* Add new filters instead of using undocumented query params

* Cleanup filterset, add test

* Rename filter and re-introduce virtual_chassis filtering method (required)

* Fix test

* Adjust tests to more accurately provide coverage

* Add breaking change note

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-30 09:33:02 -04:00
Jeremy Stretch
aebf3288d1 Fixes #13605: Specify batch size for cached counter migrations (#13610)
* Specify batch size for cached counter migrations

* Remove list() casting of querysets
2023-08-30 09:18:24 -04:00
Arthur Hanson
065a40dfb3 13599 fix cached counter for edit object (#13600)
* 13599 fix cache counter

* 13599 update test

* Merge conditionals

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-29 15:31:13 -04:00
Jeremy Stretch
83536fbb23 #12814: Add context data section to config rendering doc 2023-08-29 14:43:07 -04:00
Jeremy Stretch
420090dc6c #12590: Exclude proxy model for Token from permission object types 2023-08-29 14:41:14 -04:00
Jeremy Stretch
4ab0eb570c #11305: Add latitude & longitude to DeviceWithConfigContextSerializer 2023-08-29 14:31:42 -04:00
Jeremy Stretch
2a4e3dd09f Merge branch 'develop' into feature 2023-08-29 10:45:55 -04:00
Jeremy Stretch
0dbfbf6941 Merge pull request #13591 from netbox-community/develop
Correct version number
2023-08-28 17:07:15 -04:00
Jeremy Stretch
d515530277 Merge branch 'master' into develop 2023-08-28 17:05:59 -04:00
Jeremy Stretch
4343e0566b Correct version number 2023-08-28 17:04:37 -04:00
Jeremy Stretch
8555269f7e Merge pull request #13589 from netbox-community/develop
Release v3.5.9
2023-08-28 16:58:09 -04:00
Jeremy Stretch
f42a2ac10c Merge branch 'master' into develop 2023-08-28 16:19:44 -04:00
Jeremy Stretch
4ea3a29c0e Release v3.5.9 2023-08-28 16:13:13 -04:00
Arthur Hanson
29877c9abe 12489 Use HTMX for Location and Non-Racked Devices in Site detail view (#12491)
* 12489 use htmx for site view locations and non-racked-devices

* 12489 remove now unused queries in context

* adds device type and role to device component filter #12015

* Revert "Fixes #12463: Fix the association of completed jobs with reports & scripts in the REST API"

This reverts commit a29a07ed26.

* 12489 update nonracked_devices on rack and location templates

* 12489 fix whitespace issue

* Undo errant commits

* 12489 update site id in templates

* 12489 remove nonracked_devices include

* 12489 add has_position filter

* Use empty lookup for position field

* Remove non-racked devices list from rack view (was moved to a tab)

* Clean up location and device tables

* Restore plugins block on rack template

---------

Co-authored-by: Abhimanyu Saharan <desk.abhimanyu@gmail.com>
Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-08-28 16:03:35 -04:00
Jeremy Stretch
480f83c42d Closes #13585: Introduce 'empty' lookup for numeric value filters 2023-08-28 15:25:37 -04:00
Jeremy Stretch
faf89350ac Fixes #13569: Fix selection widgets for related interfaces when bulk editing interfaces under device view 2023-08-28 13:04:42 -04:00
Jeremy Stretch
d9c3ce935f Changelog for #12825, #13313, #13415, #13507, #13542, #13543, #13544, #13556 2023-08-28 09:10:44 -04:00
Abhimanyu Saharan
8d8f57e8b8 Adds parent filter on iprange (#13568)
* adds parent filter on iprange #13313

* lint fix

* adds filterset test

* Filter should match both start & end of IP range

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-28 09:05:43 -04:00
Abhimanyu Saharan
0a3be0b7ea adds related models count on custom field #12825 2023-08-28 08:34:33 -04:00
Abhimanyu Saharan
00ebdfe0df adds related models count on custom field #12825 2023-08-28 08:34:33 -04:00
Jeremy Stretch
d79fa131bb Closes #13415: Pass request context when rendering custom links in a table column 2023-08-25 13:14:47 -04:00
Abhimanyu Saharan
be2b24a155 fixes the swagger schema for token provisioning #13557 2023-08-25 09:45:03 -04:00
Abhimanyu Saharan
03b341dbfd adds missing status choicefield for vdc #13556 2023-08-25 09:40:04 -04:00
Arthur
ca5e69897d 13396 upgrade graphiql 2023-08-24 14:17:09 -04:00
Abhimanyu Saharan
3090dd4934 Fixed permission for config context UI view (#13547)
* fixed permission for config context UI view #13543

* removed extras.view_configcontext permission #13543
2023-08-24 14:13:31 -04:00
Abhimanyu Saharan
1f1d1ee502 adds additional safe HTTP headers to request #13542 2023-08-24 14:12:08 -04:00
Abhimanyu Saharan
1c2cf11f47 fixes global search when the content type is not found #13507 2023-08-24 14:09:48 -04:00
Jeremy Stretch
08961e751d Revert changes from #13373 pending further discussion around implementation
This reverts commit 66e4e31209.
2023-08-24 14:02:15 -04:00
Abhimanyu Saharan
88bf82be05 clear all cache when lazy is not used #13544 2023-08-24 10:12:48 -04:00
Jeremy Stretch
506884bc4d Changelog for #11272, #13516, #13530, #13536 2023-08-23 14:44:14 -04:00
Jeremy Stretch
646fa341ab Closes #13470: Remove misleading statement about access to report results 2023-08-23 14:41:38 -04:00
Jeremy Stretch
d73f7b1943 Fixes #13530: Ensure script log messages are cast as strings for proper serialization 2023-08-23 14:41:21 -04:00
Abhimanyu Saharan
a75e8416a4 adds vlan child table to vlan group #13536 2023-08-23 13:39:10 -04:00
Arthur
f743f2cfb8 11272 make position field work correctly when internationalizion enabled 2023-08-23 13:30:01 -04:00
Jeremy Stretch
7d7e8127f5 Fixes #13513: Prevent exception when rendering bookmarks widget for anonymous user 2023-08-23 10:53:56 -04:00
Jeremy Stretch
3c0a3ca703 Fixes #13516: Plugin utility functions should be importable from extras.plugins 2023-08-22 10:27:21 -04:00
Jeremy Stretch
45062697c5 Changelog for #11508, #13358, #13477, #13478, #13500, #13503 2023-08-21 15:10:12 -04:00
Arthur Hanson
66e4e31209 11508 Add group assignments for Azure SSO (#13373)
* 11508 temp azure changes

* 11508 map AzureAD groups to NetBox groups

* 11508 add is_active, reset superuser and staff based on Azure

* 11508 remove is_active, add documentation use azuread

* 11508 remove addition to settings

* 11508 review changes, add additional logging and error checking

* 11508 review changes, remove extra flag

* 11508 review changes, change SOCIAL_AUTH_ to REMOTE_AUTH_BACKEND

* 11508 clear user groups

* 11508 clear user groups

* 11508 review feedback change config key

* 11508 review changes

* 11508 review changes - add error checking

* 11508 review changes - flexible config params
2023-08-21 14:42:16 -04:00
kkthxbye-code
c86cfe3cbf Correct filter name in redirect after bulk edit
* Added modified_by_request filter to ChangeLoggedFilterSet
2023-08-21 14:35:08 -04:00
Arthur
28e112743f 13503 fix rack space utilization graph for internationalization 2023-08-21 14:21:50 -04:00
Arthur
229007082b 13510 update docs run permission image 2023-08-21 14:03:31 -04:00
Abhimanyu Saharan
4004966b16 fix content type filter on export template #13478 2023-08-17 15:29:21 -04:00
Arthur
fe95cb434a 13500 fix l2vpntermination bulk update 2023-08-17 15:25:23 -04:00
Jeremy Stretch
5709bc3b2b Release v3.6-beta2 2023-08-16 11:28:31 -04:00
Jeremy Stretch
af06510921 Closes #13412: Enable pagination of custom field choice set choices 2023-08-16 11:08:36 -04:00
Jeremy Stretch
b4acbb5e16 Closes #13439: Update API token documentation 2023-08-16 10:28:33 -04:00
Jeremy Stretch
b96e437e2b #8248: Add bookmarks widget to default dashboard 2023-08-16 10:10:31 -04:00
Alexander Haase
16e2283d19 Fix git DataSource clone authentication
Anonymous git clones (in GitLab) require the username and password not
to be set in order to successfully clone. This patch will define clone
args only, if the username passed is not empty.
2023-08-15 13:29:03 -04:00
Jeremy Stretch
c46536f469 Merge pull request #13474 from jose-d/develop-1
upgrading.md: there shouldbe OLDVER instead of NEWVER
2023-08-15 11:26:43 -04:00
Jeremy Stretch
0457520f51 Changelog for #12461 2023-08-15 11:25:56 -04:00
Jeremy Stretch
44f8a777df Merge branch 'develop' into feature 2023-08-15 11:04:03 -04:00
jose_d
9450ce4c3a upgrading.md: there shouldbe OLDVER instead of NEWVER 2023-08-15 16:19:31 +02:00
Jeremy Stretch
1c9a8ec6bd PRVB 2023-08-15 10:00:24 -04:00
Jeremy Stretch
8f5005efd5 Merge pull request #13472 from netbox-community/develop
Release v3.5.8
2023-08-15 09:56:23 -04:00
Jeremy Stretch
e61795d5c6 Release v3.5.8 2023-08-15 09:18:15 -04:00
Joel D. Tague
892c10b1f0 feat: add 200Gbps & 400Gbps interface speed options 2023-08-15 09:11:40 -04:00
Abhimanyu Saharan
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
Abhimanyu Saharan
ea107b6b86 adds object view to allow changelog page to be opened #13463 2023-08-14 09:47:58 -04:00
Jeremy Stretch
b9b9c065cc Changelog for #10030, #11578, #12639 2023-08-14 08:55:47 -04:00
Jeremy Stretch
b583770765 Fixes #13451: Disable table ordering for custom link columns 2023-08-14 08:51:16 -04:00
Abhimanyu Saharan
37d6f6abca Merge pull request #13461 from netbox-community/fix/13460-spelling
Fixed spelling for Attributes
2023-08-14 01:18:37 -07:00
Abhimanyu Saharan
be3f48c677 Fixed spelling for Attributes #13460 2023-08-14 13:29:11 +05:30
kkthxbye
5de9d3f15f Fixes #12639 - Make sure name expansions throws a validation error on decrementing ranges (#13326)
* Fixes #12639 - Make sure name expansions throws a validation error on decrementing ranges

* Fix pep8

* Also fail on equal start & end values

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-11 11:53:16 -04:00
Arthur Hanson
8593715149 13319 add documentation for internationalization (#13330)
* 13319 add documentation for internationalization

* 13319 add verbose name to model

* 13319 fix typo

* Flesh out developer doc for i18n

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-11 11:27:48 -04:00
Daniel W. Anner
40afe6cf36 Feature - Schema Generation (#13353)
* Schema generation is working

* Added option to either dump to a file or the console

* Moving schema file and utilizing settings definition for file paths

* Cleaning up the imports and fixing a few pythonic issues

* Tweak command flags

* Clean up choices mapping

* Misc cleanup

* Rename & move template file

* Move management command from extras to dcim

* Update release checklist

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-11 11:00:26 -04:00
Arthur Hanson
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
Jeremy Stretch
dc7411e4c5 Fixes #13446: Don't disable bulk edit/delete buttons after deselecting "select all" checkbox 2023-08-11 08:56:58 -04:00
Jeremy Stretch
315c4bb1ac #13434: Fix tests 2023-08-10 14:32:48 -04:00
Jeremy Stretch
1ff1b4dc89 Changelog for #13433, #13434, #13437 2023-08-10 14:12:42 -04:00
Jeremy Stretch
a332adf962 Fixes #13434: Randomly generate initial keys prior to the creation of new tokens 2023-08-10 14:11:16 -04:00
Jeremy Stretch
856cc0f885 Fixes #13437: Display bookmark button only for relevant objects 2023-08-10 13:55:03 -04:00
Jeremy Stretch
89d8f7aa70 Add missing load tag for i18n 2023-08-10 10:32:56 -04:00
Jeremy Stretch
4d2ef0a8b5 Fixes #13433: User field on API token form should be required 2023-08-10 10:04:31 -04:00
Jeremy Stretch
23b3f72dee Apply missed string translations 2023-08-10 09:38:12 -04:00
Jeremy Stretch
ff59845821 Changelog for #12814, #13037, #13376, #13410 2023-08-09 15:38:03 -04:00
Jeremy Stretch
914588f55d Merge branch 'develop' into feature 2023-08-09 15:31:21 -04:00
Jeremy Stretch
72e1e8fab1 Changelog for #11675, #11922, #12665, #13368, #13414 2023-08-09 15:02:49 -04:00
Abhimanyu Saharan
8b01c30c51 Exposes all models in device context data (#13389)
* exposes all models in device context data #12814

* added app namespaces to the context data

* revert object to device in context data

* moved context to render method of ConfigTemplate

* removed print

* Include only registered models; permit passed context data to overwrite apps

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-09 14:57:59 -04:00
Arthur
dcdb4d27ec 12665 add semicolon to link sanitation safe string 2023-08-09 14:49:34 -04:00
kkthxbye-code
9b1406a1a7 Don't hide HIDDEN_IFUNSET custom fields from bulk import fields 2023-08-09 14:47:20 -04:00
Abhimanyu Saharan
545769ad88 Adds generic object children template (#13388)
* adds generic tab view template #12110

* Rename view_tab.html and move to generic/

* Fix console ports template

* Move bulk operations view resolution to template

* Avoid setting default template_name on ObjectChildrenView

* Move base_template and table_config context vars to base context

* removed bulk_delete_control from templates

* refactored bulk_controls view

* fixed table_config

* renamed object_tab.html to objectchildren_list.html

* removed unused import

* Refactor template blocks for bulk operation buttons

* Rename object children generic template

* Move disconnect bulk action into a separate template for device components

* Fix cluster devices & VM interfaces views

* minor button label change

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-09 14:16:03 -04:00
Jeremy Stretch
16bcb1dbb0 #13426: Employ proper feature keys for image attachment & contact filter forms 2023-08-09 10:41:40 -04:00
Jeremy Stretch
5dce5563ab #11541: Fix object_types queryset on TagSerializer 2023-08-09 10:32:08 -04:00
Jeremy Stretch
4e8a3e0a6f Closes #13426: Register all model features in the registry 2023-08-09 10:27:10 -04:00
Jeremy Stretch
646d52d498 Misc docs cleanup for v3.6 2023-08-09 10:12:40 -04:00
Jeremy Stretch
cd5012bd59 Closes #13424: Move CloningMixin into NetBoxFeatureSet 2023-08-09 10:12:13 -04:00
Jeremy Stretch
4bb0388118 Fixes #13362: Limit displayed choice set list to 50 choices 2023-08-08 09:47:34 -04:00
Jeremy Stretch
f255fe507d Fixes #13410: Fix rendering of custom choice fields with large numner of choices 2023-08-08 09:32:56 -04:00
Jeremy Stretch
f5a1f83f9f Closes #13368: Report installed plugins during server error (#13387)
* Introduce get_installed_plugins() utility

* Extend 500 error template to list installed plugins

* Move get_plugin_config() to extras.plugins.utils
2023-08-07 15:29:20 -04:00
Jeremy Stretch
36072f17a9 Define LOCALE_PATHS 2023-08-07 14:34:56 -04:00
Jeremy Stretch
f9648d8544 Closes #13400: Add 'name' property to BaseTable class 2023-08-07 10:48:41 -04:00
Jeremy Stretch
2236b86c35 Closes #11922: Populate assigned VDCs when adding a child interface 2023-08-04 15:25:59 -04:00
Jeremy Stretch
0dd319d0c8 Closes #11675: Add support for specifying import/export route targets during VRF bulk import 2023-08-04 15:25:06 -04:00
Abhimanyu Saharan
53615944c5 Adds standardized list API for scripts and reports (#13382)
* adds standardized list API for scripts and reports #13037

* adds standardized list API for scripts and reports #13037

* adds standardized list API for scripts and reports #13037

* adds module name to the display #13037
2023-08-04 15:23:15 -04:00
Jeremy Stretch
88562d7dcf Changelog for #12750, #12889, #13033, #13151, #13343, #13369 2023-08-04 13:36:33 -04:00
Abhimanyu Saharan
01bb09db67 adds delete for SyncedDataMixin when related AutoSyncRecord is available #12750 2023-08-04 13:25:56 -04:00
Jeremy Stretch
f1c182bb65 Fixes #13376: Restrict add/remove tag fields by model on bulk edit forms 2023-08-04 13:09:07 -04:00
Henrik Strand
43ce453938 Adding interface TYPE_400GE_CFP2/400gbase-x-cfp2 (#13338)
* Added 400G CFP2 to InterfaceTypeChoices

* Added new type to choises
2023-08-04 11:32:52 -04:00
Jeremy Stretch
2afce6c94b Introduce ContactsMixin 2023-08-04 10:15:50 -04:00
Jeremy Stretch
14e23c3d00 Introduce ImageAttachmentsMixin 2023-08-04 10:15:50 -04:00
Jeremy Stretch
7f22c6bf12 Include notes re: demo data and netbox-docker 2023-08-04 10:12:15 -04:00
Jeremy Stretch
93a862cded Add stadium analogy and behavior anti-patterns 2023-08-04 08:55:43 -04:00
Jeremy Stretch
9cc295827b Fixes #13369: Fix job termination status for failed reports 2023-08-04 08:12:52 -04:00
Jeremy Stretch
14988fc91c Remove redundant overrides of EXEMPT_VIEW_PERMISSIONS 2023-08-03 11:07:30 -04:00
Jeremy Stretch
31f41855f4 Closes #13367: Delete unused device component deletion templates 2023-08-03 10:49:40 -04:00
Jeremy Stretch
caedc8dbe3 Closes #13352: Translation support for model verbose names (#13354)
* Update verbose_name & verbose_name_plural Meta attributes on all models

* Alter makemigrations to ignore verbose_name & verbose_name_plural changes
2023-08-03 10:41:10 -04:00
Jeremy Stretch
24ffaf09d4 Fixes #13363: Fix API endpoint for custom field choice selector in forms 2023-08-03 08:53:46 -04:00
Jeremy Stretch
d9f3637e25 Fixes #13361: Extra choices field on custom field choice set form should not be required 2023-08-03 07:49:54 -04:00
Matej Vadnjal
a807cca29e Fixes #13033: add formatted speed column to Interfaces (#13275)
* Fixes #13033: add formatted speed column to Interfaces

* use TemplateColumn instead of own class
2023-08-02 16:08:14 -04:00
Abhimanyu Saharan
57860f26b7 Adds assigned bool for IP address API (#13301)
* adds assigned bool for ip address API #13151

* Add filterset test

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-02 15:45:09 -04:00
Abhimanyu Saharan
ab916a1819 fixes dummy payload URL for webhook test 2023-08-02 15:23:05 -04:00
Abhimanyu Saharan
a68831d3a1 fixes provider_network_id for related circuits #13343 2023-08-02 15:17:14 -04:00
Jeremy Stretch
04a2543e68 Fixes #13351: Fix missing text due to incorrectly applied translation tags 2023-08-02 14:53:32 -04:00
Jeremy Stretch
82c959570d Release v3.6-beta1 2023-08-02 13:30:08 -04:00
Jeremy Stretch
354dc4398a Update changelog 2023-08-02 11:18:52 -04:00
Jeremy Stretch
a698a93938 Closes #13350: Remove unused DeviceImportTable class 2023-08-02 11:18:06 -04:00
Jeremy Stretch
04c5e62d2b #8248: Permit users to manage their own bookmarks by default 2023-08-02 11:13:09 -04:00
Jeremy Stretch
aa747c3954 #12988: Correct URL path for CustomFieldChoiceSet API endpoint 2023-08-02 11:05:03 -04:00
Jeremy Stretch
1937c1fad6 #12175: Misc cleanup 2023-08-02 11:04:28 -04:00
Jeremy Stretch
bf20611668 #6391: Add device_role to DeviceWithConfigContextSerializer 2023-08-02 10:16:51 -04:00
Jeremy Stretch
8f271151a7 Closes #11519: Add a SQL index for IPAddress host value 2023-08-02 09:56:56 -04:00
Abhimanyu Saharan
0bb86f1e7d 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
Jeremy Stretch
a4c9cbc6dd Remove hard-coded test runner 2023-08-02 08:55:38 -04:00
Jeremy Stretch
79030ecab2 #12589: Move username validation from form to NetBoxUser 2023-08-01 15:42:47 -04:00
Jeremy Stretch
ccb7568462 #8684: Drop support for 'obj' context var when rendering custom links (v3.5) 2023-08-01 15:33:25 -04:00
Jeremy Stretch
6208e0f7f6 #12591: Add extras.ConfigRevision to EXEMPT_EXCLUDE_MODELS 2023-08-01 14:56:59 -04:00
Jeremy Stretch
e64289e791 #12589: Remove obsolete admin resources 2023-08-01 14:35:28 -04:00
Jeremy Stretch
699b4dfade Update feature introduction flags 2023-08-01 14:25:25 -04:00
Jeremy Stretch
a89cec72a1 Update changelog 2023-08-01 14:13:48 -04:00
Abhimanyu Saharan
1cc78be6ca Adds custom field on webhook model (#13336)
* adds custom field on webhook model #11936

* adds tags on webhook model #11936

* Remove extraneous import; revert change to NetBoxModelForm (no longer needed)

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-01 14:05:47 -04:00
Jeremy Stretch
7b998cfeb4 #11732: Exclude _init_time from import form fields list 2023-08-01 11:53:35 -04:00
Abhimanyu Saharan
cbf4b43b35 Adds tags on contact assignment (#13328)
* adds tags on contact assignments #12882

* updated migration

* added tags on import form

* adds TagsMixin on ContactAssignmentType #12882

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-08-01 11:52:14 -04:00
Jeremy Stretch
c1ca8d5d8d Closes #12906: Make boto3 & dulwich libraries optional (#13324)
* Initial work on #12906

* Catch import errors during backend init

* Tweak error message

* Update requirements & add note to docs
2023-08-01 11:13:35 -04:00
Jeremy Stretch
43e6308d90 Closes #11732: Protect against errant overwriting of data via web UI forms 2023-08-01 09:06:51 -04:00
Arthur Hanson
e625a5667c Closes #13279: Wrap choice labels with gettext()
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-31 17:31:07 -04:00
Arthur Hanson
e284cd7e54 Closes #13150: Wrap table column headers with gettext()
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-31 14:35:28 -04:00
Jeremy Stretch
34a960505d Remove obsolete AdminGroup and AdminUser models (#12589) 2023-07-31 14:28:50 -04:00
Arthur Hanson
b7a9649269 Closes #13149: Wrap form field labels with gettext_lazy()
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-31 12:52:38 -04:00
Arthur Hanson
83bebc1bd2 Closes #13132: Wrap verbose_name and other model text with gettext_lazy() (i18n)
---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-31 11:28:07 -04:00
Jeremy Stretch
80376abedf Closes #13309: Introduce the account app (#13310)
* Introduce 'accounts' app for user-specific views & resources
* Move UserTokenTable to account app
* Move login & logout views to account app
2023-07-31 09:22:04 -04:00
Jeremy Stretch
9c6c3d3dd4 Update changelog 2023-07-31 08:35:28 -04:00
Jeremy Stretch
ab0442bd5c Fix typo 2023-07-31 08:24:03 -04:00
Abhimanyu Saharan
36f95f7842 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
Jeremy Stretch
07f68ae579 Closes #13038: Establish DEFAULT_PERMISSIONS config parameter (#13308)
* Introduce the DEFAULT_PERMISSIONS config parameter

* Establish default permissions for user token management
2023-07-30 15:04:58 -04:00
Jeremy Stretch
ca634be7ad Closes #13311: Always use get_permission_for_model() to resolve permission names 2023-07-30 14:32:02 -04:00
Jeremy Stretch
2a0d76d564 Merge branch 'develop' into feature 2023-07-30 13:36:51 -04:00
Jeremy Stretch
0b10131564 Satisfy PEP8 E721 linter complaints 2023-07-30 13:34:08 -04:00
Arthur Hanson
7c17d2e932 Closes #13102: Establish initial translation support in templates
---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-28 16:30:25 -04:00
Jeremy Stretch
cf1b1a83eb Closes #12194: Add pre-defined custom field choices (#13219)
* Initial work on custom field choice sets

* Rename choices to extra_choices (prep for #12194)

* Remove CustomField.choices

* Add & update tests

* Clean up table columns

* Add order_alphanetically boolean for choice sets

* Introduce ArrayColumn for choice lists

* Show dependent custom fields on choice set view

* Update custom fields documentation

* Introduce ArrayWidget for more convenient editing of choices

* Incorporate PR feedback

* Misc cleanup

* Initial work on predefined choices for custom fields

* Misc cleanup

* Add IATA airport codes

* #13241: Add support for custom field choice labels

* Restore ArrayColumn

* Misc cleanup

* Change extra_choices back to a nested ArrayField to preserve choice ordering

* Hack to bypass GraphQL API test utility absent support for nested ArrayFields
2023-07-28 11:24:21 -04:00
Jeremy Stretch
9d3bb585a2 Update version 2023-07-28 10:36:44 -04:00
Jeremy Stretch
d52c18ce38 Merge branch 'develop' into feature 2023-07-28 10:36:09 -04:00
Jeremy Stretch
006c353d46 PRVB 2023-07-28 10:31:54 -04:00
Jeremy Stretch
6c53ca8909 Merge pull request #13294 from netbox-community/develop
Release v3.5.7
2023-07-28 10:29:46 -04:00
Jeremy Stretch
4f984c0831 Release v3.5.7 2023-07-28 10:11:16 -04:00
Jeremy Stretch
d9dc6cec3a Changelog for #11803, #13009, #13234, #13285 2023-07-28 10:02:42 -04:00
Jeremy Stretch
90146941b5 Fixes #13285: Cast default u_height value to a decimal for validation 2023-07-28 09:49:09 -04:00
Bruno Blanes
9d0457fe1a Add Brazilian power outlet standard to choices.py (#13012)
* Add Brazilian power outlet standard to choices.py

* Eliminate possible name conflict

* Rename group and add IEC 60906-1 plug type

* Update choices.py

Add Brazilian power port standard
2023-07-28 09:26:46 -04:00
Abhimanyu Saharan
2aa51d0d94 Adds contact assignment bulk import (#13109)
* adds contact assignment bulk import #11307

* Remove unsupported tags field added by NetBoxModelImportForm

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-28 09:23:22 -04:00
Abhimanyu Saharan
7158360dfa moves non-racked devices to tab #11803 2023-07-28 08:59:15 -04:00
Jeremy Stretch
c89193d331 Closes #13080: Differentiate more clearly between old and new version placeholders in upgrade guide 2023-07-28 08:11:28 -04:00
Daniel W. Anner
eeb069048f Adding 100gbase-x-dsfp and 100gbase-x-sfpdd (#13236)
* Adding 100gbase-x-dsfp

* fixing missing comma

* Adding interface `TYPE_100GE_SFP_DD`/`100gbase-x-sfpdd`

* Update netbox/dcim/choices.py

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

---------

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2023-07-27 19:02:08 -04:00
Jeremy Stretch
3e12fbe367 Changelog for #12625, #13051, #13097, #13167, #13233, #13237 2023-07-27 16:42:03 -04:00
kkthxbye-code
4b2922312a Allow the align property on th and td and add CSS rules for overriding text-alignment 2023-07-27 16:38:46 -04:00
Abhimanyu Saharan
0276f29067 adds sensitive_parameters to DataBackend #12625 2023-07-27 16:33:29 -04:00
Roger Miret
1d52627f71 Update ipam.md
100.64.16.9/24 isn't a valid CIDR
2023-07-27 16:07:44 -04:00
Alef Burzmali
bba4fe437c Update the install doc for PostgreSQL 15
Fixes #12768
2023-07-27 16:06:41 -04:00
Abhimanyu Saharan
0ab3f979e0 Adds faster polling for scripts and reports (#13202)
* adds faster polling for scripts and reports #13097

* changes as per review
2023-07-27 15:59:41 -04:00
kkthxbye-code
5a3d46ac8d Remove vlan_group from nullable fields in InterfaceBulkEditForm 2023-07-27 15:58:16 -04:00
Fabian Geisberger
d075e7a66a Fixes #13237 - Allow unauthenticated api access to content-types. 2023-07-27 15:47:34 -04:00
kkthxbye-code
8b8adfbbbb Use class_name instead of name to get script results 2023-07-27 15:32:29 -04:00
Jeremy Stretch
0c2e3ff898 Merge pull request #13277 from netbox-community/13272-fix-graphql-test
13272 fix graphql test
2023-07-27 13:09:33 -04:00
Arthur
83c092f685 13272 fix graphql tests 2023-07-27 14:25:49 +07:00
Abhimanyu Saharan
0f9fe96192 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
1bcfcad9db Update changelog 2023-07-25 16:48:41 -04:00
Jeremy Stretch
5b5444f414 Closes #13269: Cache component template counts on device types 2023-07-25 16:38:05 -04:00
Jeremy Stretch
daa8f71bb6 Closes #10197: Add a cached counter field for virtual chassis members 2023-07-25 15:50:12 -04:00
Jeremy Stretch
9b6e32896d Clean up users & account URLs 2023-07-25 15:48:40 -04:00
Jamie (Bear) Murphy
154b8236a2 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
7600d7b344 Closes #13228: Move token management views to primary UI 2023-07-25 13:43:40 -04:00
Arthur Hanson
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
Arthur Hanson
a4acb50edd 12589 move user and group admin from admin (#12877)
Move admin views for users, groups, and object permissions from the admin site to the NetBox frontend

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-20 16:22:08 -04:00
Jeremy Stretch
96ea0ac9c7 Closes #12988: Introduce custom field choice sets (#13195)
* Initial work on custom field choice sets

* Rename choices to extra_choices (prep for #12194)

* Remove CustomField.choices

* Add & update tests

* Clean up table columns

* Add order_alphanetically boolean for choice sets

* Introduce ArrayColumn for choice lists

* Show dependent custom fields on choice set view

* Update custom fields documentation

* Introduce ArrayWidget for more convenient editing of choices

* Incorporate PR feedback

* Misc cleanup
2023-07-19 10:26:24 -04:00
Jeremy Stretch
837be4d45f Merge branch 'develop' into feature 2023-07-11 10:09:26 -04:00
Jeremy Stretch
0f0cf683c4 PRVB 2023-07-10 16:55:17 -04:00
Jeremy Stretch
ec0dbe33d3 Merge pull request #13142 from netbox-community/develop
Release v3.5.6
2023-07-10 16:53:46 -04:00
Jeremy Stretch
1c30a44b4e Release v3.5.6 2023-07-10 16:35:53 -04:00
Jeremy Stretch
252cc37f97 Changelog for #13061, #13096, #13105, #13116 2023-07-10 14:39:40 -04:00
Jeremy Stretch
f6fcf776a4 Fixes #13061: Fix display of last result for scripts & reports with a custom name defined 2023-07-10 14:13:45 -04:00
Jeremy Stretch
73348ee435 Fixes #13105: Avoid exception when attempting to allocate next available IP address from prefix marked as utilized 2023-07-10 13:53:31 -04:00
Abhimanyu Saharan
cab7b76220 Fixes form rendering when scheduling_enabled is disabled (#13123)
* fixes form rendering when scheduling_enabled is disabled #13096

* Remove requires_input property from BaseScript; render form consistently

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-10 10:30:51 -04:00
Abhimanyu Saharan
bc7678c716 fixes content type lookups when db is uninitialized #13116 2023-07-07 09:43:33 -04:00
Jeremy Stretch
63c33ff4be PRVB 2023-07-06 16:40:11 -04:00
Jeremy Stretch
da239aea13 Merge pull request #13111 from netbox-community/develop
Release v3.5.5
2023-07-06 16:38:36 -04:00
Jeremy Stretch
53a75a3dd7 Release v3.5.5 2023-07-06 16:20:14 -04:00
Abhimanyu Saharan
74fb707ad3 adds config_template to device serializer #13056 2023-07-06 16:04:21 -04:00
Jeremy Stretch
ecb4a084cc Change log for #11738, #12499, #12579, #12617, #13047, #13065, #13092, #13100 2023-07-06 14:54:37 -04:00
Jeremy Stretch
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
Abhimanyu Saharan
62bdb90f61 Adds copy content button (#12584)
* adds copy content button #12499

* adds newline

* Omit hash mark from target string

* Clean up HTML element IDs

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-07-06 14:19:55 -04:00
Abhimanyu Saharan
8143c6e03b adds object change for contact assignment #13065 2023-07-06 09:45:31 -04:00
Abhimanyu Saharan
ffe4558ec5 fixes search for vdc #13100 2023-07-06 09:41:43 -04:00
Abhimanyu Saharan
16ee42ac38 fixes prechange snapshot #12617 2023-07-06 09:39:09 -04:00
Anthony Brissonnet
860be780ad Fix #12579 create cable and add another error (#13007)
* fix create cable and add another error #12579

* fix return proper parent object field

* improve code and wokflow

---------

Co-authored-by: netopsab <abrisson@cerbere.rp.sig.u-bourgogne.fr>
2023-07-06 09:28:45 -04:00
Jeremy Stretch
5f0922713f Fixes #13047: Add annotate_asn_count() to ASNRange manager 2023-07-06 08:45:02 -04:00
Arthur
4355ee6407 12092 allow setnull for bulk edit power port maximum and allocated draw 2023-07-06 08:37:54 -04:00
Jeremy Stretch
07ae7c8a6e Changelog for #11335, #12760, #12842, #12951, #12955 2023-07-05 11:43:53 -04:00
Jeremy Stretch
63ba9fb38c Fixes #11335: Default manager for ObjectChange should filter by installed apps (#11709)
* Fixes #11335: Default manager for ObjectChange should filter by installed apps

* Employ canonical model discovery mechanism

* Move filtering logic to valid_models() queryset method

* fixed import to avoid content type does not exist

* Cleanup

---------

Co-authored-by: Abhimanyu Saharan <desk.abhimanyu@gmail.com>
2023-07-05 11:39:35 -04:00
Abhimanyu Saharan
3307bd200c Fixes syntax error on reports (#12997)
* fixes syntax error on reports #12842

* remove the extra filter #12842
2023-06-29 16:02:39 -04:00
Daniel Sheppard
f69d99ea67 Fixes #12760 - Adds Vary header to cause cache to be keyed based on URL and the HX-Request header (or lack thereof) 2023-06-29 15:53:57 -04:00
Arthur
3754e00ee0 12809 document not to use underscores in model names 2023-06-29 15:49:47 -04:00
pobradovic08
dd6d9bf6e3 List multiple devices in Terminations (#13030) 2023-06-29 15:48:00 -04:00
Abhimanyu Saharan
183c7deb81 adds contact accessor fields on assignment table #12955 2023-06-29 14:50:30 -04:00
Jeremy Stretch
0a60a3fd2a Add OneMind Services as a sponsor 2023-06-29 14:47:10 -04:00
Jeremy Stretch
6e222f8dce Closes #8248: User bookmarks (#13035)
* Initial work on #8248

* Add tests

* Fix tests

* Add feature query for bookmarks

* Add BookmarksWidget

* Correct generic relation name

* Add docs for bookmarks

* Remove inheritance from ChangeLoggedModel
2023-06-29 14:36:11 -04:00
Jeremy Stretch
b13f9d27d9 Fix Repography charts 2023-06-27 10:19:12 -04:00
Jeremy Stretch
6b01b1df40 Changelog for #12849, #12945, #12961, #12977, #12983, #13011 2023-06-27 08:39:51 -04:00
Harm Geerts
34d32374a8 Fix #12983 bulk edit of M2M fields when nothing is selected
Partially revert 41c92483a0 to restore
bulk edit with m2m fields. The m2m cleaned_data yields a empty queryset
when nothing is selected. By setting the m2m relation unless set null is
checked even when nothing is selected the m2m relation is always
cleared.

This commit only sets the m2m relation when a selection is made.
2023-06-27 08:28:19 -04:00
rmanyari
c99e565426 fix remote auth backend check 2023-06-27 08:09:50 -04:00
pobradovic08
16d5107b71 Add QSFP-DD (100GE) interface type 2023-06-27 08:02:46 -04:00
Alexander Votteler
f1858a7c23 Fixes #13011: Allow comma in custom links 2023-06-27 08:00:33 -04:00
Jeremy Stretch
290ffd408a Fixes #12977: Fix URL parameters for object count dashboard widgets (#12991)
* Fixes #12977: Introduce dict_to_querydict() to ensure proper handling of QueryDicts

* Remove unused import
2023-06-26 14:21:26 -04:00
Jeremy Stretch
74d9fe1ea2 Fixes #12961: Set correct return_url for object contacts tabs 2023-06-26 12:50:54 -04:00
Jeremy Stretch
d131d9b310 Correct changelog for #12953 2023-06-23 15:31:18 -04:00
Jeremy Stretch
32fe9fe8ec Changelog for #12533, #12960, #12963, #12966, #12975, #12989 2023-06-23 15:26:48 -04:00
Jeremy Stretch
882f29192c Fixes #12975: Correct URL for VirtualDeviceContext API serializer 2023-06-23 15:23:40 -04:00
Abhimanyu Saharan
27e850a68d fix ip address assignment #12953 2023-06-23 14:39:16 -04:00
Abhimanyu Saharan
c83b2499f0 fix db maintenance mode exception #12966 2023-06-23 14:36:50 -04:00
Abhimanyu Saharan
79c8219202 fixes device interface serializer #12533 2023-06-23 14:34:08 -04:00
Abhimanyu Saharan
49af70a77d fixes choice field schema for response #12960 2023-06-23 14:21:51 -04:00
Abhimanyu Saharan
7f96c7fee7 fixes most schema warnings #12257 2023-06-23 14:19:40 -04:00
Abhimanyu Saharan
13315f36d4 fixes device type and module type tag import #12949 2023-06-23 14:17:28 -04:00
Jeremy Stretch
1056e513b1 Closes #11541: Support for limiting tag assignments by object type (#12982)
* Initial work on #11541

* Merge migrations

* Limit tags by object type during assignment

* Add tests for object type validation

* Fix form field parameters
2023-06-23 14:08:14 -04:00
Arthur Hanson
69b818ed33 12237 update to Django 4.2 / psycopg3 (#12916)
* 12237 upgrade django and psycopg

* 12237 add migration

* 12237 rename migration

* 12237 update requirements

* 12237 fix migration

* Update base requirements

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-06-23 10:38:08 -04:00
Arthur Hanson
148278a74a 12591 config params admin (#12904)
* 12591 initial commit

* 12591 detail view

* 12591 add/edit view

* 12591 edit button

* 12591 base views and forms

* 12591 form cleanup

* 12591 form cleanup

* 12591 form cleanup

* 12591 review changes

* 12591 move check for restrictedqueryset

* 12591 restore view

* 12591 restore page styling

* 12591 remove admin

* Remove edit view for ConfigRevision instances

* Order ConfigRevisions by creation time

* Correct permission name

* Use RestrictedQuerySet for ConfigRevision

* Fix redirect URL

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-06-22 14:04:24 -04:00
Jeremy Stretch
48b2ab3587 Closes #12964: Raise minimum PostgreSQL version from 11 to 12 2023-06-22 12:27:21 -04:00
Jeremy Stretch
9fa1411d74 Changelog for #9077, #11305, #12175, #12180, #12794 2023-06-22 10:55:12 -04:00
Arthur Hanson
eff4a3741c 12175 rack with starting unit > 1 (#12778)
* 12175 add rack starting unit

* 12175 rack starting unit to svg

* verify devices can still fit if change rack starting_unit

* 12175 fix migration

* 12175 fix typo and test

* 12175 fix test

* 12175 fix max height calc display

* Misc cleanup & fixes

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-06-22 09:09:01 -04:00
Arthur Hanson
518fd8cca6 12794 change User ref to get_user_model (#12905)
* 12794 change User ref to get_user_model

* 12794 call get_user_model once in tests

* 12794 call get_user_model once in tests

* 12794 use settings.AUTH_USER_MODEL for FK reference
2023-06-22 08:26:50 -04:00
Jeremy Stretch
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
Jeremy Stretch
e7edccd9ba Merge branch 'develop' into feature 2023-06-20 14:53:07 -04:00
Jeremy Stretch
70c2b358ad PRVB 2023-06-20 14:27:18 -04:00
Jeremy Stretch
9dab3a0d79 Merge pull request #12946 from netbox-community/develop
Release v3.5.4
2023-06-20 14:24:34 -04:00
Jeremy Stretch
54622b5f92 Release v3.5.4 2023-06-20 13:56:09 -04:00
Jeremy Stretch
cdce500d90 Changelog for #12474, #12828, #12845, #12865, #12885, #12914 2023-06-15 16:15:15 -04:00
Luke Anderson
e11991c7a4 Fix #12865 - Include Add Nav Buttons for Report and Script Objects (#12909) 2023-06-15 15:04:08 -04:00
Jeremy Stretch
6ef333ea68 Fixes #12885: Permit mounting of devices in U100 (#12901)
* Fixes #12885: Permit mounting of devices in U100

* Define a RACK_U_HEIGHT_MAX constant
2023-06-15 15:00:45 -04:00
Jeremy Stretch
7fc69f3945 Fixes #12914: Clear stored ordering from user config when cleared by request 2023-06-15 14:59:52 -04:00
Jeremy Stretch
8aeb31751a Fixes #12845: Fix pagination of related IP addresses table 2023-06-15 13:07:51 -04:00
Arthur
0b2162569f 12474 update cable terminations when moving location between sites 2023-06-15 08:53:06 -04:00
Abhimanyu Saharan
93175888f0 add color to ChangeActionChoices #12828 2023-06-15 08:48:36 -04:00
Arthur
e635f0defd Merge branch 'develop' into feature 2023-06-14 16:32:56 -07:00
Arthur
b4a3156046 9077 audit alters_data=True 2023-06-14 14:23:55 -04:00
Arthur Hanson
4f76dcd2ea 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
Jeremy Stretch
4d686e8162 Changelog for #12622, #12682, #12818, #12822, #12847 2023-06-14 13:54:40 -04:00
Dillon Henschen
0e873a01b8 Closes #12622: Fix assigning VLAN without site to Prefix (#12784)
* Issue #12622: Fix creating Prefix using VLAN without site

* Issue #12622: Fix importing Prefix using VLAN without site

This commit also adds tests to verify the import changes implemented
in this commit.

* Issue #12622: Cleanup code to filter allowed VLANs on a prefix import

* Closes #12622: Switch to VLAN selector dialog when creating Prefix
2023-06-14 13:49:00 -04:00
Jeremy Stretch
f7b0e48a09 Merge pull request #12864 from sudheesh001/fix/12847-include-adds
Fixes #12847 - Include Missing Add buttons to Views
2023-06-14 13:33:18 -04:00
Sudheesh Singanamalla
c5f71c0c19 Fixes #12847 - Include Missing Add buttons to Views
Signed-off-by: Sudheesh Singanamalla <sudheesh@cs.washington.edu>
2023-06-14 10:05:43 -07:00
Jeremy Stretch
36e0bf0490 Merge pull request #12893 from netbox-community/feat/12824-doc
Fixes typo in register_model_view docstring
2023-06-14 08:39:28 -04:00
Jeremy Stretch
28b939c001 Merge pull request #12894 from netbox-community/fix/12822-link-encode
Change link parsing from quote_plus to quote
2023-06-14 08:38:11 -04:00
Jeremy Stretch
55e31ef984 Merge pull request #12896 from netbox-community/fix/12818-perm
Fix permission
2023-06-14 07:57:32 -04:00
Jeremy Stretch
85e351146d Merge pull request #12897 from netbox-community/fix/12682-openapi-connected-device
Fix connected device api schema
2023-06-14 07:56:10 -04:00
Abhimanyu Saharan
d03bfe89c0 fix connected device api schema #12682 2023-06-14 15:45:07 +05:30
Abhimanyu Saharan
c8cbced55e fix permission #12818 2023-06-14 14:43:18 +05:30
Abhimanyu Saharan
928a34674e change link parsing from quote_plus to quote #12822 2023-06-14 14:16:04 +05:30
Abhimanyu Saharan
96cf95d176 fixes typo in register_model_view docstring #12824 2023-06-14 14:06:23 +05:30
jeremystretch
2e9586523f Changelog for #12687, #12838, #12850, #12862 2023-06-13 15:47:40 -04:00
Jeremy Stretch
a81924ac0f Merge pull request #12863 from sudheesh001/fix/12862-connection-sidebar-add
Fixes #12862 - Add Button for Wireless Links in Sidebar
2023-06-13 09:19:32 -04:00
Jeremy Stretch
74c1f7a176 Merge pull request #12874 from ITJamie/broadcast_exceptions
assigning broadcast ip error fixes for ipv6 and /31/32
2023-06-13 08:57:32 -04:00
Jamie Murphy
22a0ce3f76 broadcast error fixes for ipv6 and /31/32 2023-06-12 21:01:43 +01:00
Jeremy Stretch
43235f143d Merge pull request #12839 from candlerb/candlerb/12838
Round rack power utilization to nearest 0.1%
2023-06-12 08:12:17 -04:00
Jeremy Stretch
e7851399c6 Merge pull request #12857 from netbox-community/fix/12850-contacts-table
fix contact assignment table modal
2023-06-12 08:09:17 -04:00
Sudheesh Singanamalla
82cd6c5f4c Fixes #12862 - Add Button for Wireless Links in Sidebar
Signed-off-by: Sudheesh Singanamalla <sudheesh@cs.washington.edu>
2023-06-11 12:17:32 -07:00
Abhimanyu Saharan
210879d380 fix contact assignment table modal 2023-06-11 16:50:48 +05:30
Brian Candler
01d9e0afb6 Round rack power utilization to nearest 0.1%
Fixes #12838
2023-06-08 14:31:46 +01:00
jeremystretch
2e2ff09822 Merge branch 'develop' into feature 2023-06-02 15:43:06 -04:00
jeremystretch
4a88d5e3d9 PRVB 2023-06-02 15:42:34 -04:00
Jeremy Stretch
9fb52be85c Merge pull request #12805 from netbox-community/develop
Release v3.5.3
2023-06-02 15:37:20 -04:00
jeremystretch
46d1d5a44a Release v3.5.3 2023-06-02 14:17:01 -04:00
jeremystretch
dee4aec62d Fixes #12779: Correct arithmetic for converting inches to meters 2023-06-01 13:21:15 -04:00
jeremystretch
9f70407c7d Remove survey link 2023-06-01 13:00:09 -04:00
jeremystretch
852026bf7b Changelog for #7503, #9876, #12015, #12538, #12762 2023-05-31 16:35:06 -04:00
Abhimanyu Saharan
e7f689bc52 Fixes incorrectly handled type error when list of objects is found in data (#12593)
* fixes incorrectly handled type error when list of objects is found in data #9876

* fixes incorrectly handled type error when list of objects is found in data #9876

* fixes incorrectly handled type error when list of objects is found in data #9876
2023-05-31 15:44:59 -04:00
Daniel Sheppard
1349a25e34 Update missing changelog 2023-05-31 14:30:40 -05:00
Abhimanyu Saharan
dbd3c6de24 Fixes return_url for image attachment (#12721)
* fixes return_url for image attachment #12538

* simplified conditions

* handle nonetype error

* fixed request check

* Introduce htmx_table template tag for embedding HTMX-backed object tables

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-31 15:22:37 -04:00
Arthur
3e77daff01 12767 pin graphene-django version 2023-05-31 12:04:34 -04:00
Abhimanyu Saharan
bd88ee7063 Adds device type and role to device component filter (#12504)
* adds device type and role to device component filter #12015

* changes as per review

* Add filterset tests for device type & role filters

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-31 09:59:22 -04:00
Daniel Sheppard
a9b0b49ef9 Fixes #12702 - Adds widget to FrontPortTemplateCreateForm 2023-05-31 08:49:23 -05:00
Arthur Hanson
8b051ea2f3 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
jeremystretch
bca9d0fa8a Closes #12599: Apply filter parameters to links in object count dashboard widgets 2023-05-30 16:31:34 -04:00
jeremystretch
9b8ab1c1f7 Fixes #12742: Object counts dashboard widget should support URL-compatible query filters 2023-05-30 15:44:43 -04:00
jeremystretch
b3bd03a1e9 Fixes #12715: Use contact assignments table to display the contacts assigned to an object 2023-05-30 14:51:16 -04:00
jeremystretch
18c863e393 Changelog for #11539, #12370, #12470, #12562, #12597, #12627, #12745 2023-05-30 09:52:14 -04:00
Abhimanyu Saharan
d7ca453f26 Adds hide-if-unset to custom field (#12723)
* adds hide-if-unset to custom field #12597

* moved hide logic from template to python

* fix indentation

* Update logic for omit_hidden under get_custom_fields()

* Update docs

* Account for False values

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-30 09:42:37 -04:00
Abhimanyu Saharan
9b9a559e0c Adds image preview back on the table (#12739)
* adds image preview on image attachment #12627

* adds bootstrap initialization for hx-trigger=load #12627

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-30 09:41:32 -04:00
kkthxbye-code
1f71d3570a Escape text passed as display values to slim-select 2023-05-30 09:09:15 -04:00
Abhimanyu Saharan
5a5fcf7d37 Changes render config card with accordian (#12724)
* changes render config card with accordian #12470

* fixed indentation #12470

* Use -flush CSS class to reduce whitespace

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-26 09:32:58 -04:00
Abhimanyu Saharan
5869894a48 Adds ip to failed logs (#12725)
* adds ip to failed logs #12562

* added additional logging when client ip cannot be determined
2023-05-26 08:46:49 -04:00
Abhimanyu Saharan
e2f9a3c07a fixes contact assignments filter to include parent content type #12730 2023-05-26 08:42:04 -04:00
jeremystretch
b64b19a3f4 Fixes #11934: Prevent reassignment of an IP address designated as primary for its parent object 2023-05-25 16:42:24 -04:00
Jeremy Stretch
24a51dd86e Fixes #11539: Use BooleanFilter for 'empty' lookups (#11784)
* Use BooleanFilter for 'empty' lookups

* Always use BooleanFilter for 'empty' lookups

* Restore Empty lookup logic
2023-05-25 15:20:08 -04:00
jeremystretch
bf1c191b2e Fixes #12694: Strip leading & trailing whitespace from custom link URL & text 2023-05-24 15:45:24 -04:00
jeremystretch
b31b086a4d Link to the plugin ideas board 2023-05-23 15:34:03 -04:00
jeremystretch
6160e03426 PRVB 2023-05-22 17:00:29 -04:00
Jeremy Stretch
c9b79ca579 Merge pull request #12681 from netbox-community/develop
Release v3.5.2
2023-05-22 16:54:03 -04:00
jeremystretch
fbc7811f56 Release v3.5.2 2023-05-22 16:24:30 -04:00
Austin de Coup-Crank
005e3fd692 Closes #9068: validate addresses assigned to interfaces (#12618)
* Begin logic

* Closes #9068: Disallow assigning bcast/networks to interfaces

* Allow net IDs in /31, /32, /127, /128

* linting error

* Implement requested changes

* Condensed the "if" logic a bit

---------

Co-authored-by: Austin de Coup-Crank <decoupca@moodys.com>
Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-22 16:16:17 -04:00
Dillon Henschen
078893e034 Closes #11619: Include VLANs with a null site in query during bulk interface edit for Devices > DEVICE COMPONENTS > Interfaces (#12659)
* Closes #11619: Allow VLANs without a site during multi-port edits

This commit allows users to be able to select VLANs without a site assignment
during bulk interfaces edits under Devices > DEVICE COMPONENTS > Interfaces.

Prior to this commit, only VLANs that were assigned the same site as the device
were available for selection.

* Replace 'null' with FILTERS_NULL_CHOICE_VALUE constant

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-22 15:37:31 -04:00
Daniel W. Anner
80fc8db514 Adding interface type 200gbase-x-qsfpdd 2023-05-22 13:11:29 -04:00
jeremystretch
fa3bedb947 Fixes #12642: Fix bulk tenant assignment via cluster import form 2023-05-22 13:07:40 -04:00
jeremystretch
c8d9a3b4eb Changelog for #12327, #12548, #12594, #12605, #12629 2023-05-18 14:34:13 -04:00
Austin de Coup-Crank
311dce0b5f Closes #12605: Add LX.5 port type 2023-05-18 14:25:51 -04:00
neope
23b21246f0 Adding CDFP and CFP8 400GE connectors (#12646)
* Adding CDFP and CFP8 400GE connectors

* Update choices.py

typo on CFP8
2023-05-18 14:21:32 -04:00
Arthur
92c49669f9 12548 add prefetch_related for l2vpn and vdcs to interface api 2023-05-18 14:18:55 -04:00
Abhimanyu Saharan
2204735e9f Adds rq retry options (#12588)
* adds rq retry options #12327

* Clean up docs; disable retries of failed jobs by default

* Pass a Retry object only if RQ_RETRY_MAX is non-zero

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-16 14:10:44 -04:00
Abhimanyu Saharan
0df6a5793a Adds maintenance exempt paths (#12592)
* adds maintenance exempt paths #11233

* adds maintenance exempt paths #11233

* Rename method & remove login/logout from exempt paths

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-16 11:35:21 -04:00
Arthur
eeb15ab5d1 12594 add config context to object count / list widget 2023-05-16 10:52:23 -04:00
jeremystretch
4208b79514 Closes #12320: Remove obsolete fields napalm_driver and napalm_args from Platform 2023-05-16 09:35:27 -04:00
jeremystretch
d5be59ef67 Update README 2023-05-16 08:39:05 -04:00
kkthxbye
0ad88e2431 Changed docs to reflect the new URL for the dynamic API documentation 2023-05-16 08:19:57 +02:00
jeremystretch
c65b2a080f Changelog for #11017, #12468 2023-05-15 09:13:11 -04:00
Devon Mar
0f44f7eb20 Use .font-monospace instead of .text-monospace 2023-05-15 08:28:59 -04:00
jeremystretch
02db0bcc2e Closes #11766: Remove obsolete custom ChoiceField and MultipleChoiceField classes 2023-05-12 16:27:50 -04:00
Austin de Coup-Crank
e40e9cb406 Closes #11017: increase maximum power draw (#12587)
* Convert power draw/max draw to PositiveIntegerField

* Closes #11017: Increase maximum power draw

* Rename migration file for clarity

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-12 16:10:12 -04:00
Arthur Hanson
21f4761335 12468 disallow double underscores in custom field names (#12523)
* 12468 disallow double underscores in custom field names

* 12468 disallow double underscores in custom field names

* 12468 review changes

* 12468 correct migration

* 12468 use inverse match

* 12468 use inverse match

* Add test for invalid custom field names

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-12 16:08:57 -04:00
jeremystretch
39fd64b2ef Fixes #12570: Disable ordering of synchronized object tables by the synced attribute 2023-05-12 11:08:32 -04:00
jeremystretch
567285d36a Changelog for #7671, #10686, #11233, #11559, #12554 2023-05-12 11:00:33 -04:00
jeremystretch
ff874a24dd #7671: Document REMOTE_AUTH_AUTO_CREATE_GROUPS config parameter 2023-05-12 10:56:36 -04:00
Abhimanyu Saharan
9b80ec22ba Adds db read-only middleware (#12490)
* adds db read-only middleware #11233

* fixed attribute error

* replaces getattr with get_config
2023-05-12 10:50:51 -04:00
Jon Schewe
cc0c985fec Feature/remote group autocreate (#12394)
* Add REMOTE_AUTH_AUTOCREATE_GROUPS

When REMOTE_AUTH_AUTOCREATE_GROUPS is True, Netbox will create groups
referenced in the REMOTE_AUTH_GROUP_HEADER that don't exist in the
database.

Closes #7671

* Fix naming of parameter

Apply the fix requested by kkthxbye-code in https://github.com/netbox-community/netbox/pull/8603

---------

Co-authored-by: Lars Kellogg-Stedman <lars@oddbit.com>
2023-05-12 10:35:09 -04:00
Abhimanyu Saharan
4eb5e90ccc Adds contact tabs (#12460)
* adds contact tabs #11599

* fixed lint issues

* changes as per review

* changes as per review

* replaces generic object template with base template
2023-05-12 10:26:26 -04:00
Abhimanyu Saharan
e71a98499f Adds BANNER_MAINTENANCE config (#12555)
* adds BANNER_MAINTENANCE config #12554

* changes as per review

* lint fix

* Fix admin form field widget

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-12 09:54:59 -04:00
Daniel Sheppard
011a936a56 Fixes #10686 - Import cables using VC master device (#12551)
* Allow importing cables against master device for subordinate device interfaces

* Add tests
2023-05-12 09:07:51 -04:00
Abhimanyu Saharan
556beeee6c Updates doc for reports and scripts permission (#12565)
* updates doc for script permission #12557

* updates doc for reports permission #12557
2023-05-12 09:04:56 -04:00
jeremystretch
b7f028fba3 Fixes #12550: Fix rear port selection widget under front port creation form 2023-05-10 10:44:01 -04:00
jeremystretch
2d0ac213c7 Changelog for #11670, #11900, #12131, #12233, #12286, #12323 2023-05-10 09:39:25 -04:00
Abhimanyu Saharan
6b19f15a7b Moves related ips to a tab (#12502)
* moves related ips to a tab #12233

* Refactor IP address templates to use a base template

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-09 12:49:13 -04:00
Abhimanyu Saharan
57156f0e94 Adds stroke to the reservation (#12506)
* adds stroke to the reservation #11900

* fixed right side border

* Tweak reserved stroke style & add constants for colors

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-09 10:21:23 -04:00
Abhimanyu Saharan
4e49f4a434 Adds tooltip on custom field (#12505)
* adds tooltip on custom field #12131

* adds description field check

* fixed field name

* updated code to match the panel

* added escape filter on description
2023-05-09 10:20:02 -04:00
Dillon Henschen
c55c14ea4c Closes #11670: Add ability to optionally import DeviceType and ModuleType weight (#12512)
* 11670: Add optional weight to DeviceType import

This is 1 of 2 commits to address issue #11670

To maintain consistency, the import design of the DeviceType weight follows the
same pattern used for importing weight and weight units in DCIM Racks.

* Closes #11670: Add weight to ModuleType import

This is commit 2 of 2 to address and close #11670.

To maintain consistency, the import design of the ModuleType weight follows the
same pattern used for importing weight and weight units in DCIM Racks.

* Merge tests; misc cleanup

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-09 09:59:42 -04:00
Abhimanyu Saharan
e1b7a3aeb6 Replaced device type weight with device total weight (#12522)
* replaced device type weight with device total weight #12286

* replaced device type weight with device total weight #12286

* Update netbox/templates/dcim/device.html

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

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-05-09 09:35:00 -04:00
Abhimanyu Saharan
2b2c559a37 updates ldap doc for centos #12447 2023-05-09 08:32:22 -04:00
Abhimanyu Saharan
1af3ba9496 Adds full_clean in examples (#12527)
* adds full_clean in examples #11689

* removes extra info
2023-05-09 08:31:50 -04:00
Abhimanyu Saharan
cb6852bf7a adds CXP (100GE) #12323 2023-05-09 08:28:58 -04:00
Abhimanyu Saharan
259d0e96f2 Adds dimensions card to device view (#12509)
* adds dimensions card to device view #12286

* Update netbox/templates/dcim/device.html

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

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-05-08 08:56:28 -04:00
jeremystretch
9eeca06115 #12498: Annotate option to set MAPS_URL=None 2023-05-05 15:26:22 -04:00
jeremystretch
da781b8d28 Changelog for #12223, #12498 2023-05-05 15:25:08 -04:00
Abhimanyu Saharan
896b19eaa3 adds parent device and bay position to table #12223 2023-05-05 15:23:28 -04:00
Abhimanyu Saharan
12bef7623c disables map button when MAP_URL is none #12498 2023-05-05 15:04:36 -04:00
jeremystretch
e96cfadd22 PRVB 2023-05-05 12:58:09 -04:00
Jeremy Stretch
5f184f2435 Merge pull request #12507 from netbox-community/develop
Release v3.5.1
2023-05-05 12:50:30 -04:00
jeremystretch
56a4d0333e Formatting fix 2023-05-05 12:31:12 -04:00
jeremystretch
6794742213 Release v3.5.1 2023-05-05 12:29:10 -04:00
jeremystretch
a29a07ed26 Fixes #12463: Fix the association of completed jobs with reports & scripts in the REST API 2023-05-05 10:17:13 -04:00
jeremystretch
42c80f69e6 Changelog for #11715, #11801, #11932, #12122, #12245, #12416, #12476, #12483, #12496 2023-05-05 10:01:54 -04:00
Abhimanyu Saharan
ca0e7be637 Adds bulk import for journal entry (#12485)
* adds bulk import for journal entry #12122

* lint fix

* Add kind as CSVChoiceField on JournalEntryImportForm

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-05 09:57:09 -04:00
Abhimanyu Saharan
42346702a1 Adds image attachment list view (#12487)
* adds image attachment list view #11932

* fixed typo

* Update netbox/extras/tables/tables.py

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

* Update netbox/extras/forms/filtersets.py

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

* changes as per review

* Disable ordering by size (not stored in database)

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-05-05 09:48:13 -04:00
Arthur Hanson
9909213c0d 12416 warning for missing script file (#12456)
* 12416 warning for missing script file

* 12416 widen exception catching for internal script error

* Update netbox/extras/models/scripts.py

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

* 12416 update from review feedback

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-05-05 09:37:38 -04:00
Daniel Sheppard
7a38f601de Fixes: #11715 - Fix Parent Prefix table display (#12448)
* Fixes: #11715 - Fix Parent Prefix table display of global vrf prefixes that are **not** containers.

* Combine AND into a single Q object

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

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-05-05 09:35:05 -04:00
Abhimanyu Saharan
abdcfdecf5 Adds description to elevation device tooltip (#12488)
* adds description to elevation device tooltip #11801

* changes as per review

* changes as per review

* Rearrange attrs, add headings, and update docstring

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-05 09:09:21 -04:00
Luke Anderson
9d62174e1e Fix #12245 - Add WLAN to InterfaceBulkEditForm 2023-05-05 08:41:40 -04:00
Patrick Hurrelmann
a96b76a8d1 Fixes #12496: Remove account field from provider template 2023-05-05 08:27:29 -04:00
Tobias Genannt
ab69faab87 Fix #12483: Using mutable dulwich configuration 2023-05-04 16:56:45 -04:00
Arthur
f3826e6235 fix runscript command 2023-05-04 16:18:44 -04:00
jeremystretch
3eba65b5c2 Changelog for #10757, #11652, #11791, #11190, #12363, #12464 2023-05-04 14:14:21 -04:00
Arthur Hanson
683ef30af4 12363 update paragraph spacing on journal table (#12435)
* 12363 update paragraph spacing on journal table

* 12363 make css rule generic

* 12363 change p tag to only effect last-child

* 12363 change p table spacing to .5em

* 12363 move comment
2023-05-04 14:05:32 -04:00
Daniel Sheppard
46914d9479 Fixes: #10757 - Change IP interface assignment to use new selector (#12452)
* Fixes: #10757 - Change interface assignment to use new selector.  Perform the same change to the NAT assignment as well.

* Remove nat_vrf from form and remove query_params that are not required anymore
2023-05-04 13:59:28 -04:00
Abhimanyu Saharan
ea8a0135ad Adds module status to module bay table (#12455)
* adds module status to module bay table #11652

* removed the extra line

* updated field name
2023-05-04 13:46:31 -04:00
Abhimanyu Saharan
25142e037a Adds housekeeping systemd files (#12457)
* adds housekeeping systemd files #11190

* Clean up Markdown

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-05-04 13:43:40 -04:00
Abhimanyu Saharan
93b912c2da Adds ENGINE to database config (#12458)
* adds ENGINE to database config #11791

* fixed lint issues

* updated doc
2023-05-04 13:36:52 -04:00
Tobias Genannt
4df517e4da Fix #12464: Only set username, password for HTTP/s (#12482) 2023-05-04 13:34:04 -04:00
jeremystretch
2c756873aa Fix broken links 2023-05-04 08:43:17 -04:00
jeremystretch
01fa6e28cd Changelog for #10759, #11422, #11504, #12433 2023-05-03 09:32:48 -04:00
Arthur Hanson
5036020dc0 12433 update object list widget to correctly parameterize urls (#12434)
* 12433 update object list widget to correctly parameterize urls

* Update netbox/extras/dashboard/widgets.py

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

* 12433 fix indent

* Correct per_page query parameter

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-05-03 09:20:53 -04:00
Arthur
78ec3a6411 11504 add rack filter to elevation 2023-05-03 08:40:43 -04:00
Arthur
24650d9118 11422 add power-panel-name to quick search of power feeds 2023-05-03 08:36:12 -04:00
Austin de Coup-Crank
b14a514b47 Closes 10759: Enable markdown support for custom field descriptions (#12344)
* enable markdown in custom field descriptions

* Closes #10759: Enable markdown support for custom field descriptions

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-05-02 16:47:22 -04:00
jeremystretch
7aa8434575 Changelog for #12367, #12410, #12436 2023-05-02 16:40:56 -04:00
Arthur
fbcf4c268b 12436 remove add button from contactassignment list view 2023-05-02 16:35:23 -04:00
Abhimanyu Saharan
a566a56a64 fixes RelatedObjectDoesNotExist #12367 2023-05-02 09:48:16 -04:00
jeremystretch
cc3b95bdb0 Fixes #12400: Validate default values for object and multi-object custom fields 2023-05-02 09:35:25 -04:00
jeremystretch
2099cd0fdc #12415: Bump django-rq to v2.8.0 2023-05-02 09:35:25 -04:00
Jop Zinkweg
3bdbf67b8f Update examples to reflect obj rename to object
#8684 missed some references to ```obj```
2023-05-02 08:31:33 -04:00
jeremystretch
20f0464824 Fix OpanAPI schema base path 2023-05-01 17:01:51 -04:00
jeremystretch
1952707702 Fixes #12401: Support the creation of front ports without a pre-populated device ID 2023-05-01 16:51:10 -04:00
jeremystretch
9319cffb1c Fixes #12384: Add a three-second timeout for RSS reader widget 2023-05-01 16:19:39 -04:00
jeremystretch
261f5e4995 Fixes #12415: Pin rq to v1.13.0 to fix ImportError exception from django-rq 2023-05-01 14:38:51 -04:00
jeremystretch
8cede0daf8 Changelog for #12380, #12395, #12396, #12405, #12412 2023-05-01 14:19:56 -04:00
jeremystretch
139ef7ef4c Fixes #12395: Fix "create & add another" action for objects with custom fields 2023-05-01 14:17:50 -04:00
jeremystretch
47f3023401 Fixes #12412: Device/VM interface MAC addresses can be nullified via REST API 2023-05-01 13:06:10 -04:00
Jeremy Stretch
a0f0b29432 Merge pull request #12382 from kkthxbye-code/12380-widget-fix-missing-ct
Fixes #12380 - Add ObjectChange as a valid option for ObjectListWidget and ObjectCountsWidget
2023-05-01 10:17:11 -04:00
Jeremy Stretch
f86f4f9257 Merge pull request #12406 from kkthxbye-code/12405-fix-related-vlangroup
Fixes #12405 - Fix the filtervar being set to site_id instead of site in SiteView related_models
2023-05-01 10:14:29 -04:00
Jeremy Stretch
3fc7c0edc7 Merge pull request #12407 from kkthxbye-code/12396-fix-provideraccount
Fixes #12396 - Mark provider_account as not required in API and bulk import
2023-05-01 10:12:10 -04:00
kkthxbye-code
528fb21a7e Mark provider_account as not required in API and bulk import 2023-05-01 07:44:15 +02:00
kkthxbye-code
6206d226ae Fix the filtervar being set to site_id instead of site in SiteView related_models 2023-05-01 07:15:00 +02:00
kkthxbye-code
aabaeec1d7 Add ObjectChange as a valid option for ObjectListWidget and ObjectCountsWidget 2023-04-28 12:17:39 +02:00
jeremystretch
25dc7e234d PRVB 2023-04-27 14:52:07 -04:00
Jeremy Stretch
eac7d01977 Merge pull request #12371 from netbox-community/develop
Release v3.5.0
2023-04-27 14:38:56 -04:00
jeremystretch
a5bc9d4a2d Release v3.5.0 2023-04-27 14:24:44 -04:00
jeremystretch
b3efb14176 Remove pinned version dependencies 2023-04-27 14:09:16 -04:00
Jeremy Stretch
a2f4fce5b3 Merge pull request #12370 from netbox-community/feature
Prepare for v3.5.0 release
2023-04-27 14:01:23 -04:00
jeremystretch
6109bef700 Merge branch 'develop' into feature 2023-04-27 12:11:08 -04:00
Jeremy Stretch
72767fb5b7 Merge pull request #12366 from netbox-community/develop
Release v3.4.10
2023-04-27 12:03:16 -04:00
jeremystretch
84089ab8c5 Release v3.4.10 2023-04-27 11:47:42 -04:00
Arthur Hanson
9a788349a9 12252 allow sorting on object in search (#12357)
* 12252 allow sorting on object in search

* 12252 code review changes
2023-04-27 11:26:14 -04:00
jeremystretch
b7140a0e4a Closes #12343: Enforce a minimum length for SECRET_KEY configuration parameter 2023-04-27 10:35:39 -04:00
Jeremy Stretch
d39c796828 Merge pull request #12356 from netbox-community/11607-custom-field-cable
11607 make CableSerializer use WritableNestedSerializer
2023-04-27 09:30:30 -04:00
Jeremy Stretch
4a92f6867a Merge pull request #12358 from x64x6a/develop
Add additional characters to exclude from url encode
2023-04-27 08:50:45 -04:00
x64x6a
4355085124 Fixes #12355: Exclude additional characters from url encode 2023-04-26 15:53:14 -07:00
Arthur
5d4ef5e9e5 11607 make CableSerializer WritableNestedSerializer for to_internal value instantiation 2023-04-26 13:27:55 -07:00
jeremystretch
f49e4ee512 Merge branch 'develop' into feature 2023-04-26 15:09:51 -04:00
Jeremy Stretch
f867cb3ae0 Merge pull request #12354 from netbox-community/develop
Release v3.4.9
2023-04-26 14:54:08 -04:00
jeremystretch
a49fdad5e1 Release v3.4.9 2023-04-26 14:33:23 -04:00
Arthur
1ad029712e #11902 validate device on inventory item import 2023-04-26 14:22:37 -04:00
jeremystretch
d87235af2f Closes #12337: Enable anonymized reporting of census data 2023-04-26 10:44:56 -04:00
jeremystretch
99af126fac Closes #11386: Introduce CSRF_COOKIE_SECURE, SECURE_SSL_REDIRECT, and SESSION_COOKIE_SECURE configuration parameters 2023-04-25 16:29:01 -04:00
jeremystretch
83cea218b5 Changelog for #12195, #12218, #12278 2023-04-25 14:49:43 -04:00
jeremystretch
9eb38ab7b2 Delete obsolete static resources 2023-04-25 14:48:00 -04:00
Abhimanyu Saharan
d3206d9bf9 Added method to update viewset description (#12218)
* wip

* wip

* updated description on viewset

* fixed model name

* Update schema.py

* Update schema.py
2023-04-25 14:37:05 -04:00
Austin de Coup-Crank
adb9673f09 Fixes #11623: obfuscate Wi-Fi PSKs (#12244)
* Fixes #11623: obfuscate Wi-Fi PSKs

* yarn linting fixes

* include static files
2023-04-24 12:13:28 -04:00
PieterL75
b693123f6e Fixes #10987: Show rack-list dropdown in rack (#11779)
* Intial. 2 ways the racknavigation displayed

* show active rack in dropdown

* auto hide/show when viewport reduces

* Dropdown only

* Update links to use get_absolute_url()

---------

Co-authored-by: Pieter Lambrecht <pieter.lambrecht@sentia.com>
Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-04-24 12:01:33 -04:00
jeremystretch
e7663b7e39 Mark Provider.account as deprecated 2023-04-21 16:21:04 -04:00
jeremystretch
053be952ba Fixes #12238: Improve error message for API token IP prefix validation failures 2023-04-21 16:06:33 -04:00
jeremystretch
390619ca99 Changelog for #11383, #12205, #12226, #12255 2023-04-21 15:40:34 -04:00
jeremystretch
b1130ff9b6 Add an issue template for deprecations 2023-04-21 15:38:27 -04:00
Darek
89fa546a14 Merge pull request from GHSA-92x4-vfjf-rmf7 2023-04-21 15:08:04 -04:00
jeremystretch
c8988bac8a Add graphics 2023-04-21 13:46:07 -04:00
Arthur Hanson
55385dd0db 12278 add ipaddressfield serializer for OpenAPI spectacular typing (#12285)
* #12278 add serializer for ipaddressfield to remove spectacular warnings

* #12278 add ipaddressfieldserializer to nested serializers

* #12278 fix to_internal_value to_representation in serializer

* #12278 to_internal_value is called before validation! need to raise validation error if incorrect format

* #12278 to_internal_value needs to return value doh

* #12278 move IPAddressField to field_serializers

* #12278 remove old import

* 12278 remove validator
2023-04-21 12:41:03 -04:00
Arthur Hanson
38a0ed5e24 12255 inventory item device change (#12311)
* #12255 allow inventory items to change devices

* #12255 allow inventory item template to change devices

* #12255 fix init

* 12255 remove can_swtich from template model

* 12255 change to check module list
2023-04-21 12:36:11 -04:00
Arthur
15d80f4e1b 12195 remove incorrect null=True on choice fields 2023-04-21 12:23:07 -04:00
jeremystretch
2fe5592c3c Fixes #12299: Fix object list widget support for filtering by multiple values 2023-04-21 11:54:28 -04:00
jeremystretch
8cf0a79dee Changelog for #12149, #12256, #12288 2023-04-21 11:40:28 -04:00
jeremystretch
183c5ca667 Update screenshots 2023-04-21 11:35:35 -04:00
jeremystretch
d5c4b1e27c #10520: Remove obsolete NAPALM documentation 2023-04-21 11:22:38 -04:00
jeremystretch
2fcdc0ae6a #10520: Restore ability to edit platform NAPALM fields via UI 2023-04-21 11:21:42 -04:00
Janik H
12bb0ec1fe Fix typo in api token auth 2023-04-21 10:01:13 -04:00
Austin de Coup-Crank
8b7ee0a0db 11383 fix search order (#12251)
* Fixes #11383: Sorting search by type doesn't work

* Fixes #11383: Sorting search by type doesn't work; more reliable approach
2023-04-20 17:04:47 -04:00
Arthur Hanson
274cd5d56c 12288 add servers to spectacular settings (#12300)
* 12288 add servers to spectacular settings

* 12288 standardize quotes

* Account for BASE_PATH

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-04-20 15:56:21 -04:00
Luke Anderson
ab3531558a Closes #12226: Add Profile Data Headers to Remote Authentication Middleware (#12253)
* Closes #12226: Add Profile Data Headers to Remote Authentication Middleware

* Tweak documentation

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-04-20 15:49:54 -04:00
Arthur
dda56f21f3 #12256 remove read-only fields from writable serializers 2023-04-20 14:11:55 -04:00
Arthur
31c909c368 #12149 remove spectacular choice mapping fixup internal one 2023-04-20 14:10:05 -04:00
jeremystretch
164b2a5016 Fixes #12270: Fix pre-population of list values when creating a saved filter 2023-04-19 17:41:38 -04:00
jeremystretch
7b374e4cf6 Fixes #12296: Fix 'mark connected' form field for bulk editing front & rear ports 2023-04-19 17:25:32 -04:00
jeremystretch
13625325f5 #8684: Fix test 2023-04-19 11:31:26 -04:00
jeremystretch
b84ac184c2 #8684: Remove obsolete 'obj' var from custom link context 2023-04-19 09:58:18 -04:00
jeremystretch
d5d2431cbd Docs cleanup for v3.5 2023-04-18 16:58:53 -04:00
jeremystretch
c08c7dda50 Closes #12292: Replace SelectSpeedWidget and SelectDurationWidget with NumberWithOptions 2023-04-18 16:33:43 -04:00
jeremystretch
b807198e6d Rename ImportForm to BulkImportForm 2023-04-18 15:27:05 -04:00
jeremystretch
9caa7f6b7c Move SyncedDataMixin from extras to core 2023-04-18 15:18:19 -04:00
jeremystretch
4452f57f90 Release v3.5-beta2 2023-04-18 09:21:15 -04:00
jeremystretch
b167153186 Enable scheduling_enabled parameter for reports 2023-04-18 08:45:31 -04:00
jeremystretch
197c6a1cbf Add scheduling_enabled parameter for scripts 2023-04-18 08:45:31 -04:00
jeremystretch
014a5d10d1 Closes #12187: Add button to download rendered config from UI 2023-04-17 16:37:02 -04:00
jeremystretch
86d185fe05 Fix validation of DataSource URL 2023-04-17 16:00:35 -04:00
Tobias Genannt
9ef1fb1e3a Use dulwich as Git client 2023-04-17 15:53:50 -04:00
jeremystretch
7ecf3be33c Clean up script & report job views 2023-04-17 15:27:12 -04:00
jeremystretch
a0893c2e8b Add general purpose view for individual jobs 2023-04-17 15:08:18 -04:00
Jeremy Stretch
8b040ff930 Closes #12129: Enable automatic synchronization of objects when DataFiles are updated (#12262)
* Closes #12129: Enable automatic synchronization of objects when DataFiles are updated

* Cleanup
2023-04-17 10:35:17 -04:00
Jeremy Stretch
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
jeremystretch
59a6b3e71b Merge branch 'develop' into feature 2023-04-12 17:38:16 -04:00
jeremystretch
c1c98f9883 Closes #12232: Annotate direct URL for release notes for all projects 2023-04-12 17:30:00 -04:00
jeremystretch
dd8112c30e PRVB 2023-04-12 15:33:22 -04:00
Jeremy Stretch
3c91331e16 Merge pull request #12234 from netbox-community/develop
Release v3.4.8
2023-04-12 15:29:09 -04:00
jeremystretch
eef38257b9 Release v3.4.8 2023-04-12 14:06:09 -04:00
Austin de Coup-Crank
bb9a125934 Closes #12040: fix bulk import tab selection 2023-04-12 13:01:04 -04:00
Arthur Hanson
8de252e34e 11432 device field (#11567)
* 11432 make device field on interface read-only on api edit call

* 11432 make device field on interface read-only on api edit call

* 11432 extend serializer change to mixin

* 11432 add readonlydevicemixin to template serializers

* 11432 change subclass ordering

* 11432 fix device_type for template serializers

* 11432 DRY

* 11432 DRY

* 11432 make internal var

* 11432 change to model-level validation

* 11432 fix fk accessor

* Clean up validation error messages

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-04-12 10:25:54 -04:00
Arthur Hanson
9e305c6181 Closes #12207: Establish a permission for creating API tokens on behalf of other users (#12192)
* 11091 add permission to allow user to create api tokens for other users

* 11091 update docs

* 11091 fix for test

* 11091 fix for test

* 11091 test case for invalid token creation

* 11091 add test for permission grant

* Cleanup & fix serializer validation

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-04-12 10:25:06 -04:00
pobradovic08
97ed6439ce Fixes #12227: L2VPN Bulk import not setting Tenant field 2023-04-12 09:24:31 -04:00
jeremystretch
15a615d3a3 Optimize migrations 2023-04-11 16:08:41 -04:00
jeremystretch
3528aaee2c Update release notes 2023-04-11 15:56:34 -04:00
jeremystretch
46d7bf02ac Add tests for ConfigTemplate 2023-04-11 15:25:48 -04:00
jeremystretch
6820796c10 Closes #10414: Enable general purpose image attachments for device types 2023-04-10 16:43:40 -04:00
jeremystretch
4a331b560f Closes #11015: Remove unit from commit rate column header in circuits table 2023-04-10 16:35:21 -04:00
jeremystretch
4c9cf9032c Changelog for #10221, #10600, #11431, #11454 2023-04-10 14:06:36 -04:00
jeremystretch
ada01b39cc #10221: Tweak variable names & error message 2023-04-10 14:03:59 -04:00
Abhimanyu Saharan
b41f8755df Fixes GenericForeignKey validation (#11550)
* added model validation for GenericForeignKey

* added ct_field and fk_field null validation

* applied suggestion
2023-04-10 14:02:32 -04:00
Abhimanyu Saharan
2c07762b7a Added optional user and group on custom field (#12206)
* added group and user model to object_type

* Update netbox/utilities/utils.py

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

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-04-10 12:40:13 -04:00
jeremystretch
f68a63255b #11029: Cleanup & changelog 2023-04-10 10:40:56 -04:00
kkthxbye
278f2b173a Fixes #11431 - Disallow changing customfield type after creation (#11449)
* Disallow changing customfield type after creation

* Fix test_api.CustomFieldTest

---------

Co-authored-by: kkthxbye-code <>
2023-04-10 10:13:08 -04:00
Arthur Hanson
00714b23a2 11029 add changelog on CableTermination (#11407)
* 11209 add changelog on CableTermination

* Rename migration

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-04-10 10:11:58 -04:00
jeremystretch
768d6f624e Fixes #12191: Change absolute image path to relative 2023-04-10 09:17:13 -04:00
jeremystretch
1146aaff89 Closes #11453: Display a warning banner when DEBUG is enabled 2023-04-10 09:12:04 -04:00
Arthur Hanson
5a4feb7099 10615 filter cable termination_id with cable_end (#12182)
* 10615 filter cable termination_id with cable_end

* 10615 filter distinct

* 10615 filter distinct
2023-04-07 14:13:58 -04:00
jeremystretch
589d51e028 Merge branch 'develop' into feature 2023-04-07 13:58:56 -04:00
jeremystretch
a6fd0ab09a #12007: Move vlan & vlan_id filter methods to CommonInterfaceFilterSet 2023-04-07 13:58:12 -04:00
jeremystretch
08017c51f6 Merge branch 'develop' into feature 2023-04-07 13:00:00 -04:00
jeremystretch
9f71cf79e6 Changelog for #12007, #12118 2023-04-07 11:54:43 -04:00
Abhimanyu Saharan
c26fe266cc Moved interface filterset under common class (#12200)
* moved interface filterset under common class #12007

* lint fix
2023-04-07 10:54:39 -04:00
jeremystretch
085cfc58f4 Fixes #12184: Fix filtered bulk deletion for various models 2023-04-07 10:25:36 -04:00
jeremystretch
63a0ec7a79 Fixes #12190: Fix form layout for plugin textarea fields 2023-04-07 10:03:47 -04:00
jeremystretch
ccfdc216a5 Fixes #12118: Refactor bulk creation logic under _instantiate_components() 2023-04-06 17:01:46 -04:00
Jeremy Stretch
2bf9acfb19 Closes #12193: Clean up tests (#12197)
* Fix skipped API tests

* Remove invalid tests

* Correct logger name
2023-04-06 16:35:27 -04:00
jeremystretch
74d8baea30 Remove NS1 from sponsors list 2023-04-06 14:32:57 -04:00
jeremystretch
f8d40ae824 Changelog for #11746, #12011, #12087 2023-04-05 13:32:18 -04:00
Daniel Sheppard
41c92483a0 #12087 - Fix Bulk Edit update when M2M operations are present. (#12169)
* #12087 - Fix Bulk Edit update when M2M operations are present.

* #12087 - Minor tweaks

* Change .set() to .clear()

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

* #12087 - Update comments

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-04-05 13:29:32 -04:00
jeremystretch
6d6299f0cb #11584: Linkify assigment counts in contacts table 2023-04-05 12:53:39 -04:00
jeremystretch
f44a2ba0ee Closes #12119: Lock & unlock dashboard layout 2023-04-05 09:59:22 -04:00
jeremystretch
29fbe6e4ee Closes #12126: Introduce a DEFAULT_DASHBOARD config parameter 2023-04-05 08:32:18 -04:00
Arthur Hanson
94c2a2e56c 11746 fix delete custom field (#12092)
* 11746 delete custom field

* 11746 use filter instead of exclude
2023-04-04 16:38:48 -04:00
Arthur
0a2ae90411 12011 fix module bay bulk create 2023-04-04 16:34:51 -04:00
jeremystretch
1b5f926e17 Fixes #12167: Catch and report on exceptions raised when rendering a config template 2023-04-04 08:47:01 -04:00
Arthur Hanson
13cbb33c98 12148 add swagger-sidecar for self-hosted swagger docs (#12159)
* 12148 add swagger-sidecar for self-hosted swagger docs

* 12149 add to base_requirements
2023-04-04 08:23:56 -04:00
jeremystretch
b032742418 Closes #12133: Move any instance mutations inside clean() to save() 2023-04-03 16:26:07 -04:00
jeremystretch
8a684adf66 Changelog for #12074, #12117 2023-04-03 15:38:05 -04:00
Arthur Hanson
bca00cd97a 12117 remove clone from cable (#12130)
* 12117 remove clone from cable

* 12117 remove clone button if no params

* Update clone.html

* Update clone.html

* Update clone.html

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-04-03 15:27:13 -04:00
Arthur Hanson
2883fa14de Fixes #12074: Move automatic location assignment out of clean()
* 12074 fix full clean

* 12074 move device location setting to save from clean

* 12074 fix set location only if present in rack

* Update base.py

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-04-03 15:22:36 -04:00
Arthur
56d2a9aa11 12151 remove choice field str mapping for OpenAPI 2023-04-03 15:09:34 -04:00
jeremystretch
53abcc0f5c Closes #12136: Extend object count & list widgets to support filters 2023-04-03 15:02:11 -04:00
jeremystretch
0676ed45c7 Closes #12107: Document support for plugin-provided dashboard widgets 2023-04-03 14:15:18 -04:00
jeremystretch
872b70c2b5 Fixes #12145: Employ HTMXSelect widget to fix inclusion of <select> field values during form regeneration 2023-04-03 12:49:26 -04:00
jeremystretch
2805633b16 Fixes #12144: Ensure consistent treatment of context data when rendering config templates via UI & API 2023-04-03 09:50:07 -04:00
jeremystretch
f245f07fd9 Fixes #12146: Do not display object selector for disabled fields 2023-04-03 09:39:03 -04:00
kkthxbye
e966d1df47 Merge pull request #12139 from tobiasge/fix-data-source-logs
Fix #12138: Log correct count when files were deleted
2023-04-02 22:29:59 +02:00
kkthxbye
e4b2d87ce6 Merge pull request #12143 from tobiasge/fix-missing-s3backend
Fixes #12142: Add S3Backend to __all__
2023-04-02 22:28:08 +02:00
kkthxbye
b3a347e6fb Merge pull request #12141 from tobiasge/fix-typo-in-datasource
Fixes: #12140: Typo in Synchronized Data documentation
2023-04-02 22:24:41 +02:00
Tobias Genannt
e7d1a43541 Fixes #12142: Add S3Backend to __all__ 2023-04-01 11:28:33 +02:00
Tobias Genannt
5ff9483d13 Log correct count when files were deleted 2023-04-01 10:51:33 +02:00
Tobias Genannt
ac07b33602 Fixed typo in Synchronized Data documentation 2023-04-01 10:45:45 +02:00
jeremystretch
8d6c591535 Fixes #12103: Limit the types of objects available for object count & list widgets 2023-03-31 15:30:40 -04:00
jeremystretch
6a85c5b3ce Fixes #12115: Fix rendering config templates from a data file 2023-03-31 10:37:12 -04:00
jeremystretch
bd38b50e5e Fixes #12105: Prevent data sources from becoming stuck in syncing status when an exception is raised 2023-03-31 09:52:07 -04:00
jeremystretch
eb77c0e920 Fixes #12106: Fix exception when saving dashboard widget with minimum width/height 2023-03-31 09:34:50 -04:00
jeremystretch
198c004c1d Fixes #12108: Limit the draggable area of widgets to their headers 2023-03-31 09:26:58 -04:00
jeremystretch
730eb2e83b Fixes #12112: Do not link data source URL for local paths 2023-03-31 09:06:16 -04:00
jeremystretch
cdad50e051 Fixes #12109: Fix migration error when replicating more than 100 job results 2023-03-31 08:59:15 -04:00
jeremystretch
3264636b7a Changelog for #12084, #12095 2023-03-30 17:02:23 -04:00
gdprdatasubect
fbc23424a6 Update models.py
Change default MIME-Type as discussed under #12095
2023-03-30 16:58:41 -04:00
jeremystretch
6f08c4a4be Fixes #11846: Update database creation instructions for PostgreSQL 14+ 2023-03-30 16:35:56 -04:00
jeremystretch
0ac8419005 Fixes #12104: Restore copy-to-clipboard & footer navigation in docs 2023-03-30 16:29:54 -04:00
jeremystretch
f18f6e2856 Merge branch 'develop' into feature 2023-03-30 15:56:38 -04:00
jeremystretch
99b914689a Release v3.5-beta1 2023-03-30 15:55:12 -04:00
jeremystretch
b0f6cea4f3 Documentation cleanup 2023-03-30 15:45:32 -04:00
jeremystretch
bfd8e012dc Note breaking changes re: API schema 2023-03-30 14:36:02 -04:00
Arthur Hanson
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
jeremystretch
1be626e5ee Record OpenAPI spec for reference 2023-03-30 13:34:08 -04:00
jeremystretch
f36dfe3a11 Update changelog 2023-03-30 13:21:03 -04:00
jeremystretch
90527b799d #9416: Add view to reset user's dashboard 2023-03-30 12:46:06 -04:00
jeremystretch
6e6e8fa2d9 Set user agent for RSS feed requests 2023-03-30 12:44:36 -04:00
Arthur Hanson
e467589730 12084 saved filters (#12090)
* 12084 change back saved filter saving

* 12084 doc string

* 12084 add test

* Pass SavedFilter initial parameters as JSON & relocate test

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-03-30 11:00:40 -04:00
jeremystretch
424b336536 Fixes #12061: Improve handling of insufficient permissions for widget content 2023-03-30 10:03:41 -04:00
jeremystretch
06dec6a2d9 Fixes #12046: Fix URL parsing for git data sources 2023-03-30 09:07:56 -04:00
jeremystretch
f965608791 Fixes #11660: Catch RQ timeout exception when syncing data sources 2023-03-30 08:51:47 -04:00
jeremystretch
c4891fe105 Closes #12085: Add a file source view for reports 2023-03-29 16:58:35 -04:00
Jeremy Stretch
715592547c #12081: Script & report cleanup (#12091)
* start() and terminate() methods on Job should call save()

* Fix display of associated jobs

* Introduce get_latest_jobs() method on JobsMixin

* Update messaging when no reports/scripts exist

* Catch ImportErrors when rendering report/script lists

* Fix loading of nested modules

* Fix URLs for nested scripts/reports
2023-03-29 16:51:55 -04:00
jeremystretch
177668dca5 Update changelog for #9047 2023-03-29 08:31:40 -04:00
Daniel Sheppard
9d709c84e7 Closes: #9047 - Add Provider Accounts (#12057)
* #9047 - ProviderAccount

* #9047 - Move to new selector types

* #9047 - Re-introduce provider FK to Circuit model

* #9047 - Fix broken tests

* Misc cleanup

* Revert errant change

* Fix tests

* Update circuit filter form

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-03-29 08:27:11 -04:00
Jeremy Stretch
d2a694a878 Closes #12068: Establish a direct relationship from jobs to objects (#12075)
* Reference database object by GFK when running scripts & reports via UI

* Reference database object by GFK when running scripts & reports via API

* Remove old enqueue_job() method

* Enable filtering jobs by object

* Introduce ObjectJobsView

* Add tabbed views for report & script jobs

* Add object_id to JobSerializer

* Move generic relation to JobsMixin

* Clean up old naming
2023-03-28 15:47:09 -04:00
jeremystretch
15590f1f48 Merge branch 'develop' into feature 2023-03-28 14:19:08 -04:00
jeremystretch
0330c652bd PRVB 2023-03-28 14:13:39 -04:00
jeremystretch
5a6005cdfa Merge branch 'master' into develop 2023-03-28 14:09:47 -04:00
jeremystretch
4eaba7993f Release v3.4.7 2023-03-28 14:08:04 -04:00
kkthxbye
2840f9d71d Fixes #11991 - Add vdcs to InterfaceImportForm and InterfaceBulkEditForm (#11996)
* Add vdcs to InterfaceImportForm and InterfaceBulkEditForm

* Filter vdcs queryset by device when bulk importing interfaces
2023-03-28 14:08:04 -04:00
jeremystretch
9946ae2981 Update changelog for #11645, #12029, #12038 2023-03-28 14:08:04 -04:00
Abhimanyu Saharan
420ec6791f Updated _schedule_at to use local time when _interval is set (#12006)
* updated _schedule_at to use local time when _interval is set

* updated schedule_at to use local time when interval is set
2023-03-28 14:08:04 -04:00
Arthur
47234f1607 12038 show vc priority with placeholder 2023-03-28 14:08:04 -04:00
Arthur
b058bd9cea 12029 add description to virtual description add 2023-03-28 14:08:04 -04:00
jeremystretch
5b03636c88 Update changelog 2023-03-28 14:08:04 -04:00
jeremystretch
be55bb43ad #12058: Fix initial JSON population 2023-03-28 14:08:04 -04:00
Arthur
293afab730 12058 add clone to config context 2023-03-28 14:08:04 -04:00
Arthur Hanson
6b622fd9bf 11933 saved filters clone of content-types and add m2m field cloning (#12014)
* 11933 saved filters clone of content-types and add m2m field cloning

* Fix JSON rendering

* Add content_types to CustomLink.clone()

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-03-28 14:08:04 -04:00
Arthur
7280dfacab 12038 fix clone tag 2023-03-28 14:08:04 -04:00
Arthur
4428a446d0 12008 make export templates cloneable 2023-03-28 14:08:04 -04:00
Austin de Coup-Crank
2eedcac383 Fixes #11977: Multiple remote authentication backends (#12012)
* Add suppport for REMOTE_AUTH_BACKEND as iterable

* Closes #11977: Support for multiple auth backends

* Tweak list casting

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-03-28 14:08:04 -04:00
Arthur
35af1d7b61 12049 fix passsword typo 2023-03-28 14:08:04 -04:00
jeremystretch
1b92958870 Closes #11682: Remove lateral padding from highlighted text 2023-03-28 14:08:04 -04:00
Brian Candler
795669113f Improve error reporting for duplicate CSV column headings
Fixes #11990
2023-03-28 14:08:04 -04:00
kkthxbye-code
de57446f36 Use ssid for the string representation of WirelessLinks if available 2023-03-28 14:08:04 -04:00
kkthxbye-code
3b13cef0c8 Render the parameters column as JSON in SavedFiltersTable 2023-03-28 14:08:04 -04:00
kkthxbye-code
497f3145fa Add parameters to the SavedFilterTable 2023-03-28 14:08:04 -04:00
jeremystretch
f597b76ddc Fixes #11979: Correct URL for tags in route targets list 2023-03-28 14:08:04 -04:00
Daniel W. Anner
ebaac82560 Removed type2-ieee802.3at as per described in #11984 2023-03-28 14:08:04 -04:00
Ryan Merolle
371764fecd Add fieldsets functionality to scripts to allow for form field groupings (#11880)
* update script template

* update docs

* introduce default_fieldset

* correct custom script docs

* default to use fieldsets in scripts

* update scripts docs for new behavior

* Misc cleanup

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-03-28 14:08:04 -04:00
jeremystretch
f67deb0dea PRVB 2023-03-28 14:08:04 -04:00
jeremystretch
d3c5f1e744 Release v3.4.7 2023-03-28 13:46:43 -04:00
kkthxbye
b12551c64b Fixes #11991 - Add vdcs to InterfaceImportForm and InterfaceBulkEditForm (#11996)
* Add vdcs to InterfaceImportForm and InterfaceBulkEditForm

* Filter vdcs queryset by device when bulk importing interfaces
2023-03-28 13:20:23 -04:00
jeremystretch
9995fad513 Update changelog for #11645, #12029, #12038 2023-03-28 10:21:38 -04:00
Abhimanyu Saharan
1d2335d578 Updated _schedule_at to use local time when _interval is set (#12006)
* updated _schedule_at to use local time when _interval is set

* updated schedule_at to use local time when interval is set
2023-03-28 10:19:18 -04:00
Arthur
ad03061edf 12038 show vc priority with placeholder 2023-03-28 10:13:51 -04:00
Arthur
87eabdbffb 12029 add description to virtual description add 2023-03-28 10:10:05 -04:00
jeremystretch
19787dd21d Update changelog 2023-03-28 10:02:29 -04:00
jeremystretch
7d64e5bc62 #12058: Fix initial JSON population 2023-03-28 10:00:15 -04:00
Arthur
a2c7452f90 12058 add clone to config context 2023-03-28 09:56:06 -04:00
Arthur Hanson
654e32cbbe 11933 saved filters clone of content-types and add m2m field cloning (#12014)
* 11933 saved filters clone of content-types and add m2m field cloning

* Fix JSON rendering

* Add content_types to CustomLink.clone()

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-03-28 09:53:57 -04:00
Arthur
879aabe2f9 12038 fix clone tag 2023-03-28 09:48:05 -04:00
Arthur
835af32213 12008 make export templates cloneable 2023-03-28 09:45:44 -04:00
Austin de Coup-Crank
571d33e660 Fixes #11977: Multiple remote authentication backends (#12012)
* Add suppport for REMOTE_AUTH_BACKEND as iterable

* Closes #11977: Support for multiple auth backends

* Tweak list casting

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-03-28 08:44:24 -04:00
jeremystretch
61e2073775 #12067: Fix ordering for JobResult replication 2023-03-27 14:25:42 -04:00
jeremystretch
82080ef491 Remove the old JobResult model 2023-03-27 14:20:13 -04:00
jeremystretch
b3d2020045 Replicate JobResults to new Job model 2023-03-27 14:20:13 -04:00
jeremystretch
34236ff468 Update release notes 2023-03-27 14:20:13 -04:00
jeremystretch
7b258dc11f Rename JOBRESULT_RETENTION to JOB_RETENTION 2023-03-27 14:20:13 -04:00
jeremystretch
40572b543f Rename JobResult to Job and move to core 2023-03-27 14:20:13 -04:00
jeremystretch
669cfe8952 Closes #12062: Avoid caching invalid RSS feed content 2023-03-27 09:29:51 -04:00
jeremystretch
37aa07eea1 Clean up navigation menu 2023-03-24 22:01:41 -04:00
jeremystretch
ea1801bad3 Refactor extras.models 2023-03-24 21:25:22 -04:00
jeremystretch
5c0ce96b6f Reorganize management commands 2023-03-24 21:11:10 -04:00
Jeremy Stretch
f7a2eb8aef Closes #11890: Sync/upload reports & scripts (#12059)
* Initial work on #11890

* Consolidate get_scripts() and get_reports() functions

* Introduce proxy models for script & report modules

* Add add/delete views for reports & scripts

* Add deletion links for modules

* Enable resolving scripts/reports from module class

* Remove get_modules() utility function

* Show results in report/script lists

* Misc cleanup

* Fix file uploads

* Support automatic migration for submodules

* Fix module child ordering

* Template cleanup

* Remove ManagedFile views

* Move is_script(), is_report() into extras.utils

* Fix URLs for nested reports & scripts

* Misc cleanup
2023-03-24 21:00:36 -04:00
Arthur
96eb89a469 12049 fix passsword typo 2023-03-24 20:19:58 -04:00
jeremystretch
9c5f4163af Update release notes 2023-03-23 08:44:42 -04:00
Arthur Hanson
c57d71a9db 11291 optimize GraphQL queries (#11943)
* 11291 initial optimize graphql queries

* 11291 add optimizer to schemas

* 11291 cleanup fields.py

* 11291 fix fragment query
2023-03-23 08:42:18 -04:00
jeremystretch
e176c7d906 #9416: cleanup & widget improvements 2023-03-22 15:44:01 -04:00
jeremystretch
a098c3b0c1 #11558: Introduce GIT_PATH configuration setting 2023-03-22 11:25:03 -04:00
jeremystretch
2fc79af4c7 #11558: Cleanup & docs 2023-03-22 09:20:44 -04:00
jeremystretch
00088cba6d #11559: Add device config API endpoint & cleanup 2023-03-21 17:00:06 -04:00
jeremystretch
d6afc125e5 #11693: Clean up ExportTemplate model form 2023-03-21 14:15:37 -04:00
jeremystretch
c35e7b8ee5 #11584: Add bulk edit view & tests 2023-03-21 13:47:08 -04:00
jeremystretch
1e493f6f28 #10729: Cleanup 2023-03-21 09:36:21 -04:00
jeremystretch
402d5d955f Documentation cleanup 2023-03-20 16:37:47 -04:00
jeremystretch
64f6eea579 #10054: Trigger change event after updating form field value 2023-03-20 16:06:06 -04:00
jeremystretch
9ce29f9edc #9653: Cleanup 2023-03-20 16:00:08 -04:00
jeremystretch
ecb8f1599d #11558: Set data_synced time under model's clean() 2023-03-20 15:45:48 -04:00
jeremystretch
2b3b9517d2 #9073: Fix form behavior when disassociating a ConfigContext from a DataFile 2023-03-20 15:42:23 -04:00
jeremystretch
08bdb54cb4 #11558: Disable sync button if RQ worker not running 2023-03-20 15:12:11 -04:00
jeremystretch
13d604d44e Fix rendering of form textareas 2023-03-20 13:18:09 -04:00
jeremystretch
9219397208 #8958: Declare constants for event types 2023-03-20 13:04:05 -04:00
jeremystretch
6e93c3574c #8749: Cleanup 2023-03-20 12:42:26 -04:00
jeremystretch
0455654f71 #8272: Cleanup & add filter for bridge_id 2023-03-20 11:40:45 -04:00
jeremystretch
3b9fda0169 Merge branch 'develop' into feature 2023-03-20 08:54:22 -04:00
jeremystretch
8d25d7812c Closes #11682: Remove lateral padding from highlighted text 2023-03-17 16:04:55 -04:00
jeremystretch
0ddd7b0e45 Disable bulk update test for L2VPN terminations 2023-03-17 10:09:57 -04:00
Jeremy Stretch
206d578bc3 Closes #10242: Redirect to filtered objects list after bulk import (#12001)
* Redirect user to filtered objects list after bulk import

* Remove obsolete table attribute from bulk import views
2023-03-17 09:23:40 -04:00
Brian Candler
a864e8127b Improve error reporting for duplicate CSV column headings
Fixes #11990
2023-03-17 09:21:40 -04:00
kkthxbye-code
fc482ed096 Use ssid for the string representation of WirelessLinks if available 2023-03-17 09:19:07 -04:00
jeremystretch
6e4c4c4342 Closes #11494: Enable filtering objects by create/update request IDs 2023-03-16 16:29:43 -04:00
Arthur
5b81986bb3 11955 remove csvdatafield csvfilefield 2023-03-16 15:17:37 -04:00
kkthxbye-code
85f40bcbe0 Render the parameters column as JSON in SavedFiltersTable 2023-03-16 09:12:48 -04:00
kkthxbye-code
e7ed280790 Add parameters to the SavedFilterTable 2023-03-16 09:12:48 -04:00
jeremystretch
3d14a79428 Fixes #11979: Correct URL for tags in route targets list 2023-03-16 08:20:52 -04:00
Daniel W. Anner
d93a24d0bb Removed type2-ieee802.3at as per described in #11984 2023-03-16 08:16:49 -04:00
jeremystretch
43bba935c3 Remove unused template 2023-03-15 14:08:56 -04:00
jeremystretch
da7293524e #10054: Simplify cable forms 2023-03-15 14:01:01 -04:00
Jeremy Stretch
cacc418cd5 Closes: #11781: Add support for Amazon S3 remote data sources (#11986)
* Add boto3 as a dependency

* Add Amazon S3 backend for remote data sources

* Update docs to include Amazon S3 support
2023-03-15 12:11:52 -04:00
Ryan Merolle
4286d74d44 Add fieldsets functionality to scripts to allow for form field groupings (#11880)
* update script template

* update docs

* introduce default_fieldset

* correct custom script docs

* default to use fieldsets in scripts

* update scripts docs for new behavior

* Misc cleanup

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-03-14 15:50:49 -04:00
jeremystretch
5cd3ad0b12 Cleanup & docs 2023-03-14 15:44:16 -04:00
Arthur
f7150645a1 8749 clone custom fields 2023-03-14 15:44:16 -04:00
jeremystretch
ef7c66de34 Fix CSV import tests 2023-03-14 15:31:26 -04:00
jeremystretch
1446b07f8c Closes #11780: Enable loading import data from remote sources 2023-03-14 14:53:26 -04:00
Jeremy Stretch
8bd0a2ef9d Closes #11826: RSS feed widget (#11976)
* Add feedparser as a dependency

* Introduce RSSFeedWidget

* Clean up widget templates
2023-03-14 11:59:27 -04:00
jeremystretch
af63ac693e Closes #11893: Convert ChangeLogWidget for use with all models 2023-03-14 08:39:18 -04:00
jeremystretch
6a696d9ed7 Closes #11968: Add navigation menu buttons to create device & VM components 2023-03-13 15:15:38 -04:00
Jeremy Stretch
d1f76bec37 Closes #10054: Implement advanced UI controls for object selection (#11952)
* WIP

* WIP

* WIP

* Make object selector functional

* Replace extraneous form fields with selector widgets

* Avoid overlap with filterset field names

* Show checkmarks next to visibile filters

* Update results automatically when searching

* Include selector for device/VM component parent fields

* Use selector for filtering VLAN group/site

* Limit selector to 100 results
2023-03-13 12:44:26 -04:00
jeremystretch
016eff52c0 PRVB 2023-03-13 11:59:57 -04:00
jeremystretch
2a9178af12 Merge branch 'develop' into feature 2023-03-13 11:58:37 -04:00
Jeremy Stretch
6b6ea36b4c Merge pull request #11965 from netbox-community/develop
Release v3.4.6
2023-03-13 11:49:41 -04:00
jeremystretch
520493c714 Release v3.4.6 2023-03-13 11:16:31 -04:00
kkthxbye
e459c46dad Fixes #11929 - Strip whitespace from csv headers (#11956)
* Strip whitespace from csv headers

* Move strip() call to parse_csv()

---------

Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
2023-03-13 10:55:18 -04:00
jeremystretch
a71a59c088 Fixes #11631: Fix filtering changelog & journal entries by multiple content type IDs 2023-03-13 10:00:05 -04:00
jeremystretch
267a14264b Fixes #11927: Correct loading of plugin resources with custom paths 2023-03-13 08:52:38 -04:00
jeremystretch
065738473e Changelog for #11850, #11851 2023-03-13 08:38:57 -04:00
kkthxbye-code
f698c42c41 Fix loading of CSV files with BOM 2023-03-13 08:13:59 -04:00
rmanyari
ab303db3dd Closes #11851: Add family field to IPAddress queries in GraphQL (#11870)
* Closes #11851: Add family field to IPAddress queries in GraphQL

* Add family field support to Prefix and Aggregate, fix tests
2023-03-10 14:48:45 -05:00
rganascim
07b0b93256 Closes #11638: add http redirect to apache 2023-03-10 09:55:22 -05:00
jeremystretch
a717ddf5e6 Changelog for #8272, #8958 2023-03-10 09:00:28 -05:00
Jeremy Stretch
d880875e67 Changelog for #11294, #11819 2023-03-09 08:37:03 -05:00
Aron Bergur Jóhannsson
fa60f9d2a8 Closes #11294: Markdown Preview (#11894)
* MarkdownWidget

* Change border and color of active markdown tab

* Fix template name typo

* Add render markdown endpoint

* Static assets for markdown widget

* widget style fix and unique ids based on name

* Replace SmallTextArea with SmallMarkdownWidget

* Clear innerHTML before swapping

* render markdown directly in template

* change render markdown view path

* remove small markdown widget

* Simplify rendering logic

* Use a form to clean input Markdown data

---------

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2023-03-09 08:21:13 -05:00
jeremystretch
e015da9e4c Undo change to default status for object type_* fields on Webhook 2023-03-07 18:01:32 -05:00
jeremystretch
4de64d783e Add trigger_webhooks() to JobResult 2023-03-07 18:01:32 -05:00
jeremystretch
a8c331f88a Replace JobResult.set_status() with terminate() 2023-03-07 18:01:32 -05:00
jeremystretch
697feed257 Add type_job_start & type_job_end to Webhook 2023-03-07 18:01:32 -05:00
kkthxbye-code
3260ae76f1 Move update_interface_bridges to a utility function 2023-03-07 18:00:24 -05:00
kkthxbye-code
a74ae46f86 Add bridge to InterfaceTemplate 2023-03-07 18:00:24 -05:00
Abhimanyu Saharan
33286aad39 added the missing filterset 2023-03-07 17:42:23 -05:00
jeremystretch
d48a8770de Fixes #11903: Fix escaping of return URL values for action buttons in tables 2023-03-07 09:34:25 -05:00
Charly Forot
ee5b707e68 README.md: typo
infrasucture -> infrastructure
2023-03-06 10:49:02 -05:00
jose_d
d29a4a60f9 README.md: typo 2023-03-03 11:29:47 -05:00
Ximalas
07b39fe44a Update choices.py: Adding Cisco StackWise-1T (#11886)
Cisco Catalyst 9300X Series adds Cisco StackWise-1T.
https://www.cisco.com/c/en/us/products/collateral/switches/catalyst-9300-series-switches/nb-06-cat9300-ser-data-sheet-cte-en.html
2023-03-02 08:59:08 -05:00
jeremystretch
e270cb20ba Changelog for #11470, #11871 2023-03-01 17:34:57 -05:00
jeremystretch
c44eb65993 Closes #11325: Move help_texts from model forms to models 2023-03-01 17:31:54 -05:00
rmanyari
6640fc9eb7 Fixes #11470: Validation and user friendly message on invalid address query param (#11858)
* Fixes #11470: Validation and user friendly message on invalid address query param

* Update invalid input handling to return empty set instead of raising exception
2023-03-01 16:49:40 -05:00
Daniel W. Anner
189668fbfb Implemented PoE choice for IEEE 802.3az 2023-03-01 15:30:19 -05:00
jeremystretch
536b46158a Add mark_utilized to IPRange 2023-03-01 09:27:06 -05:00
jeremystretch
8a08d3621b Closes #10374: Require unique tenant names & slugs per group (not globally) 2023-02-28 20:03:41 -05:00
Jeremy Stretch
5517963b24 Closes #10729: Add date & time custom field type (#11857)
* Add datetime custom field type

* Update custom field tests
2023-02-28 13:33:40 -05:00
Jeremy Stretch
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
jeremystretch
c9e5a4c996 Changelog for #11011 2023-02-27 15:38:21 -05:00
jeremystretch
ed5fd140eb Optimize shallow_compare_dict() 2023-02-27 15:38:21 -05:00
aron bergur jóhannsson
4f12eccde6 Update toggle caption for vif 2023-02-27 14:53:52 -05:00
aron bergur jóhannsson
1f0db6d2fa include static assets 2023-02-27 14:53:52 -05:00
aron bergur jóhannsson
eed6990b39 Closes #11011: Hide virtual interfaces 2023-02-27 14:53:52 -05:00
jeremystretch
a554164d1d Changelog for #10058, #11565, #11758, #11817 2023-02-27 14:46:03 -05:00
jeremystretch
6ea30798bf #10058: Enable primary IP search for virtual machines too 2023-02-27 14:41:34 -05:00
Pieter Lambrecht
3418b7adf6 remove DeviceIndex search for ipaddresses 2023-02-27 14:36:56 -05:00
Pieter Lambrecht
88d5119c59 Search device by primary IP address 2023-02-27 14:36:56 -05:00
Marc
6e7d2f53aa Change Interpreter in shebang to python3 2023-02-27 14:09:10 -05:00
Simon Toft
559a318584 Fixes #11565 - Populate custom field defaults when creating FHRP groups with VIP 2023-02-27 14:02:22 -05:00
Sebastian Himmler
67499cbf06 add conntected_enpoints property to graphql 2023-02-27 12:52:05 -05:00
Rafael Ganascim
0744ff2fa0 Fixes #11758 - replace unsafe chars in menu label (#11831)
* Fixes #11758 - replace unsafe chars in menu label

* Fixes #11758 - replace unsafe chars in menu label
2023-02-27 11:42:30 -05:00
jeremystretch
cfa6b28ceb Closes #11807: Restore default page size when navigating between views 2023-02-27 09:22:48 -05:00
jeremystretch
ed77c03830 Fixes #11796: When importing devices, restrict rack by location only if the location field is specified 2023-02-27 08:26:32 -05:00
jeremystretch
e4e4d0c0ec Fixes #11753: Avoid re-initializing SlimSelects 2023-02-25 12:09:06 -05:00
jeremystretch
64291f731b Update change log 2023-02-24 16:46:01 -05:00
Jeremy Stretch
084a2cc52c Closes #9416: Dashboard widgets (#11823)
* Replace masonry with gridstack

* Initial work on dashboard widgets

* Implement function to save dashboard layout

* Define a default dashboard

* Clean up widgets

* Implement widget configuration views & forms

* Permit merging dict value with existing dict in user config

* Add widget deletion view

* Enable HTMX for widget configuration

* Implement view to add dashboard widgets

* ObjectCountsWidget: Identify models by app_label & name

* Add color customization to dashboard widgets

* Introduce Dashboard model to store user dashboard layout & config

* Clean up utility functions

* Remove hard-coded API URL

* Use fixed grid cell height

* Add modal close button

* Clean up dashboard views

* Rebuild JS
2023-02-24 16:04:00 -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
jeremystretch
927371b908 Adjust inspector to accommodate non-detail views 2023-02-24 13:54:39 -05:00
jeremystretch
561f1eadfc PRVB 2023-02-21 09:03:19 -05:00
Jeremy Stretch
6638fd88b4 Merge pull request #11793 from netbox-community/develop
Release v3.4.5
2023-02-21 09:01:01 -05:00
jeremystretch
c280ca35d6 Release v3.4.5 2023-02-21 08:45:52 -05:00
jeremystretch
3586cf79d4 Arrange parameters alphabetically 2023-02-21 08:42:39 -05:00
jeremystretch
972ba7bfdc #11685: Fix migration 2023-02-20 10:27:30 -05:00
jeremystretch
5a4d8a7107 Closes #11787: Rebuild any missing search cache entires after upgrade 2023-02-20 09:49:13 -05:00
jeremystretch
3e946c78d0 #11685: Clear cached search records for relevant IPAM objects 2023-02-20 09:02:58 -05:00
jeremystretch
0855ff8b42 Skip clearing cache when handling new objects 2023-02-20 08:17:39 -05:00
jeremystretch
574b5551a0 Clean up model & registry documentation 2023-02-19 20:09:52 -05:00
jeremystretch
c109daf1d8 Clean up the application registry 2023-02-19 20:09:52 -05:00
jeremystretch
c84f0de8f8 #11625: Employ HTMX form rendering for device & VM interfaces 2023-02-19 20:09:52 -05:00
jeremystretch
368e774ceb Add index for (source, path) to DataFile 2023-02-19 20:09:52 -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
jeremystretch
db4e00d394 #11765: Avoid setting netbox-static-select on SelectMultiple with size 2023-02-19 20:09:52 -05:00
Jeremy Stretch
b9bd96f0c7 Closes #11765: Remove StaticSelect & StaticSelectMultiple (#11767)
* Remove StaticSelect, StaticSelectMultiple form widgets

* Tag custom ChoiceField, MultipleChoiceField classes for removal in v3.6
2023-02-19 20:09:51 -05:00
kkthxbye-code
c73829fe92 Fix issues with the ContactAssignmentListView 2023-02-19 20:09:51 -05:00
kkthxbye-code
81b8046d1d Fixes #9653 - Add default_platform to DeviceType 2023-02-19 20:09:51 -05:00
jeremystretch
a1c9f7a2c6 DataFile should not inherit from ChangeLoggingMixin 2023-02-19 20:09:51 -05:00
jeremystretch
62509c20da Check for change records only if objects being deleted support change logging 2023-02-19 20:09:51 -05:00
jeremystretch
96a79c2126 Closes #11737: ChangeLoggedModel should inherit WebhooksMixin 2023-02-19 20:09:51 -05:00
kkthxbye-code
8d68b6a2e6 Fixes #11694 - Remove obsolete SmallTextarea widget 2023-02-19 20:09:51 -05:00
jeremystretch
c8faca01f1 Changelog for #11693 2023-02-19 20:09:51 -05:00
jeremystretch
b267cbae36 Merge migrations 2023-02-19 20:09:51 -05:00
jeremystretch
ac87ce733d Closes #11693: Enable remote data synchronization for export templates 2023-02-19 20:09:51 -05:00
Jeremy Stretch
678a7d17df Closes #9073: Remote data support for config contexts (#11692)
* WIP

* Add bulk sync view for config contexts

* Introduce 'sync' permission for synced data models

* Docs & cleanup

* Remove unused method

* Add a REST API endpoint to synchronize config context data
2023-02-19 20:09:51 -05:00
jeremystretch
664132281e Fixes #11659: Include all relevant DataFile attributes during bulk update 2023-02-19 20:09:51 -05:00
jeremystretch
0be633d624 #11558: Fix URL display under data source view 2023-02-19 20:09:51 -05:00
Jeremy Stretch
d8784d4155 Closes #11558: Add support for remote data sources (#11646)
* WIP

* WIP

* Add git sync

* Fix file hashing

* Add last_synced to DataSource

* Build out UI & API resources

* Add status field to DataSource

* Add UI control to sync data source

* Add API endpoint to sync data sources

* Fix display of DataSource job results

* DataSource password should be write-only

* General cleanup

* Add data file UI view

* Punt on HTTP, FTP support for now

* Add DataSource URL validation

* Add HTTP proxy support to git fetcher

* Add management command to sync data sources

* DataFile REST API endpoints should be read-only

* Refactor fetch methods into backend classes

* Replace auth & git branch fields with general-purpose parameters

* Fix last_synced time

* Render discrete form fields for backend parameters

* Enable dynamic edit form for DataSource

* Register DataBackend classes in application registry

* Add search indexers for DataSource, DataFile

* Add single & bulk delete views for DataFile

* Add model documentation

* Convert DataSource to a primary model

* Introduce pre_sync & post_sync signals

* Clean up migrations

* Rename url to source_url

* Clean up filtersets

* Add API & filterset tests

* Add view tests

* Add initSelect() to HTMX refresh handler

* Render DataSourceForm fieldsets dynamically

* Update compiled static resources
2023-02-19 20:09:51 -05:00
jeremystretch
e65b2a9fb3 Closes #11625: Add HTMX support to ObjectEditView 2023-02-19 20:09:51 -05:00
jeremystretch
7accdd52d8 Closes #11611: Refactor API viewset classes and introduce NetBoxReadOnlyModelViewSet 2023-02-19 20:09:51 -05:00
jeremystretch
2669068429 #11517: Standardize display of contact assignments 2023-02-19 20:09:51 -05:00
jeremystretch
157bf89e89 Closes #11584: Add a list view for contact assignments 2023-02-19 20:09:51 -05:00
jeremystretch
6e264562ee Use embedded tables for importing/export VRFs & L2VPNs under route target view 2023-02-19 20:09:51 -05:00
jeremystretch
2525eefefd Move rack reservations panel to separate tab 2023-02-19 20:09:51 -05:00
jeremystretch
0f6995e92a Use embedded table to show assigned services under object view 2023-02-19 20:09:51 -05:00
jeremystretch
8f7c100e22 Standard related object links across all models 2023-02-19 20:09:51 -05:00
jeremystretch
48e5b395b2 Standardize linking to related objects in tables 2023-02-19 20:09:51 -05:00
jeremystretch
94797bb956 Standardize related model display for organizational models 2023-02-19 20:09:51 -05:00
jeremystretch
91b81d51da Standardize related model display for nested models 2023-02-19 20:09:51 -05:00
jeremystretch
0c9e7aa074 Clean up related objects for sites, tenants 2023-02-19 20:09:51 -05:00
jeremystretch
48d6d7279d Changelog for #11440 2023-02-19 20:09:51 -05:00
kkthxbye
8e94eb67d2 Add the enabled filed to InterfaceTemplate 2023-02-19 20:09:51 -05:00
Jeremy Stretch
1a2dae3471 Closes #8184: Enable HTMX for embedded tables (#11518)
* Enable HTMX rendering for embedded tables

* Start converting embedded tables to use HTMX (WIP)

* Additional table conversions (WIP)

* Standardize HTMX usage for nested group models

* Enable HTMX for additional emebedded tables

* Fix HTMX table rendering for ObjectChildrenView

* Standardize usage of inc/panel_table.html

* Hide selection boxes in embedded tables
2023-02-19 20:09:51 -05:00
jeremystretch
f74a2536f1 Closes #11254: Introduce the X-Request-ID HTTP header to annotate the unique ID of each request for change logging 2023-02-19 20:09:51 -05:00
jeremystretch
ef3ac25406 Remove old feature version notices 2023-02-19 20:09:51 -05:00
jeremystretch
0b4ea14e9a Closes #11489: Refactor & combine core middleware 2023-02-19 20:09:51 -05:00
jeremystretch
2381317eb3 Closes #10604: Remove unused extra_tabs block from object.html generic template 2023-02-19 20:09:51 -05:00
jeremystretch
e19ce69238 Closes #10923: Remove unused NetBoxModelCSVForm class 2023-02-19 20:09:51 -05:00
jeremystretch
cd09501d4d #11685: Omit no-op migration 2023-02-19 20:08:57 -05:00
jeremystretch
e635e3e959 Fixes #11658: Remove reindex command call from search migration 2023-02-19 18:57:27 -05:00
jeremystretch
9efc4689cc Changelog for #11685 2023-02-19 18:57:27 -05:00
kkthxbye-code
25278becef Change Prefix and Aggregate search index weights to better order search results. 2023-02-19 18:50:24 -05:00
kkthxbye-code
fc7cb106c1 Address feedback 2023-02-19 18:50:24 -05:00
kkthxbye-code
18ea7d1e13 pep8 fixes 2023-02-19 18:50:24 -05:00
kkthxbye-code
eed1b8f412 Create CachedValueField to contain search specific lookups 2023-02-19 18:50:24 -05:00
kkthxbye-code
a61e7e7c04 Fix typo in search query 2023-02-19 18:50:24 -05:00
kkthxbye-code
ce166b12ce Proof of concept for showing containing prefixes when searching for ip-addresses. 2023-02-19 18:50:24 -05:00
jeremystretch
315371bf7c Fixes #11786: List only applicable object types in form widget when filtering custom fields 2023-02-19 16:17:57 -05:00
jeremystretch
afc752b4ce Fixes #11723: Circuit terminations should link to their associated circuits (rather than site or provider network) 2023-02-17 21:31:19 -05:00
jeremystretch
126f9ba05f Raise stale timers from 60/30 to 90/30 2023-02-17 16:57:52 -05:00
jeremystretch
c031951f4b Closes #11110: Add start_address and end_address filters for IP ranges 2023-02-17 16:50:10 -05:00
jeremystretch
c36e7a1d0b Update introduction doc 2023-02-17 10:11:39 -05:00
jeremystretch
3a4fee4e6e Changelog for #11226, #11335, #11473, #11592 2023-02-16 20:15:48 -05:00
Aron Bergur Jóhannsson
2db181ea49 Closes #11592: Expose FILE_UPLOAD_MAX_MEMORY_SIZE as a setting (#11742)
* Closes #11592: Expose FILE_UPLOAD_MAX_MEMOMORY_SIZE as a setting

* change configuration settings to alphabetic order

* Small example and documentation

---------

Co-authored-by: aron bergur jóhannsson <aronnemi@gmail.com>
2023-02-16 11:26:22 -05:00
aron bergur jóhannsson
eee1a0e10a change empty list to qs.none() 2023-02-16 11:06:57 -05:00
aron bergur jóhannsson
9594049804 Fixes #11473 graphql invalid tag filter returns all devices/interfaces 2023-02-16 11:06:57 -05:00
kkthxbye-code
c78022a74c Change the way we invalidate the module cache to support reloading code from subpackages 2023-02-16 10:50:38 -05:00
Jeremy Stretch
3150c1f8b3 Changelog for #11459, #11711 2023-02-13 17:58:41 -05:00
Jeremy Stretch
9f91b89467 #11711: Use CSVModelChoiceField for custom object fields during CSV import 2023-02-13 17:53:01 -05:00
kkthxbye
d748851027 Fixes #11711 - Use CSVModelMultipleChoiceField when importing custom multiple object fields (#11712)
* Fixes #11711 - Use CSVModelMultipleChoiceField when importing custom multiple object fields

* Fix pep8

---------

Co-authored-by: kkthxbye-code <>
2023-02-13 17:49:08 -05:00
kkthxbye
df499ea8ac Fixes #11459 - Allow using null in conditions (#11722)
* Fixes #11459 - Allow using null in conditions
- Update docs to reflect this
- Change docs example from primary_ip to primary_ip4 as computed properties are not serialized when queuing webhooks

* Update netbox/extras/conditions.py

---------

Co-authored-by: Simon Toft <SITO@telenor.dk>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2023-02-13 17:44:35 -05:00
jeremystretch
b5da383a17 Changelog for #11032, #11582, #11601 2023-02-08 14:56:14 -05:00
kkthxbye-code
f9237285fd Fixes #11601 - Add partial lookup to IPRangeFilterSet 2023-02-08 14:50:22 -05:00
kkthxbye-code
3c970c331c Fixes #11582: Fix missing VC form errors
### Fixes: #11582

Not sure if this is the correct fix or not. The reason that the custom field errors were not shown is that messages.html only shows non_field_errors if the form passed to the context is named form. This is probably an issue in more places, but not sure how to make it generic. A change to messages.html would also need to support formsets.

Any input appreciated @jeremystretch or @arthanson
2023-02-08 14:40:46 -05:00
kkthxbye
91705aa9fd Fixes #11032 - Replication fields broken in custom validation (#11698)
* Fixes #11032 - Replication fields broken in custom validation

* Use getattr instead of hasattr to make sure custom validation is triggered as normal

---------

Co-authored-by: kkthxbye-code <>
2023-02-08 14:36:20 -05:00
jeremystretch
56c7a238a4 Fixes #11683: Fix CSV header attribute detection when auto-detecting import format 2023-02-07 17:24:26 -05:00
jeremystretch
3f28d6aef3 Add step for creating search index 2023-02-07 16:55:50 -05:00
jeremystretch
edbd597bf2 Update housekeeping command docs 2023-02-07 16:52:54 -05:00
jeremystretch
5e1bb20f32 Display login message as success 2023-02-07 16:49:07 -05:00
jeremystretch
7ebfa4c1d1 PRVB 2023-02-02 15:41:24 -05:00
Jeremy Stretch
65417dbf9e Merge pull request #11655 from netbox-community/develop
Release v3.4.4
2023-02-02 15:39:38 -05:00
jeremystretch
37d0135cab Release v3.4.4 2023-02-02 15:24:54 -05:00
Maximilian Wilhelm
699edd049c Closes #11152: Add support to abort custom script gracefully (#11621)
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2023-02-02 15:22:55 -05:00
jeremystretch
95b2acb603 Fixes #11650: Display error message when attempting to create device component with duplicate name 2023-02-02 14:59:16 -05:00
jeremystretch
98a2f3e497 Refresh the README 2023-02-02 14:18:32 -05:00
Abhimanyu Saharan
fb2771370c handled scripts error when only interval is used 2023-02-02 10:25:19 -05:00
jeremystretch
a137cd6cbe Fixes #11635: Pre-populate assigned VRF when following "first available IP" link from prefix view 2023-02-01 12:28:54 -05:00
Arthur
10e27cfa00 11620 fix interface poe type filter 2023-02-01 10:24:20 -05:00
jeremystretch
46ede62f3f Fix rendering of example code 2023-01-30 10:25:20 -05:00
jeremystretch
e7ad6eeb74 Fixes #11613: Correct plugin import logic fix from #11267 2023-01-27 19:56:12 -05:00
jeremystretch
892fd95b5f Update NetBox Cloud link 2023-01-27 16:46:49 -05:00
jeremystretch
0da518e83d Changelog for #11267 2023-01-27 16:45:20 -05:00
Jeremy Stretch
fbc9fea0a5 Fixes #11267: Avoid catching ImportError exceptions when loading plugins (#11566)
* Avoid catching ImportErrors when loading plugin URLs

* Avoid catching ImportErrors when loading plugin resources
2023-01-27 16:44:10 -05:00
jeremystretch
ccc108a217 Closes #11598: Add buttons to easily switch between rack list and elevations views 2023-01-26 10:53:59 -05:00
jeremystretch
22a9df82e6 Closes #11554: Add module types count to manufacturers list 2023-01-26 08:46:25 -05:00
jeremystretch
9cb75e9834 Closes #11585: Add IP address filters for services 2023-01-25 21:25:25 -05:00
jeremystretch
55b1549895 Closes #10762: Permit selection custom fields to have only one choice 2023-01-25 10:27:05 -05:00
jeremystretch
6f74c5ec03 Fixes #11528: Show edit/delete buttons in user tokens table 2023-01-25 10:09:37 -05:00
jeremystretch
b8de9c0875 Fixes #11528: Permit import of devices using uploaded file 2023-01-25 09:55:45 -05:00
jeremystretch
d5ccda355f Fixes #11562: Correct ordering of virtual chassis interfaces with duplicate names 2023-01-24 15:44:02 -05:00
jeremystretch
b79a2976f7 Closes #10888, #10889: Add supplementary notes to installation docs 2023-01-24 14:40:09 -05:00
jeremystretch
39087d10eb Add NetBox Labs as a sponsor 2023-01-23 10:44:42 -05:00
jeremystretch
6a793087b4 Reference GitHub advisory reporting 2023-01-23 10:23:49 -05:00
jeremystretch
0f9a303963 Changelog for #11487 2023-01-23 10:21:11 -05:00
Arthur Hanson
eca624b13d 11487 remove set null from read-only custom fields bulk edit (#11552)
* 11487 remove set null from read-only custom fields bulk edit

* 11487 removes unreleased sentry-sdk
2023-01-23 08:48:14 -05:00
jeremystretch
a4d8169df8 Changelog for #11537 2023-01-20 16:48:22 -05:00
jeremystretch
5f7e310305 Fixes #11555: Avoid inadvertent interpretation of search query as regular expression under global search 2023-01-20 16:47:19 -05:00
jeremystretch
d5e6829eff PRVB 2023-01-20 14:21:03 -05:00
Jeremy Stretch
504800a7db Merge pull request #11551 from netbox-community/develop
Release v3.4.3
2023-01-20 14:19:15 -05:00
jeremystretch
97723b1f96 Correct pinned sentry-sdk version 2023-01-20 13:53:28 -05:00
jeremystretch
5911041777 #11516: Tweak fix to ensure proper highlighting 2023-01-20 13:43:47 -05:00
jeremystretch
fcd0481b09 Release v3.4.3 2023-01-20 13:10:21 -05:00
jeremystretch
cc350165dd Fixes #11544: Catch ValidationError exception when filtering by invalid MAC address 2023-01-20 12:06:34 -05:00
Arthur
db7e1b8a97 11537 remove connection from power feed table 2023-01-20 11:52:56 -05:00
jeremystretch
188f773081 Changelog for #11118, #11227, #11228 2023-01-20 10:24:57 -05:00
reishoku
6271f81cff Add 800GbE interface support: QSFP-DD OSFP (#11429)
Signed-off-by: KOSHIKAWA Kenichi <reishoku.misc@pm.me>

Signed-off-by: KOSHIKAWA Kenichi <reishoku.misc@pm.me>
2023-01-20 10:09:53 -05:00
jeremystretch
4bfc3bf412 #11118: Extend L2VPN filters to device & VM interfaces 2023-01-20 09:58:58 -05:00
Abhimanyu Saharan
d5a92104d1 added l2vpn_termination on vlan filterset (#11501)
* added l2vpn_termination on vlan filterset

* added l2vpn to vlan filterset
2023-01-20 09:34:41 -05:00
Abhimanyu Saharan
ddd4f805a5 added device and vm tab on device role (#11500)
* added vm tab on device role

* added blank lines

* updated templates

* fixed lint issues
2023-01-20 09:30:18 -05:00
Jeremy Stretch
a1c1b19482 Changelog for #11433, #11516 2023-01-17 21:22:02 -05:00
Abhimanyu Saharan
426bc15065 fixed AttributeError: object of class Schema has no attribute fields 2023-01-17 21:12:06 -05:00
kkthxbye-code
df5febf6e7 Add re.escape to highlight_string 2023-01-17 20:42:17 -05:00
jeremystretch
9e09e46700 Fixes #11522: Correct tag links under contact & tenant list views 2023-01-17 10:32:22 -05:00
jeremystretch
ba0e9bb1d2 Changelog for #11488, #11497 2023-01-17 10:27:53 -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
kkthxbye-code
fb3d1ef399 Check for the extras.run_script permission when running scripts via. the API 2023-01-17 10:13:18 -05:00
jeremystretch
d7c37d9dd6 Fixes #11483: Apply configured formatting to custom date fields 2023-01-13 08:23:57 -05:00
jeremystretch
24de404fbc Changelog for #11416 2023-01-12 09:37:52 -05:00
jeremystretch
8565d175f9 Fixes #11467: Correct count on interfaces tab when viewing a VC master device 2023-01-12 09:05:55 -05:00
Arthur
8d9e151030 11416 fix circuit termination deletion 2023-01-11 16:09:39 -05:00
jeremystretch
758c5347fb Fixes #10201: Fix AssertionError exception when removing some terminations from an existing cable 2023-01-11 14:42:25 -05:00
Jonathan Senecal
1e54eee631 Update ipaddress.md
Missing `ipam` before `IPAddress.status`
2023-01-11 09:45:28 -05:00
jeremystretch
448760a2fe Add items to contributing guide 2023-01-10 15:47:33 -05:00
jeremystretch
e44b22f7d1 Refresh contributing guide 2023-01-10 08:41:06 -05:00
jeremystretch
30379c3f52 Changelog for #11438, #11444 2023-01-09 10:58:23 -05:00
jeremystretch
8729d60c1c Fixes #11402: Avoid LookupError exception when running scripts with commit disabled 2023-01-09 10:57:13 -05:00
kkthxbye
effcdb8723 Snapshot DeviceBay before populating/depopulating. 2023-01-09 08:39:54 -05:00
kkthxbye
1354947434 Get the queue from QUEUE_MAPPINGS when deleting JobResults 2023-01-09 08:22:40 -05:00
jeremystretch
864ce0088e Changelog for #10486, #11210, #11340, #11379 2023-01-06 16:25:41 -05:00
jeremystretch
93ac0b77c9 Fixes #11379: Fix TypeError exception when bulk editing custom date fields 2023-01-06 16:23:38 -05:00
Mario
ea327e6b37 Closes #10486: Add buttons to edit cables (#11414)
* Added buttons to edit cables

* Revert change that did not address this branch

* Consolidated buttons

* moved back trace button / added permission checks

* reverted disabled trace button
2023-01-06 15:11:29 -05:00
kkthxbye-code
f7b85ab941 Return no terminations if the cable is unsaved 2023-01-06 14:57:07 -05:00
Arthur Hanson
ce9933da85 11340 cable termination setter (#11341)
* 11340 update _terminations_modified only if modified

* 11340 update _terminations_modified only if modified
2023-01-06 10:15:43 -05:00
Robin Schneider
0662f0dab4 Add summary release notes for v3.4 2023-01-06 10:07:21 -05:00
jeremystretch
0669fda1fd Fixes #11384: Correct current time display on script & report forms 2023-01-06 09:42:13 -05:00
jeremystretch
b88fcb6625 Closes #11406: Correct example JSON 2023-01-05 16:38:29 -05:00
jeremystretch
69be24cd5f Changelog for #9996, #11150, #11245, #11371, #11403 2023-01-05 16:29:17 -05:00
Renato Almeida de Oliveira
35273cc87f Add ExportTemplatesMixin to JournalEntry model (#11251)
* Add ExportTemplatesMixin to JournalEntry model

* Move mixin ahead of base class

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2023-01-05 16:26:48 -05:00
Daniel W. Anner
5af73e9bf7 #11371 - Add various 100Mb Interface Types (#11377)
* Added 100base-fx (aka fast ethernet over fiber optic)

* Added 100BASE-T1 (single pair fast ethernet) as well as 100BASE‑LFX (fast ethernet over fiber, non standard)

* Update choices.py

Updated the placing of the 100base-fx and lfx choices

* Update netbox/dcim/choices.py

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2023-01-05 16:26:26 -05:00
Patrick Kerwood
128ccb4330 feat: added setting redis certificate authority path 2023-01-05 16:15:26 -05:00
Robin Schneider
07df622b59 NetBox should always be referred to as NetBox [DATALAD RUNCMD]
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "git ls-files -z . | xargs --null -I '()' find './()' -type f -not -name 'style-guide.md' -print0 | xargs --null sed --in-place --regexp-extended 's/\\bNetbox\\b/NetBox/g;'",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
2023-01-05 16:06:00 -05:00
Michaël Arnauts
5d22260589 #11150: Add a filter for device.primary_ip4 and primary_ip6 (#11382)
* Closes #11150: Add a filter for device.primary_ip4 and primary_ip6

* Tweaked tests to query for multiple IDs

Co-authored-by: jeremystretch <jstretch@ns1.com>
2023-01-05 14:25:15 -05:00
kkthxbye-code
39985ebdd1 Fix exception when scheduling a job in the past 2023-01-05 13:52:07 -05:00
jeremystretch
92ec06c694 PRVB 2023-01-03 16:30:17 -05:00
Jeremy Stretch
04137e887e Merge pull request #11376 from netbox-community/develop
Release v3.4.2
2023-01-03 16:28:05 -05:00
jeremystretch
e940f00c01 Release v3.4.2 2023-01-03 16:13:11 -05:00
jeremystretch
1c72a80d9a Changelog for #11156, #11259, #11342, #11345 2023-01-03 10:21:19 -05:00
kkthxbye
b9f8370097 Fixes #11156 - Allow InventoryItem component reassignment (#11256)
* Allow re-assigning InventoryItem components

* Refactor logic for finding initial component assignment on InventoryItems

* PEP8 fix

* Fix wrong HTML causing tab list to extend past the end of the parent row

* Tweak form field labels

Co-authored-by: jeremystretch <jstretch@ns1.com>
2023-01-03 10:13:34 -05:00
Christian Harendt
1c636ea127 add username for redis authentication 2023-01-03 09:42:18 -05:00
kkthxbye
e1169e7ea6 Fixes #11345 - Fix module validation (#11346)
* Make sure we bail out if field validation failed when importing modules

* Tweak form validation logic

Co-authored-by: jeremystretch <jstretch@ns1.com>
2023-01-03 09:14:25 -05:00
kkthxbye-code
5975dbcb07 Fix component traces all pointing to the interface trace URL 2023-01-03 08:25:28 -05:00
Arthur Hanson
08a419ec7a 11271 flag to disable localization (#11323)
* 11271 flag to disable localization

* 11271 change to remove middleware

* 11271 update docs for new var

* Update docs/configuration/system.md

Co-authored-by: kkthxbye <400797+kkthxbye-code@users.noreply.github.com>

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
Co-authored-by: kkthxbye <400797+kkthxbye-code@users.noreply.github.com>
2022-12-29 09:04:35 -05:00
jeremystretch
d417168805 Changelog for #11223, #11244, #11248 2022-12-28 16:58:04 -05:00
Mario
ccb2966c4c Fixes #11244: Elevations: Filter badge missing (#11321)
* Added filter badge in rack elevation

* Tweak template context

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2022-12-28 16:54:33 -05:00
Alef Burzmali
b7cdbd3d41 Fixes #11248 - Reindex only NetBox apps 2022-12-28 16:35:05 -05:00
Alef Burzmali
ae440c9edf Fixes #11223 - Accept app_label for reindex 2022-12-28 16:35:05 -05:00
jeremystretch
b6cd099117 Changelog for #11121, #11280 2022-12-27 16:07:02 -05:00
Arthur
98f57f2dba 11297 have custom field form display content-type instead of model 2022-12-27 15:50:08 -05:00
kkthxbye-code
735fa4aa31 Add summed resource card to cluster view 2022-12-27 10:24:46 -05:00
kkthxbye
c7108bb3f7 Fixes #11280 - Fix exporting interfaces and FHRP group rows with multiple IP's assigned (#11285)
undefined
2022-12-27 10:15:28 -05:00
jeremystretch
98b3fc03b8 Changelog for #9285, #10700, #11290 2022-12-22 10:14:38 -05:00
kkthxbye-code
92da2fe082 Add device name as part of module search for the q filter 2022-12-22 10:09:53 -05:00
kkthxbye-code
bfab3a26bc Add component import to InventoryItem bulk import 2022-12-22 09:59:50 -05:00
kkthxbye-code
b35b33e798 Use the start time to calculate duration of jobs instead of created time 2022-12-22 09:52:05 -05:00
jeremystretch
db5c2a379e Fixes #11232: Enable partial & regex matching for non-string types in global search 2022-12-22 09:14:57 -05:00
jeremystretch
3675ad2539 PRVB 2022-12-16 17:18:06 -05:00
Jeremy Stretch
27c71b8ec0 Merge pull request #11219 from netbox-community/develop
Release v3.4.1
2022-12-16 17:16:07 -05:00
jeremystretch
0058c7749c Release v3.4.1 2022-12-16 17:03:40 -05:00
jeremystretch
f882dcabf7 Fixes #11184: Correct visualization of cable path which splits across multiple circuit terminations 2022-12-16 16:45:51 -05:00
Arthur Hanson
c8f4a7c742 11206 dont remove user groups if no valid REMOTE_AUTH_DEFAULT_GROUPS (#11207)
* 11206 dont remove user groups if no valid REMOTE_AUTH_DEFAULT_GROUPS

* 11206 dont remove user groups if no valid REMOTE_AUTH_DEFAULT_GROUPS
2022-12-16 08:59:24 -05:00
jeremystretch
ed366c5ab2 Closes #11214: Introduce the DEFAULT_LANGUAGE configuration parameter 2022-12-16 08:56:14 -05:00
jeremystretch
2738da2d39 Fixes #11189: Fix localization of dates & numbers 2022-12-16 08:43:05 -05:00
jeremystretch
9f15ca2d90 Closes #9971: Enable ordering of nested group models by name 2022-12-15 16:21:30 -05:00
jeremystretch
e4f5407c70 Changelog for #11175, #11178 2022-12-15 16:05:43 -05:00
jeremystretch
951f82b428 Fixes #11205: Correct cloning behavior for recursively-nested models 2022-12-15 16:04:29 -05:00
Arthur Hanson
f8685ad7aa 11175 fix cloning special chars in fields (#11181)
* 11175 fix cloning special chars in fields

* 11175 fix cloning special chars in fields
2022-12-15 13:07:55 -05:00
Arthur
c59d527664 11178 fix quick search press enter button 2022-12-15 13:01:21 -05:00
jeremystretch
77423e7bb1 Fixes #11185: Fix TemplateSyntaxError when viewing custom script results 2022-12-15 12:55:09 -05:00
jeremystretch
ba12675267 PRVB 2022-12-14 14:24:46 -05:00
Jeremy Stretch
def3ccfaee Merge pull request #11180 from netbox-community/develop
Release v3.4.0
2022-12-14 14:18:49 -05:00
jeremystretch
bbc68f9484 Release v3.4.0 2022-12-14 13:10:22 -05:00
Jeremy Stretch
93685d92a4 Merge pull request #11179 from netbox-community/feature
Prepare for v3.4.0 release
2022-12-14 11:56:29 -05:00
Arthur Hanson
b2bf613895 11171 fix graphql related models query (#11172)
* 11171 fix graphql related models query

* 11171 remove redundant code from code review

* 11171 remove redundant code from code review
2022-12-14 11:32:22 -05:00
jeremystretch
80ced6b782 Closes #11163: Auto-detect data format during bulk import 2022-12-14 10:09:59 -05:00
jeremystretch
47dfb89c52 Relocate ImportFormatChoices 2022-12-14 09:30:10 -05:00
jeremystretch
064e3ff605 Merge branch 'develop' into feature 2022-12-13 17:17:05 -05:00
Jeremy Stretch
fb27803ab0 Merge pull request #11174 from netbox-community/develop
Release v3.3.10
2022-12-13 15:44:42 -05:00
jeremystretch
5e32b39f25 Release v3.3.10 2022-12-13 15:29:07 -05:00
jeremystretch
b9888d6f86 Fixes #11109: Fix nullification of custom object & multi-object fields via REST API 2022-12-13 14:48:40 -05:00
jeremystretch
96a796ebde Fixes #11173: Enable missing tags columns for contact, L2VPN lists 2022-12-13 14:04:50 -05:00
jeremystretch
996e73d5d8 Fixes #10981: Fix release notes formatting 2022-12-13 13:26:41 -05:00
jeremystretch
5c969a8caf Changelog for #9361, #10447, #11077 2022-12-13 13:24:07 -05:00
jeremystretch
68faab8196 Fixes #11168: Honor RQ_DEFAULT_TIMEOUT config parameter when using Redis Sentinel 2022-12-13 13:22:28 -05:00
sleepinggenius2
b3693099dc Adds replication and adoption for module import (#9498)
* Adds replication and adoption for module import

* Moves common Module form clean logic to new class

* Adds tests for replication and adoption for module import

* Fix test

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-12-13 11:33:09 -05:00
Arthur Hanson
9bb9ac3dec 11077 use formatting for custom field date (#11143)
* 11077 use formatting for custom field date

* Apply configured date format to column render() method

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-12-13 09:22:57 -05:00
kkthxbye-code
a57378e780 Add missing newline and change wording of InventoryItem validation 2022-12-13 08:58:57 -05:00
kkthxbye-code
41f631b65b Allow re-assigning inventoryitems to other devices 2022-12-13 08:58:57 -05:00
jeremystretch
2db668f5cc Clean up v3.4 release notes 2022-12-12 16:49:00 -05:00
jeremystretch
aacf606999 #10739: Collapse BaseView class 2022-12-12 16:32:55 -05:00
jeremystretch
e338f7cfe3 #10371: Fix API serializer representation for module status 2022-12-12 16:14:18 -05:00
jeremystretch
758030733c #8366: Misc cleanup 2022-12-12 15:27:37 -05:00
jeremystretch
ad78f9e075 #7961: Fix updating via import when custom fields are absent 2022-12-12 14:19:27 -05:00
jeremystretch
3468e8c8ae #9623: Misc cleanup 2022-12-12 12:56:38 -05:00
jeremystretch
13d39a28ce #7854: Misc cleanup 2022-12-12 12:34:05 -05:00
jeremystretch
8809fc949b Fixes #11154: Index VM interface MAC address and MTU for global search 2022-12-12 10:43:48 -05:00
jeremystretch
860805ba82 Closes #10255: Introduce LOGOUT_REDIRECT_URL config parameter to control redirection of user after logout 2022-12-09 17:08:07 -05:00
jeremystretch
1e0b024609 Closes #10516: Add vertical frame & cabinet rack types 2022-12-09 16:35:37 -05:00
jeremystretch
8486d47d17 Fixes #11142: Correct available choices for status under IP range filter form 2022-12-09 16:04:46 -05:00
jeremystretch
407365888a Closes #11089: Permit whitespace in MAC addresses 2022-12-09 16:00:11 -05:00
jeremystretch
2ad1db0c64 Tweak migration name 2022-12-09 15:07:10 -05:00
jeremystretch
83a0576ca4 #9072: Add weight parameter to influence ViewTab ordering 2022-12-09 14:50:13 -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
2b12138c41 Fix configuration key for WirelessLANStatusChoices 2022-12-09 10:45:02 -05:00
jeremystretch
97aa40f7a8 Closes #10371: Add operational status field for modules 2022-12-09 10:43:29 -05:00
jeremystretch
b2f34cec19 Fixes #10950: Fix validation of VDC primary IPs 2022-12-09 09:49:01 -05:00
jeremystretch
3bc9586b0c Changelog for #10945 2022-12-08 18:18:51 -05:00
Jeremy Stretch
4297c65f87 Closes #10945: Enable recurring execution of scheduled reports & scripts (#11096)
* Add interval to JobResult

* Accept a recurrence interval when executing scripts & reports

* Cleaned up jobs list display

* Schedule next job only if a reference start time can be determined

* Improve validation for scheduled jobs
2022-12-08 18:17:13 -05:00
jeremystretch
62b0f034e7 Changelog for #11022 2022-12-08 10:00:21 -05:00
jeremystretch
6ffd8aa320 Introduce constants for RQ queue names 2022-12-08 09:58:52 -05:00
kkthxbye-code
d53ddd611b Add any queues defined in QUEUE_MAPPINGS to RQ_QUEUES 2022-12-08 09:45:21 -05:00
kkthxbye-code
080a001118 Allow redefining internally used queues 2022-12-08 09:45:21 -05:00
jeremystretch
5a77791f9d Merge branch 'develop' into feature 2022-12-08 09:31:22 -05:00
jeremystretch
ab9c253310 Fixes #11128: Disable ordering changelog table by object to avoid exception 2022-12-08 09:00:02 -05:00
jeremystretch
35596ddcbc Closes #10806: Add warning to run deactivate prior to upgrade script 2022-12-08 09:00:02 -05:00
kkthxbye-code
0cacac82ee Disable sorting by object_repr on ObjectChangeTable 2022-12-08 08:44:11 -05:00
Jeremy Stretch
780997a568 Closes #11119: Enable filtering L2VPNs by slug 2022-12-06 15:48:22 -05:00
Jeremy Stretch
d2d60c0607 Fixes #11087: Fix background color of bottom banner content 2022-12-06 15:40:59 -05:00
Renato Almeida de Oliveira
d4d8d00d01 add distinct method to circuit_count 2022-12-06 15:19:35 -05:00
jeremystretch
cb52d9c84e Changelog for #11000, #11046 2022-12-02 13:02:13 -05:00
jeremystretch
db61e57893 Closes #11090: Add regular expression support to global search engine 2022-12-02 12:54:35 -05:00
Jeremy Stretch
52cf9086a5 Fixes #11046: Restrict length of indexed search values (#11076)
* Fixes #11046: Restrict length of indexed search values

* Reference constant in index declaration

* Remove index from CachedValue.value
2022-12-02 10:07:53 -05:00
jeremystretch
db7590df1a Changelog for #10748, #11041 2022-12-02 09:30:44 -05:00
PieterL75
ee03f3d584 10748 Add 'Provider' to the circuit termination edit/view (#10939)
* Show the Provider of the NetworkProvider

* Clean up form fields

Co-authored-by: Pieter Lambrecht <pieter.lambrecht@sentia.com>
Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-12-02 09:27:47 -05:00
Arthur Hanson
2577f3a786 11000 improve yaml import (#11075)
* 11000 improve yaml import

* 11000 add commenting

* 11000 add commenting
2022-12-02 08:34:24 -05:00
Arthur
826a1714c3 11041 return power percentage with 1 decimal place 2022-12-01 15:41:15 -05:00
jeremystretch
d0e0c2ff8b Merge branch 'develop' into feature 2022-11-30 16:21:20 -05:00
jeremystretch
fb407e9076 PRVB 2022-11-30 16:18:03 -05:00
Jeremy Stretch
85c60670dc Merge pull request #11059 from netbox-community/develop
Release v3.3.9
2022-11-30 16:14:00 -05:00
jeremystretch
f2f36c67f6 Release v3.3.9 2022-11-30 15:51:37 -05:00
jeremystretch
281934cf34 Fixes #11047: Cloning a rack reservation should replicate rack & user 2022-11-30 15:37:50 -05:00
jeremystretch
00d72f18cf Annotate need for natural ordering 2022-11-30 15:33:01 -05:00
Arthur
b36afdc924 11014 code review changes 2022-11-30 15:33:01 -05:00
Arthur
4ed45e4031 11014 fix rack elevation name sorting 2022-11-30 15:33:01 -05:00
Arthur
cf0258204f 11048 fix connected_endpoint refs 2022-11-30 15:13:45 -05:00
Patrick Hurrelmann
3bd560add8 Fixes #11028 - Enable clearing of the color field for front and rear ports in bulk edit 2022-11-30 15:09:07 -05:00
Arthur
9e51a8d9d2 10999 fix power utilization on Device detail 2022-11-29 09:38:04 -05:00
Arthur
f59c6699f6 11025 fix error tag toast 2022-11-29 09:36:48 -05:00
jeremystretch
39732fa861 Merge branch 'develop' into feature 2022-11-29 09:19:11 -05:00
jeremystretch
80f5eeacdd Fix issues loading demo data 2022-11-29 09:18:03 -05:00
jeremystretch
f56e3eb784 Fixes #8058: Display server-side form errors inline with fields 2022-11-22 12:02:21 -05:00
jeremystretch
c3dcd8937f Merge branch 'develop' into feature 2022-11-22 10:08:23 -05:00
jeremystretch
b1da374df2 Fixes #10997: Fix exception when editing NAT IP for VM with no cluster 2022-11-22 08:52:21 -05:00
jeremystretch
dc1da0a738 Fixes #10996: Hide checkboxes on child object lists when no bulk operations are available 2022-11-22 08:52:04 -05:00
jeremystretch
1946e8f053 #10984: Update test 2022-11-21 16:05:51 -05:00
jeremystretch
4623858849 Fixes #10936: Permit demotion of device/VM primary IP via IP address edit form 2022-11-21 15:36:13 -05:00
jeremystretch
9c5891f1b6 Fixes #10929: Raise validation error when attempting to create a duplicate cable termination 2022-11-21 14:08:33 -05:00
jeremystretch
d5538c1ca3 Fixes #10241: Support referencing custom field related objects by attribute in addition to PK 2022-11-21 12:48:13 -05:00
jeremystretch
90f15b8d55 Fixes #10938: render_field template tag should respect label kwarg 2022-11-21 09:49:30 -05:00
jeremystretch
4e27e8d3dd Fixes #10969: Update cable paths ending at associated rear port when creating new front ports 2022-11-21 09:44:08 -05:00
jeremystretch
150cb772fe Fixes #10984: Fix navigation menu expansion for plugin menus comprising multiple words 2022-11-21 08:38:44 -05:00
jeremystretch
e494d7bb22 Fixes #10982: Catch NoReverseMatch exception when rendering tabs with no registered URL 2022-11-21 08:06:12 -05:00
jeremystretch
9774bb46ce Fixes #10973: Fix device links in VDC table 2022-11-18 16:33:06 -05:00
jeremystretch
84c0c45da9 Fixes #10980: Fix view tabs for plugin objects 2022-11-18 16:26:08 -05:00
jeremystretch
46e3883f19 Closes #815: Enable specifying terminations when bulk importing circuits 2022-11-18 15:22:24 -05:00
Arthur
3a89a676cd 10869 convert docstring to comment 2022-11-18 13:47:55 -05:00
jeremystretch
0885333b11 Fixes #9223: Fix serialization of array field values in change log 2022-11-18 11:24:14 -05:00
jeremystretch
c287641363 Changelog for #10236, #10653 2022-11-18 11:23:30 -05:00
Arthur Hanson
de9646d096 10653 log failed login attempts on INFO (#10843)
* 10653 log failed login attempts on INFO

* 10653 use signal to log failed login attempts

* 10653 use signal to log failed login attempts

* Update netbox/users/signals.py

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

* Update netbox/users/apps.py

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

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2022-11-18 08:57:57 -05:00
Arthur Hanson
dd2520d675 10236 fix device detail for power-feed (#10961)
* 10236 fix device detail for power-feed

* 10236 optimize with statement
2022-11-18 08:55:28 -05:00
jeremystretch
3a5914827b Fixes #6389: Call snapshot() on object when processing deletions 2022-11-17 21:04:55 -05:00
jeremystretch
cf55e96241 Fixes #10721: Disable ordering by custom object field columns 2022-11-17 16:30:54 -05:00
jeremystretch
bd29d15814 Fixes #10579: Mark cable traces terminating to a provider network as complete 2022-11-17 16:08:29 -05:00
jeremystretch
d3911e2a4c Fixes #9878: Fix spurious error message when rendering REST API docs 2022-11-17 15:13:37 -05:00
jeremystretch
eb591731ef #10712: Remove pin for swagger-spec-validator (fixed in v3.0.3) 2022-11-17 13:06:51 -05:00
jeremystretch
ae11419045 Changelog for #10946, #10948 2022-11-17 12:41:24 -05:00
jeremystretch
43bbd42d3c Fixes #10957: Add missing VDCs column to interface tables 2022-11-17 12:29:30 -05:00
jeremystretch
d4a231585a Clean up tests 2022-11-17 10:50:05 -05:00
kkthxbye-code
977b79ecee Check that device has a platform set before rendering napalm tab 2022-11-17 08:25:06 -05:00
kkthxbye-code
5202d0add9 Linkify primary IP for VDC 2022-11-17 08:22:42 -05:00
jeremystretch
ebf555e1fb Use strings to specify prerequisite models 2022-11-16 17:22:09 -05:00
jeremystretch
f411c4f439 Introduce panel template for services 2022-11-16 16:52:35 -05:00
jeremystretch
216d8d24b8 Add note to update model's SearchIndex 2022-11-16 16:40:01 -05:00
jeremystretch
cb2b256934 Fix typo 2022-11-16 16:38:29 -05:00
jeremystretch
2f96fdd135 Merge branch 'develop' into feature 2022-11-16 11:42:32 -05:00
jeremystretch
e40e2550a6 PRVB 2022-11-16 11:34:45 -05:00
Jeremy Stretch
bfda5d9011 Merge pull request #10937 from netbox-community/develop
Release v3.3.8
2022-11-16 11:32:44 -05:00
jeremystretch
62a80c46a8 Release v3.3.8 2022-11-16 10:45:29 -05:00
jeremystretch
ceec1055e0 Changelog for #10356, #10904, #10920 2022-11-16 10:40:18 -05:00
jeremystretch
540bba4544 Closes #10920: Include request cookies when queuing a custom script 2022-11-16 10:37:06 -05:00
jeremystretch
44c248e6c2 Closes #10934: Update release package URL 2022-11-16 10:36:30 -05:00
Patrick Hurrelmann
3a62fd49e6 Fixes: #10356 backplane connections (#10554)
* Fixes: #10356 Add interface type and cable for backplane connections

* Allow Backplone for front and readports , too.

* Correct tyo in port definition

* pep8 fix (blank lines)

* Remove port type and changed name/description of backplane cable

* Omit backplane cable type

Co-authored-by: Patrick Hurrelmann <patrick.hurrelmann@nfon.com>
Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-11-16 10:26:46 -05:00
Derick Vigne
a2007a4728 Closes #10904: Added Colors to SVG for Front and Rear Ports (#10905)
* Added Colors to SVG for Front and Reaer Ports

Fix for feature request 10904 thanks to @TheZackCodec

* Simplify termination color resolution

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-11-16 09:57:49 -05:00
jeremystretch
316c3808f7 Changelog for #9439, #10902, #10914, #10915, #10919 2022-11-16 09:43:11 -05:00
Arthur Hanson
928d880f0e 10902 add location to power feed form (#10913)
* 10902 add location to power feed form

* Bind location field to selected site

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-11-16 09:27:49 -05:00
Arthur
c6930e3ea8 10919 add location to cable termination panels 2022-11-16 09:22:39 -05:00
jeremystretch
db77e9428f Update features docs for v3.4 2022-11-16 09:11:03 -05:00
jeremystretch
80f5c96af3 Document save_object() on BulkImportView 2022-11-16 08:47:45 -05:00
jeremystretch
de1b346da0 Split core views into separate modules 2022-11-16 08:43:22 -05:00
jeremystretch
96818cacf0 #10608: Use register_model_view() for token views 2022-11-16 08:11:42 -05:00
jeremystretch
0c0c848597 Clean up plugins documentation 2022-11-15 16:55:18 -05:00
jeremystretch
23077821f6 #10052: Serialize date fields 2022-11-15 16:10:20 -05:00
jeremystretch
87fd09ca8b Cleanup for #9654 2022-11-15 15:30:39 -05:00
jeremystretch
0bcc59a1e9 #8366: Add started field to JobResult 2022-11-15 15:06:11 -05:00
jeremystretch
87727c71f7 #8366: name scheduled_time to scheduled for consistency with other fields 2022-11-15 13:37:13 -05:00
jeremystretch
23c0ca456f #4347: Rename NetBoxModelCSVForm to NetBoxModelImportForm 2022-11-15 12:24:57 -05:00
jeremystretch
d9d25ff4e7 Cleanup for #4347 2022-11-15 12:09:03 -05:00
jeremystretch
6f8a7fdbe3 Cleanup for #7854 2022-11-15 11:24:36 -05:00
jeremystretch
640fd8045d #9887: Add missing model documentation links 2022-11-15 11:00:13 -05:00
jeremystretch
4230162294 Add missing model documentation 2022-11-15 10:50:26 -05:00
jeremystretch
355678274d #9623: Add slug field to SavedFilter 2022-11-15 10:44:12 -05:00
jeremystretch
ecf5304a14 #10560: Add new fields to indexers 2022-11-15 10:37:35 -05:00
jeremystretch
94dd07e1e6 #10560: Build search index as part of migration 2022-11-15 10:37:16 -05:00
jeremystretch
1b707e07f2 Add missing milestones to release notes 2022-11-14 17:07:39 -05:00
Arthur
564884a774 10903 add module type on manufacturer page 2022-11-14 14:17:06 -05:00
Arthur
7401fd7050 10909 add l2vpn to tenant stats 2022-11-14 14:16:18 -05:00
jeremystretch
42e9dc0da7 Changelog for #4751, #10694, #10851 2022-11-14 14:06:30 -05:00
Jeremy Stretch
a5308ea28e Closes #10851: New staging mechanism (#10890)
* WIP

* Convert checkout() context manager to a class

* Misc cleanup

* Drop unique constraint from Change model

* Extend staging tests

* Misc cleanup

* Incorporate M2M changes

* Don't cancel wipe out creation records when an object is deleted

* Rename Change to StagedChange

* Add documentation for change staging
2022-11-14 13:55:03 -05:00
Arthur Hanson
27bf7b4a9a 4751 Enable plugins to inject content within object list views (#10901)
* 4751 add plugin buttons to list templates

* 4751 add plugin buttons to list templates

* 4751 add documentation

* 4751 fix object reference

* 4751 update docs
2022-11-14 13:51:58 -05:00
Jeremy Stretch
a57c937aaa #10694: Emit post_save signal when creating/updating device components in bulk (#10900)
* Emit post_save signal when creating/updating device components in bulk

* Fix post_save for bulk_update()
2022-11-14 13:46:32 -05:00
jeremystretch
4a95cfd1c4 Permanently connect change logging & webhook receivers 2022-11-14 09:31:25 -05:00
jeremystretch
cd8943144b Use context vars instead of thread-local storage for change logging 2022-11-14 09:31:25 -05:00
jeremystretch
8400509358 Fixes #10891: Populate tag selection list for service filter form 2022-11-14 09:28:03 -05:00
jeremystretch
d971131198 Fixes #10897: Fix form widget styling on FHRP group form 2022-11-14 09:24:12 -05:00
jeremystretch
5729a06348 Fixes #10910: Fix cable creation links on power port view 2022-11-14 09:20:02 -05:00
Arthur
6eba5d4d96 10300 initial translation support use gettext 2022-11-11 08:47:29 -05:00
jeremystretch
2cc2d2cc37 Changelog & documentation for #7854 2022-11-11 08:25:44 -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
jeremystretch
d59d23e308 Fixes #10881: Fix dark mode coloring for data on device status page 2022-11-10 16:47:17 -05:00
jeremystretch
3d1501e8fd Changelog for #10837, #10874 2022-11-10 16:33:34 -05:00
Brian Candler
c854c29016 Fix broken cookie paths when BASE_PATH is set (introduced in #10706) (#10856)
Fixes #10837
2022-11-10 16:23:05 -05:00
Arthur Hanson
33d8f8e5e7 10874 remove link to contact roles (#10879) 2022-11-10 16:19:43 -05:00
jeremystretch
653acbf62c #4347: Changelog & cleanup 2022-11-10 11:05:44 -05:00
Arthur Hanson
93e7457e0d 4347 Add JSON/YAML import support for all objects (#10367)
* 4347 initial code for json import

* 4347 initial code for json import

* Clean up form processing logic

* Consolidate import forms

* Consolidate object import/update logic

* Clean up bulk import view

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-11-10 11:01:52 -05:00
jeremystretch
93e241e8f3 Changelog for #10709, #10829 2022-11-04 16:56:52 -04:00
Arthur
43da786016 10829 fix top edit selected button 2022-11-04 16:54:24 -04:00
jeremystretch
ea6d86e6c4 Closes #10052: The cf attribute now returns deserialized custom field data 2022-11-04 14:53:18 -04:00
jeremystretch
fe73e90b7b Reorganize virtualization models 2022-11-04 13:51:30 -04:00
jeremystretch
f68c7fb188 Changelog for #7376, #10710 2022-11-04 13:46:15 -04:00
jeremystretch
ad40d42dc4 Closes #10710: Add status field to WirelessLAN 2022-11-04 13:40:39 -04:00
Arthur Hanson
cdeb65e2fb 7376 csv tags (#10802)
* 7376 add tags to CSV import

* 7376 change help text

* 7376 validate tags

* 7376 fix tests

* 7376 add tag validation tests

* Introduce CSVModelMultipleChoiceField for CSV import tag assignment

* Clean up CSVImportTestCase

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-11-04 10:50:43 -04:00
Arthur
271d524687 10709 add AzureAD Tenant Oauth2 2022-11-04 09:12:22 -04: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
e2f5ee661a Clean up redundant NestedGroupModel, OrganizationalModel fields 2022-11-03 13:59:44 -04:00
jeremystretch
6b2deaeced Closes #8485: Enable journaling for all organizational models 2022-11-03 13:31:51 -04:00
jeremystretch
13afc52617 Closes #10543: Introduce get_plugin_config() utility function 2022-11-03 13:18:58 -04:00
jeremystretch
e7f54c5867 Reorganize plugin resources 2022-11-03 12:59:01 -04:00
Arthur Hanson
4ebcdd2b8f 8072 move js code from template to static file (#10824) 2022-11-03 09:29:45 -04:00
jeremystretch
07730ccd33 #10820: Fix zoneinfo import for py3.9+ 2022-11-02 16:29:42 -04:00
jeremystretch
0ad7ae2837 Closes #10698: Omit app label from content type in table columns 2022-11-02 16:26:26 -04:00
jeremystretch
8fb91a1f8c Closes #10821: Enable data localization 2022-11-02 15:55:39 -04:00
jeremystretch
3b0a84969b Closes #10820: Switch timezone library from pytz to zoneinfo 2022-11-02 15:54:41 -04:00
jeremystretch
81c0dce5a3 Closes #10697: Move application registry into core app 2022-11-02 15:25:22 -04:00
Arthur Hanson
816fedb78d 8853 Prevent the retrieval of API tokens after creation (#10645)
* 8853 hide api token

* 8853 hide key on edit

* 8853 add key display

* 8853 cleanup html

* 8853 make token view accessible only once on POST

* Clean up display of tokens in views

* Honor ALLOW_TOKEN_RETRIEVAL in API serializer

* Add docs & tweak default setting

* Include token key when provisioning with user credentials

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-11-02 12:45:00 -04:00
Jeremy Stretch
484efdaf75 Closes #9623: Implement saved filters (#10801)
* Initial work on saved filters

* Return only enabled/shared filters

* Add tests

* Clean up filtering of usable SavedFilters
2022-11-02 12:27:53 -04:00
jeremystretch
ea61a540cd Closes #10816: Pass the current request when instantiating a FilterSet within UI views 2022-11-02 11:00:09 -04:00
jeremystretch
0b24d3d892 Merge branch 'develop' into feature 2022-11-01 17:13:11 -04:00
jeremystretch
2af8891f70 PRVB 2022-11-01 17:11:55 -04:00
jeremystretch
4e39021b6f Merge branch 'master' into develop 2022-11-01 17:10:18 -04:00
jeremystretch
2cd5fce62d Release v3.3.7 2022-11-01 17:09:55 -04:00
jeremystretch
ade307bc03 Fixes #10809: Permit nullifying site time_zone via REST API 2022-11-01 17:09:55 -04:00
jeremystretch
c8be4ef8e2 Fixes #10791: Permit nullifying VLAN group scope_type via REST API 2022-11-01 17:09:55 -04:00
jeremystretch
816214361d Fixes #10803: Fix exception when ordering contacts by number of assignments 2022-11-01 17:09:55 -04:00
jeremystretch
d1970ca85b Changelog for #10282, #10770 2022-11-01 17:09:55 -04:00
Arthur
8001694a4c 10282 fix race condition in API IP creation 2022-11-01 17:09:55 -04:00
Arthur
10e258739f 10770 fix social auth 2022-11-01 17:09:55 -04:00
jeremystretch
f3fdf03661 Changelog for #10666 (missed in v3.3.6) 2022-11-01 17:09:55 -04:00
jeremystretch
44814f759c PRVB 2022-11-01 17:09:55 -04:00
jeremystretch
4f5caa5ed2 Release v3.3.7 2022-11-01 16:48:40 -04:00
jeremystretch
aa7f04bf1b Fixes #10809: Permit nullifying site time_zone via REST API 2022-11-01 16:45:32 -04:00
jeremystretch
aaf1ea52b7 Fixes #10791: Permit nullifying VLAN group scope_type via REST API 2022-11-01 15:38:10 -04:00
jeremystretch
7990cfb078 Fixes #10803: Fix exception when ordering contacts by number of assignments 2022-11-01 15:27:35 -04:00
jeremystretch
675a5f8687 Changelog for #10781 2022-10-31 15:17:24 -04:00
jeremystretch
a25ee66150 Changelog for #10282, #10770 2022-10-31 15:15:45 -04:00
Arthur Hanson
13c27b00d3 10781 add python 3.11 support (#10782)
* 10781 add python 3.11 support

* 10781 update Django to latest
2022-10-31 15:05:34 -04:00
Arthur
867af61875 10282 fix race condition in API IP creation 2022-10-31 15:04:43 -04:00
Arthur
8f4fa065f9 10770 fix social auth 2022-10-31 15:02:57 -04:00
Arthur
7b5f5ca6bb Merge branch 'develop' into feature 2022-10-27 14:25:27 -07:00
jeremystretch
a176e9452f Changelog for #7961 2022-10-27 13:24:20 -04:00
Arthur Hanson
cb815ede60 7961 CSV bulk update (#10715)
* 7961 add csv bulk update

* temp checkin - blocked

* 7961 bugfix and cleanup

* 7961 change to id, add docs

* 7961 add tests cases

* 7961 fix does not exist validation error

* 7961 fix does not exist validation error

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 update tests

* 7961 make test cases more explicit

* 7961 make test cases more explicit

* 7961 make test cases more explicit

* 7961 make test cases more explicit

* 7961 make test cases more explicit

* 7961 make test cases more explicit

* 7961 make test cases more explicit

* 7961 optimize loading csv test data

* 7961 update tests remove redundant code

* 7961 avoid MPTT issue in test cases
2022-10-27 13:10:18 -04:00
jeremystretch
d773f4e62a Closes #9832: Add mounting_depth field to rack model 2022-10-27 10:50:54 -04:00
jeremystretch
dbe66596f9 Closes #9887: Inspect docs_url property to determine link to model documentation 2022-10-27 09:44:09 -04:00
jeremystretch
ec4e2a8e16 #8274, #10761: Fix content types display in object lists 2022-10-26 17:07:16 -04:00
jeremystretch
7e7f68923d #10761: Fix ExportTemplate resolution for REST API requests 2022-10-26 17:05:09 -04:00
jeremystretch
edb5220228 Changelog for #10666 (missed in v3.3.6) 2022-10-26 15:11:44 -04:00
Jeremy Stretch
ac373d2376 Merge pull request #10763 from netbox-community/10761-exporttemplate-content-types
Closes #10761: Enable associating an export template with multiple objects
2022-10-26 14:14:34 -04:00
jeremystretch
16919cc1d9 Closes #10761: Enable associating an export template with multiple object types 2022-10-26 13:30:45 -04:00
Jeremy Stretch
7a155407f6 Merge pull request #10760 from netbox-community/8274-customlink-content-types
Closes #8274: Enable associating a custom link with multiple object types
2022-10-26 12:22:56 -04:00
jeremystretch
9e8234bb45 Closes #8274: Enable associating a custom link with multiple object types 2022-10-26 11:39:26 -04:00
jeremystretch
c4dcd34ce9 Merge branch 'develop' into feature 2022-10-26 10:25:49 -04:00
jeremystretch
18332bdbf1 PRVB 2022-10-26 10:23:50 -04:00
Jeremy Stretch
f1a7bceef2 Merge pull request #10758 from netbox-community/develop
Release v3.3.6
2022-10-26 10:18:44 -04:00
jeremystretch
eac2ace80b Release v3.3.6 2022-10-26 09:58:31 -04:00
Kevin Petremann
174ba6cf0f Fix LDAP auth: user never updated if inactive 2022-10-26 09:40:05 -04:00
jeremystretch
658c9347f3 Fixes #10682: Correct home view links to connection lists 2022-10-26 09:32:29 -04:00
jeremystretch
7b3ef2ade5 Fixes #10719: Prevent user without sufficient permission from creating an IP address via FHRP group creation 2022-10-26 08:44:20 -04:00
jeremystretch
2a62b628cf Fixes #10723: Distinguish between inside/outside NAT assignments for device/VM primary IPs 2022-10-26 08:23:50 -04:00
Arthur
d8c07abd68 10610 interface_id query on lag return vc interfaces 2022-10-26 08:10:03 -04:00
Arthur Hanson
8d486c5838 10716 add left-right plugins to tags page (#10744)
* 10716 add left-right plugins to tags page

* 10716 add back plugin_full_width
2022-10-26 08:05:15 -04:00
jeremystretch
eb91934d70 Fixes #10745: Correct display of status field in clusters list 2022-10-25 16:41:07 -04:00
jeremystretch
01654765e8 Fixes #10746: Add missing status attribute to cluster view 2022-10-25 16:38:32 -04:00
jeremystretch
91c6bbcd78 Closes #10695: Rename forms/models.py to forms/model_forms.py 2022-10-25 16:26:05 -04:00
jeremystretch
b2e2e3be35 Closes #10739: Introduce get_queryset() method on generic views 2022-10-25 11:33:20 -04:00
Jeremy Stretch
9628dead07 Closes #10560: New global search (#10676)
* Initial work on new search backend

* Clean up search backends

* Return only the most relevant result per object

* Clear any pre-existing cached entries on cache()

* #6003: Implement global search functionality for custom field values

* Tweak field weights & document guidance

* Extend search() to accept a lookup type

* Move get_registry() out of SearchBackend

* Enforce object permissions when returning search results

* Add indexers for remaining models

* Avoid calling remove() on non-cacheable objects

* Use new search backend by default

* Extend search backend to filter by object type

* Clean up search view form

* Enable specifying lookup logic

* Add indexes for value field

* Remove object type selector from search bar

* Introduce SearchTable and enable HTMX for results

* Enable pagination

* Remove legacy search backend

* Cleanup

* Use a UUID for CachedValue primary key

* Refactoring search methods

* Define max search results limit

* Extend reindex command to support specifying particular models

* Add clear() and size to SearchBackend

* Optimize bulk caching performance

* Highlight matched portion of field value

* Performance improvements for reindexing

* Started on search tests

* Cleanup & docs

* Documentation updates

* Clean up SearchIndex

* Flatten search registry to register by app_label.model_name

* Clean up search backend classes

* Clean up RestrictedGenericForeignKey and RestrictedPrefetch

* Resolve migrations conflict
2022-10-21 13:16:16 -04:00
jeremystretch
4c504870e0 Tweak PR template language 2022-10-21 12:47:19 -04:00
jeremystretch
3d687a6c2d Closes #10718: Optimize object-based permissions enforcement 2022-10-21 12:43:36 -04:00
Jeremy Stretch
5d56d95fda Merge pull request #10417 from kkthxbye-code/8366-job-scheduling
Fixes #8366 - Add job scheduling
2022-10-21 11:22:05 -04:00
kkthxbye-code
5e5228ff12 Fix JobResultFilterset to use DateTimeField to perserve bc compat 2022-10-21 15:53:39 +02:00
kkthxbye-code
72ba57052a PEP8 fix 2022-10-21 10:42:49 +02:00
kkthxbye-code
ed2f7f1236 Job scheduling review changes 2022-10-21 10:31:30 +02:00
jeremystretch
893925436d Merge branch 'feature' into 8366-job-scheduling 2022-10-20 17:03:57 -04:00
jeremystretch
96c4696417 Changelog for #9584, #10580, #10639 2022-10-20 16:31:52 -04:00
Arthur Hanson
e7659a5f99 9584 add device type (slug) to filter list (#10630)
* 9584 add device type (slug) to filter list

* 9584 add test
2022-10-20 16:27:51 -04:00
Craig Pund
53c9c3cf8d Fixes #10580 (#10687)
* change IP address accessor to parent object

* set IP assigned check to link to interface

* Fix Assigned not being orderable

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

Co-authored-by: Craig Pund <cpund@iuhealth.org>
Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2022-10-20 16:26:26 -04:00
Patrick Rauscher
f60312febf Set *_COOKIE_PATH according to BASE_PATH
As discussed in #10639, all three `COOKIE_PATH`s should be set accordingly with the netbox-`BASE_PATH` to improve coexistance with other Django-projects probably hosted on the same Host
2022-10-20 16:24:38 -04:00
jeremystretch
bd79a27e4d Merge branch 'develop' into feature 2022-10-20 16:07:03 -04:00
jeremystretch
7505baf3a1 Fixes #10712: Fix ModuleNotFoundError exception when generating API schema under Python 3.9+ 2022-10-20 15:49:13 -04:00
kkthxbye-code
4f95c5a72c Allow scheduling jobs via. the API 2022-10-20 21:36:43 +02:00
jeremystretch
85a4b1f881 Closes #10699: Remove custom import_object() function 2022-10-19 10:40:39 -04:00
jeremystretch
33c6142365 Update documentation section options for new issues 2022-10-19 09:52:10 -04:00
jeremystretch
10e874039f Changelog for #10643, #10646 2022-10-19 09:02:09 -04:00
jeremystretch
060ee2dd96 Revert PR #10621 2022-10-19 08:55:30 -04:00
jeremystretch
43d1182b4b Fix styling for power input, rear port connection links 2022-10-19 08:47:14 -04:00
Arthur
d53da57f63 10646 fix cable power feed filter 2022-10-19 08:42:55 -04:00
Arthur Hanson
028b4b7ea7 10643 add fieldset to device role for improved add/edit form display (#10680)
* 10643 add fieldset to device role for improved add/edit form display

* 10643 update other forms

* 10643 update other forms

* Specify fieldsets for additional models

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-10-19 08:35:23 -04:00
jeremystretch
4cb0230878 Closes #10685: Position A/Z termination cards above the fold under circuit view 2022-10-18 16:51:37 -04:00
Arthur Hanson
2fe8df3cbb 10655 fix contacts display in list views (#10681)
* 10655 fix contacts display in list views

* 10655 review changes
2022-10-18 16:47:14 -04:00
Arthur
64d67e3b00 10584 add clone fields to ipam-service 2022-10-18 16:06:31 -04:00
kkthxbye-code
83ff99a130 Added delete button to script/report result 2022-10-17 09:54:23 +02:00
kkthxbye-code
52faeb6f60 Added documentation describing job scheduling 2022-10-16 18:15:45 +02:00
kkthxbye-code
f797b5ed97 Add scheduled_time to JobResultSerializer 2022-10-16 15:27:33 +02:00
kkthxbye-code
e143038df8 Remove JobResult view from admin panel 2022-10-16 15:20:38 +02:00
kkthxbye-code
074082d1f1 Allow export of JobResult table 2022-10-16 15:18:54 +02:00
kkthxbye-code
d647983003 Always activate scheduler functionality when running the rqworker management command 2022-10-16 13:47:15 +02:00
kkthxbye-code
1d9808a92a Added scheduled_time field to JobResult model 2022-10-16 13:42:28 +02:00
Arthur
a44eed5001 10631 add extra GraphQL documentation 2022-10-13 08:08:26 -04:00
jeremystretch
f2407afc9f Changelog for #8245 2022-10-12 13:43:31 -04:00
Arthur Hanson
99cf1b1671 8245 add graphql filtering at all levels (#10618)
* 8245 monkey-patch graphene-django to support filtering at all levels

* 8245 fix tests

* 8245 fix tests
2022-10-12 13:21:34 -04:00
jeremystretch
aaf829898b Changelog for #10575, #10596 2022-10-12 08:41:41 -04:00
Arthur
8481cf66e3 10575 add requirements for openid connect packages 2022-10-12 08:39:14 -04:00
Arthur Hanson
bb150379a2 10571 replace deprecated mkdoc settings (#10622)
* 10571 replace deprecated mkdoc settings

* Omit landing page from docs nav menu

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-10-12 08:36:02 -04:00
Arthur Hanson
cc811e5a56 10596 add overflow-auto to card-body (#10621)
* 10596 add overflow-auto to card-body

* 10596 add overflow-auto to card-body
2022-10-12 08:31:02 -04:00
jeremystretch
e8c5a4724a Changelog for #9817, #10595 2022-10-11 12:35:50 -04:00
Arthur Hanson
9ca4c7315b 10595 extend graphql relationships (#10603)
* 9817 add graphql l2vpntermination assigned_object

* 9817 add graphql ipaddressassignment assigned_object

* 9817 ipan graphql gfk

* 9817 dcim graphql gfk

* 9817 dcim graphql gfk

* 9817 fix tests

* 10595 cable a_terminations to graphql

* 10595 add contacts to graphql

* 10595 move contacts to Provider
2022-10-11 12:26:18 -04:00
Arthur Hanson
ffce5d968d 8927 plugin search (#10489)
* #7016 base search classes

* 7016 add search indexes

* 7016 add search indexes

* 7016 add search indexes

* 7016 add search indexes

* 7016 add search indexes

* 7016 add search indexes

* 8927 refactor search

* 8927 refactor search

* 8927 refactor search

* 8927 refactor search

* 8927 get search choices working

* 8927 cleanup - optimize

* 8927 use backend search function

* 8927 fix for plugin search

* 8927 add docs

* Move search app to a module under netbox/

* Utilize global registry to register model search classes

* Build search form options from registry

* Determine search categories from model app by default

* Enable dynamic search registration for plugins

* Update docs & improve plugin support

* Clean up search backend class

* Docs for #8927

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-10-10 14:00:59 -04:00
jeremystretch
656f0b7d82 #9072: Add hide_if_empty argument to ViewTab 2022-10-10 08:11:29 -04:00
kkthxbye-code
ef0b455b05 Called super delete method before deleting JobResult task.
Done to avoid having deleted a task on accident if the deleting of the JobResult fails.
2022-10-09 21:16:26 +02:00
kkthxbye-code
679a9e839b Work on job scheduling:
* Added JobResult form filtersets
* Change housekeeping cleanup delete from `_raw_delete` to `delete` to make sure scheduled tasks are cancelled
* Change default sort of JobResult table to -created
* Added `delete` override to `JobResult` to remove scheduled tasks from RQ when a JobResult is deleted
* Updated js/css dist files. Will need to be redone when develop is merged to feature.
2022-10-09 21:05:31 +02:00
kkthxbye-code
53c8a48244 Merge branch 'feature' into 8366-job-scheduling
Sync with upstream
2022-10-09 11:18:47 +02:00
Jeremy Stretch
3f37914b3c Merge pull request #10609 from netbox-community/10608-registered-model-views
Closes #10608: Register all core model views using register_model_view()
2022-10-07 17:58:07 -04:00
jeremystretch
b0ba9bd83d Closes #10608: Register all core model views using register_model_view() 2022-10-07 17:17:58 -04:00
Jeremy Stretch
a3dbf4023c Merge pull request #10597 from netbox-community/9072-plugin-view-tabs
#9072: Custom model view tabs for plugins
2022-10-07 15:22:04 -04:00
jeremystretch
053c97b7a8 Docs and test for #9072 2022-10-07 15:03:52 -04:00
jeremystretch
1fc8de85a3 Add device NAPALM view tabs 2022-10-07 14:17:18 -04:00
jeremystretch
5e1a0733e4 Replace active_tab context for object views 2022-10-07 12:14:19 -04:00
jeremystretch
bfe26b46a6 Wrap model detail views with register_model_view() 2022-10-07 11:36:14 -04:00
jeremystretch
4c999daacd Introduce ViewTab 2022-10-07 10:54:34 -04:00
jeremystretch
663652f45e Changelog for #9478 2022-10-06 16:54:19 -04:00
Arthur Hanson
10bb8fa10a 9478 link peers to GraphQL (#10574)
* 9468 add link_peer to GraphQL

* 9478 add class_type

* 9478 fix tests

* 9478 fix tests

* 9478 fix tests
2022-10-06 16:50:53 -04:00
jeremystretch
a0bae06ff7 Replace static journaling, changelog URL paths with dynamic resolution 2022-10-06 16:21:23 -04:00
jeremystretch
0d7851ed9d #9072: Implement a mechanism for dynamically registering model detail views 2022-10-06 16:20:35 -04:00
jeremystretch
664d5db5eb Changelog for #10556 2022-10-05 15:53:50 -04:00
Jeremy Stretch
a1cc15a604 Merge pull request #10557 from netbox-community/10556-graphql-display
#10556 add display to GraphQL
2022-10-05 15:51:54 -04:00
Arthur Hanson
24ba840be7 10472 graphene 3 (#10473)
* update to Graphene 3.0.0

* 10472 exempt view permissions on tests

* 10472 exempt permission check on graphql tests
2022-10-05 15:50:17 -04:00
jeremystretch
a9e583a693 Changelog for #9669, #9722 2022-10-05 12:04:47 -04:00
Jeremy Stretch
3a3ff474cb Merge pull request #10567 from scanplus/ldap-ca-cert
Added LDAP_CA_CERT_* to LDAP settings
2022-10-05 12:01:39 -04:00
Arthur Hanson
cc00789d35 9669 sanitize social auth usernames (#10549) 2022-10-05 11:50:47 -04:00
Jeremy Stretch
689f11a573 Merge pull request #10555 from kkthxbye-code/10527-update-js-dependencies
Fixes #10527 - Update JS dependencies
2022-10-05 11:04:37 -04:00
jeremystretch
c481a1b6a2 Merge branch 'develop' into feature 2022-10-05 10:28:48 -04:00
jeremystretch
ae90ad1fb7 PRVB 2022-10-05 10:13:02 -04:00
Jeremy Stretch
56d9725c39 Merge pull request #10570 from netbox-community/develop
Release v3.3.5
2022-10-05 10:10:44 -04:00
jeremystretch
1c69bfaf2c Release v3.3.5 2022-10-05 09:47:55 -04:00
Tobias Genannt
5e37f82b2f Added LDAP_CA_CERT_* to LDAP settings
These options can be used to specify a CA certificate to validate the LDAP
server certificate
2022-10-05 14:28:30 +02:00
jeremystretch
bdefd8ea8c Fixes #10562: Correct URL for contacts table tags column 2022-10-05 08:13:33 -04:00
kkthxbye-code
eabd405845 Fix graphiql by pinning esbuild 2022-10-04 22:00:32 +02:00
jeremystretch
03946f2ca8 Fixes #10559: Permit the pinning of a VM to a particular device within a cluster which has no site assignment 2022-10-04 15:46:55 -04:00
jeremystretch
fec8d1bc2f Fixes #10423: Enforce object type validation when creating journal entries 2022-10-04 15:26:52 -04:00
jeremystretch
53f5f46037 #10460: Fix PowerFeed details 2022-10-04 14:36:14 -04:00
Arthur
81d99a0061 #10556 add display to GraphQL 2022-10-04 10:50:34 -07:00
kkthxbye-code
b227757b9a Update JS dependencies WIP 2022-10-04 15:02:37 +02:00
jeremystretch
eef5cefb5d Fixes #10460: Restore missing connection details for device components 2022-10-03 16:11:24 -04:00
jeremystretch
7712b81ab9 Fixes #10517: Automatically inherit site assignment from cluster when creating a virtual machine 2022-10-03 15:35:45 -04:00
jeremystretch
7feb86fe55 Changelog for #10352 2022-10-03 15:03:28 -04:00
PieterL75
d1efbf6620 Issue10352 removegetvariables (#10475)
* Add javascript to disable empty form fields

* add js cleanGetUrl

* use addEventListener submit

* use addEventListener

* update collectstatics

* Use FormData to remove empty fields

* optimeze ts-ignore

* update ts-ignore comment

* oneline of ts-ignore

* one line of ts-ingnore

* fix tsc errors by adding types (as per kkthxbye)

Co-authored-by: Pieter Lambrecht <pieter.lambrecht@sentia.com>
2022-10-03 14:32:01 -04:00
jeremystretch
aabee05a6a Changelog for #8424, #10491 2022-10-03 13:58:04 -04:00
jeremystretch
cf062b5b6a Closes #10346: Document how to access plugin config parameters 2022-10-03 13:56:46 -04:00
Arthur Hanson
0b6a3898fe 8424 device location (#10544)
* 8424 fix merge

* 8424 fix merge

* 8424 fix merge

* 8424 fix merge
2022-10-03 13:55:05 -04:00
Jeremy Stretch
517ebcfbcd Merge pull request #10525 from netbox-community/10491-delete-dependant
10491 improve error message for ProtectedError on contact assignment
2022-10-03 13:27:34 -04:00
jeremystretch
9ef24d3f43 Fixes #10513: Disable the reassignment of a module to a new device 2022-10-03 11:11:51 -04:00
jeremystretch
568e0c7ff6 Changelog for #9880 2022-09-30 17:30:18 -04:00
Jeremy Stretch
a454a3f74e Merge pull request #10502 from jsenecal/9880-allow-plugins-to-register-apps
Allow Plugins to register a list of Django apps to be appended to INSTALLED_APPS
2022-09-30 17:28:56 -04:00
jeremystretch
f7860138c7 Rename plugin_apps to django_apps for clarity 2022-09-30 17:18:12 -04:00
jeremystretch
0607295081 Docs cleanup 2022-09-30 17:18:12 -04:00
Jonathan Senecal
d4a7af8a89 Update plugins development docs 2022-09-30 17:18:12 -04:00
Jonathan Senecal
5c1417c4c7 PEP8 fixes 2022-09-30 17:18:12 -04:00
Jonathan Senecal
dc522a0135 Initial implementation
- Allows to specify a list of django-apps to be "installed" alongside the plugin.

(cherry picked from commit 6c7296200d756d2acbba3a589a7759f3a690cc48)
2022-09-30 17:18:12 -04:00
Jonathan Senecal
ac7db3cc88 Tidy-up imports and typing
(cherry picked from commit adee5cf6a8856ceda0170a4382cec8fd784be93b)
2022-09-30 17:18:12 -04:00
Patrick Hurrelmann
5cc55d1e99 Fixes: #10465 Format all remaining displayed rackunits with floatformat (#10481)
* Fixes: #10465 Try to finish #10268 and format all remaining displayed rackunits with floatformat

* #10465: PEP8 fix

Co-authored-by: Patrick Hurrelmann <patrick.hurrelmann@nfon.com>
Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-09-30 17:18:12 -04:00
jeremystretch
10352ff5ad Merge branch 'develop' into feature 2022-09-30 17:17:18 -04:00
jeremystretch
97d561ac33 Changelog for #9654, #10348 2022-09-30 16:37:07 -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
Arthur Hanson
af8bb0c4b9 10348 add decimal custom field (#10422)
* 10348 add decimal custom field

* 10348 fix tests

* 10348 add documentation

* Rearrange custom fields to be ordered consistently

* Rename number_field to integer_field for clarity

* Clean up validation logic

* Apply suggested changes from PR

* Store decimal custom field values natively

* Fix filter test

* Update custom field model migrations to use new encoder

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-09-30 16:03:24 -04:00
jeremystretch
ada5c58acf Closes #10529: Run validation on each value of a multi-value filter 2022-09-30 15:05:13 -04:00
Arthur
02ffc2ddee 10491 improve error message for ProtectedError on contact assignment 2022-09-30 09:09:21 -07:00
jeremystretch
62820ea2b8 Add workflow_dispatch event 2022-09-29 12:36:10 -04:00
jeremystretch
04738587e8 Move permissions block to root 2022-09-29 12:17:10 -04:00
jeremystretch
cbbfcd0e7b Bump stale to v6 2022-09-29 12:00:44 -04:00
jeremystretch
309a70df89 Tweak workflow permissions 2022-09-29 11:59:15 -04:00
Alex
4cb6984a65 GitHub Workflows security hardening (#10456)
* build: harden lock.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden stale.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden ci.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

Signed-off-by: Alex <aleksandrosansan@gmail.com>
2022-09-29 11:41:33 -04:00
jeremystretch
d486fa8452 Changelog for #9045, #9046, #9071 2022-09-28 17:18:31 -04:00
Jeremy Stretch
c95ad5b208 Merge pull request #10441 from netbox-community/9071-plugin-menu
9071 add header to plugin menu
2022-09-28 17:08:10 -04:00
Jeremy Stretch
5382ac20b6 Merge pull request #10488 from netbox-community/9249-device-vm-names
Closes #9249: Ignore case for device/VM names
2022-09-28 17:05:57 -04:00
jeremystretch
3fbd514417 Add test for plugin menu registration 2022-09-28 16:57:40 -04:00
jeremystretch
d0465242a3 Add documentation for PluginMenu 2022-09-28 16:44:16 -04:00
jeremystretch
db90b084cf Enable plugins to create root-level navigation menus 2022-09-28 16:08:03 -04:00
jeremystretch
00d2dcda68 Refactor navigation resources and menu 2022-09-28 15:56:09 -04:00
Arthur Hanson
20e3fdc782 #9045 #9046 - remove legacy fields from Provider (#10377)
* #9045 - remove legacy fields from Provider

* Add safegaurd for legacy data to migration

* 9045 remove fields from forms and tables

* Update unrelated tests to use ASN model instead of Provider

* Fix migrations collision

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-09-28 15:22:19 -04:00
jeremystretch
3c32c09a5a Fixes #10496: Use page.canonical_url to identify ReadTheDocs builds 2022-09-28 09:30:38 -04:00
jeremystretch
ad6a7086c4 Changelog for #9249 2022-09-27 16:52:14 -04:00
jeremystretch
e977333177 Update device/VM name filters to be case-insensitive 2022-09-27 16:48:39 -04:00
jeremystretch
1d4f828b93 Device/VM unique constraints ignore case for name field 2022-09-27 16:47:56 -04:00
Jeremy Stretch
c349e06346 Merge pull request #10368 from netbox-community/10361-unique-constraints
Closes #10361: Migrate from unique_together to UniqueConstraints
2022-09-27 15:55:44 -04:00
jeremystretch
7ff2cb75a8 Use templated app & model names for all unique constraints 2022-09-27 15:44:38 -04:00
jeremystretch
f51415cf2c Replace unique_together with UniqueConstraints 2022-09-27 15:35:24 -04:00
jeremystretch
ec6457bcd3 Remove custom validate_unique() methods 2022-09-27 14:28:21 -04:00
jeremystretch
2d9852d6f1 Fixes #10408: Fix validation when attempting to add redundant contact assignments 2022-09-27 13:11:57 -04:00
jeremystretch
05542324fc Changelog for #10465, #10480 2022-09-27 11:53:11 -04:00
Patrick Hurrelmann
669e86f96e Fixes: #10465 Format all remaining displayed rackunits with floatformat (#10481)
* Fixes: #10465 Try to finish #10268 and format all remaining displayed rackunits with floatformat

* #10465: PEP8 fix

Co-authored-by: Patrick Hurrelmann <patrick.hurrelmann@nfon.com>
Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-09-27 11:24:19 -04:00
Jeremy Stretch
cbf928f363 Merge pull request #10482 from phurrelmann/10480-fix-link-target-on-cable-svg
Fixes: #10480 Fix link-target on cable-trace svg
2022-09-27 11:07:14 -04:00
jeremystretch
6016e1b15d Changelog & cleanup for #9892 2022-09-27 09:55:35 -04:00
Jeremy Stretch
d08d5620da Merge pull request #10424 from netbox-community/9892-fhrpgroup-name
9892 fhrpgroup name
2022-09-27 09:48:11 -04:00
Patrick Hurrelmann
43b18c13e3 Fixes: #10480 Fix link-target on cable-trace svg to open link in the same window. 2022-09-27 13:23:51 +02:00
Arthur
7deb9fde9e 9071 add documentation 2022-09-26 14:41:46 -07:00
Arthur
b134d2a7b0 9071 fix test 2022-09-26 14:23:53 -07:00
Arthur
36f31228ff Merge branch 'feature' into 9071-plugin-menu 2022-09-26 14:09:44 -07:00
Arthur
8103ad3b9e 9892 add name to str 2022-09-26 13:57:09 -07:00
Arthur
10cb3c2c3d 9892 add name to str 2022-09-26 13:54:49 -07:00
jeremystretch
dda193247a Fixes #10470: Omit read-only custom fields from CSV import forms 2022-09-26 16:47:34 -04:00
jeremystretch
2463e4efd3 Fixes #10461: Enable filtering by read-only custom fields in the UI 2022-09-26 16:42:11 -04:00
Arthur
5ce805db2e 9892 doh - fix tests 2022-09-26 12:56:16 -07:00
jeremystretch
a0b17887fd Fixes #10445: Avoid rounding virtual machine memory values 2022-09-26 15:45:58 -04:00
Arthur
3eeb31d577 9892 doh - fix tests 2022-09-26 11:49:51 -07:00
Arthur
e11d594122 9892 add supporting tests, form fields 2022-09-26 11:39:43 -07:00
Arthur
600c437af5 Merge branch 'feature' into 9892-fhrpgroup-name 2022-09-26 11:10:25 -07:00
jeremystretch
0280ddcbe9 Merge branch 'develop' into feature 2022-09-26 11:55:58 -04:00
jeremystretch
96784640e3 Changelog for #10435, #10439 2022-09-26 10:27:35 -04:00
Jeremy Stretch
b75d12fe05 Merge pull request #10442 from netbox-community/10435-untagged-vlan
10435 check if vm.cluster in qs
2022-09-26 10:25:48 -04:00
Jeremy Stretch
5e389c32ed Merge pull request #10463 from netbox-community/revert-10410-10408-add-contact
Revert "10408 add error message if already exists"
2022-09-26 10:24:54 -04:00
Jeremy Stretch
fd89ef04b6 Revert "10408 add error message if already exists" 2022-09-26 10:24:40 -04:00
Jeremy Stretch
abcc10e938 Merge pull request #10410 from netbox-community/10408-add-contact
10408 add error message if already exists
2022-09-26 10:24:23 -04:00
jeremystretch
3ad337dd15 Filter VLANs and VLANGroups by site or cluster site for VM 2022-09-26 10:08:54 -04:00
Jeremy Stretch
a527767caa Merge pull request #10455 from miaow2/10439-airlow-widget
10439 Add widget for Airflow field in DeviceTypeForm
2022-09-26 09:20:48 -04:00
Arthur Hanson
39129ecedf 10407 fix documentation link to requests (#10409)
* 10407 fix documentation link to requests

* Append page heading to URL

Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-09-26 09:17:02 -04:00
Artem I. Kotik
c97d2d4fe9 Add widget for Airflow field in DeviceTypeForm 2022-09-24 15:49:23 +04:00
Arthur
5a018afbc4 Merge branch 'develop' into feature 2022-09-23 12:37:19 -07:00
kkthxbye-code
06dea8ef3f WIP: Moving JobResults out of the admin panel 2022-09-23 13:44:24 +02:00
kkthxbye-code
cbb3378d10 Job Scheduling WIP 2022-09-23 06:45:40 +02:00
Arthur
7735634649 10435 check if vm.cluster in qs 2022-09-22 10:34:37 -07:00
Arthur
e074570b8f 9071 add header to plugin menu 2022-09-22 10:01:19 -07:00
Jonathan Senecal
148c6a6c23 Merge pull request #10432 from netbox-community/10431-pylance-is-no-longer-working-by-default-in-vscode
Add [tool.pyright] to pyproject.toml and fix #10431
2022-09-21 15:33:25 -04:00
Jonathan Senecal
360172cad0 Add [tool.pyright] to pyproject.toml 2022-09-21 15:19:40 -04:00
Arthur
a5421ae170 9892 add FHRP group name 2022-09-20 16:13:01 -07:00
Arthur
5d07f2c837 9892 add FHRP group name 2022-09-20 16:03:55 -07:00
Arthur
e95708fe08 Merge branch 'develop' into feature 2022-09-20 08:52:37 -07:00
Daniel Sheppard
75c91232b4 Update changelog for #9497 2022-09-20 09:49:46 -05:00
Daniel Sheppard
0190c0225e Merge pull request #10420 from netbox-community/9497-fix-site-location-nonracked-device-display
Fixes #9497 - Change non-racked filter for sites/locations
2022-09-20 09:48:09 -05:00
Daniel Sheppard
86d366be4d Fixes #9651 - Document Pre-Change process for scripts 2022-09-20 09:46:23 -05:00
Daniel Sheppard
71d71a6b1b Fixes #9497 - Change filter for sites/locations 2022-09-20 09:26:40 -05:00
kkthxbye
c8671ce8e8 Update yarn.lock (flatpickr bump) 2022-09-20 08:53:57 +02:00
Arthur
ed3d04c7ba Merge branch 'develop' into feature 2022-09-19 15:51:54 -07:00
Arthur
695ad47fe9 10408 add error message if already exists 2022-09-19 10:46:16 -07:00
kkthxbye
25ac1edb48 Merge branch 'netbox-community:develop' into 8366-job-scheduling 2022-09-18 15:08:11 +02:00
kkthxbye-code
824b4e0923 Add scheduling for reports and scripts 2022-09-18 15:06:28 +02:00
jeremystretch
1b62c11db5 PRVB 2022-09-16 13:41:09 -04:00
Jeremy Stretch
83a66a672d Merge pull request #10391 from netbox-community/develop
Release v3.3.4
2022-09-16 13:39:06 -04:00
jeremystretch
30b9ddc251 Release v3.3.4 2022-09-16 13:14:14 -04:00
jeremystretch
4a9831bd23 Fixes #10383: Fix assignment of component templates to module types via web UI 2022-09-16 08:30:46 -04:00
jeremystretch
59388d89a0 Fixes #10387: Fix MultiValueDictKeyError exception when editing a device interface 2022-09-16 08:20:24 -04:00
jeremystretch
1d033bd286 Update lock threads action; lock closed PRs after 30 days 2022-09-15 16:08:43 -04:00
jeremystretch
1eb0e5d307 Merge branch 'develop' into feature 2022-09-15 14:30:24 -04:00
jeremystretch
935f008c16 PRVB 2022-09-15 14:29:43 -04:00
Arthur Hanson
b5d57f3418 Merge pull request #10381 from netbox-community/develop
Release v3.3.3
2022-09-15 11:18:08 -07:00
Arthur
05b17a0082 Release v3.3.3 2022-09-15 11:04:12 -07:00
jeremystretch
91fd25a548 Fixes #10353: Table action buttons should reserve return URL parameters 2022-09-15 13:40:39 -04:00
jeremystretch
e05696dfcc Fixes #10337: Display SSO links when local authentication fails 2022-09-15 13:17:04 -04:00
Jeremy Stretch
157a45b627 Merge pull request #10369 from netbox-community/10359-add-region-column
#10359 add region column to site table
2022-09-15 13:07:59 -04:00
jeremystretch
e9a91455e8 #10359: Add region and site group columns to the devices table 2022-09-15 12:55:21 -04:00
jeremystretch
f97eb99950 Changelog for #10247, #10258, #10305, #10362 2022-09-15 10:14:16 -04:00
Jeremy Stretch
c4b7ab067a Fixes #10247: Allow changing selected device/VM when creating a new component (#10312)
* Initial work on #10247

* Continued work on #10247

* Clean up component creation tests

* Move valdiation of replicated field to form

* Clean up ordering of fields in component creation forms

* Omit fieldset header if none

* Clean up ordering of fields in component template creation forms

* View tests should not move component templates to new device type

* Define replication_fields on VMInterfaceCreateForm

* Clean up expandable field help texts

* Update comments

* Update component bulk update forms & views to support new replication fields

* Fix ModularDeviceComponentForm parent class

* Fix bulk creation of VM interfaces (thanks @kkthxbye-code!)
2022-09-15 10:10:32 -04:00
Jeremy Stretch
7477f6584e Merge pull request #10370 from kvedder-amplex/develop
add custom fields to l2vpntermination edit template
2022-09-15 10:07:27 -04:00
Jeremy Stretch
7b4f5252f1 Merge pull request #10290 from kkthxbye-code/10258-nested-module-scripts
Fixes #10258 - Allow running scripts nested in modules/packages
2022-09-15 10:06:28 -04:00
kvedder
4e03419e85 add custom fields to l2vpntermination edit template 2022-09-14 22:15:12 -04:00
Arthur
4d97043e26 #10359 add region column to site table 2022-09-14 15:50:45 -07:00
jeremystretch
4208dbd514 Closes #10358: Raise minimum required PostgreSQL version from 10 to 11 2022-09-14 17:10:14 -04:00
kkthxbye-code
c335b76ec6 PEP8: Fix whitespace on blank line 2022-09-14 20:00:12 +02:00
kkthxbye-code
356ff457be Allow reports to be nested in submodules 2022-09-14 19:57:37 +02:00
Jeremy Stretch
833c3fbd39 Merge pull request #10349 from sasschary/10316-cableform-termination
Fixes #10305: Allows null master in VirtualChassis APIs
2022-09-14 12:13:16 -04:00
Zachary Clark
ace66eab61 Fixes #10305: Allows null master in VirtualChassis APIs 2022-09-13 19:54:39 -04:00
jeremystretch
6a9274a95f Closes #10314: Move clone() method from NetBoxModel to CloningMixin 2022-09-13 14:36:37 -04:00
jeremystretch
87af94a7d2 Merge branch 'develop' into feature 2022-09-13 14:24:58 -04:00
jeremystretch
ea9d2e3f88 Closes #9577: Add has_front_image and has_rear_image filters for device types 2022-09-13 14:14:18 -04:00
Jeremy Stretch
cd5581aada Merge pull request #10341 from netbox-community/10172-upgrade-django
10172 upgrade django
2022-09-13 13:38:27 -04:00
jeremystretch
211a1394d3 Changelog for #8580, #10333 2022-09-12 17:17:53 -04:00
Jeremy Stretch
44032ffc11 Merge pull request #10291 from netbox-community/8580-filter-connected
#8580 add interface filters for connected
2022-09-12 17:16:28 -04:00
jeremystretch
f10460d774 Add relevant tests for all device components 2022-09-12 17:03:33 -04:00
jeremystretch
57365ef7b9 Rename is_occupied to occupied 2022-09-12 16:42:04 -04:00
Arthur
d24f10ce6e #8580 add tests 2022-09-12 10:52:40 -07:00
Arthur
1daa2ff98d #8580 add tests 2022-09-12 10:22:05 -07:00
Arthur
0e6a6b784d Merge branch 'develop' into 8580-filter-connected 2022-09-12 10:11:20 -07:00
Arthur
ce6bf9e5c1 #10172 fixes for Django 4.1 2022-09-12 09:59:37 -07:00
Jeremy Stretch
e3576e2614 Merge pull request #10338 from jsenecal/10298-pyproject-toml
Introduce pyproject.toml
2022-09-12 12:56:41 -04:00
Jeremy Stretch
0899d7aefd Merge pull request #10335 from netbox-community/10333-customfield-csv-ui_visibility
Fixes #10333: Show available values for ui_visibility field of CustomField for CSV import
2022-09-12 12:56:10 -04:00
Jonathan Senecal
d078befd33 Introduce pyproject.toml
- Tweaked to not break the existing codebase... too much
2022-09-12 11:48:26 -04:00
jeremystretch
f67cb71dbc Fixes #10333: Show available values for ui_visibility field of CustomField for CSV import 2022-09-12 10:36:19 -04:00
Arthur Hanson
721cd578bb 10310 pre commit yarn (#10315)
* #10310 run yarn pre-commit only if static files changed
2022-09-12 09:16:17 -04:00
jeremystretch
3aac62caa7 Changelog for #10304, #10307 2022-09-09 17:08:12 -04:00
Jeremy Stretch
6b9eb57de7 Merge pull request #10313 from netbox-community/10304-customfield-clone
Fixes #10304: Enable cloning for custom fields & custom links
2022-09-09 17:04:01 -04:00
jeremystretch
2b2a41edd2 Enable cloning for custom fields & custom links 2022-09-09 16:51:18 -04:00
jeremystretch
cd1ad452da Move clone() to CloningMixin 2022-09-09 16:44:58 -04:00
Jeremy Stretch
77868a9b17 Merge pull request #10309 from netbox-community/10307-fix-poe-type
#10307 fix choices for poe type
2022-09-09 16:20:21 -04:00
Arthur
59a2a43473 #10307 fix choices for poe type 2022-09-09 07:40:01 -07:00
jeremystretch
385a0f979e Changelog for #10250, #10294 2022-09-08 16:50:16 -04:00
Jeremy Stretch
770cc5a700 Merge pull request #10287 from netbox-community/10250-cable-import-virtual
Fixes #10250: Fix exception when CableTermination validation fails during bulk import of cables
2022-09-08 16:48:02 -04:00
Jeremy Stretch
a03155432e Merge pull request #10286 from netbox-community/10259-prefix-flat-link
Fixes #10259: Fix NoReverseMatch exception when listing available prefixes with "flat" column displayed
2022-09-08 16:47:27 -04:00
Arthur
27d72746ca #10172 upgrade Django to 4.1.1 2022-09-08 13:20:27 -07:00
Arthur
d51e833bf3 #8580 changes from code review 2022-09-08 13:11:17 -07:00
jeremystretch
c6644ec1ae Annotate upgrade paths in upgrade documentation 2022-09-08 10:17:46 -04:00
Jeremy Stretch
a7562a6aa1 Merge pull request #10296 from kkthxbye-code/10294-fix-wwn-changelog
Fixes #10294 - Don't return empty string for empty wwn form field
2022-09-08 09:32:53 -04:00
jeremystretch
6b70436e2b Add Repography stats 2022-09-08 09:18:45 -04:00
kkthxbye-code
3dbc7bdd2c Add wwn CharField to InterfaceForm 2022-09-08 11:38:39 +02:00
Arthur
b4877e7fac #8580 add interface filters for connected 2022-09-07 15:45:01 -07:00
kkthxbye-code
f489ffa043 Allow running scripts nested in modules/packages 2022-09-07 22:33:24 +02:00
jeremystretch
211c7641c1 Fixes #10250: Fix exception when CableTermination validation fails during bulk import of cables 2022-09-07 14:41:48 -04:00
jeremystretch
51d066a1bc Fixes #10259: Fix NoReverseMatch exception when listing available prefixes with "flat" column displayed 2022-09-07 14:30:51 -04:00
jeremystretch
b702822857 Closes #10268: Omit trailing ".0" in device positions within UI 2022-09-07 14:09:17 -04:00
jeremystretch
1cbb2320c1 Changelog for #9231, #10270, #10278 2022-09-07 13:59:00 -04:00
Jeremy Stretch
1c4ad3f817 Merge pull request #10285 from netbox-community/10278-rack-photo-add-another
#10278 fix attaching an image to a rack "Create & Add Another"
2022-09-07 13:56:13 -04:00
Jeremy Stretch
ef5ec06141 Merge pull request #10283 from netbox-community/10270-save-custom-boolean
#10270 - fix custom field validation for IPAM services
2022-09-07 13:54:24 -04:00
Jeremy Stretch
0c37236d60 Merge pull request #10281 from netbox-community/9231-empty-search
9231 fix empty search
2022-09-07 13:53:33 -04:00
Arthur
def853e8c4 #10278 add get_extra_addanother_params 2022-09-07 10:40:24 -07:00
Arthur
7826cfb01f #10270 - fix custom field validation for ipam services 2022-09-07 08:45:56 -07:00
jeremystretch
ac8f0a7ef2 Add installation video to docs 2022-09-07 11:23:13 -04:00
Arthur
48a907ae45 #9231 add comment 2022-09-07 08:09:28 -07:00
Arthur
2fe620df70 #9231 call class method 2022-09-06 18:04:29 -07:00
Arthur
536bd37d05 #9231 make empty search work 2022-09-06 16:37:52 -07:00
jeremystretch
d29d265b0a PRVB 2022-09-02 15:44:41 -04:00
Jeremy Stretch
41d653738a Merge pull request #10254 from netbox-community/develop
Release v3.3.2
2022-09-02 15:33:54 -04:00
jeremystretch
1955497dbe Release v3.3.2 2022-09-02 15:20:14 -04:00
Jeremy Stretch
572803d7ac Merge pull request #10253 from netbox-community/9823-fix_numericarrayfield_validation_error
Fixes #9823 - Make validation error from NumericArrayField more verbose.
2022-09-02 15:18:42 -04:00
Daniel Sheppard
25a474f9f7 Fix PEP8 errors 2022-09-02 14:05:38 -05:00
Daniel Sheppard
c42f7ab6d3 Fixes #9823 - Make validation error from NumericArrayField more verbose. 2022-09-02 13:48:15 -05:00
Jeremy Stretch
a7717b432e Merge pull request #10252 from netbox-community/10034-l2vpn-column
Fixes #10034: Add L2VPN column to interface and VLAN tables
2022-09-02 14:39:59 -04:00
jeremystretch
2acfda3dc5 Fixes #10034: Add L2VPN column to interface and VLAN tables 2022-09-02 14:26:35 -04:00
jeremystretch
569525fb68 Changelog for #9481, #10231, #10233 2022-09-02 08:56:09 -04:00
Jeremy Stretch
15353b7513 Merge pull request #10233 from netbox-community/9665-rack-elevation-sorting
#9665 Rack Elevation Sorting Enhancements
2022-09-02 08:53:16 -04:00
Jeremy Stretch
4737336b85 Merge pull request #10239 from amhn/Add_missing_serializer_annotation
Closes #10231: Add missing serializer annotations
2022-09-02 08:27:26 -04:00
Jeremy Stretch
d85b1c775f Merge pull request #10246 from netbox-community/9481-child-parent-location
#9481 update child location whem move parent
2022-09-02 08:25:34 -04:00
Arthur
2ce1a96468 #9481 update child location whem move parent 2022-09-01 15:44:41 -07:00
Arthur
239b8d2e7c #9665 review changes 2022-09-01 11:15:23 -07:00
Arthur
43b3ce9ed1 #9665 review changes 2022-09-01 11:12:01 -07:00
Arthur
80d5a966db Merge branch 'develop' into 9665-rack-elevation-sorting 2022-09-01 09:38:38 -07:00
Andreas Nieß
b11fa53519 Closes #10231: Add missing serializer annotations 2022-09-01 17:18:09 +02:00
jeremystretch
ce4d00dc21 Fixes #10184: Fix vertical alignment when displaying object attributes with buttons 2022-09-01 09:53:48 -04:00
Jeremy Stretch
bb269affe2 Merge pull request #10235 from netbox-community/10220-vm-primary-ips
Fixes #10220: Validate IP version when assigning primary IPs to a VM
2022-09-01 09:47:50 -04:00
jeremystretch
d818c250b0 Fixes #10220: Validate IP version when assigning primary IPs to a virtual machine 2022-09-01 09:31:42 -04:00
Arthur
3d4d880110 #9665 Rack Elevation Sorting Enhancements 2022-08-31 14:42:59 -07:00
jeremystretch
899b61264f Fixes #9328: Hide available IPs when non-default ordering is applied 2022-08-31 16:55:03 -04:00
jeremystretch
4dc059fba3 Changelog for #9477, #10195 2022-08-31 16:44:43 -04:00
Jeremy Stretch
f94792fad8 Merge pull request #10230 from netbox-community/10195-filterdevice
10195 Filter device components by Rack
2022-08-31 16:41:31 -04:00
jeremystretch
6df2ff7ebf #10195: Add filterset tests 2022-08-31 16:22:37 -04:00
Jeremy Stretch
dc4ddedca3 Merge pull request #10232 from netbox-community/9477-reset-column-ordering
Closes #9477: Add a button to clear applied table column ordering
2022-08-31 15:46:00 -04:00
jeremystretch
73b85f9b29 Minor tweaks to git cheat sheet 2022-08-31 15:44:06 -04:00
jeremystretch
ce054dd37d Closes #9477: Add a button to clear applied table column ordering 2022-08-31 15:28:59 -04:00
Arthur
3a0e91a688 #10195 add rack to component filter forms 2022-08-31 11:40:03 -07:00
Arthur
60ca4f29d7 #10195 add rack to component filter forms 2022-08-31 08:41:47 -07:00
jeremystretch
301ebe0da3 Add content to the git cheat sheet 2022-08-31 10:52:58 -04:00
jeremystretch
ada745324f Changelog for #10176, #10217 2022-08-31 10:36:01 -04:00
jeremystretch
a69eec5fb9 Further tweaks to the PR template 2022-08-31 10:36:01 -04:00
Jeremy Stretch
8c35ebbb7e Merge pull request #10227 from netbox-community/10217-cable-trace-split
Fixes #10217: Handle exception when trace splits to multiple rear ports
2022-08-31 10:25:41 -04:00
jeremystretch
5ef2d1d7ad Fixes #10217: Handle exception when trace splits to multiple rear ports 2022-08-31 10:07:10 -04:00
Jeremy Stretch
815b2d8a2b Merge pull request #10225 from netbox-community/10176
#10176 fix space utilization for rack
2022-08-31 08:55:39 -04:00
Arthur
0cfe2d882d #10176 fix space utilization for rack 2022-08-30 16:16:15 -07:00
Jeremy Stretch
6019b738a4 Merge pull request #10218 from netbox-community/10043-available-vlans-limit
Closes #10043: Add support for 'limit' query parameter to available VLANs API endpoint
2022-08-30 15:31:09 -04:00
jeremystretch
de17a651e6 Closes #10043: Add support for 'limit' query parameter to available VLANs API endpoint 2022-08-30 15:16:34 -04:00
jeremystretch
91dc9f0c9d Tweak PR template 2022-08-30 14:27:27 -04:00
jeremystretch
0770aa237a Changelog for #9895, #10060 2022-08-30 14:23:43 -04:00
Jeremy Stretch
d3f2d77961 Merge pull request #10187 from amhn/9895_Remove_JSONFieldInspector
9895 remove json field inspector
2022-08-30 14:21:02 -04:00
Jeremy Stretch
da03b22fe4 Merge pull request #10215 from netbox-community/10060-searchjournal
#10060 add journal entry to global search
2022-08-30 13:57:32 -04:00
Arthur
456647838c #10060 add journal entry to global search 2022-08-30 08:39:51 -07:00
Jeremy Stretch
e192ac34d0 Merge pull request #10213 from kkthxbye-code/10212-add-sidebar-padding
Fixes #10212 - Add padding to the bottom of the sidebar
2022-08-30 10:30:30 -04:00
kkthxbye
6a3ccda12e Add padding to the bottom of the sidebar 2022-08-30 15:57:04 +02:00
jeremystretch
14f79ef85a Closes #10202: Clean up TemplateColumn template code & accessors 2022-08-30 09:55:12 -04:00
jeremystretch
924471ee76 Clean up cable terminations display & edit form 2022-08-30 09:16:17 -04:00
jeremystretch
cd5844b050 Fixes #10208: Fix permissions evaluation for interface actions dropdown menu 2022-08-30 08:59:50 -04:00
jeremystretch
0f6a12b595 Changelog for #9962, #9963, #10178 2022-08-30 08:56:11 -04:00
Jeremy Stretch
d19c6a6afc Merge pull request #10173 from netbox-community/9962-ssonextparam
#9962 add next param to sso url
2022-08-30 08:53:58 -04:00
Jeremy Stretch
3257ea00b5 Merge pull request #10171 from netbox-community/10170-changelog
#10170 optimize change log queries
2022-08-30 08:50:01 -04:00
Jeremy Stretch
f073087379 Merge pull request #10205 from netbox-community/9963-csrftoken
#9963 change csrf token access
2022-08-30 08:48:23 -04:00
Jeremy Stretch
1ba47ae67c Merge pull request #10206 from netbox-community/10178-devicemanufacturer
#10178 add manufacturer to device detail view devicetype
2022-08-30 08:39:11 -04:00
Arthur
8ca3dfd8c9 #10178 add manufacturer to device detail view devicetype 2022-08-29 15:26:38 -07:00
Arthur
cdea30253b #101700 change csrf token access 2022-08-29 14:57:56 -07:00
Arthur
c8ee01ba0f #10170 changes from codereview 2022-08-29 14:53:28 -07:00
Arthur
3ad08c75c0 Revert "#101700 change csrf token access"
This reverts commit c12e545ccd.
2022-08-29 14:48:20 -07:00
Arthur
c12e545ccd #101700 change csrf token access 2022-08-29 14:40:03 -07:00
Jeremy Stretch
6571faad6c Merge pull request #10204 from netbox-community/10164-git-cheat-sheet
Closes #10164: Add a git cheat sheet
2022-08-29 16:01:31 -04:00
jeremystretch
f98f1647da Add "fixing mistakes" section 2022-08-29 15:40:39 -04:00
Arthur
249b8b0363 #10170 changes from code review 2022-08-29 12:20:51 -07:00
jeremystretch
777af35030 Fixes #10177: Correct display of custom fields when editing VM interfaces 2022-08-29 15:10:14 -04:00
Arthur
23fafe1996 Merge branch 'develop' into 10170-changelog 2022-08-29 12:08:39 -07:00
Jeremy Stretch
e0741cc9af Merge pull request #10200 from netbox-community/10181-api-file-upload
Fixes #10181: Restore MultiPartParser (regression from #10031)
2022-08-29 11:40:55 -04:00
jeremystretch
0e4911a575 Fixes #10181: Restore MultiPartParser (regression from #10031) 2022-08-29 11:17:31 -04:00
Jeremy Stretch
28bc76695a Merge pull request #10180 from ibrahimtok/patch-1
Update filtersets.md
2022-08-29 09:35:08 -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
Andreas Nieß
cd6911f83c Replace custom JSONField inspector with the one from drf_yasg 2022-08-29 07:52:29 +02:00
itok
173f27cb64 Update filtersets.md
corrected typos on the page,
an issue report has also been submitted at https://github.com/netbox-community/netbox/issues/10179
regards,
2022-08-28 13:53:53 +03:00
jeremystretch
152dcbe522 Initial draft of git cheat sheet 2022-08-26 16:52:00 -04:00
Arthur
2a7bad326d #9962 add next param to sso url 2022-08-26 12:55:35 -07:00
Arthur
cb6d8bf063 #10170 optimize change log queries 2022-08-26 10:46:47 -07:00
jeremystretch
83db8d2072 Clarify that issues must be accepted and assigned prior to PR submission 2022-08-26 13:33:55 -04:00
jeremystretch
3da8e4c1bb Update README & screenshots 2022-08-26 10:31:56 -04:00
jeremystretch
ee111a28d4 Changelog for #10161 2022-08-26 10:05:44 -04:00
Jeremy Stretch
d00d9cb00f Merge pull request #10162 from kkthxbye-code/10161-fix-cf-setnull
Fixes #10161 - Render "Set Null" button for custom fields
2022-08-26 09:44:21 -04:00
Jeremy Stretch
74ba5a61bf Merge pull request #10163 from netbox-community/10156-svg-link-target
Fixes #10156: Avoid forcing SVG image links to open in a new window
2022-08-26 09:41:37 -04:00
jeremystretch
fd81f57e61 Fixes #10156: Avoid forcing SVG image links to open in a new window 2022-08-26 08:45:48 -04:00
kkthxbye-code
e75e189933 Render "Set Null" button for custom fields 2022-08-26 14:32:17 +02:00
Daniel Sheppard
88d2fca2c6 Fixes #10155 - Fix rear port display when editing front port template for module type 2022-08-25 15:34:18 -05:00
jeremystretch
bd615ebf65 PRVB 2022-08-25 16:25:26 -04:00
Jeremy Stretch
44b9e822d9 Merge pull request #10154 from netbox-community/develop
Release v3.3.1
2022-08-25 16:20:52 -04:00
jeremystretch
ed4fe6bd36 Release v3.3.1 2022-08-25 16:07:34 -04:00
jeremystretch
a416ff6314 Fixes #10118: Fix display of connected LLDP neighbors for devices 2022-08-25 15:25:30 -04:00
jeremystretch
61ba5817c9 Add branch naming standard to developer docs 2022-08-25 15:03:16 -04:00
jeremystretch
7bdbdda7f9 Changelog for #10135 2022-08-25 14:51:16 -04:00
Arthur Hanson
a9ddd41729 Fix SSO signon for SAML with idp (#10137)
* #10135 add idp to saml login

* #10135 add idp to saml login

* #10135 add idp to saml login

* #10135 refactor / cleanup
2022-08-25 14:48:46 -04:00
jeremystretch
1379b9c9fb Tweak display of prerequisite model warning 2022-08-25 14:25:47 -04:00
jeremystretch
32615befd5 #10038 & #10039: Changelog & replicate for VM interfaces 2022-08-25 14:25:47 -04:00
Arthur Hanson
7697779abf #10038 add L2VPN termination to interface list context menu (#10152)
Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2022-08-25 13:41:55 -04:00
Arthur Hanson
bb37ebf4ba #10038 add assign FHRP group to device-interface context menu (#10151) 2022-08-25 13:38:55 -04:00
jeremystretch
5f37699736 Fixes #9663: Omit available IP annotations when filtering prefix child IPs list 2022-08-25 10:34:18 -04:00
Jeremy Stretch
9da9a209a5 Fixes #10087: Correct display of far end in console/power/interface connections tables (#10117) 2022-08-25 08:46:19 -04:00
jeremystretch
482b4b6e95 Fixes #10147: Permit the creation of 0U device types via REST API 2022-08-25 08:37:43 -04:00
Arthur Hanson
ec2e8ad184 #10139 update development documents for githooks and web-ui (#10141)
* #10139 update development documents for githooks and web-ui

* Remove redudant phrase

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2022-08-25 08:21:55 -04:00
jeremystretch
6c686af1b7 Changelog for #10070 2022-08-24 17:13:09 -04:00
Arthur Hanson
4132027ada fixes for #10070 make l2vpn slug unique (#10119)
Co-authored-by: jeremystretch <jstretch@ns1.com>
2022-08-24 17:12:14 -04:00
jeremystretch
f70ef7a585 Changelog and cleanup for #9935 2022-08-24 16:44:24 -04:00
Arthur Hanson
eb2bf3469e #9935 add new wireless choices for interfaces (#10116)
* #9935 add new wireless choices for interfaces

* #9935 add new wireless interfaces to constants

* #9935 oops - remove login.html changes
2022-08-24 16:36:38 -04:00
jeremystretch
bfbf97aec9 Closes #10031: Enforce 'application/json' content type for REST API requests 2022-08-24 15:49:36 -04:00
jeremystretch
2baf06e012 Add unique slugs to L2VPNs in relevant tests 2022-08-24 14:46:42 -04:00
jeremystretch
c2c8bd0a76 Closes #10133: Enable nullifying device location during bulk edit 2022-08-24 13:25:54 -04:00
jeremystretch
36729fb6ae Fixes #10134: Custom fields data serializer should return a 400 response for invalid data 2022-08-24 13:08:21 -04:00
jeremystretch
18d5576997 Changelog for #10033, #10037, #10094 2022-08-24 08:59:40 -04:00
Jeremy Stretch
6a7c56d919 Merge pull request #10115 from arthanson/art-10033
#10033 disable Add a Termination button if 2 terminations on L2VPN P2P
2022-08-24 08:57:01 -04:00
Jeremy Stretch
3110765d12 Merge pull request #10103 from arthanson/art-10094
Fix #10094 - Contact Assignments Create and Add Another
2022-08-24 08:55:02 -04:00
Jeremy Stretch
deee36651d Merge pull request #10120 from arthanson/art-10086
fix for #10086 - change capitalization on wireless link table for Interface A, B and Auth Type
2022-08-24 08:46:24 -04:00
Arthur
1c46102c4a #10094 changes from code review 2022-08-23 16:19:43 -07:00
Arthur
439cf1a308 #10033 changes from code review 2022-08-23 16:17:40 -07:00
Jeremy Stretch
219f2eee29 Merge pull request #10101 from arthanson/art-10037
#10037 add Child Interface to context menu
2022-08-23 16:32:15 -04:00
Arthur
374abe5214 #10033 disable Add a Termination button if 2 terminations on L2VPN P2P 2022-08-23 10:34:06 -07:00
Arthur
8b1a462a60 #10094 changes from code review 2022-08-23 09:29:55 -07:00
Arthur
c11ca543e2 #10037 default type to virtual 2022-08-23 09:16:48 -07:00
Jeremy Stretch
bf92e3a9dd Merge pull request #10114 from netbox-community/10109-available-prefixes
Fixes #10109: Fix available prefixes calculation for container prefixes in the global table
2022-08-23 10:51:12 -04:00
jeremystretch
7ba0b420f1 Fixes #10109: Fix available prefixes calculation for container prefixes in the global table 2022-08-23 10:37:38 -04:00
Daniel Sheppard
f3906dd7c4 Fixes #10111 - Wrap search QS to catch ValueError on identifier field 2022-08-23 09:33:36 -05:00
jeremystretch
984d8b8ee6 Fixes #10108: Linkify inside NAT IPs for primary device IPs in UI 2022-08-23 09:17:12 -04:00
Jeremy Stretch
7b4189271c Merge pull request #10065 from atownson/issue_10055
Fixes #10055: NAT Outside evaluations and links
2022-08-23 08:28:39 -04:00
atownson
63e8faeed9 Changed nat_outside to ManyToManyColumn 2022-08-22 20:34:44 -05:00
Arthur
f48aaf1c46 #10094 fix Contact AddAnother 2022-08-22 16:47:40 -07:00
Arthur
41499b189c #10094 fix Contact AddAnother 2022-08-22 16:33:50 -07:00
Arthur
9fddd193b9 #10094 fix Contact AddAnother 2022-08-22 16:31:41 -07:00
Arthur
0c7c61b685 #10037 add Child Interface to context menu 2022-08-22 14:56:31 -07:00
atownson
6179686c81 Corrected IPv6 family 2022-08-22 15:22:53 -05:00
atownson
2bb79e1346 Updated exists evaluation 2022-08-22 15:18:25 -05:00
atownson
71bf5f4697 Updated exists evaluation 2022-08-22 15:17:35 -05:00
jeremystretch
069c2d2fd2 Changelog for #6454, #10057, #10059 2022-08-22 16:11:35 -04:00
Jeremy Stretch
f35ff105ab Merge pull request #10096 from arthanson/art-6454
Fixes #6454 - Adds warning for prerequisite models
2022-08-22 16:09:59 -04:00
Arthur
25ec624e4e #6454 suggested review changes 2022-08-22 12:59:26 -07:00
Arthur
a972174706 #6454 changes from PR review 2022-08-22 11:46:41 -07:00
Jeremy Stretch
646272f9b3 Merge pull request #10097 from arthanson/art-10059
Fix for #10059 - add identifier to L2VPN table
2022-08-22 14:31:11 -04:00
Jeremy Stretch
743106e94f Merge pull request #10095 from arthanson/art-10057
fix for #10057
2022-08-22 14:30:22 -04:00
Jeremy Stretch
f5d81f51c4 Merge pull request #10093 from arthanson/art-10056
Fix for #10056
2022-08-22 14:29:24 -04:00
Arthur
e8f62eb1f9 #10059 change ordering of identifier column 2022-08-22 11:17:01 -07:00
Arthur
ea1467add7 fix for #10086 - change capitalization on wireless link table for Interface A, B and Auth Type 2022-08-22 09:24:52 -07:00
Arthur
917439725a fix for #10059 - add identifier to L2VPN table 2022-08-22 09:08:16 -07:00
jeremystretch
2ef9e2d6fc Closes #10066: Use fixed column widths for custom field values in UI 2022-08-22 11:17:40 -04:00
jeremystretch
c14a5973c7 Fixes #10089: linkify template filter should escape object representation 2022-08-22 11:14:36 -04:00
Arthur
3a7ea62874 fix for #10057 2022-08-18 16:20:24 -07:00
Arthur
0a38c16cc2 Fix for #10056 2022-08-18 16:06:57 -07:00
Arthur
c65a291698 #6454 add L2VPN check 2022-08-18 16:00:17 -07:00
Arthur
38a8ddcd77 #6454 fix merge conflicts 2022-08-18 15:31:54 -07:00
atownson
43ad8e80b9 netbox-community#10055: Added empty text 2022-08-18 17:12:44 -05:00
Arthur
928dff6b68 #6454 add prerequisite alert 2022-08-18 15:11:03 -07:00
atownson
0bdee1d6d8 netbox-community#10055 - Align NAT Outside with NAT Inside 2022-08-18 16:22:22 -05:00
atownson
3f40e15ed5 netbox-community#10055 - Add template for NAT Outside
Fixes 'ipam.IPAddress.None' text
2022-08-18 16:18:29 -05:00
atownson
a687aa1de6 netbox-community#10055 - Add loop for NAT Outside 2022-08-18 16:09:36 -05:00
atownson
c811eb069d netbox-community#10055 - Add loop for NAT Outside 2022-08-18 16:05:29 -05:00
Arthur
eb3d3dcbc4 #6454 add prerequisite alert 2022-08-18 13:58:40 -07:00
jeremystretch
804c064a7e Closes #10061: Replicate type when cloning L2VPN instances 2022-08-18 15:19:34 -04:00
jeremystretch
9059c09627 Refresh development docs 2022-08-18 13:40:44 -04:00
jeremystretch
279253c486 Fixes #10040: Fix exception when ordering prefixes by flat representation 2022-08-18 09:49:45 -04:00
jeremystretch
c7d6fe2d62 Fixes #10053: Custom fields header should not be displayed when editing circuit terminations with no custom fields 2022-08-17 15:37:48 -04:00
Jeremy Stretch
5327857f81 Merge pull request #9744 from candlerb/candlerb/9743
Documentation: distinguish release and git upgrade processes
2022-08-17 15:20:52 -04:00
jeremystretch
3b4dd051f2 PRVB 2022-08-17 14:11:47 -04:00
Jeremy Stretch
306e98a81e Merge pull request #10051 from netbox-community/develop
Release v3.3.0
2022-08-17 14:10:44 -04:00
jeremystretch
f9a6e368a7 Release v3.3.0 2022-08-17 13:55:21 -04:00
jeremystretch
9e22946bb8 #9986: Update tzdata & remove pytz pin 2022-08-17 12:00:11 -04:00
Jeremy Stretch
21b9732f06 Merge pull request #10049 from netbox-community/feature
Prep for v3.3 release
2022-08-17 11:49:34 -04:00
jeremystretch
bfa3c957d7 Clean up release notes 2022-08-17 11:31:45 -04:00
jeremystretch
107f19a0e9 Closes #10035: Include assigned_object_parent column by default in L2VPN terminations table 2022-08-17 10:59:17 -04:00
jeremystretch
5671a37f43 Closes #10036: Set clone_fields on L2VPNTermination 2022-08-17 10:51:50 -04:00
jeremystretch
93b36ed580 Closes #10032: Remove unique constraint from L2VPN identifier 2022-08-17 10:47:42 -04:00
jeremystretch
e523006ec3 Fixes #9758: Display parent object of connected termination 2022-08-17 10:39:30 -04:00
jeremystretch
a8576e54c7 Optimize database queries 2022-08-17 10:30:35 -04:00
Jeremy Stretch
47d6abdcd1 Merge pull request #10029 from netbox-community/docs-refresh
Refresh & reorganize NetBox documentation for v3.3 release
2022-08-16 16:24:49 -04:00
jeremystretch
bbc6f1d778 Merge branch 'feature' into docs-refresh 2022-08-16 16:09:38 -04:00
jeremystretch
e6c69127e4 Add model documentation for JournalEntry 2022-08-16 16:06:48 -04:00
jeremystretch
0ba45caabf Update virtualization models documentation 2022-08-16 15:57:29 -04:00
jeremystretch
d43c98d546 Update IPAM models documentation 2022-08-16 15:32:00 -04:00
jeremystretch
a36294e209 Merge branch 'develop' into feature 2022-08-16 12:56:49 -04:00
jeremystretch
7a44a4e305 PRVB 2022-08-16 12:36:42 -04:00
Jeremy Stretch
63c6687a87 Merge pull request #10026 from netbox-community/develop
Release v3.2.9
2022-08-16 12:29:59 -04:00
jeremystretch
e01b7951f2 Release v3.2.9 2022-08-16 11:50:14 -04:00
jeremystretch
8c220cc04f Fixes #9491: Remove button for adding inventory item templates to module type components 2022-08-16 11:39:51 -04:00
jeremystretch
9e9e90f88b Closes #9933: Add DOCSIS interface type 2022-08-16 10:11:40 -04:00
jeremystretch
6d328a82e9 Cleanup for #9505 2022-08-16 10:04:47 -04:00
jeremystretch
dedee0f9d9 #9979: Fix fallback to default value 2022-08-16 09:53:13 -04:00
jeremystretch
0ef1bc8490 Clean up bulk edit buttons 2022-08-16 09:49:51 -04:00
jeremystretch
30ab1e5a5e Changelog for #8723, #9505, #9979 2022-08-16 09:14:19 -04:00
Jeremy Stretch
14821eed44 Merge pull request #9639 from cpund/8723-branch
PR for #8723
2022-08-16 09:10:24 -04:00
Jeremy Stretch
c8ecee9682 Merge pull request #9712 from renatoalmeidaoliveira/develop
Include Network information in Prefix Template Issue:#9505
2022-08-16 09:06:56 -04:00
Jeremy Stretch
a8dd809f8e Merge pull request #9981 from chcon/develop
re-enable markdown in custom columns
2022-08-16 08:57:37 -04:00
jeremystretch
4307f078ed Finish refreshing DCIM models documentation 2022-08-15 15:16:02 -04:00
jeremystretch
f76ce172e0 Update model docs for device components 2022-08-15 11:57:38 -04:00
Christoph Schneider
15f4b1fd5d add newline 2022-08-13 14:02:26 +02:00
Christoph Schneider
36491b13d8 remove class definition 2022-08-13 14:01:07 +02:00
Christoph Schneider
ac540b6183 remove import 2022-08-13 13:59:19 +02:00
Christoph Schneider
6f09d94e2a remove commented line 2022-08-13 13:56:51 +02:00
Christoph Schneider
f942216f3f re-enable markup in longtext custom columns 2022-08-13 13:54:38 +02:00
jeremystretch
d4f976ac8d Refreshed wireless model documentation 2022-08-12 16:37:47 -04:00
jeremystretch
040feddcf1 Refreshed tenancy model documentation 2022-08-12 16:19:34 -04:00
jeremystretch
cff6b81f1f Refreshed extras model documentation 2022-08-12 16:00:04 -04:00
jeremystretch
fafc464d93 Refreshed circuits model documentation 2022-08-12 15:00:45 -04:00
jeremystretch
9c667bb3af Add hyperlinks to Mermaid graphs 2022-08-12 14:14:56 -04:00
jeremystretch
8c5779c864 Add feature docs for virtualization 2022-08-12 14:11:58 -04:00
jeremystretch
642fe422c4 Touch up intro page 2022-08-12 13:39:07 -04:00
jeremystretch
ca0b21bef5 Closes #9980: Use standard table controls template for device interfaces list 2022-08-12 11:25:03 -04:00
jeremystretch
e4fa8af47f Changelog for #8595 2022-08-12 10:48:16 -04:00
Jeremy Stretch
6cf898fa13 Merge pull request #9982 from DorianXGH/pon_if_types
Closes #8595: Added new PON interface types
2022-08-12 10:43:15 -04:00
jeremystretch
150c3d3a97 Merge branch 'feature' into docs-refresh 2022-08-12 10:19:38 -04:00
jeremystretch
e4bbebf87a Merge branch 'develop' into feature 2022-08-12 10:18:57 -04:00
jeremystretch
41ad9b242c Fixes #9986: Workaround for upstream timezone data bug 2022-08-12 10:12:01 -04:00
jeremystretch
c635f09e05 Closes #9994: Disable search indexing for local documentation builds 2022-08-12 09:21:28 -04:00
Dorian Bourgeoisat
693ad700e8 Swapping NG-PON2 as main name instead of TWDM-PON 2022-08-12 00:49:13 +02:00
jeremystretch
7e3050cf83 Add "getting started" links 2022-08-11 16:34:29 -04:00
jeremystretch
0750e27351 Finish customization docs 2022-08-11 16:14:06 -04:00
jeremystretch
f9fb2cc698 Finish features documentation 2022-08-11 15:29:26 -04:00
Craig Pund
5873ad95dc handle objects without names 2022-08-11 15:16:42 -04:00
Craig Pund
6a687a9ed1 not necessary to prefetch 2022-08-11 15:16:01 -04:00
jeremystretch
e2d5313940 Changelog for #9857 2022-08-11 13:02:37 -04:00
Jeremy Stretch
a59169fa96 Merge pull request #9964 from jsenecal/feat9857
Add a "clear" button for quick search
2022-08-11 12:20:33 -04:00
jeremystretch
a7b78565a1 Split webhooks documentation 2022-08-11 11:55:45 -04:00
jeremystretch
5f15f550c9 Restore model documentation for all models under extras 2022-08-11 11:37:07 -04:00
jeremystretch
8cd5a24409 #9414: Clean up clone_fields on all models 2022-08-11 09:58:37 -04:00
Jonathan Senecal
f74b7aa7ac Add a "clear" button for quick search
Fixes #9857
2022-08-11 08:26:25 -04:00
Christoph Schneider
9a80a491c9 re-enable markdown in custom columns 2022-08-11 14:11:41 +02:00
jeremystretch
aabe8f7c5b Changelog for #9625 2022-08-10 16:18:30 -04:00
Jeremy Stretch
10af44c12a Merge pull request #9970 from barnebyte-timewarp/develop
Closes #9625: Add Contact Phone/Email to quick view panes to save time
2022-08-10 16:16:04 -04:00
jeremystretch
a9aaa8939c Closes #9161: Pretty print JSON custom field data when editing 2022-08-10 16:12:04 -04:00
jeremystretch
8f1e70f01d Fixes #9961: Correct typo 2022-08-10 15:24:45 -04:00
jeremystretch
9733cee3d2 Continued work on feature docs 2022-08-10 14:07:51 -04:00
jeremystretch
e69be8f9a6 Continued work on feature docs 2022-08-10 12:51:21 -04:00
Dorian Bourgeoisat
1c7ef73d1f Closes #8595: Added new PON interface types 2022-08-10 15:33:33 +02:00
Barnabas Lovas
c24f1f14ec Closes #9625: Add Contact Phone/Email to quick view panes to save time 2022-08-10 13:22:58 +02:00
jeremystretch
1a0b6d6cb0 Continued work on feature docs 2022-08-09 16:49:28 -04:00
Jeremy Stretch
b318b79027 Merge pull request #9958 from threadedstream/fix_typo_virt_filtersets
fix typo in virtualization/forms/filtersets.py
2022-08-09 14:29:58 -04:00
jeremystretch
c1d9cace11 Fixes #9900: Pre-populate site & rack fields for cable connection form 2022-08-09 14:21:27 -04:00
jeremystretch
7dc2e02e22 Fixes #9938: Exclude virtual interfaces from terminations list when connecting a cable 2022-08-09 11:39:04 -04:00
jeremystretch
602cf8c5fa Fixes #9939: Fix list of next nodes for split paths under trace view 2022-08-09 11:29:42 -04:00
gildarov
c7faca9480 fix typo in virtualization/forms/filtersets.py 2022-08-09 11:56:19 +03:00
jeremystretch
1b88b36820 Merge branch 'develop' into feature 2022-08-08 15:39:03 -04:00
jeremystretch
064d7f3bd0 PRVB 2022-08-08 15:34:13 -04:00
Jeremy Stretch
f1877c0c5f Merge pull request #9955 from netbox-community/develop
Release v3.2.8
2022-08-08 15:32:38 -04:00
jeremystretch
ce7fb8ab17 Release v3.2.8 2022-08-08 15:17:36 -04:00
jeremystretch
caca074161 Fixes #9950: Prevent redirection to arbitrary URLs via 'next' parameter on login URL 2022-08-08 14:21:42 -04:00
jeremystretch
8721ad987c Fixes #9952: Prevent InvalidMove when attempting to assign a nested child object as parent 2022-08-08 12:22:22 -04:00
jeremystretch
876251c1cf Fixes #9948: Fix TypeError exception when requesting API tokens list as non-authenticated user 2022-08-08 12:22:01 -04:00
jeremystretch
36ac83a319 Fixes #9949: Fix KeyError exception resulting from invalid API token provisioning request 2022-08-08 11:43:27 -04:00
jeremystretch
90317adae7 Clean up usages of mark_safe() 2022-08-08 10:47:07 -04:00
jeremystretch
135543683d Changelog for #9919 2022-08-08 10:24:49 -04:00
Jeremy Stretch
38350a1023 Merge pull request #9940 from osamu-kj/develop
Fixes #9919: XSS Bypass in custom fields displayed in tables
2022-08-08 10:10:11 -04:00
jeremystretch
0e1947bc4b PEP8 fix 2022-08-08 09:58:58 -04:00
Osamu-kj
7141fc8eb0 Custom fields - removed the debug lines 2022-08-06 17:17:43 +02:00
Osamu-kj
db38ed4f19 Fixed the XSS protection code inside custom fields 2022-08-06 15:10:31 +02:00
jeremystretch
8c0ef1a0a2 Started on feature docs 2022-08-04 16:35:32 -04:00
jeremystretch
4c899f151c Drop markdown-include 2022-08-04 14:12:51 -04:00
jeremystretch
5da3cab4de Reorganize documentation 2022-08-04 14:11:52 -04:00
jeremystretch
a7bf7bf7a5 Merge branch 'feature' into docs-refresh 2022-08-04 13:13:22 -04:00
Osamu-kj
f874e9932d Added HTML Sanitization to the custom fields 2022-08-04 18:52:25 +02:00
jeremystretch
56433cf855 Fix denormalization logic to be compatible with loading fixture data 2022-08-04 10:42:44 -04:00
jeremystretch
a2e84dd279 Changelog for #9827, #9906 2022-08-03 15:22:51 -04:00
Jeremy Stretch
a397ce234a Merge pull request #9850 from sleepinggenius2/issue_9827
Adds patterned_fields support for bulk component creation
2022-08-03 15:22:16 -04:00
Jeremy Stretch
3694e5e846 Merge pull request #9911 from oasys/9906-support-color-on-frontrearport-import-export
Fixes #9906 import/export front/rearport color field for module- and device-types
2022-08-03 14:58:02 -04:00
jeremystretch
f11a6f0135 Release v3.3-beta2 2022-08-03 14:41:50 -04:00
Jeremy Stretch
44850feaf8 Merge pull request #9904 from netbox-community/9888-site_device_filters
Fixes: #9888 - Add filter and columns for device and site
2022-08-03 13:31:58 -04:00
jeremystretch
367bf25618 Fixes #9778: Fix exception during cable deletion after deleting a connected termination 2022-08-03 12:46:16 -04:00
jeremystretch
b9678c7c0e Closes #9853: Show full object in cable A/B termination lists 2022-08-03 10:50:35 -04:00
Jason Lavoie
c6e25f068d import/export color field on front- and rear-ports for module-types and device-types
Closes: #9906

- Adds `color` field to front and rearport template import forms
- Adds `color` field to `to_yaml` export for front and rearport
  templates
2022-08-03 09:22:06 -04:00
Daniel Sheppard
37c4f1a7d3 Fix up a few minor mistakes. Add tests. 2022-08-02 13:38:17 -05:00
jeremystretch
d3a567a2f5 Fixes #9788: Ensure denormalized fields on CableTermination are kept in sync with related objects 2022-08-02 13:56:52 -04:00
Daniel Sheppard
5b3ef04550 #9888 - Add filter and columns for device and site 2022-08-02 12:56:10 -05:00
jeremystretch
e96620260a Closes #9903: Implement a mechanism for automatically updating denormalized fields 2022-08-02 13:49:34 -04:00
jeremystretch
29a611c729 Closes #9896: Discontinue arbitrary use of OrderedDict 2022-08-01 16:51:44 -04:00
jeremystretch
562769fb89 Merge branch 'develop' into feature 2022-08-01 14:42:09 -04:00
Jeremy Stretch
4591237bfd Merge pull request #9886 from hagbarddenstore/issue_9699
Remove deprecated usage of prefetch_related
2022-08-01 13:46:38 -04:00
jeremystretch
262a0cf397 Fixes #9789: Fix rendering of cable traces ending at provider networks 2022-08-01 13:29:39 -04:00
jeremystretch
ff3fcb8134 #9871: Tweak display of utilization graph value 2022-08-01 12:38:12 -04:00
jeremystretch
d4d73674fc Fixes #9871: Fix utilization graph value alignments 2022-08-01 11:54:39 -04:00
jeremystretch
984d15d7fb Closes #9893: Move YAML serialization logic for component templates under the individual models 2022-08-01 11:39:07 -04:00
jeremystretch
efa449faff Closes #9882: Add manufacturer column to modules table 2022-08-01 10:36:53 -04:00
jeremystretch
3af989763e Closes #9883: Linkify location column in power panels table 2022-08-01 10:32:05 -04:00
jeremystretch
9646f88384 Fixes #9885: Fix child prefix counts when editing/deleting aggregates in bulk 2022-08-01 10:28:21 -04:00
jeremystretch
1bbf5d214b Closes #9881: Increase granularity in utilization graph values 2022-08-01 10:23:18 -04:00
jeremystretch
8a075bcff9 Fixes #9884: Prevent querying assigned VRF on prefix object init 2022-08-01 09:47:18 -04:00
jeremystretch
9fe5f09742 Fixes #9891: Ensure consistent ordering for tags during object serialization 2022-08-01 09:32:52 -04:00
jeremystretch
84f2225f42 PEP8 cleanup 2022-08-01 09:16:58 -04:00
jeremystretch
728ad51624 Changelog & cleanup for #9637 2022-08-01 09:12:15 -04:00
atownson
5ab03b7e92 Closes #9637: Add existing fields to the Rack Reservation user interface pages (#9870)
* Closes netbox-community#9637

Added site_group to RackReservationFrom class fieldsets
Added location to RackReservationTable class
2022-08-01 09:01:18 -04:00
Kim Johansson
6904666e2a Remove deprecated usage of prefetch_related
Fixes #9699
2022-07-30 01:18:30 +02:00
jeremystretch
1cd4075488 Add mermaid flowcharts showing rough data model dependencies 2022-07-29 16:23:45 -04:00
jeremystretch
a6c431f3ba Reorganize configuration docs 2022-07-29 15:10:50 -04:00
jeremystretch
b1ce8bd222 Started "getting started" guide 2022-07-29 13:45:59 -04:00
Daniel Sheppard
890efa5400 Fixes #9062 - Add/edit {module} substitution to help text for component template name 2022-07-29 11:55:26 -05:00
jeremystretch
18acac18e0 Move data model definitions to separate hierarchy 2022-07-29 10:30:47 -04:00
jeremystretch
c582d7459f Rearrange introductory content 2022-07-29 10:06:26 -04:00
jeremystretch
04fb0bd51c Closes #9858: ChangeLoggedModelFilterSet cleanup 2022-07-28 15:41:10 -04:00
jeremystretch
2c43c8d077 Closes #9793: Add PoE attributes to interface templates 2022-07-28 15:20:25 -04:00
jeremystretch
c5fb7b72f0 Closes #9391: Remove 500-character limit for custom link text & URL fields 2022-07-28 14:36:20 -04:00
jeremystretch
07620db027 Changelog for #9762 2022-07-28 12:45:27 -04:00
Jeremy Stretch
f8a3ffae4e Merge pull request #9868 from atownson/issue_9762
Closes #9762: Add nat_outside to the IPAddress table
2022-07-28 12:43:13 -04:00
atownson
62d1510c55 Closes netbox-community#9762
Added nat_outside to IPAddressTable class
2022-07-28 10:23:04 -05:00
jeremystretch
498b655cb7 Changelog and cleanup for #9825 2022-07-27 16:50:31 -04:00
Jeremy Stretch
fa94d9c82c Merge pull request #9826 from viroge/develop
Closes #9825: Add Contacts to VM table view
2022-07-27 16:48:08 -04:00
jeremystretch
6cee12b153 Fix formatting of webhook conditions form field 2022-07-27 15:40:25 -04:00
sleepinggenius2
bbf4b906e4 Adds patterned_fields support for bulk components 2022-07-26 17:16:03 -04:00
jeremystretch
a6be8dccf5 Fixes #9847: Respect desc_units when ordering rack units 2022-07-26 15:45:47 -04:00
jeremystretch
466931d2fb Fixes #9829: Arrange custom fields by group when editing objects 2022-07-26 12:41:51 -04:00
jeremystretch
d442f8fd60 Fixes #9843: Fix rendering of custom field values (regression from #9647) 2022-07-26 11:09:51 -04:00
jeremystretch
7631722f97 Merge branch 'temp' into feature 2022-07-26 08:36:50 -04:00
Daniel Sheppard
6d30c07dd0 Update changelog for #9844 2022-07-26 07:29:18 -05:00
Daniel Sheppard
6f7289f932 Fixes #9844 - Add dedicated device_vlan form field 2022-07-26 07:22:21 -05:00
jeremystretch
2583abc39d Fix null cable termination representation 2022-07-25 11:34:16 -04:00
jeremystretch
12476036cd Changelog for #9794, #9818 2022-07-25 09:55:20 -04:00
Jeremy Stretch
91070f823a Merge pull request #9819 from jaylik/jaylik-9818
Fixes #9818: Typo fix in CableForm
2022-07-25 09:52:42 -04:00
Jeremy Stretch
8df4966a2b Merge pull request #9796 from mzbroch/mzb-9102,4
Fixes 9794: Typo fix in REARPORT_BUTTONS template code
2022-07-25 09:50:27 -04:00
Renato Almeida de Oliveira
7d6882bec2 Change display to Modal 2022-07-23 20:24:33 +00:00
Gabor SOMOGYVARI
451a0067c7 Closes #9825: Add Contacts to VM table view 2022-07-22 10:42:20 +02:00
Juho Ylikorpi
e2580ea469 fixes #9818 2022-07-21 16:54:23 +03:00
jeremystretch
abf11fbcb8 Merge branch 'develop' into feature 2022-07-20 12:20:33 -04:00
jeremystretch
383918d83b PRVB 2022-07-20 11:15:02 -04:00
Jeremy Stretch
f8cbd322ba Merge pull request #9801 from netbox-community/develop
Release v3.2.7
2022-07-20 11:13:00 -04:00
jeremystretch
9835d6b2df Release NetBox v3.2.7 2022-07-20 10:57:11 -04:00
jeremystretch
17e00ac040 Fixes #9705: Support filter expressions for the serial field on racks, devices, and inventory items 2022-07-20 10:39:36 -04:00
Marek Zbroch
e92b7f8bb9 Typo fix in REARPORT_BUTTONS template code 2022-07-20 13:02:10 +02:00
jeremystretch
1c9db2d9f8 Fixes #9499: Fix filtered bulk deletion of VM Interfaces 2022-07-19 16:21:32 -04:00
jeremystretch
44586743ea Fixes #9437: Standardize form submission buttons and behavior when using enter key 2022-07-19 14:21:20 -04:00
jeremystretch
802d9d2b6e Fixes #9749: Retain original slug values when modifying object names 2022-07-19 13:01:51 -04:00
jeremystretch
a7a20ad2ea Fixes #9775: Fix exception when viewing a report with no descripton 2022-07-19 13:01:21 -04:00
Jeremy Stretch
124ff23e3d Merge pull request #9750 from smuth4/fix/broken-image-urls
Fixes #9634: Respect image URLs which are already fully formed
2022-07-19 12:46:32 -04:00
Jeremy Stretch
abfa6a325a Merge pull request #9748 from mzbroch/mzb-9102
Fixes #9768: Typo fix in CableEditView
2022-07-19 10:05:14 -04:00
jeremystretch
0e18292e41 Add summary release notes for v3.3 2022-07-18 13:09:45 -04:00
jeremystretch
6d53788ea2 Changelog for #9765 2022-07-18 13:05:12 -04:00
Jeremy Stretch
fae9874dde Merge pull request #9766 from kkthxbye-code/fix-9765
Fixes #9765 - Fix "Total segment" count on trace view
2022-07-18 13:04:01 -04:00
jeremystretch
b8da66bb55 Fixes #9733: Handle split paths during trace when fanning out to front ports with differing cables 2022-07-18 11:51:59 -04:00
kkthxbye-code
8a2276e791 Use segment_count for segment count on trace view 2022-07-18 16:17:16 +02:00
Jeremy Stretch
4bdef80554 Merge pull request #9752 from mzbroch/mzb-9102#2
Fixes #9730 - Fix CableForm Validation for #9102
2022-07-18 10:03:48 -04:00
jeremystretch
1a028f77d4 Changelog for #9754 2022-07-18 09:16:43 -04:00
Jeremy Stretch
7603468abc Merge pull request #9757 from kkthxbye-code/fix-9754-2
Fixes #9754 -Revert #9735 & #9696
2022-07-18 08:40:45 -04:00
kkthxbye-code
b854cefb57 Revert #9735 & #9696 2022-07-17 17:33:47 +02:00
Marek Zbroch
58b191b439 Fix CableForm Validation for #9102 2022-07-17 09:28:58 +02:00
Stephen Muth
3d475e5afa Fixes #9634: Respect image URLs which are already fully formed
For local storage, URLs will always be relative, but some custom storage backends
such as S3 may return absolute ones.
2022-07-16 11:46:25 -04:00
Marek Zbroch
f385a5fd5e Typo fix in CableEditView 2022-07-16 09:42:01 +02:00
jeremystretch
250265c3d9 Fixes #9746: Permit filtering interfaces by arbitrary speed value in UI 2022-07-15 15:40:55 -04:00
jeremystretch
e07dd3ddcb Define NESTED_SERIALIZER_PREFIX constant 2022-07-15 15:31:42 -04:00
jeremystretch
68f53aaa87 Closes #9745: Add wireless LANs and links to global search 2022-07-15 15:28:00 -04:00
Jeremy Stretch
5fda5cc08c Merge pull request #9742 from henryriveraCS/develop
Corrected typo for description of 'snapshots'
2022-07-15 14:53:15 -04:00
jeremystretch
68b87dd668 Fixes #9729: Fix ordering of content type creation to ensure compatability with demo data 2022-07-15 13:27:20 -04:00
Brian Candler
587a34442a Documentation: distinguish release and git upgrade processes
Fixes #9743
2022-07-15 17:10:15 +01:00
Henry
6da171a699 Corrected typo for description of 'snapshots' 2022-07-15 10:52:37 -04:00
jeremystretch
024e7d8651 Fixes #9728: Fix validation when assigning a virtual machine to a device 2022-07-15 10:19:56 -04:00
jeremystretch
e8dd952aa5 Fix migration progress output 2022-07-15 10:07:35 -04:00
jeremystretch
fe2fae5b86 Closes #9741: Check for UserConfig instance during user login 2022-07-15 09:42:12 -04:00
jeremystretch
5b5160ca6f Fixes #9715: Fix SOCIAL_AUTH_PIPELINE config parameter not taking effect 2022-07-15 08:34:30 -04:00
Jeremy Stretch
b9dd654e7a Merge pull request #9735 from kkthxbye-code/fix-9734
Fixes #9734 & #9713 - Only set focus on select field search boxes if the select is open
2022-07-15 08:14:46 -04:00
kkthxbye-code
b0df24e6d1 UI: Only set focus on select field search boxes if the select is open 2022-07-15 08:51:05 +02:00
jeremystretch
868e94fb73 Release v3.3-beta1 2022-07-14 12:04:53 -04:00
jeremystretch
15395a56e7 Move L2VPN into new menu group 2022-07-14 11:02:00 -04:00
jeremystretch
29c81a788f Clean up connection tables 2022-07-14 10:37:27 -04:00
jeremystretch
0615252e15 Add progress output to cable migration 2022-07-14 10:33:20 -04:00
jeremystretch
be00d1f3c6 Fix erroneous import 2022-07-14 08:36:16 -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
fb2bfe2337 Introduce GenericObjectSerializer 2022-07-13 15:12:53 -04:00
Renato Almeida de Oliveira
e135f8e74d Include Network information in Prefix Template Issue:#9505 2022-07-13 02:49:14 +00:00
jeremystretch
43a4a9c86d Complete release notes 2022-07-12 16:29:43 -04:00
jeremystretch
43b27cc052 Misc cleanup 2022-07-12 16:29:26 -04:00
jeremystretch
53372a7471 #8157: General cleanup & fix tests 2022-07-11 21:51:39 -04:00
jeremystretch
1ddb219a0c Documentation cleanup 2022-07-11 17:29:25 -04:00
jeremystretch
2264937f81 Consolidate custom field migrations 2022-07-11 17:11:58 -04:00
jeremystretch
8a8ada8529 #9177: Use TenancyColumnsMixin (from #9686) 2022-07-11 16:14:46 -04:00
jeremystretch
123e758c6d Closes #9708: Render user API tokens in a table 2022-07-11 15:43:59 -04:00
jeremystretch
531d961d30 Add API tokens to user menu 2022-07-11 14:47:15 -04:00
jeremystretch
c380fd00bf Merge branch 'develop' into feature 2022-07-11 12:58:24 -04:00
jeremystretch
57397570c0 Drop extraneous/invalid prefetches 2022-07-11 12:45:53 -04:00
jeremystretch
e106d7ac3a PRVB 2022-07-11 12:11:50 -04:00
jeremystretch
29eb37857c Merge branch 'develop' into feature 2022-07-08 16:06:27 -04:00
Jeremy Stretch
6c9f2734a2 Merge pull request #9615 from netbox-community/9102-cabling
Closes #9102: Add support for multi-termination cable ends
2022-07-08 14:59:38 -04:00
jeremystretch
f386ec82ae Fix CablePath serialization for pass-through port paths 2022-07-08 13:55:13 -04:00
jeremystretch
ac4a87de13 Improve display of related objects in cables list 2022-07-08 13:33:43 -04:00
jeremystretch
42e5282283 Improve filtering cables by termination device/rack/site 2022-07-08 11:44:28 -04:00
jeremystretch
11707cb3b1 Fix trace() loop 2022-07-07 19:08:20 -04:00
jeremystretch
d444aa1110 Fix support for tracing across bridge relationships 2022-07-07 14:35:02 -04:00
jeremystretch
a858e041e4 Cache properties which return related objects 2022-07-07 14:23:05 -04:00
jeremystretch
13ef5dc0b3 Extend Interface.link_peers() to support WirelessLinks 2022-07-07 13:57:39 -04:00
jeremystretch
9a7f3f8c1a Cleanup for #9102 2022-07-07 12:48:44 -04:00
jeremystretch
1beb8522b9 #9102: Document API changes 2022-07-06 16:02:53 -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
78a3dfc5d9 Changelog for #8157 2022-07-06 13:38: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
jeremystretch
1e1ce550c0 Update L2VPN migration 2022-07-06 12:53:10 -04:00
jeremystretch
4bb4bbce14 Clean up validation 2022-07-06 12:49:00 -04:00
jeremystretch
29a46d2c18 Add support for VM interface termination via bulk import 2022-07-06 12:48:28 -04:00
Daniel Sheppard
878c465c56 Update Termination table rendering on L2VPN View 2022-07-06 09:10:10 -05:00
Daniel Sheppard
f1c8926252 Fix error 2022-07-06 09:01:08 -05:00
Daniel Sheppard
5bcc3a3fb9 Update docs 2022-07-06 09:00:33 -05:00
Daniel Sheppard
30350e3b40 More fixes as a result of code review 2022-07-06 08:57:15 -05:00
Daniel Sheppard
0004b834fb Commit fixes Jeremy suggested
Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2022-07-06 08:17:50 -05:00
Daniel Sheppard
dbb1773e15 Remove extraneous imports
Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2022-07-06 08:04:33 -05:00
Daniel Sheppard
8e39e7f830 Change API urls to plural form
Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2022-07-06 08:03:07 -05:00
Daniel Sheppard
aa856e75e8 Change Virtual Circuits to L2VPN
Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2022-07-06 08:02:44 -05:00
Daniel Sheppard
b1729f2127 Change Virtual Circuits to L2VPN
Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2022-07-06 08:02:29 -05:00
jeremystretch
277c2ff869 Closes #8171: Populate next available address when cloning an IP 2022-07-01 16:36:24 -04:00
jeremystretch
23f391c5b5 Closes #9228: Add serialize_object() method to ChangeLoggingMixin 2022-07-01 15:52:16 -04:00
jeremystretch
a5124ab9c8 Closes #8511: Enable custom fields and tags for circuit terminations 2022-07-01 15:10:31 -04:00
jeremystretch
a57398b0d6 Closes #9647: Introduce customfield_value template tag 2022-07-01 14:45:22 -04:00
jeremystretch
c11af40a06 prepare_cloned_fields() should always return a QueryDict 2022-07-01 13:52:37 -04:00
jeremystretch
12c138b341 Closes #9074: Enable referencing the current user when evaluating permission constraints 2022-07-01 13:34:10 -04:00
jeremystretch
c6dfdf10e5 Introduce qs_filter_from_constraints() for constructing object permission QS filters 2022-07-01 11:49:36 -04:00
jeremystretch
ad5fd01ea4 Merge branch 'develop' into feature 2022-07-01 11:37:18 -04:00
jeremystretch
be778353b7 #1099: Restore PoE fields on interface edit form 2022-06-30 17:13:26 -04:00
Craig Pund
76e634330f draft for error handling on device with no name 2022-06-30 16:00:03 -04:00
jeremystretch
3a6f46bf38 Closes #9075: Introduce AbortRequest exception for cleanly interrupting object mutations 2022-06-30 15:15:07 -04:00
jeremystretch
65f4895dd6 Add ActionsMixin to __all__ 2022-06-30 14:35:41 -04:00
Craig Pund
ef03a2f383 fix return url to account 4 filtered device lists 2022-06-30 14:13:56 -04:00
Daniel Sheppard
5b397a9827 Add docs 2022-06-30 08:29:08 -05:00
Craig Pund
5dff7433e8 add bulk device rename button to device_list 2022-06-30 01:38:53 -04:00
Craig Pund
fa014fcbf0 add device bulk rename view and url 2022-06-30 01:38:38 -04:00
Daniel Sheppard
dd6bfed565 Add migration file 2022-06-29 18:37:31 -05:00
Daniel Sheppard
6e983d1542 Fix up some PEP errors 2022-06-29 16:14:30 -05:00
Daniel Sheppard
3be9f6c4f3 #8157 - Final work on L2VPN model 2022-06-29 16:01:20 -05:00
jeremystretch
779969f150 Closes #9070: Hide navigation menu items based on user permissions 2022-06-29 16:36:10 -04:00
Jeremy Stretch
2245f1bf41 Merge pull request #9630 from netbox-community/9092-ObjectChildrenView
Closes #9092: Introduce support for use of ObjectChildrenView by plugins
2022-06-29 14:49:17 -04:00
jeremystretch
a0f9b5e47b Document support for ObjectChildrenView 2022-06-29 14:30:47 -04:00
jeremystretch
4649bc632c Update templates for subclasses of ObjectChildrenView 2022-06-29 14:21:57 -04:00
jeremystretch
cdcb77dea8 Move actions determination to a mixin 2022-06-29 14:21:30 -04:00
jeremystretch
c5770392e3 Refactor ObjectChildrenView 2022-06-28 18:14:57 -04:00
jeremystretch
cd3111ca8d Merge branch 'develop' into feature 2022-06-28 16:55:49 -04:00
Daniel Sheppard
03f1584d3a L2VPN Clean Tree 2022-06-27 23:24:50 -05:00
jeremystretch
03d6e25dea Remove obsolete validation logic 2022-06-27 16:49:04 -04:00
jeremystretch
8bbc592261 Add SVG rendering to cable path tests 2022-06-27 15:53:34 -04:00
jeremystretch
9d35a9d912 Fix bug with path padding 2022-06-27 15:34:54 -04:00
jeremystretch
7622d90c1d Extend cable tracing to support terminations to different parent objects 2022-06-27 15:22:09 -04:00
jeremystretch
fcd1daaf79 Update power utilization calculations for new cabling model 2022-06-27 14:34:08 -04:00
jeremystretch
25ed3390cb Merge branch 'feature' into 9102-cabling 2022-06-27 12:12:34 -04:00
jeremystretch
7dd5f9e720 Closes #9177: Add tenant assignment for wireless LANs & links 2022-06-27 11:30:52 -04:00
Jeremy Stretch
f6c52e0616 Merge pull request #9606 from netbox-community/4434-rack-device-highlights
Closes #4434: Enable highlighting devices within rack elevations
2022-06-24 11:44:11 -04:00
jeremystretch
fc02e15fb1 Closes #4434: Enable highlighting devices within rack elevations 2022-06-24 11:04:38 -04:00
jeremystretch
f9d81fd362 Closes #9414: Add clone() method to NetBoxModel for copying instance attributes 2022-06-23 15:21:10 -04:00
Jeremy Stretch
12bd3840f9 Merge pull request #9595 from netbox-community/9536-token-last-used
Closes #9536: Record last used time for API tokens
2022-06-23 12:28:30 -04:00
jeremystretch
dc05e62ce0 Documentation & clenaup for #9536 2022-06-23 12:15:02 -04:00
Jeremy Stretch
4f33685ca7 Merge pull request #9554 from PieterL75/issue_9536
Closes #9536: Last Used field on API tokens
2022-06-23 11:53:58 -04:00
Jeremy Stretch
cfb9605e9b Merge branch 'feature' into issue_9536 2022-06-23 10:35:27 -04:00
Jeremy Stretch
f563ba7a9e Merge pull request #9590 from netbox-community/8233-api-token-ip
Closes #8233: Restrict API tokens by source IP
2022-06-23 08:29:45 -04:00
jeremystretch
7e4b34560f Update token model docs 2022-06-23 08:12:36 -04:00
jeremystretch
d4db656940 Allowed IPs should be optional on Token 2022-06-23 08:09:39 -04:00
jeremystretch
3c15419bd0 Introduce IPNetworkSerializer to serialize allowed token IPs 2022-06-22 21:51:43 -04:00
jeremystretch
e3b7bba84f Add token authentication tests 2022-06-22 21:10:18 -04:00
jeremystretch
a38a880e67 Refactor source IP resolution logic 2022-06-22 17:01:07 -04:00
Jeremy Stretch
7043c6faf9 Merge pull request #9175 from PieterL75/issue_8233
Closes #8233: Restrict API key access by source IP
2022-06-22 16:23:59 -04:00
jeremystretch
379880cd84 Closes #9582: Enable assigning config contexts based on device location 2022-06-22 16:10:48 -04:00
jeremystretch
341615668b Closes #7120: Add termination_date field to Circuit 2022-06-22 15:09:50 -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
64080e808e Refactor dcim.svg module 2022-06-20 14:30:25 -04:00
Jeremy Stretch
7decad1ff3 Merge pull request #9571 from netbox-community/51-half-height-rack-units
Closes #51: Half height rack units
2022-06-20 14:13:44 -04:00
jeremystretch
103729c085 Add test for 0.5U devices 2022-06-20 13:57:37 -04:00
jeremystretch
4ced0bed13 Clean up rack model tests 2022-06-20 12:37:56 -04:00
jeremystretch
0d6d68c62f Fix YAML representation of decimal values 2022-06-20 12:07:59 -04:00
jeremystretch
278891c262 Fix rack utilization calculation 2022-06-20 12:07:59 -04:00
jeremystretch
ae12948558 Refactor device rendering methods 2022-06-20 12:07:59 -04:00
jeremystretch
0c915f7de9 Clean up rack elevation rendering 2022-06-20 12:06:34 -04:00
jeremystretch
84f0561712 Initial work on half-height RUs 2022-06-20 12:05:06 -04:00
jeremystretch
ba12db3019 Merge branch 'develop' into feature 2022-06-20 11:50:23 -04:00
Pieter Lambrecht
81cea9b9d9 Show LastUsed in /user/api-tokens/ 2022-06-19 13:03:03 +02:00
Pieter Lambrecht
ae342a0506 Correct delay time from 6 to 60 seconds 2022-06-19 12:41:44 +02:00
Pieter Lambrecht
f8221340af Disable token last_used update when in Maint mode 2022-06-19 12:40:52 +02:00
PieterL75
536239d272 Merge branch 'feature' into issue_8233 2022-06-17 16:31:13 +02:00
Pieter Lambrecht
d32bbd06cf Fix last_used=None error 2022-06-17 15:52:12 +02:00
Pieter Lambrecht
5d868168a5 Rename timediff to lasted_used_diff 2022-06-17 14:58:20 +02:00
Pieter Lambrecht
5d4575ed25 Only update every 60 seconds 2022-06-17 14:57:19 +02:00
Pieter Lambrecht
c04b4bbbfa Add last_used to Token model and update when used 2022-06-17 14:45:56 +02:00
jeremystretch
9b51c2a0b2 Fix typo 2022-06-09 12:45:48 -04:00
jeremystretch
87b3be26a0 Closes #9434: Enabled django-rich test runner for more user-friendly output 2022-06-09 11:48:32 -04:00
jeremystretch
a74dba865c Merge branch 'develop' into feature 2022-06-09 11:38:21 -04:00
jeremystretch
180adb42a3 Use polylines to draw cable fanouts 2022-06-08 16:29:26 -04:00
jeremystretch
8d92ec2007 Add support for cable fan-outs 2022-06-07 16:43:22 -04:00
jeremystretch
ecba9699ed Introduce Node class for SVG boxes 2022-06-07 14:56:46 -04:00
jeremystretch
0b0a646f87 Clean up cable termination changes 2022-06-03 14:15:28 -04:00
jeremystretch
537383e071 Add cable topology tests 2022-06-02 12:40:31 -04:00
jeremystretch
bab6fb0de2 Update SVG trace rendering to support multiple terminations per cable end 2022-06-02 11:07:26 -04:00
jeremystretch
cf7a091319 Refactor SVG module 2022-06-02 08:28:27 -04:00
jeremystretch
3362bc3106 Remove link peer fields from cable termination models 2022-06-01 16:48:56 -04:00
jeremystretch
6befd2155a Clean up tests 2022-06-01 11:38:31 -04:00
jeremystretch
7b02070007 Merge branch 'feature' into 9102-cabling 2022-05-31 16:10:10 -04:00
jeremystretch
32322e95b6 Merge branch 'develop' into feature 2022-05-31 15:50:23 -04:00
jeremystretch
6280398bc1 Clean up tests 2022-05-26 16:40:20 -04:00
jeremystretch
1bd39e6568 Fix filtering cables by connected device/rack/site 2022-05-26 16:01:20 -04:00
jeremystretch
bd950e9ca6 Merge branch 'feature' into 9102-cabling 2022-05-26 15:37:29 -04:00
jeremystretch
db42589cca Closes #5303: A virtual machine may be assigned to a site and/or cluster 2022-05-26 14:59:49 -04:00
jeremystretch
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
jeremystretch
31024ce672 Changelog & cleanup for #9166 2022-05-24 16:39:05 -04:00
Jeremy Stretch
aea023357b Merge pull request #9411 from kkthxbye-code/fix-9166-2
Fixes #9166 - Add the option to make custom fields read-only or hidden in UI
2022-05-24 16:14:23 -04:00
kkthxbye
6e7c5dcaed Remove whitespace from blank line 2022-05-24 10:38:55 +02:00
kkthxbye
c14a2a0a39 Exclude hidden custom fields from tables 2022-05-24 10:27:29 +02:00
kkthxbye
20eaa7d069 #9166 - Add UI Visibility setting for custom fields 2022-05-24 10:12:32 +02:00
jeremystretch
50c872c47c Clean up tests 2022-05-23 14:50:58 -04:00
jeremystretch
4ec26aa6aa Fix population of initial field selections when creating a cable 2022-05-23 13:52:39 -04:00
jeremystretch
a7d3e5e7f5 Merge all cable creation URLs into a single view 2022-05-23 13:22:45 -04:00
jeremystretch
7b5ff4c1a5 Merge cable creation/edit views & forms 2022-05-20 16:53:23 -04:00
jeremystretch
64146b8cb1 Closes #8471: Add status field to Cluster 2022-05-19 16:13:22 -04:00
jeremystretch
d155c39f59 Update cable termination type/ID filters 2022-05-18 16:48:49 -04:00
jeremystretch
a909ceda84 Simplify assignment of new cable terminations 2022-05-18 15:49:52 -04:00
jeremystretch
922916ae99 Improve cable termination panel layout 2022-05-18 12:56:16 -04:00
jeremystretch
75eea50d71 Order CableTerminations by cable, cable_end 2022-05-16 16:35:32 -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
399afffddf Fix CablePath migration 2022-05-13 16:46:55 -04:00
jeremystretch
906c3dca8b Tests cleanup 2022-05-13 16:29:19 -04:00
jeremystretch
1b593384e5 Restore reverse relation to CableTerminations from Cable 2022-05-13 15:45:58 -04:00
jeremystretch
951627093c Test cleanup 2022-05-13 15:34:01 -04:00
jeremystretch
6ff2e55ce4 Add origins, destinations properties on CablePath 2022-05-13 15:05:38 -04:00
jeremystretch
3082c76ec6 Update object trace() method 2022-05-13 14:37:20 -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
594964aebe Simplify Cable init signature 2022-05-12 17:11:01 -04:00
jeremystretch
bb9eb119a4 Extend cable tracing tests 2022-05-12 16:08:44 -04:00
jeremystretch
4d5bcb65c8 Fix up pass-through port traversal 2022-05-12 16:08:44 -04:00
jeremystretch
c88f7b8408 Fix circuit termination tracing & update tests 2022-05-12 16:08:44 -04:00
jeremystretch
8bc6d8cb23 Introduce CablePath.retrace() to handle deleted cables 2022-05-12 16:08:44 -04:00
jeremystretch
eb4984afe6 Correct test queries 2022-05-12 16:08:44 -04:00
jeremystretch
d89f067c00 Update & restore rebuild_paths() 2022-05-12 16:08:44 -04:00
jeremystretch
5667a9c456 Refactor CablePath.from_origin() 2022-05-12 16:08:44 -04:00
jeremystretch
b44bfa1aa6 WIP 2022-05-12 16:08:44 -04:00
jeremystretch
304282bd4f Update tests 2022-05-12 16:08:44 -04:00
jeremystretch
93daa6406b Fix cable path tracing 2022-05-12 16:08:44 -04:00
jeremystretch
ecee7421ea Fix terminations assignment 2022-05-12 16:08:44 -04:00
jeremystretch
83fdab5feb Change CablePath.path to JSONField 2022-05-12 16:08:44 -04:00
jeremystretch
e129ae50f0 Start updating tests 2022-05-12 16:08:44 -04:00
jeremystretch
f0b722b0a5 Update cable tracing logic 2022-05-12 16:08:44 -04:00
jeremystretch
82706eb3a6 Migrate CablePath to use two-dimensional array 2022-05-12 16:08:44 -04:00
jeremystretch
c22007939b Ensure cable is cached on terminating endpoints 2022-05-12 16:08:44 -04:00
jeremystretch
f0fc8bf2cf Restrict A terminations by parent object 2022-05-12 16:08:44 -04:00
jeremystretch
c3742f63fd Update signal handlers (WIP) 2022-05-12 16:08:44 -04:00
jeremystretch
5d37f9f975 Update cable connection forms 2022-05-12 16:08:44 -04:00
jeremystretch
1f4ad444ae Introduce CableTermination model & migrate data 2022-05-12 16:08:44 -04:00
jeremystretch
907323d46f Revert initial model changes 2022-05-12 16:08:44 -04:00
jeremystretch
e0fc1b4f41 Remove errant print statement 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
6c290353c1 Allow editing A side termination when creating cable 2022-05-12 16:08:44 -04:00
jeremystretch
c48c8cc353 Remove termination IDs from cable creation view paths 2022-05-12 16:08:44 -04:00
jeremystretch
e208404e3a Merge branch 'develop' into feature 2022-05-12 14:16:01 -04:00
jeremystretch
01d2ede097 Closes #1202: Support overlapping assignment of NAT IP addresses 2022-05-11 16:22:07 -04:00
jeremystretch
e2a02de6e9 Remove erroneous field from prefetch 2022-05-11 16:13:35 -04:00
jeremystretch
ca10a7834a Merge branch 'develop' into feature 2022-05-11 16:09:25 -04:00
jeremystretch
61d756c7c4 Closes #9261: NetBoxTable no longer automatically clears pre-existing calls to prefetch_related() on its queryset 2022-04-29 13:09:39 -04:00
jeremystretch
9ae25e9449 Merge branch 'develop' into feature 2022-04-29 09:05:52 -04:00
jeremystretch
e2b32757d8 Merge branch 'develop' into feature 2022-04-25 12:20:46 -04:00
Pieter Lambrecht
fa4807be8c Update releasenotes 2022-04-19 21:55:39 +02:00
Pieter Lambrecht
086e34f728 Updated docs relnotes to refer to 8233 2022-04-19 21:33:29 +02:00
Pieter Lambrecht
2587720298 Fix 8878: Restrict API key usage by Source IP 2022-04-19 14:44:35 +02:00
Jeremy Stretch
098ef91583 Merge pull request #9144 from netbox-community/8495-custom-field-groups
Closes #8495: Enable custom field grouping
2022-04-15 14:57:28 -04:00
jeremystretch
17df8a5c43 Closes #8495: Enable custom field grouping 2022-04-15 14:45:28 -04:00
jeremystretch
4fac10ac4a Merge branch 'develop' into feature 2022-04-15 12:09:28 -04:00
jeremystretch
03535ce50b Closes #8995: Enable arbitrary ordering of REST API results 2022-04-08 16:00:33 -04:00
1427 changed files with 463255 additions and 32326 deletions

View File

@@ -10,21 +10,31 @@ body:
installation. If you're having trouble with installation or just looking for
assistance with using NetBox, please visit our
[discussion forum](https://github.com/netbox-community/netbox/discussions) instead.
- type: dropdown
attributes:
label: Deployment Type
description: How are you running NetBox?
options:
- Self-hosted
- NetBox Cloud
validations:
required: true
- type: input
attributes:
label: NetBox version
label: NetBox Version
description: What version of NetBox are you currently running?
placeholder: v3.2.6
placeholder: v3.7.2
validations:
required: true
- type: dropdown
attributes:
label: Python version
label: Python Version
description: What version of Python are you currently running?
options:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
validations:
required: true
- type: textarea

View File

@@ -3,10 +3,16 @@ blank_issues_enabled: false
contact_links:
- name: 📖 Contributing Policy
url: https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md
about: "Please read through our contributing policy before opening an issue or pull request"
about: "Please read through our contributing policy before opening an issue or pull request."
- name: ❓ Discussion
url: https://github.com/netbox-community/netbox/discussions
about: "If you're just looking for help, try starting a discussion instead"
about: "If you're just looking for help, try starting a discussion instead."
- name: 🌎 Correct a Translation
url: https://explore.transifex.com/netbox-community/netbox/
about: "Spot an incorrect translation? You can propose a fix on Transifex."
- name: 💡 Plugin Idea
url: https://plugin-ideas.netbox.dev
about: "Have an idea for a plugin? Head over to the ideas board!"
- name: 💬 Community Slack
url: https://netdev.chat/
about: "Join #netbox on the NetDev Community Slack for assistance with installation issues and other problems"
url: https://netdev.chat
about: "Join #netbox on the NetDev Community Slack for assistance with installation issues and other problems."

24
.github/ISSUE_TEMPLATE/deprecation.yaml vendored Normal file
View File

@@ -0,0 +1,24 @@
---
name: 🗑️ Deprecation
description: The removal of an existing feature or resource
labels: ["type: deprecation"]
body:
- type: textarea
attributes:
label: Proposed Changes
description: >
Describe in detail the proposed changes. What is being removed?
validations:
required: true
- type: textarea
attributes:
label: Justification
description: Please provide justification for the proposed change(s).
validations:
required: true
- type: textarea
attributes:
label: Impact
description: List all areas of the application that will be affected by this change.
validations:
required: true

View File

@@ -19,11 +19,15 @@ body:
label: Area
description: To what section of the documentation does this change primarily pertain?
options:
- Installation instructions
- Configuration parameters
- Functionality/features
- REST API
- Administration/development
- Features
- Installation/upgrade
- Getting started
- Configuration
- Customization
- Integrations/API
- Plugins
- Administration
- Development
- Other
validations:
required: true

View File

@@ -14,7 +14,7 @@ body:
attributes:
label: NetBox version
description: What version of NetBox are you currently running?
placeholder: v3.2.6
placeholder: v3.7.2
validations:
required: true
- type: dropdown

37
.github/ISSUE_TEMPLATE/translation.yaml vendored Normal file
View File

@@ -0,0 +1,37 @@
---
name: 🌍 Translation
description: Request support for a new language in the user interface
labels: ["type: translation"]
body:
- type: markdown
attributes:
value: >
**NOTE:** This template is used only for proposing the addition of *new* languages. Please do
not use it to request changes to existing translations.
- type: input
attributes:
label: Language
description: What is the name of the language in English?
validations:
required: true
- type: input
attributes:
label: ISO 639-1 code
description: >
What is the two-letter [ISO 639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
assigned to the language?
validations:
required: true
- type: dropdown
attributes:
label: Volunteer
description: Are you a fluent speaker of this language **and** willing to contribute a translation map?
options:
- "Yes"
- "No"
validations:
required: true
- type: textarea
attributes:
label: Comments
description: Any other notes you would like to share

View File

@@ -1,15 +1,17 @@
<!--
Thank you for your interest in contributing to NetBox! Please note
that our contribution policy requires that a feature request or bug
report be opened for approval prior to filing a pull request. This
helps avoid wasting time and effort on something that we might not
be able to accept.
Thank you for your interest in contributing to NetBox! Please note that
our contribution policy requires that a feature request or bug report be
approved and assigned prior to opening a pull request. This helps avoid
waste time and effort on a proposed change that we might not be able to
accept.
Please indicate the relevant feature request or bug report below.
IF YOUR PULL REQUEST DOES NOT REFERENCE AN ACCEPTED BUG REPORT OR
FEATURE REQUEST, IT WILL BE MARKED AS INVALID AND CLOSED.
IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED
TO YOU, IT WILL BE CLOSED AUTOMATICALLY.
Please specify your assigned issue number on the line below.
-->
### Fixes: <ISSUE NUMBER GOES HERE>
### Fixes: #1234
<!--
Please include a summary of the proposed changes below.
-->

View File

@@ -1,5 +1,7 @@
name: CI
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
@@ -7,7 +9,7 @@ jobs:
NETBOX_CONFIGURATION: netbox.configuration_testing
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.8', '3.9', '3.10', '3.11']
node-version: ['14.x']
services:
redis:
@@ -29,15 +31,15 @@ jobs:
steps:
- name: Check out repo
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
@@ -45,7 +47,7 @@ jobs:
run: npm install -g yarn
- name: Setup Node.js with Yarn Caching
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn
@@ -66,6 +68,9 @@ jobs:
- name: Collect static files
run: python netbox/manage.py collectstatic --no-input
- name: Check for missing migrations
run: python netbox/manage.py makemigrations --check
- name: Check PEP8 compliance
run: pycodestyle --ignore=W504,E501 --exclude=node_modules netbox/

View File

@@ -4,18 +4,20 @@ name: 'Lock threads'
on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
permissions:
issues: write
pull-requests: write
discussions: write
jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v2
- uses: dessant/lock-threads@v5
with:
github-token: ${{ github.token }}
issue-lock-inactive-days: '90'
issue-exclude-created-before: ''
issue-exclude-labels: ''
issue-lock-labels: ''
issue-lock-comment: ''
issue-inactive-days: 90
pr-inactive-days: 30
discussion-inactive-days: 180
issue-lock-reason: 'resolved'
process-only: 'issues'

View File

@@ -1,14 +1,21 @@
# close-stale-issues (https://github.com/marketplace/actions/close-stale-issues)
name: 'Close stale issues/PRs'
on:
schedule:
- cron: '0 4 * * *'
workflow_dispatch:
permissions:
issues: write
pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v5
- uses: actions/stale@v8
with:
close-issue-message: >
This issue has been automatically closed due to lack of activity. In an
@@ -17,7 +24,7 @@ jobs:
necessary.
close-pr-message: >
This PR has been automatically closed due to lack of activity.
days-before-stale: 60
days-before-stale: 90
days-before-close: 30
exempt-issue-labels: 'status: accepted,status: blocked,status: needs milestone'
operations-per-run: 100

View File

@@ -1,181 +1,132 @@
## Getting Help
**Looking for help?** NetBox has a vast, active community of fellow users that may be able to provide assistance. Just [start a discussion](https://github.com/netbox-community/netbox/discussions/new) right here on GitHub! Or if you'd prefer to chat, join us live in the `#netbox` channel on the [NetDev Community Slack](https://netdev.chat/)!
If you encounter any issues installing or using NetBox, try one of the
following resources to get assistance. Please **do not** open a GitHub issue
except to report bugs or request features.
<div align="center">
<h3>
:bug: <a href="#bug-reporting-bugs">Report a bug</a> &middot;
:bulb: <a href="#bulb-feature-requests">Suggest a feature</a> &middot;
:arrow_heading_up: <a href="#arrow_heading_up-submitting-pull-requests">Submit a pull request</a>
</h3>
<h3>
:jigsaw: <a href="#jigsaw-creating-plugins">Create a plugin</a> &middot;
:rescue_worker_helmet: <a href="#rescue_worker_helmet-become-a-maintainer">Become a maintainer</a> &middot;
:heart: <a href="#heart-other-ways-to-contribute">Other ideas</a>
</h3>
</div>
<h3></h3>
### GitHub Discussions
## :information_source: Welcome to the Stadium!
GitHub's discussions are the best place to get help or propose rough ideas for
new functionality. Their integration with GitHub allows for easily cross-
referencing and converting posts to issues as needed. There are several
categories for discussions:
In her book [Working in Public](https://www.amazon.com/Working-Public-Making-Maintenance-Software/dp/0578675862), Nadia Eghbal defines four production models for open source projects, categorized by contributor and user growth: federations, clubs, toys, and stadiums. The NetBox project fits her definition of a stadium very well:
* **General** - General community discussion
* **Ideas** - Ideas for new functionality that isn't yet ready for a formal
feature request
* **Q&A** - Request help with installing or using NetBox
> Stadiums are projects with low contributor growth and high user growth. While they may receive casual contributions, their regular contributor base does not grow proportionately to their users. As a result, they tend to be powered by one or a few developers.
### Slack
The bulk of NetBox's development is carried out by a handful of core maintainers, with occasional contributions from collaborators in the community. We find the stadium analogy very useful in conveying the roles and obligations of both contributors and users.
For real-time chat, you can join the **#netbox** Slack channel on [NetDev Community](https://netdev.chat/).
Unfortunately, the Slack channel does not provide long-term retention of chat
history, so try to avoid it for any discussions would benefit from being
preserved for future reference.
If you're a contributor, actively working on the center stage, you have an obligation to produce quality content that will benefit the project as a whole. Conversely, if you're in the audience consuming the work being produced, you have the option of making requests and suggestions, but must also recognize that contributors are under no obligation to act on them.
## Reporting Bugs
NetBox users are welcome to participate in either role, on stage or in the crowd. We ask only that you acknowledge the role you've chosen and respect the roles of others.
* First, ensure that you're running the [latest stable version](https://github.com/netbox-community/netbox/releases)
of NetBox. If you're running an older version, it's possible that the bug has
already been fixed.
### General Tips for Working on GitHub
* Next, check the GitHub [issues list](https://github.com/netbox-community/netbox/issues)
to see if the bug you've found has already been reported. If you think you may
be experiencing a reported issue that hasn't already been resolved, please
click "add a reaction" in the top right corner of the issue and add a thumbs
up (+1). You might also want to add a comment describing how it's affecting your
installation. This will allow us to prioritize bugs based on how many users are
affected.
* Register for a free [GitHub account](https://github.com/signup) if you haven't already.
* You can use [GitHub Markdown](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) for formatting text and adding images.
* To help mitigate notification spam, please avoid "bumping" issues with no activity. (To vote an issue up or down, use a :thumbsup: or :thumbsdown: reaction.)
* Please avoid pinging members with `@` unless they've previously expressed interest or involvement with that particular issue.
* Familiarize yourself with [this list of discussion anti-patterns](https://github.com/bradfitz/issue-tracker-behaviors) and make every effort to avoid them.
* When submitting an issue, please be as descriptive as possible. Be sure to
provide all information request in the issue template, including:
## :bug: Reporting Bugs
* The environment in which NetBox is running
* The exact steps that can be taken to reproduce the issue
* Expected and observed behavior
* Any error messages generated
* Screenshots (if applicable)
:warning: Bug reports are used to call attention to some unintended or unexpected behavior in NetBox, such as when an error occurs or when the result of taking some action is inconsistent with the documentation. **Bug reports may not be used to suggest new functionality**; please see "feature requests" below if that is your goal.
* Please avoid prepending any sort of tag (e.g. "[Bug]") to the issue title.
The issue will be reviewed by a maintainer after submission and the appropriate
labels will be applied for categorization.
* First, ensure that you're running the [latest stable version](https://github.com/netbox-community/netbox/releases) of NetBox. If you're running an older version, it's likely that the bug has already been fixed.
* Keep in mind that we prioritize bugs based on their severity and how much
work is required to resolve them. It may take some time for someone to address
your issue.
* Next, search our [issues list](https://github.com/netbox-community/netbox/issues?q=is%3Aissue) to see if the bug you've found has already been reported. If you come across a bug report that seems to match, please click "add a reaction" in the top right corner of the issue and add a thumbs up (:thumbsup:). This will help draw more attention to it. Any comments you can add to provide additional information or context would also be much appreciated.
* If you can't find any existing issues (open or closed) that seem to match yours, you're welcome to [submit a new bug report](https://github.com/netbox-community/netbox/issues/new?label=type%3A+bug&template=bug_report.yaml). Be sure to complete the entire report template, including detailed steps that someone triaging your issue can follow to confirm the reported behavior. (If we're not able to replicate the bug based on the information provided, we'll ask for additional detail.)
* Some other tips to keep in mind:
* Error messages and screenshots are especially helpful.
* Don't prepend your issue title with a label like `[Bug]`; the proper label will be assigned automatically.
* Ensure that your reproduction instructions don't reference data in our [demo instance](https://demo.netbox.dev/), which gets rebuilt nightly.
* Verify that you have GitHub notifications enabled and are subscribed to your issue after submitting.
* We appreciate your patience as bugs are prioritized by their severity, impact, and difficulty to resolve.
* For more information on how bug reports are handled, please see our [issue
intake policy](https://github.com/netbox-community/netbox/wiki/Issue-Intake-Policy).
## Feature Requests
## :bulb: Feature Requests
* First, check the GitHub [issues list](https://github.com/netbox-community/netbox/issues)
to see if the feature you're requesting is already listed. (Be sure to search
closed issues as well, since some feature requests have been rejected.) If the
feature you'd like to see has already been requested and is open, click "add a
reaction" in the top right corner of the issue and add a thumbs up (+1). This
ensures that the issue has a better chance of receiving attention. Also feel
free to add a comment with any additional justification for the feature.
(However, note that comments with no substance other than a "+1" will be
deleted. Please use GitHub's reactions feature to indicate your support.)
* First, check the GitHub [issues list](https://github.com/netbox-community/netbox/issues?q=is%3Aissue) to see if the feature you have in mind has already been proposed. If you happen to find an open feature request that matches your idea, click "add a reaction" in the top right corner of the issue and add a thumbs up (:thumbsup:). This ensures that the issue has a better chance of receiving attention. Also feel free to add a comment with any additional justification for the feature.
* Before filing a new feature request, consider raising your idea in a
[GitHub discussion](https://github.com/netbox-community/netbox/discussions)
first. Feedback you receive there will help validate and shape the proposed
feature before filing a formal issue.
* If you have a rough idea that's not quite ready for formal submission yet, start a [GitHub discussion](https://github.com/netbox-community/netbox/discussions) instead. This is a great way to test the viability and narrow down the scope of a new feature prior to submitting a formal proposal, and can serve to generate interest in your idea from other community members.
* Good feature requests are very narrowly defined. Be sure to thoroughly
describe the functionality and data model(s) being proposed. The more effort
you put into writing a feature request, the better its chance is of being
implemented. Overly broad feature requests will be closed.
* Once you're ready, submit a feature request [using this template](https://github.com/netbox-community/netbox/issues/new?label=type%3A+feature&template=feature_request.yaml). Be sure to provide sufficient context and detail to convey exactly what you're proposing and why. The stronger your use case, the better chance your proposal has of being accepted.
* When submitting a feature request on GitHub, be sure to include all
information requested by the issue template, including:
* Some other tips to keep in mind:
* Don't prepend your issue title with a label like `[Feature]`; the proper label will be assigned automatically.
* Try to anticipate any likely questions about your proposal and provide that information proactively.
* Verify that you have GitHub notifications enabled and are subscribed to your issue after submitting.
* You're welcome to volunteer to implement your FR, but don't submit a pull request until it has been approved.
* A detailed description of the proposed functionality
* A use case for the feature; who would use it and what value it would add
to NetBox
* A rough description of changes necessary to the database schema (if
applicable)
* Any third-party libraries or other resources which would be involved
* For more information on how feature requests are handled, please see our [issue intake policy](https://github.com/netbox-community/netbox/wiki/Issue-Intake-Policy).
* Please avoid prepending any sort of tag (e.g. "[Feature]") to the issue
title. The issue will be reviewed by a moderator after submission and the
appropriate labels will be applied for categorization.
## :arrow_heading_up: Submitting Pull Requests
* For more information on how feature requests are handled, please see our
[issue intake policy](https://github.com/netbox-community/netbox/wiki/Issue-Intake-Policy).
* [Pull requests](https://docs.github.com/en/pull-requests) (a feature of GitHub) are used to propose changes to NetBox's code base. Our process generally goes like this:
* A user opens a new issue (bug report or feature request)
* A maintainer triages the issue and may mark it as needing an owner
* The issue's author can volunteer to own it, or someone else can
* A maintainer assigns the issue to whomever volunteers
* The issue owner submits a pull request that will resolve the issue
* A maintainer reviews and merges the pull request, closing the issue
## Submitting Pull Requests
* It's very important that you not submit a pull request until a relevant issue has been opened **and** assigned to you. Otherwise, you risk wasting time on work that may ultimately not be needed.
* If you're interested in contributing to NetBox, be sure to check out our
[getting started](https://docs.netbox.dev/en/stable/development/getting-started/)
documentation for tips on setting up your development environment.
* New pull requests should generally be based off of the `develop` branch, rather than `master`. The `develop` branch is used for ongoing development, while `master` is used for tracking stable releases. (If you're developing for an upcoming minor release, use `feature` instead.)
* Be sure to open an issue **before** starting work on a pull request, and
discuss your idea with the NetBox maintainers before beginning work. This will
help prevent wasting time on something that might we might not be able to
implement. When suggesting a new feature, also make sure it won't conflict with
any work that's already in progress.
* In most cases, it is not necessary to add a changelog entry: A maintainer will take care of this when the PR is merged. (This helps avoid merge conflicts resulting from multiple PRs being submitted simultaneously.)
* Once you've opened or identified an issue you'd like to work on, ask that it
be assigned to you so that others are aware it's being worked on. A maintainer
will then mark the issue as "accepted."
* Any pull request which does _not_ relate to an **accepted** issue will be closed.
* All new functionality must include relevant tests where applicable.
* When submitting a pull request, please be sure to work off of the `develop`
branch, rather than `master`. The `develop` branch is used for ongoing
development, while `master` is used for tagging stable releases.
* In most cases, it is not necessary to add a changelog entry: A maintainer will
take care of this when the PR is merged. (This helps avoid merge conflicts
resulting from multiple PRs being submitted simultaneously.)
* All code submissions should meet the following criteria (CI will enforce
these checks):
* Python syntax is valid
* All tests pass when run with `./manage.py test`
* PEP 8 compliance is enforced, with the exception that lines may be
* All code submissions must meet the following criteria (CI will enforce these checks where feasible):
* Consist entirely of original work
* Python syntax is valid
* All tests pass when run with `./manage.py test`
* PEP 8 compliance is enforced, with the exception that lines may be
greater than 80 characters in length
## Commenting
> [!CAUTION]
> Any contributions which include AI-generated or reproduced content will be rejected.
Only comment on an issue if you are sharing a relevant idea or constructive
feedback. **Do not** comment on an issue just to show your support (give the
top post a :+1: instead) or ask for an ETA. These comments will be deleted to
reduce noise in the discussion.
* Some other tips to keep in mind:
* If you'd like to volunteer for someone else's issue, please post a comment on that issue letting us know. (This will allow the maintainers to assign it to you.)
* Check out our [developer docs](https://docs.netbox.dev/en/stable/development/getting-started/) for tips on setting up your development environment.
* All new functionality must include relevant tests where applicable.
## Issue Lifecycle
## :jigsaw: Creating Plugins
New issues are handled according to our [issue intake policy](https://github.com/netbox-community/netbox/wiki/Issue-Intake-Policy).
Maintainers will assign label(s) and/or close new issues as the policy
dictates. This helps ensure a productive development environment and avoid
accumulating a large backlog of work.
Do you have an idea for something you'd like to build in NetBox, but might not be right for the core project? NetBox includes a powerful and extensive [plugins framework](https://docs.netbox.dev/en/stable/plugins/) that enables users to develop their own custom data models and integrations.
The core maintainers group has chosen to make use of GitHub's [Stale bot](https://github.com/apps/stale)
to aid in issue management.
Check out our [plugin development tutorial](https://github.com/netbox-community/netbox-plugin-tutorial) to get started!
* Issues will be marked as stale after 60 days of no activity.
* If the stable label is not removed in the following 30 days, the issue will
be closed automatically.
* Any issue bearing one of the following labels will be exempt from all Stale
bot actions:
* `status: accepted`
* `status: blocked`
* `status: needs milestone`
## :rescue_worker_helmet: Become a Maintainer
It is natural that some new issues get more attention than others. The stale
bot helps bring renewed attention to potentially valuable issues that may have
been overlooked. **Do not** comment on a stale issue merely to "bump" it in an
effort to circumvent the bot: This will result in the immediate closure of the
issue, and you may be barred from participating in future discussions.
We're always looking for motivated individuals to join the maintainers team and help drive NetBox's long-term development. Some of our most sought-after skills include:
## Maintainer Guidance
* Python development with a strong focus on the [Django](https://www.djangoproject.com/) framework
* Expertise working with PostgreSQL databases
* Javascript & TypeScript proficiency
* A knack for web application design (HTML & CSS)
* Familiarity with git and software development best practices
* Excellent attention to detail
* Working experience in the field of network operations & engineering
* Maintainers are expected to contribute at least four hours per week to the
project on average. This can be employer-sponsored or individual time, with
the understanding that all contributions are submitted under the Apache 2.0
license and that your employer may not make claim to any contributions.
Contributions include code work, issue management, and community support. All
development must be in accordance with our [development guidance](https://docs.netbox.dev/en/stable/development/).
We generally ask that maintainers dedicate around four hours of work to the project each week on average, which includes both hands-on development and project management tasks such as issue triage. Maintainers are also encouraged (but not required) to attend our bi-weekly Zoom call to catch up on recent items.
* Maintainers are expected to attend (where feasible) our biweekly ~30-minute
sync to review agenda items. This meeting provides opportunity to present and
discuss pressing topics. Meetings are held as virtual audio/video conferences.
Interested? You can contact our lead maintainer, Jeremy Stretch, at jeremy@netbox.dev or on the [NetDev Community Slack](https://netdev.chat/). We'd love to have you on the team!
* Maintainers with no substantial recorded activity in a 60-day period will be
removed from the project.
## :heart: Other Ways to Contribute
You don't have to be a developer to contribute to NetBox: There are plenty of other ways you can add value to the community! Below are just a few examples:
* Help answer questions and provide feedback in our [GitHub discussions](https://github.com/netbox-community/netbox/discussions) and on [Slack](https://netdev.chat/).
* Write a blog article or record a YouTube video demonstrating how NetBox is used at your organization.
* Help grow our [library of device & module type definitions](https://github.com/netbox-community/devicetype-library).

175
README.md
View File

@@ -1,106 +1,129 @@
<div align="center">
<img src="https://raw.githubusercontent.com/netbox-community/netbox/develop/docs/netbox_logo.svg" width="400" alt="NetBox logo" />
<p><strong>The cornerstone of every automated network</strong></p>
<a href="https://github.com/netbox-community/netbox/releases"><img src="https://img.shields.io/github/v/release/netbox-community/netbox" alt="Latest release" /></a>
<a href="https://github.com/netbox-community/netbox/blob/master/LICENSE.txt"><img src="https://img.shields.io/badge/license-Apache_2.0-blue.svg" alt="License" /></a>
<a href="https://github.com/netbox-community/netbox/graphs/contributors"><img src="https://img.shields.io/github/contributors/netbox-community/netbox?color=blue" alt="Contributors" /></a>
<a href="https://github.com/netbox-community/netbox/stargazers"><img src="https://img.shields.io/github/stars/netbox-community/netbox?style=flat" alt="GitHub stars" /></a>
<a href="https://explore.transifex.com/netbox-community/netbox/"><img src="https://img.shields.io/badge/languages-6-blue" alt="Languages supported" /></a>
<a href="https://github.com/netbox-community/netbox/actions/workflows/ci.yml"><img src="https://github.com/netbox-community/netbox/workflows/CI/badge.svg?branch=master" alt="CI status" /></a>
<p></p>
</div>
![Master branch build status](https://github.com/netbox-community/netbox/workflows/CI/badge.svg?branch=master)
NetBox exists to empower network engineers. Since its release in 2016, it has become the go-to solution for modeling and documenting network infrastructure for thousands of organizations worldwide. As a successor to legacy IPAM and DCIM applications, NetBox provides a cohesive, extensive, and accessible data model for all things networked. By providing a single robust user interface and programmable APIs for everything from cable maps to device configurations, NetBox serves as the central source of truth for the modern network.
NetBox is an infrastructure resource modeling (IRM) tool designed to empower
network automation, used by thousands of organizations around the world.
Initially conceived by the network engineering team at
[DigitalOcean](https://www.digitalocean.com/), NetBox was developed specifically
to address the needs of network and infrastructure engineers. It is intended to
function as a domain-specific source of truth for network operations.
<p align="center">
<a href="#netboxs-role">NetBox's Role</a> |
<a href="#why-netbox">Why NetBox?</a> |
<a href="#getting-started">Getting Started</a> |
<a href="#get-involved">Get Involved</a> |
<a href="#project-stats">Project Stats</a> |
<a href="#screenshots">Screenshots</a>
</p>
Myriad infrastructure components can be modeled in NetBox, including:
<p align="center">
<img src="docs/media/screenshots/home-light.png" width="600" alt="NetBox user interface screenshot" />
</p>
* Hierarchical regions, site groups, sites, and locations
* Racks, devices, and device components
* Cables and wireless connections
* Power distribution
* Data circuits and providers
* Virtual machines and clusters
* IP prefixes, ranges, and addresses
* VRFs and route targets
* FHRP groups (VRRP, HSRP, etc.)
* AS numbers
* VLANs and scoped VLAN groups
* Organizational tenants and contacts
## NetBox's Role
In addition to its extensive built-in models and functionality, NetBox can be
customized and extended through the use of:
NetBox functions as the **source of truth** for your network infrastructure. Its job is to define and validate the _intended state_ of all network components and resources. NetBox does not interact with network nodes directly; rather, it makes this data available programmatically to purpose-built automation, monitoring, and assurance tools. This separation of duties enables the construction of a robust yet flexible automation system.
* Custom fields
* Custom links
* Configuration contexts
* Custom model validation rules
* Reports
* Custom scripts
* Export templates
* Conditional webhooks
* Plugins
* Single sign-on (SSO) authentication
* NAPALM integration
* Detailed change logging
<p align="center">
<img src="docs/media/misc/reference_architecture.png" alt="Reference network automation architecture" />
</p>
NetBox also features a complete REST API as well as a GraphQL API for easily
integrating with other tools and systems.
The diagram above illustrates the recommended deployment architecture for an automated network, leveraging NetBox as the central authority for network state. This approach allows your team to swap out individual tools to meet changing needs while retaining a predictable, modular workflow.
NetBox runs as a web application atop the [Django](https://www.djangoproject.com/)
Python framework with a [PostgreSQL](https://www.postgresql.org/) database. For a
complete list of requirements, see `requirements.txt`. The code is available [on GitHub](https://github.com/netbox-community/netbox).
## Why NetBox?
The complete documentation for NetBox can be found at [docs.netbox.dev](https://docs.netbox.dev/). A public demo instance is available at https://demo.netbox.dev.
### Comprehensive Data Model
<div align="center">
<h4>Thank you to our sponsors!</h4>
Racks, devices, cables, IP addresses, VLANs, circuits, power, VPNs, and lots more: NetBox is built for networks. Its comprehensive and thoroughly inter-linked data model provides for natural and highly structured modeling of myriad network primitives that just isn't possible using general-purpose tools. And there's no need to waste time contemplating how to build out a database: Everything is ready to go upon installation.
[![DigitalOcean](https://raw.githubusercontent.com/wiki/netbox-community/netbox/images/sponsors/digitalocean.png)](https://try.digitalocean.com/developer-cloud)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[![Equinix Metal](https://raw.githubusercontent.com/wiki/netbox-community/netbox/images/sponsors/equinix.png)](https://metal.equinix.com/)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[![NS1](https://raw.githubusercontent.com/wiki/netbox-community/netbox/images/sponsors/ns1.png)](https://ns1.com/)
<br />
[![Sentry](https://raw.githubusercontent.com/wiki/netbox-community/netbox/images/sponsors/sentry.png)](https://sentry.io/)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[![Stellar Technologies](https://raw.githubusercontent.com/wiki/netbox-community/netbox/images/sponsors/stellar.png)](https://stellar.tech/)
### Focused Development
</div>
NetBox strives to meet a singular goal: Provide the best available solution for making network infrastructure programmatically accessible. Unlike "all-in-one" tools which awkwardly bolt on half-baked features in an attempt to check every box, NetBox is committed to its core function. NetBox provides the best possible solution for modeling network infrastructure, and provides rich APIs for integrating with tools that excel in other areas of network automation.
### Discussion
### Extensible and Customizable
* [GitHub Discussions](https://github.com/netbox-community/netbox/discussions) - Discussion forum hosted by GitHub; ideal for Q&A and other structured discussions
* [Slack](https://netdev.chat/) - Real-time chat hosted by the NetDev Community; best for unstructured discussion or just hanging out
No two networks are exactly the same. Users are empowered to extend NetBox's native data model with custom fields and tags to best suit their unique needs. You can even write your own plugins to introduce entirely new objects and functionality!
### Installation
### Flexible Permissions
Please see [the documentation](https://docs.netbox.dev/) for
instructions on installing NetBox. To upgrade NetBox, please download the
[latest release](https://github.com/netbox-community/netbox/releases) and
run `upgrade.sh`.
NetBox includes a fully customizable permission system, which affords administrators incredible granularity when assigning roles to users and groups. Want to restrict certain users to working only with cabling and not be able to change IP addresses? Or maybe each team should have access only to a particular tenant? NetBox enables you to craft roles as you see fit.
### Providing Feedback
### Custom Validation & Protection Rules
The best platform for general feedback, assistance, and other discussion is our
[GitHub discussions](https://github.com/netbox-community/netbox/discussions).
To report a bug or request a specific feature, please open a GitHub issue using
the [appropriate template](https://github.com/netbox-community/netbox/issues/new/choose).
The data you put into NetBox is crucial to network operations. In addition to its robust native validation rules, NetBox provides mechanisms for administrators to define their own custom validation rules for objects. Custom validation can be used both to ensure new or modified objects adhere to a set of rules, and to prevent the deletion of objects which don't meet certain criteria. (For example, you might want to prevent the deletion of a device with an "active" status.)
If you are interested in contributing to the development of NetBox, please read
our [contributing guide](CONTRIBUTING.md) prior to beginning any work.
### Device Configuration Rendering
### Screenshots
NetBox can render user-created Jinja2 templates to generate device configurations from its own data. Configuration templates can be uploaded individually or pulled automatically from an external source, such as a git repository. Rendered configurations can be retrieved via the REST API for application directly to network devices via a provisioning tool such as Ansible or Salt.
![Screenshot of main page (light mode)](docs/media/screenshots/home-light.png "Main page (light mode)")
### Custom Scripts
![Screenshot of main page (dark mode)](docs/media/screenshots/home-dark.png "Main page (dark mode)")
Complex workflows, such as provisioning a new branch office, can be tedious to carry out via the user interface. NetBox allows you to write and upload custom scripts that can be run directly from the UI. Scripts prompt users for input and then automate the necessary tasks to greatly simplify otherwise burdensome processes.
![Screenshot of rack elevation](docs/media/screenshots/rack.png "Rack elevation")
### Automated Events
![Screenshot of prefixes hierarchy](docs/media/screenshots/prefixes-list.png "Prefixes hierarchy")
Users can define event rules to automatically trigger a custom script or outbound webhook in response to a NetBox event. For example, you might want to automatically update a network monitoring service whenever a new device is added to NetBox, or update a DHCP server when an IP range is allocated.
![Screenshot of cable trace](docs/media/screenshots/cable-trace.png "Cable tracing")
### Comprehensive Change Logging
### Related projects
NetBox automatically logs the creation, modification, and deletion of all managed objects, providing a thorough change history. Changes can be attributed to the executing user, and related changes are grouped automatically by request ID.
Please see [our wiki](https://github.com/netbox-community/netbox/wiki/Community-Contributions)
for a list of relevant community projects.
> [!NOTE]
> A complete list of NetBox's myriad features can be found in [the introductory documentation](https://docs.netbox.dev/en/stable/introduction/).
## Getting Started
* Just want to explore? Check out [our public demo](https://demo.netbox.dev/) right now!
* The [official documentation](https://docs.netbox.dev) offers a comprehensive introduction.
* Check out [our wiki](https://github.com/netbox-community/netbox/wiki/Community-Contributions) for even more projects to get the most out of NetBox!
<p align="center">
<a href="https://netboxlabs.com/netbox-cloud/"><img src="docs/media/misc/netbox_cloud.png" alt="NetBox Cloud" /></a><br />
Looking for an enterprise solution? Check out <strong><a href="https://netboxlabs.com/netbox-cloud/">NetBox Cloud</a></strong>!
</p>
## Get Involved
* Follow [@NetBoxOfficial](https://twitter.com/NetBoxOfficial) on Twitter!
* Join the conversation on [the discussion forum](https://github.com/netbox-community/netbox/discussions) and [Slack](https://netdev.chat/)!
* Already a power user? You can [suggest a feature](https://github.com/netbox-community/netbox/issues/new?assignees=&labels=type%3A+feature&template=feature_request.yaml) or [report a bug](https://github.com/netbox-community/netbox/issues/new?assignees=&labels=type%3A+bug&template=bug_report.yaml) on GitHub.
* Contributions from the community are encouraged and appreciated! Check out our [contributing guide](CONTRIBUTING.md) to get started.
* [Share your idea](https://plugin-ideas.netbox.dev/) for a new plugin, or [learn how to build one](https://github.com/netbox-community/netbox-plugin-tutorial) yourself!
## Project Stats
<p align="center">
<a href="https://github.com/netbox-community/netbox/commits"><img src="https://images.repography.com/29023055/netbox-community/netbox/recent-activity/whQtEr_TGD9PhW1BPlhlEQ5jnrgQ0KJpm-LlGtpoGO0/3Kx_iWUSBRJ5-AI4QwJEJWrUDEz3KrX2lvh8aYE0WXY_timeline.svg" alt="Timeline graph"></a>
<a href="https://github.com/netbox-community/netbox/issues"><img src="https://images.repography.com/29023055/netbox-community/netbox/recent-activity/whQtEr_TGD9PhW1BPlhlEQ5jnrgQ0KJpm-LlGtpoGO0/3Kx_iWUSBRJ5-AI4QwJEJWrUDEz3KrX2lvh8aYE0WXY_issues.svg" alt="Issues graph"></a>
<a href="https://github.com/netbox-community/netbox/pulls"><img src="https://images.repography.com/29023055/netbox-community/netbox/recent-activity/whQtEr_TGD9PhW1BPlhlEQ5jnrgQ0KJpm-LlGtpoGO0/3Kx_iWUSBRJ5-AI4QwJEJWrUDEz3KrX2lvh8aYE0WXY_prs.svg" alt="Pull requests graph"></a>
<a href="https://github.com/netbox-community/netbox/graphs/contributors"><img src="https://images.repography.com/29023055/netbox-community/netbox/recent-activity/whQtEr_TGD9PhW1BPlhlEQ5jnrgQ0KJpm-LlGtpoGO0/3Kx_iWUSBRJ5-AI4QwJEJWrUDEz3KrX2lvh8aYE0WXY_users.svg" alt="Top contributors"></a>
<br />Stats via <a href="https://repography.com">Repography</a>
</p>
## Screenshots
<p align="center">
<strong>NetBox Dashboard (Light Mode)</strong><br />
<img src="docs/media/screenshots/home-light.png" width="600" alt="NetBox dashboard (light mode)" />
</p>
<p align="center">
<strong>NetBox Dashboard (Dark Mode)</strong><br />
<img src="docs/media/screenshots/home-dark.png" width="600" alt="NetBox dashboard (dark mode)" />
</p>
<p align="center">
<strong>Prefixes List</strong><br />
<img src="docs/media/screenshots/prefixes-list.png" width="600" alt="Prefixes list" />
</p>
<p align="center">
<strong>Rack View</strong><br />
<img src="docs/media/screenshots/rack.png" width="600" alt="Rack view" />
</p>
<p align="center">
<strong>Cable Trace</strong><br />
<img src="docs/media/screenshots/cable-trace.png" width="600" alt="Cable trace" />
</p>

View File

@@ -24,7 +24,7 @@ If you believe you've uncovered a security vulnerability and wish to report it c
Please note that we **DO NOT** accept reports generated by automated tooling which merely suggest that a file or file(s) _may_ be vulnerable under certain conditions, as these are most often innocuous.
If you believe that you've found a vulnerability which meets all of these conditions, please email a brief description of the suspected bug and instructions for reproduction to **security@netbox.dev**. For any security concerns regarding NetBox deployed via Docker, please see the [netbox-docker](https://github.com/netbox-community/netbox-docker) project.
If you believe that you've found a vulnerability which meets all of these conditions, please [submit a draft security advisory](https://github.com/netbox-community/netbox/security/advisories/new) on GitHub, or email a brief description of the suspected bug and instructions for reproduction to **security@netbox.dev**. For any security concerns regarding NetBox deployed via Docker, please see the [netbox-docker](https://github.com/netbox-community/netbox-docker) project.
### Bug Bounties

View File

@@ -1,82 +1,95 @@
# HTML sanitizer
# https://github.com/mozilla/bleach
# https://github.com/mozilla/bleach/blob/main/CHANGES
bleach
# The Python web framework on which NetBox is built
# https://github.com/django/django
Django
# https://docs.djangoproject.com/en/stable/releases/
Django<5.0
# Django middleware which permits cross-domain API requests
# https://github.com/OttoYiu/django-cors-headers
# https://github.com/adamchainz/django-cors-headers/blob/main/CHANGELOG.rst
django-cors-headers
# Runtime UI tool for debugging Django
# https://github.com/jazzband/django-debug-toolbar
# https://github.com/jazzband/django-debug-toolbar/blob/main/docs/changes.rst
django-debug-toolbar
# Library for writing reusable URL query filters
# https://github.com/carltongibson/django-filter
# https://github.com/carltongibson/django-filter/blob/main/CHANGES.rst
django-filter
# Django debug toolbar extension with support for GraphiQL
# https://github.com/flavors/django-graphiql-debug-toolbar/
# https://github.com/flavors/django-graphiql-debug-toolbar/blob/main/CHANGES.rst
django-graphiql-debug-toolbar
# Modified Preorder Tree Traversal (recursive nesting of objects)
# https://github.com/django-mptt/django-mptt
django-mptt
# Pinned to 0.14.0; 0.15.0 requires Python 3.9+
# https://github.com/django-mptt/django-mptt/blob/main/CHANGELOG.rst
django-mptt==0.14.0
# Context managers for PostgreSQL advisory locks
# https://github.com/Xof/django-pglocks
# https://github.com/Xof/django-pglocks/blob/master/CHANGES.txt
django-pglocks
# Prometheus metrics library for Django
# https://github.com/korfuri/django-prometheus
# https://github.com/korfuri/django-prometheus/blob/master/CHANGELOG.md
django-prometheus
# Django chaching backend using Redis
# https://github.com/jazzband/django-redis
# Django caching backend using Redis
# https://github.com/jazzband/django-redis/blob/master/CHANGELOG.rst
django-redis
# Django extensions for Rich (terminal text rendering)
# https://github.com/adamchainz/django-rich/blob/main/CHANGELOG.rst
django-rich
# Django integration for RQ (Reqis queuing)
# https://github.com/rq/django-rq
# https://github.com/rq/django-rq/blob/master/CHANGELOG.md
django-rq
# Abstraction models for rendering and paginating HTML tables
# https://github.com/jieter/django-tables2
# https://github.com/jieter/django-tables2/blob/master/CHANGELOG.md
django-tables2
# User-defined tags for objects
# https://github.com/alex/django-taggit
# Will evaluate v3.0 during NetBox v3.3 beta
django-taggit>=2.1.0,<3.0
# https://github.com/jazzband/django-taggit/blob/master/CHANGELOG.rst
django-taggit
# A Django field for representing time zones
# https://github.com/mfogel/django-timezone-field/
django-timezone-field
# A REST API framework for Django projects
# https://github.com/encode/django-rest-framework
# https://www.django-rest-framework.org/community/release-notes/
djangorestframework
# Swagger/OpenAPI schema generation for REST APIs
# https://github.com/axnsan12/drf-yasg
drf-yasg[validation]
# Sane and flexible OpenAPI 3 schema generation for Django REST framework.
# https://github.com/tfranzel/drf-spectacular/blob/master/CHANGELOG.rst
drf-spectacular
# Serve self-contained distribution builds of Swagger UI and Redoc with Django.
# https://github.com/tfranzel/drf-spectacular-sidecar
drf-spectacular-sidecar
# RSS feed parser
# https://github.com/kurtmckee/feedparser/blob/develop/CHANGELOG.rst
feedparser
# Django wrapper for Graphene (GraphQL support)
# https://github.com/graphql-python/graphene-django
graphene_django
# https://github.com/graphql-python/graphene-django/releases
# Pinned to v3.0.0 for GraphiQL UI issue (see #12762)
graphene_django==3.0.0
# WSGI HTTP server
# https://gunicorn.org/
# https://docs.gunicorn.org/en/latest/news.html
gunicorn
# Platform-agnostic template rendering engine
# https://github.com/pallets/jinja
# https://jinja.palletsprojects.com/changes/
Jinja2
# Simple markup language for rendering HTML
# https://github.com/Python-Markdown/markdown
# https://python-markdown.github.io/changelog/
Markdown
# File inclusion plugin for Python-Markdown
@@ -84,49 +97,49 @@ Markdown
markdown-include
# MkDocs Material theme (for documentation build)
# https://github.com/squidfunk/mkdocs-material
# https://squidfunk.github.io/mkdocs-material/changelog/
mkdocs-material
# Introspection for embedded code
# https://github.com/mkdocstrings/mkdocstrings
# https://github.com/mkdocstrings/mkdocstrings/blob/master/CHANGELOG.md
mkdocstrings[python-legacy]
# Library for manipulating IP prefixes and addresses
# https://github.com/netaddr/netaddr
# https://github.com/netaddr/netaddr/blob/master/CHANGELOG
netaddr
# Fork of PIL (Python Imaging Library) for image processing
# https://github.com/python-pillow/Pillow
# https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst
Pillow
# PostgreSQL database adapter for Python
# https://github.com/psycopg/psycopg2
psycopg2-binary
# https://github.com/psycopg/psycopg/blob/master/docs/news.rst
psycopg[binary,pool]
# YAML rendering library
# https://github.com/yaml/pyyaml
# https://github.com/yaml/pyyaml/blob/master/CHANGES
PyYAML
# Sentry SDK
# https://github.com/getsentry/sentry-python
sentry-sdk
# Requests
# https://github.com/psf/requests/blob/main/HISTORY.md
requests
# Social authentication framework
# https://github.com/python-social-auth/social-core
# https://github.com/python-social-auth/social-core/blob/master/CHANGELOG.md
social-auth-core
# Django app for social-auth-core
# https://github.com/python-social-auth/social-app-django
# https://github.com/python-social-auth/social-app-django/blob/master/CHANGELOG.md
social-auth-app-django
# SVG image rendering (used for rack elevations)
# https://github.com/mozman/svgwrite
# hhttps://github.com/mozman/svgwrite/blob/master/NEWS.rst
svgwrite
# Tabular dataset library (for table-based exports)
# https://github.com/jazzband/tablib
# https://github.com/jazzband/tablib/blob/master/HISTORY.md
tablib
# Timezone data (required by django-timezone-field on Python 3.9+)
# https://github.com/python/tzdata
# https://github.com/python/tzdata/blob/master/NEWS.md
tzdata

View File

@@ -1,3 +1,12 @@
<VirtualHost *:80>
# CHANGE THIS TO YOUR SERVER'S NAME
ServerName netbox.example.com
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>
<VirtualHost *:443>
ProxyPreserveHost On

View File

@@ -0,0 +1,564 @@
{
"type": "object",
"additionalProperties": false,
"definitions": {
"airflow": {
"type": "string",
"enum": [
"front-to-rear",
"rear-to-front",
"left-to-right",
"right-to-left",
"side-to-rear",
"passive",
"mixed"
]
},
"weight-unit": {
"type": "string",
"enum": [
"kg",
"g",
"lb",
"oz"
]
},
"subdevice-role": {
"type": "string",
"enum": [
"parent",
"child"
]
},
"console-port": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"de-9",
"db-25",
"rj-11",
"rj-12",
"rj-45",
"mini-din-8",
"usb-a",
"usb-b",
"usb-c",
"usb-mini-a",
"usb-mini-b",
"usb-micro-a",
"usb-micro-b",
"usb-micro-ab",
"other"
]
}
}
},
"console-server-port": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"de-9",
"db-25",
"rj-11",
"rj-12",
"rj-45",
"mini-din-8",
"usb-a",
"usb-b",
"usb-c",
"usb-mini-a",
"usb-mini-b",
"usb-micro-a",
"usb-micro-b",
"usb-micro-ab",
"other"
]
}
}
},
"power-port": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"iec-60320-c6",
"iec-60320-c8",
"iec-60320-c14",
"iec-60320-c16",
"iec-60320-c20",
"iec-60320-c22",
"iec-60309-p-n-e-4h",
"iec-60309-p-n-e-6h",
"iec-60309-p-n-e-9h",
"iec-60309-2p-e-4h",
"iec-60309-2p-e-6h",
"iec-60309-2p-e-9h",
"iec-60309-3p-e-4h",
"iec-60309-3p-e-6h",
"iec-60309-3p-e-9h",
"iec-60309-3p-n-e-4h",
"iec-60309-3p-n-e-6h",
"iec-60309-3p-n-e-9h",
"iec-60906-1",
"nbr-14136-10a",
"nbr-14136-20a",
"nema-1-15p",
"nema-5-15p",
"nema-5-20p",
"nema-5-30p",
"nema-5-50p",
"nema-6-15p",
"nema-6-20p",
"nema-6-30p",
"nema-6-50p",
"nema-10-30p",
"nema-10-50p",
"nema-14-20p",
"nema-14-30p",
"nema-14-50p",
"nema-14-60p",
"nema-15-15p",
"nema-15-20p",
"nema-15-30p",
"nema-15-50p",
"nema-15-60p",
"nema-l1-15p",
"nema-l5-15p",
"nema-l5-20p",
"nema-l5-30p",
"nema-l5-50p",
"nema-l6-15p",
"nema-l6-20p",
"nema-l6-30p",
"nema-l6-50p",
"nema-l10-30p",
"nema-l14-20p",
"nema-l14-30p",
"nema-l14-50p",
"nema-l14-60p",
"nema-l15-20p",
"nema-l15-30p",
"nema-l15-50p",
"nema-l15-60p",
"nema-l21-20p",
"nema-l21-30p",
"nema-l22-30p",
"cs6361c",
"cs6365c",
"cs8165c",
"cs8265c",
"cs8365c",
"cs8465c",
"ita-c",
"ita-e",
"ita-f",
"ita-ef",
"ita-g",
"ita-h",
"ita-i",
"ita-j",
"ita-k",
"ita-l",
"ita-m",
"ita-n",
"ita-o",
"usb-a",
"usb-b",
"usb-c",
"usb-mini-a",
"usb-mini-b",
"usb-micro-a",
"usb-micro-b",
"usb-micro-ab",
"usb-3-b",
"usb-3-micro-b",
"dc-terminal",
"saf-d-grid",
"neutrik-powercon-20",
"neutrik-powercon-32",
"neutrik-powercon-true1",
"neutrik-powercon-true1-top",
"ubiquiti-smartpower",
"hardwired",
"other"
]
}
}
},
"power-outlet": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"iec-60320-c5",
"iec-60320-c7",
"iec-60320-c13",
"iec-60320-c15",
"iec-60320-c19",
"iec-60320-c21",
"iec-60309-p-n-e-4h",
"iec-60309-p-n-e-6h",
"iec-60309-p-n-e-9h",
"iec-60309-2p-e-4h",
"iec-60309-2p-e-6h",
"iec-60309-2p-e-9h",
"iec-60309-3p-e-4h",
"iec-60309-3p-e-6h",
"iec-60309-3p-e-9h",
"iec-60309-3p-n-e-4h",
"iec-60309-3p-n-e-6h",
"iec-60309-3p-n-e-9h",
"iec-60906-1",
"nbr-14136-10a",
"nbr-14136-20a",
"nema-1-15r",
"nema-5-15r",
"nema-5-20r",
"nema-5-30r",
"nema-5-50r",
"nema-6-15r",
"nema-6-20r",
"nema-6-30r",
"nema-6-50r",
"nema-10-30r",
"nema-10-50r",
"nema-14-20r",
"nema-14-30r",
"nema-14-50r",
"nema-14-60r",
"nema-15-15r",
"nema-15-20r",
"nema-15-30r",
"nema-15-50r",
"nema-15-60r",
"nema-l1-15r",
"nema-l5-15r",
"nema-l5-20r",
"nema-l5-30r",
"nema-l5-50r",
"nema-l6-15r",
"nema-l6-20r",
"nema-l6-30r",
"nema-l6-50r",
"nema-l10-30r",
"nema-l14-20r",
"nema-l14-30r",
"nema-l14-50r",
"nema-l14-60r",
"nema-l15-20r",
"nema-l15-30r",
"nema-l15-50r",
"nema-l15-60r",
"nema-l21-20r",
"nema-l21-30r",
"nema-l22-30r",
"CS6360C",
"CS6364C",
"CS8164C",
"CS8264C",
"CS8364C",
"CS8464C",
"ita-e",
"ita-f",
"ita-g",
"ita-h",
"ita-i",
"ita-j",
"ita-k",
"ita-l",
"ita-m",
"ita-n",
"ita-o",
"ita-multistandard",
"usb-a",
"usb-micro-b",
"usb-c",
"dc-terminal",
"hdot-cx",
"saf-d-grid",
"neutrik-powercon-20a",
"neutrik-powercon-32a",
"neutrik-powercon-true1",
"neutrik-powercon-true1-top",
"ubiquiti-smartpower",
"hardwired",
"other"
]
},
"feed-leg": {
"type": "string",
"enum": [
"A",
"B",
"C"
]
}
}
},
"interface": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"virtual",
"bridge",
"lag",
"100base-fx",
"100base-lfx",
"100base-tx",
"100base-t1",
"1000base-t",
"2.5gbase-t",
"5gbase-t",
"10gbase-t",
"10gbase-cx4",
"1000base-x-gbic",
"1000base-x-sfp",
"10gbase-x-sfpp",
"10gbase-x-xfp",
"10gbase-x-xenpak",
"10gbase-x-x2",
"25gbase-x-sfp28",
"50gbase-x-sfp56",
"40gbase-x-qsfpp",
"50gbase-x-sfp28",
"100gbase-x-cfp",
"100gbase-x-cfp2",
"200gbase-x-cfp2",
"400gbase-x-cfp2",
"100gbase-x-cfp4",
"100gbase-x-cxp",
"100gbase-x-cpak",
"100gbase-x-dsfp",
"100gbase-x-sfpdd",
"100gbase-x-qsfp28",
"100gbase-x-qsfpdd",
"200gbase-x-qsfp56",
"200gbase-x-qsfpdd",
"400gbase-x-qsfp112",
"400gbase-x-qsfpdd",
"400gbase-x-osfp",
"400gbase-x-osfp-rhs",
"400gbase-x-cdfp",
"400gbase-x-cfp8",
"800gbase-x-qsfpdd",
"800gbase-x-osfp",
"1000base-kx",
"10gbase-kr",
"10gbase-kx4",
"25gbase-kr",
"40gbase-kr4",
"50gbase-kr",
"100gbase-kp4",
"100gbase-kr2",
"100gbase-kr4",
"ieee802.11a",
"ieee802.11g",
"ieee802.11n",
"ieee802.11ac",
"ieee802.11ad",
"ieee802.11ax",
"ieee802.11ay",
"ieee802.15.1",
"other-wireless",
"gsm",
"cdma",
"lte",
"sonet-oc3",
"sonet-oc12",
"sonet-oc48",
"sonet-oc192",
"sonet-oc768",
"sonet-oc1920",
"sonet-oc3840",
"1gfc-sfp",
"2gfc-sfp",
"4gfc-sfp",
"8gfc-sfpp",
"16gfc-sfpp",
"32gfc-sfp28",
"64gfc-qsfpp",
"128gfc-qsfp28",
"infiniband-sdr",
"infiniband-ddr",
"infiniband-qdr",
"infiniband-fdr10",
"infiniband-fdr",
"infiniband-edr",
"infiniband-hdr",
"infiniband-ndr",
"infiniband-xdr",
"t1",
"e1",
"t3",
"e3",
"xdsl",
"docsis",
"gpon",
"xg-pon",
"xgs-pon",
"ng-pon2",
"epon",
"10g-epon",
"cisco-stackwise",
"cisco-stackwise-plus",
"cisco-flexstack",
"cisco-flexstack-plus",
"cisco-stackwise-80",
"cisco-stackwise-160",
"cisco-stackwise-320",
"cisco-stackwise-480",
"cisco-stackwise-1t",
"juniper-vcp",
"extreme-summitstack",
"extreme-summitstack-128",
"extreme-summitstack-256",
"extreme-summitstack-512",
"other"
]
},
"poe_mode": {
"type": "string",
"enum": [
"pd",
"pse"
]
},
"poe_type": {
"type": "string",
"enum": [
"type1-ieee802.3af",
"type2-ieee802.3at",
"type3-ieee802.3bt",
"type4-ieee802.3bt",
"passive-24v-2pair",
"passive-24v-4pair",
"passive-48v-2pair",
"passive-48v-4pair"
]
}
}
},
"front-port": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"8p8c",
"8p6c",
"8p4c",
"8p2c",
"6p6c",
"6p4c",
"6p2c",
"4p4c",
"4p2c",
"gg45",
"tera-4p",
"tera-2p",
"tera-1p",
"110-punch",
"bnc",
"f",
"n",
"mrj21",
"fc",
"lc",
"lc-pc",
"lc-upc",
"lc-apc",
"lsh",
"lsh-pc",
"lsh-upc",
"lsh-apc",
"lx5",
"lx5-pc",
"lx5-upc",
"lx5-apc",
"mpo",
"mtrj",
"sc",
"sc-pc",
"sc-upc",
"sc-apc",
"st",
"cs",
"sn",
"sma-905",
"sma-906",
"urm-p2",
"urm-p4",
"urm-p8",
"splice",
"other"
]
}
}
},
"rear-port": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"8p8c",
"8p6c",
"8p4c",
"8p2c",
"6p6c",
"6p4c",
"6p2c",
"4p4c",
"4p2c",
"gg45",
"tera-4p",
"tera-2p",
"tera-1p",
"110-punch",
"bnc",
"f",
"n",
"mrj21",
"fc",
"lc",
"lc-pc",
"lc-upc",
"lc-apc",
"lsh",
"lsh-pc",
"lsh-upc",
"lsh-apc",
"lx5",
"lx5-pc",
"lx5-upc",
"lx5-apc",
"mpo",
"mtrj",
"sc",
"sc-pc",
"sc-upc",
"sc-apc",
"st",
"cs",
"sn",
"sma-905",
"sma-906",
"urm-p2",
"urm-p4",
"urm-p8",
"splice",
"other"
]
}
}
}
}
}

View File

@@ -1,4 +1,4 @@
# The IP address (typically localhost) and port that the Netbox WSGI process should listen on
# The IP address (typically localhost) and port that the NetBox WSGI process should listen on
bind = '127.0.0.1:8001'
# Number of gunicorn workers to spawn. This should typically be 2n+1, where

View File

@@ -0,0 +1,17 @@
[Unit]
Description=NetBox Housekeeping Service
Documentation=https://docs.netbox.dev/
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=netbox
Group=netbox
WorkingDirectory=/opt/netbox
ExecStart=/opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py housekeeping
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,13 @@
[Unit]
Description=NetBox Housekeeping Timer
Documentation=https://docs.netbox.dev/
After=network-online.target
Wants=network-online.target
[Timer]
OnCalendar=daily
AccuracySec=1h
Persistent=true
[Install]
WantedBy=multi-user.target

95605
contrib/openapi2.json Normal file

File diff suppressed because it is too large Load Diff

69695
contrib/openapi2.yaml Normal file

File diff suppressed because it is too large Load Diff

9
docs/_theme/main.html vendored Normal file
View File

@@ -0,0 +1,9 @@
{% extends "base.html" %}
{% block site_meta %}
{{ super() }}
{# Disable search indexing unless we're building for ReadTheDocs (see #10496) #}
{% if page.canonical_url != 'https://docs.netbox.dev/' %}
<meta name="robots" content="noindex">
{% endif %}
{% endblock %}

View File

@@ -1,5 +0,0 @@
# Journaling
All primary objects in NetBox support journaling. A journal is a collection of human-generated notes and comments about an object maintained for historical context. It supplements NetBox's change log to provide additional information about why changes have been made or to convey events which occur outside NetBox. Unlike the change log, in which records typically expire after a configurable period of time, journal entries persist for the life of their associated object.
Each journal entry has a selectable kind (info, success, warning, or danger) and a user-populated `comments` field. Each entry automatically records the date, time, and associated user upon being created.

View File

@@ -1,74 +0,0 @@
# NAPALM
NetBox supports integration with the [NAPALM automation](https://github.com/napalm-automation/napalm) library. NAPALM allows NetBox to serve a proxy for operational data, fetching live data from network devices and returning it to a requester via its REST API. Note that NetBox does not store any NAPALM data locally.
The NetBox UI will display tabs for status, LLDP neighbors, and configuration under the device view if the following conditions are met:
* Device status is "Active"
* A primary IP has been assigned to the device
* A platform with a NAPALM driver has been assigned
* The authenticated user has the `dcim.napalm_read_device` permission
!!! note
To enable this integration, the NAPALM library must be installed. See [installation steps](../../installation/3-netbox/#napalm) for more information.
Below is an example REST API request and response:
```no-highlight
GET /api/dcim/devices/1/napalm/?method=get_environment
{
"get_environment": {
...
}
}
```
!!! note
To make NAPALM requests via the NetBox REST API, a NetBox user must have assigned a permission granting the `napalm_read` action for the device object type.
## Authentication
By default, the [`NAPALM_USERNAME`](../configuration/dynamic-settings.md#napalm_username) and [`NAPALM_PASSWORD`](../configuration/dynamic-settings.md#napalm_password) configuration parameters are used for NAPALM authentication. They can be overridden for an individual API call by specifying the `X-NAPALM-Username` and `X-NAPALM-Password` headers.
```
$ curl "http://localhost/api/dcim/devices/1/napalm/?method=get_environment" \
-H "Authorization: Token $TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json; indent=4" \
-H "X-NAPALM-Username: foo" \
-H "X-NAPALM-Password: bar"
```
## Method Support
The list of supported NAPALM methods depends on the [NAPALM driver](https://napalm.readthedocs.io/en/latest/support/index.html#general-support-matrix) configured for the platform of a device. Because there is no granular mechanism in place for limiting potentially disruptive requests, NetBox supports only read-only [get](https://napalm.readthedocs.io/en/latest/support/index.html#getters-support-matrix) methods.
## Multiple Methods
It is possible to request the output of multiple NAPALM methods in a single API request by passing multiple `method` parameters. For example:
```no-highlight
GET /api/dcim/devices/1/napalm/?method=get_ntp_servers&method=get_ntp_peers
{
"get_ntp_servers": {
...
},
"get_ntp_peers": {
...
}
}
```
## Optional Arguments
The behavior of NAPALM drivers can be adjusted according to the [optional arguments](https://napalm.readthedocs.io/en/latest/support/index.html#optional-arguments). NetBox exposes those arguments using headers prefixed with `X-NAPALM-`. For example, the SSH port is changed to 2222 in this API call:
```
$ curl "http://localhost/api/dcim/devices/1/napalm/?method=get_environment" \
-H "Authorization: Token $TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json; indent=4" \
-H "X-NAPALM-port: 2222"
```

View File

@@ -1,57 +0,0 @@
{!models/extras/webhook.md!}
## Conditional Webhooks
A webhook may include a set of conditional logic expressed in JSON used to control whether a webhook triggers for a specific object. For example, you may wish to trigger a webhook for devices only when the `status` field of an object is "active":
```json
{
"and": [
{
"attr": "status.value",
"value": "active"
}
]
}
```
For more detail, see the reference documentation for NetBox's [conditional logic](../reference/conditions.md).
## Webhook Processing
When a change is detected, any resulting webhooks are placed into a Redis queue for processing. This allows the user's request to complete without needing to wait for the outgoing webhook(s) to be processed. The webhooks are then extracted from the queue by the `rqworker` process and HTTP requests are sent to their respective destinations. The current webhook queue and any failed webhooks can be inspected in the admin UI under System > Background Tasks.
A request is considered successful if the response has a 2XX status code; otherwise, the request is marked as having failed. Failed requests may be retried manually via the admin UI.
## Troubleshooting
To assist with verifying that the content of outgoing webhooks is rendered correctly, NetBox provides a simple HTTP listener that can be run locally to receive and display webhook requests. First, modify the target URL of the desired webhook to `http://localhost:9000/`. This will instruct NetBox to send the request to the local server on TCP port 9000. Then, start the webhook receiver service from the NetBox root directory:
```no-highlight
$ python netbox/manage.py webhook_receiver
Listening on port http://localhost:9000. Stop with CONTROL-C.
```
You can test the receiver itself by sending any HTTP request to it. For example:
```no-highlight
$ curl -X POST http://localhost:9000 --data '{"foo": "bar"}'
```
The server will print output similar to the following:
```no-highlight
[1] Tue, 07 Apr 2020 17:44:02 GMT 127.0.0.1 "POST / HTTP/1.1" 200 -
Host: localhost:9000
User-Agent: curl/7.58.0
Accept: */*
Content-Length: 14
Content-Type: application/x-www-form-urlencoded
{"foo": "bar"}
------------
```
Note that `webhook_receiver` does not actually _do_ anything with the information received: It merely prints the request headers and body for inspection.
Now, when the NetBox webhook is triggered and processed, you should see its headers and content appear in the terminal where the webhook receiver is listening. If you don't, check that the `rqworker` process is running and that webhook events are being placed into the queue (visible under the NetBox admin UI).

View File

@@ -73,7 +73,7 @@ You should be redirected to Microsoft's authentication portal. Enter the usernam
If successful, you will be redirected back to the NetBox UI, and will be logged in as the AD user. You can verify this by navigating to your profile (using the button at top right).
This user account has been replicated locally to NetBox, and can now be assigned groups and permissions within the NetBox admin UI.
This user account has been replicated locally to NetBox, and can now be assigned groups and permissions by navigating to Admin > Permissions.
## Troubleshooting

View File

@@ -67,4 +67,4 @@ You should be redirected to Okta's authentication portal. Enter the username/ema
If successful, you will be redirected back to the NetBox UI, and will be logged in as the Okta user. You can verify this by navigating to your profile (using the button at top right).
This user account has been replicated locally to NetBox, and can now be assigned groups and permissions within the NetBox admin UI.
This user account has been replicated locally to NetBox, and can now be assigned groups and permissions by navigating to Admin > Permissions.

View File

@@ -2,9 +2,9 @@
## Local Authentication
Local user accounts and groups can be created in NetBox under the "Authentication and Authorization" section of the administrative user interface. This interface is available only to users with the "staff" permission enabled.
Local user accounts and groups can be created in NetBox under the "Authentication" section in the "Admin" menu. This section is available only to users with the "staff" permission enabled.
At a minimum, each user account must have a username and password set. User accounts may also denote a first name, last name, and email address. [Permissions](../permissions.md) may also be assigned to users and/or groups within the admin UI.
At a minimum, each user account must have a username and password set. User accounts may also denote a first name, last name, and email address. [Permissions](../permissions.md) may also be assigned to users and/or groups under Admin > Permissions.
## Remote Authentication
@@ -26,6 +26,8 @@ REMOTE_AUTH_BACKEND = 'netbox.authentication.RemoteUserBackend'
Another option for remote authentication in NetBox is to enable HTTP header-based user assignment. The front end HTTP server (e.g. nginx or Apache) performs client authentication as a process external to NetBox, and passes information about the authenticated user via HTTP headers. By default, the user is assigned via the `REMOTE_USER` header, but this can be customized via the `REMOTE_AUTH_HEADER` configuration parameter.
Optionally, user profile information can be supplied by `REMOTE_USER_FIRST_NAME`, `REMOTE_USER_LAST_NAME` and `REMOTE_USER_EMAIL` headers. These are saved to the users profile during the authentication process. These headers can be customized like the `REMOTE_USER` header.
### Single Sign-On (SSO)
```python
@@ -34,4 +36,4 @@ REMOTE_AUTH_BACKEND = 'social_core.backends.google.GoogleOAuth2'
NetBox supports single sign-on authentication via the [python-social-auth](https://github.com/python-social-auth) library. To enable SSO, specify the path to the desired authentication backend within the `social_core` Python package. Please see the complete list of [supported authentication backends](https://github.com/python-social-auth/social-core/tree/master/social_core/backends) for the available options.
Most remote authentication backends require some additional configuration through settings prefixed with `SOCIAL_AUTH_`. These will be automatically imported from NetBox's `configuration.py` file. Additionally, the [authentication pipeline](https://python-social-auth.readthedocs.io/en/latest/pipeline.html) can be customized via the `SOCIAL_AUTH_PIPELINE` parameter.
Most remote authentication backends require some additional configuration through settings prefixed with `SOCIAL_AUTH_`. These will be automatically imported from NetBox's `configuration.py` file. Additionally, the [authentication pipeline](https://python-social-auth.readthedocs.io/en/latest/pipeline.html) can be customized via the `SOCIAL_AUTH_PIPELINE` parameter. (NetBox's default pipeline is defined in `netbox/settings.py` for your reference.)

View File

@@ -4,27 +4,15 @@
### Enabling Error Reporting
NetBox v3.2.3 and later support native integration with [Sentry](https://sentry.io/) for automatic error reporting. To enable this functionality, simply set `SENTRY_ENABLED` to True in `configuration.py`. Errors will be sent to a Sentry ingestor maintained by the NetBox team for analysis.
```python
SENTRY_ENABLED = True
```
### Using a Custom DSN
If you prefer instead to use your own Sentry ingestor, you'll need to first create a new project under your Sentry account to represent your NetBox deployment and obtain its corresponding data source name (DSN). This looks like a URL similar to the example below:
```
https://examplePublicKey@o0.ingest.sentry.io/0
```
Once you have obtained a DSN, configure Sentry in NetBox's `configuration.py` file with the following parameters:
NetBox supports native integration with [Sentry](https://sentry.io/) for automatic error reporting. To enable this functionality, set `SENTRY_ENABLED` to True and define your unique [data source name (DSN)](https://docs.sentry.io/product/sentry-basics/concepts/dsn-explainer/) in `configuration.py`.
```python
SENTRY_ENABLED = True
SENTRY_DSN = "https://examplePublicKey@o0.ingest.sentry.io/0"
```
Setting `SENTRY_ENABLED` to False will disable the Sentry integration.
### Assigning Tags
You can optionally attach one or more arbitrary tags to the outgoing error reports if desired by setting the `SENTRY_TAGS` parameter:

View File

@@ -3,10 +3,17 @@
NetBox includes a `housekeeping` management command that should be run nightly. This command handles:
* Clearing expired authentication sessions from the database
* Deleting changelog records older than the configured [retention time](../configuration/dynamic-settings.md#changelog_retention)
* Deleting job result records older than the configured [retention time](../configuration/dynamic-settings.md#jobresult_retention)
* Deleting changelog records older than the configured [retention time](../configuration/miscellaneous.md#changelog_retention)
* Deleting job result records older than the configured [retention time](../configuration/miscellaneous.md#job_retention)
* Check for new NetBox releases (if [`RELEASE_CHECK_URL`](../configuration/miscellaneous.md#release_check_url) is set)
This command can be invoked directly, or by using the shell script provided at `/opt/netbox/contrib/netbox-housekeeping.sh`. This script can be linked from your cron scheduler's daily jobs directory (e.g. `/etc/cron.daily`) or referenced directly within the cron configuration file.
This command can be invoked directly, or by using the shell script provided at `/opt/netbox/contrib/netbox-housekeeping.sh`.
## Scheduling
### Using Cron
This script can be linked from your cron scheduler's daily jobs directory (e.g. `/etc/cron.daily`) or referenced directly within the cron configuration file.
```shell
sudo ln -s /opt/netbox/contrib/netbox-housekeeping.sh /etc/cron.daily/netbox-housekeeping
@@ -15,4 +22,28 @@ sudo ln -s /opt/netbox/contrib/netbox-housekeeping.sh /etc/cron.daily/netbox-hou
!!! note
On Debian-based systems, be sure to omit the `.sh` file extension when linking to the script from within a cron directory. Otherwise, the task may not run.
The `housekeeping` command can also be run manually at any time: Running the command outside scheduled execution times will not interfere with its operation.
### Using Systemd
First, create symbolic links for the systemd service and timer files. Link the existing service and timer files from the `/opt/netbox/contrib/` directory to the `/etc/systemd/system/` directory:
```bash
sudo ln -s /opt/netbox/contrib/netbox-housekeeping.service /etc/systemd/system/netbox-housekeeping.service
sudo ln -s /opt/netbox/contrib/netbox-housekeeping.timer /etc/systemd/system/netbox-housekeeping.timer
```
Then, reload the systemd configuration and enable the timer to start automatically at boot:
```bash
sudo systemctl daemon-reload
sudo systemctl enable --now netbox-housekeeping.timer
```
Check the status of your timer by running:
```bash
sudo systemctl list-timers --all
```
This command will show a list of all timers, including your `netbox-housekeeping.timer`. Make sure the timer is active and properly scheduled.
That's it! Your NetBox housekeeping service is now configured to run daily using systemd.

View File

@@ -153,15 +153,10 @@ New objects can be created by instantiating the desired model, defining values f
```
>>> lab1 = Site.objects.get(pk=7)
>>> myvlan = VLAN(vid=123, name='MyNewVLAN', site=lab1)
>>> myvlan.full_clean()
>>> myvlan.save()
```
Alternatively, the above can be performed as a single operation. (Note, however, that `save()` does _not_ return the new instance for reuse.)
```
>>> VLAN(vid=123, name='MyNewVLAN', site=Site.objects.get(pk=7)).save()
```
To modify an existing object, we retrieve it, update the desired field(s), and call `save()` again.
```
@@ -169,6 +164,7 @@ To modify an existing object, we retrieve it, update the desired field(s), and c
>>> vlan.name
'MyNewVLAN'
>>> vlan.name = 'BetterName'
>>> vlan.full_clean()
>>> vlan.save()
>>> VLAN.objects.get(pk=1280).name
'BetterName'

View File

@@ -1,8 +1,78 @@
# Permissions
# Object-Based Permissions
NetBox v2.9 introduced a new object-based permissions framework, which replaces Django's built-in permissions model. Object-based permissions enable an administrator to grant users or groups the ability to perform an action on arbitrary subsets of objects in NetBox, rather than all objects of a certain type. For example, it is possible to grant a user permission to view only sites within a particular region, or to modify only VLANs with a numeric ID within a certain range.
NetBox employs a new object-based permissions framework, which replaces Django's built-in permissions model. Object-based permissions enable an administrator to grant users or groups the ability to perform an action on arbitrary subsets of objects in NetBox, rather than all objects of a certain type. For example, it is possible to grant a user permission to view only sites within a particular region, or to modify only VLANs with a numeric ID within a certain range.
{!models/users/objectpermission.md!}
A permission in NetBox represents a relationship shared by several components:
* Object type(s) - One or more types of object in NetBox
* User(s)/Group(s) - One or more users or groups of users
* Action(s) - The action(s) that can be performed on an object
* Constraints - An arbitrary filter used to limit the granted action(s) to a specific subset of objects
At a minimum, a permission assignment must specify one object type, one user or group, and one action. The specification of constraints is optional: A permission without any constraints specified will apply to all instances of the selected model(s).
## Actions
There are four core actions that can be permitted for each type of object within NetBox, roughly analogous to the CRUD convention (create, read, update, and delete):
* **View** - Retrieve an object from the database
* **Add** - Create a new object
* **Change** - Modify an existing object
* **Delete** - Delete an existing object
In addition to these, permissions can also grant custom actions that may be required by a specific model or plugin. For example, the `run` permission for scripts allows a user to execute custom scripts. These can be specified when granting a permission in the "additional actions" field.
!!! note
Internally, all actions granted by a permission (both built-in and custom) are stored as strings in an array field named `actions`.
## Constraints
Constraints are expressed as a JSON object or list representing a [Django query filter](https://docs.djangoproject.com/en/stable/ref/models/querysets/#field-lookups). This is the same syntax that you would pass to the QuerySet `filter()` method when performing a query using the Django ORM. As with query filters, double underscores can be used to traverse related objects or invoke lookup expressions. Some example queries and their corresponding definitions are shown below.
All attributes defined within a single JSON object are applied with a logical AND. For example, suppose you assign a permission for the site model with the following constraints.
```json
{
"status": "active",
"region__name": "Americas"
}
```
The permission will grant access only to sites which have a status of "active" **and** which are assigned to the "Americas" region.
To achieve a logical OR with a different set of constraints, define multiple objects within a list. For example, if you want to constrain the permission to VLANs with an ID between 100 and 199 _or_ a status of "reserved," do the following:
```json
[
{
"vid__gte": 100,
"vid__lt": 200
},
{
"status": "reserved"
}
]
```
Additionally, where multiple permissions have been assigned for an object type, their collective constraints will be merged using a logical "OR" operation.
### User Token
When defining a permission constraint, administrators may use the special token `$user` to reference the current user at the time of evaluation. This can be helpful to restrict users to editing only their own journal entries, for example. Such a constraint might be defined as:
```json
{
"created_by": "$user"
}
```
The `$user` token can be used only as a constraint value, or as an item within a list of values. It cannot be modified or extended to reference specific user attributes.
### Default Permissions
!!! info "This feature was introduced in NetBox v3.6."
While permissions are typically assigned to specific groups and/or users, it is also possible to define a set of default permissions that are applied to _all_ authenticated users. This is done using the [`DEFAULT_PERMISSIONS`](../configuration/security.md#default_permissions) configuration parameter. Note that statically configuring permissions for specific users or groups is **not** supported.
### Example Constraint Definitions

View File

@@ -54,7 +54,7 @@ pg_dump --username netbox --password --host localhost -s netbox > netbox_schema.
By default, NetBox stores uploaded files (such as image attachments) in its media directory. To fully replicate an instance of NetBox, you'll need to copy both the database and the media files.
!!! note
These operations are not necessary if your installation is utilizing a [remote storage backend](../../configuration/optional-settings/#storage_backend).
These operations are not necessary if your installation is utilizing a [remote storage backend](../configuration/system.md#storage_backend).
### Archive the Media Directory

View File

@@ -0,0 +1,110 @@
# Data & Validation Parameters
## CUSTOM_VALIDATORS
!!! tip "Dynamic Configuration Parameter"
This is a mapping of models to [custom validators](../customization/custom-validation.md) that have been defined locally to enforce custom validation logic. An example is provided below:
```python
CUSTOM_VALIDATORS = {
"dcim.site": [
{
"name": {
"min_length": 5,
"max_length": 30
}
},
"my_plugin.validators.Validator1"
],
"dim.device": [
"my_plugin.validators.Validator1"
]
}
```
---
## FIELD_CHOICES
Some static choice fields on models can be configured with custom values. This is done by defining `FIELD_CHOICES` as a dictionary mapping model fields to their choices. Each choice in the list must have a database value and a human-friendly label, and may optionally specify a color. (A list of available colors is provided below.)
The choices provided can either replace the stock choices provided by NetBox, or append to them. To _replace_ the available choices, specify the app, model, and field name separated by dots. For example, the site model would be referenced as `dcim.Site.status`. To _extend_ the available choices, append a plus sign to the end of this string (e.g. `dcim.Site.status+`).
For example, the following configuration would replace the default site status choices with the options Foo, Bar, and Baz:
```python
FIELD_CHOICES = {
'dcim.Site.status': (
('foo', 'Foo', 'red'),
('bar', 'Bar', 'green'),
('baz', 'Baz', 'blue'),
)
}
```
Appending a plus sign to the field identifier would instead _add_ these choices to the ones already offered:
```python
FIELD_CHOICES = {
'dcim.Site.status+': (
...
)
}
```
The following model fields support configurable choices:
* `circuits.Circuit.status`
* `dcim.Device.status`
* `dcim.Location.status`
* `dcim.Module.status`
* `dcim.PowerFeed.status`
* `dcim.Rack.status`
* `dcim.Site.status`
* `dcim.VirtualDeviceContext.status`
* `extras.JournalEntry.kind`
* `ipam.IPAddress.status`
* `ipam.IPRange.status`
* `ipam.Prefix.status`
* `ipam.VLAN.status`
* `virtualization.Cluster.status`
* `virtualization.VirtualMachine.status`
* `wireless.WirelessLAN.status`
The following colors are supported:
* `blue`
* `indigo`
* `purple`
* `pink`
* `red`
* `orange`
* `yellow`
* `green`
* `teal`
* `cyan`
* `gray`
* `black`
* `white`
---
## PROTECTION_RULES
!!! tip "Dynamic Configuration Parameter"
This is a mapping of models to [custom validators](../customization/custom-validation.md) against which an object is evaluated immediately prior to its deletion. If validation fails, the object is not deleted. An example is provided below:
```python
PROTECTION_RULES = {
"dcim.site": [
{
"status": {
"eq": "decommissioning"
}
},
"my_plugin.validators.Validator1",
]
}
```

View File

@@ -0,0 +1,23 @@
# Date & Time Parameters
## TIME_ZONE
Default: UTC
The time zone NetBox will use when dealing with dates and times. It is recommended to use UTC time unless you have a specific need to use a local time zone. Please see the [list of available time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
## Date and Time Formatting
You may define custom formatting for date and times. For detailed instructions on writing format strings, please see [the Django documentation](https://docs.djangoproject.com/en/stable/ref/templates/builtins/#date). Default formats are listed below.
!!! note
These system defaults will be overridden by a user's selected language/locale when [localization](./system.md#enable_localization) is enabled.
```python
DATE_FORMAT = 'N j, Y' # June 26, 2016
SHORT_DATE_FORMAT = 'Y-m-d' # 2016-06-26
TIME_FORMAT = 'g:i a' # 1:23 p.m.
SHORT_TIME_FORMAT = 'H:i:s' # 13:23:00
DATETIME_FORMAT = 'N j, Y g:i a' # June 26, 2016 1:23 p.m.
SHORT_DATETIME_FORMAT = 'Y-m-d H:i' # 2016-06-26 13:23
```

View File

@@ -0,0 +1,124 @@
# Default Value Parameters
## DEFAULT_DASHBOARD
This parameter controls the content and layout of user's default dashboard. Once the dashboard has been created, the user is free to customize it as they please by adding, removing, and reconfiguring widgets.
This parameter must specify an iterable of dictionaries, each representing a discrete dashboard widget and its configuration. The follow widget attributes are supported:
* `widget`: Dotted path to the Python class (required)
* `width`: Default widget width (between 1 and 12, inclusive)
* `height`: Default widget height, in rows
* `title`: Widget title
* `color`: Color of the widget's title bar, specified by name
* `config`: Dictionary mapping of any widget configuration parameters
A brief example configuration is provided below.
```python
DEFAULT_DASHBOARD = [
{
'widget': 'extras.ObjectCountsWidget',
'width': 4,
'height': 3,
'title': 'Organization',
'config': {
'models': [
'dcim.site',
'tenancy.tenant',
'tenancy.contact',
]
}
},
{
'widget': 'extras.ObjectCountsWidget',
'width': 4,
'height': 3,
'title': 'IPAM',
'color': 'blue',
'config': {
'models': [
'ipam.prefix',
'ipam.iprange',
'ipam.ipaddress',
]
}
},
]
```
## DEFAULT_USER_PREFERENCES
!!! tip "Dynamic Configuration Parameter"
This is a dictionary defining the default preferences to be set for newly-created user accounts. For example, to set the default page size for all users to 100, define the following:
```python
DEFAULT_USER_PREFERENCES = {
"pagination": {
"per_page": 100
}
}
```
For a complete list of available preferences, log into NetBox and navigate to `/user/preferences/`. A period in a preference name indicates a level of nesting in the JSON data. The example above maps to `pagination.per_page`.
---
## PAGINATE_COUNT
!!! tip "Dynamic Configuration Parameter"
Default: 50
The default maximum number of objects to display per page within each list of objects.
---
## POWERFEED_DEFAULT_AMPERAGE
!!! tip "Dynamic Configuration Parameter"
Default: 15
The default value for the `amperage` field when creating new power feeds.
---
## POWERFEED_DEFAULT_MAX_UTILIZATION
!!! tip "Dynamic Configuration Parameter"
Default: 80
The default value (percentage) for the `max_utilization` field when creating new power feeds.
---
## POWERFEED_DEFAULT_VOLTAGE
!!! tip "Dynamic Configuration Parameter"
Default: 120
The default value for the `voltage` field when creating new power feeds.
---
## RACK_ELEVATION_DEFAULT_UNIT_HEIGHT
!!! tip "Dynamic Configuration Parameter"
Default: 22
Default height (in pixels) of a unit within a rack elevation. For best results, this should be approximately one tenth of `RACK_ELEVATION_DEFAULT_UNIT_WIDTH`.
---
## RACK_ELEVATION_DEFAULT_UNIT_WIDTH
!!! tip "Dynamic Configuration Parameter"
Default: 220
Default width (in pixels) of a unit within a rack elevation.

View File

@@ -0,0 +1,21 @@
# Development Parameters
## DEBUG
Default: False
This setting enables debugging. Debugging should be enabled only during development or troubleshooting. Note that only
clients which access NetBox from a recognized [internal IP address](#internal_ips) will see debugging tools in the user
interface.
!!! warning
Never enable debugging on a production system, as it can expose sensitive data to unauthenticated users and impose a
substantial performance penalty.
---
## DEVELOPER
Default: False
This parameter serves as a safeguard to prevent some potentially dangerous behavior, such as generating new database schema migrations. Additionally, enabling this setting disables the debug warning banner in the UI. Set this to `True` **only** if you are actively developing the NetBox code base.

View File

@@ -1,232 +0,0 @@
# Dynamic Configuration Settings
These configuration parameters are primarily controlled via NetBox's admin interface (under Admin > Extras > Configuration Revisions). These setting may also be overridden in `configuration.py`; this will prevent them from being modified via the UI.
---
## ALLOWED_URL_SCHEMES
Default: `('file', 'ftp', 'ftps', 'http', 'https', 'irc', 'mailto', 'sftp', 'ssh', 'tel', 'telnet', 'tftp', 'vnc', 'xmpp')`
A list of permitted URL schemes referenced when rendering links within NetBox. Note that only the schemes specified in this list will be accepted: If adding your own, be sure to replicate all of the default values as well (excluding those schemes which are not desirable).
---
## BANNER_TOP
## BANNER_BOTTOM
Setting these variables will display custom content in a banner at the top and/or bottom of the page, respectively. HTML is allowed. To replicate the content of the top banner in the bottom banner, set:
```python
BANNER_TOP = 'Your banner text'
BANNER_BOTTOM = BANNER_TOP
```
---
## BANNER_LOGIN
This defines custom content to be displayed on the login page above the login form. HTML is allowed.
---
## CHANGELOG_RETENTION
Default: 90
The number of days to retain logged changes (object creations, updates, and deletions). Set this to `0` to retain
changes in the database indefinitely.
!!! warning
If enabling indefinite changelog retention, it is recommended to periodically delete old entries. Otherwise, the database may eventually exceed capacity.
---
## CUSTOM_VALIDATORS
This is a mapping of models to [custom validators](../customization/custom-validation.md) that have been defined locally to enforce custom validation logic. An example is provided below:
```python
CUSTOM_VALIDATORS = {
"dcim.site": [
{
"name": {
"min_length": 5,
"max_length": 30
}
},
"my_plugin.validators.Validator1"
],
"dim.device": [
"my_plugin.validators.Validator1"
]
}
```
---
## DEFAULT_USER_PREFERENCES
This is a dictionary defining the default preferences to be set for newly-created user accounts. For example, to set the default page size for all users to 100, define the following:
```python
DEFAULT_USER_PREFERENCES = {
"pagination": {
"per_page": 100
}
}
```
For a complete list of available preferences, log into NetBox and navigate to `/user/preferences/`. A period in a preference name indicates a level of nesting in the JSON data. The example above maps to `pagination.per_page`.
---
## ENFORCE_GLOBAL_UNIQUE
Default: False
By default, NetBox will permit users to create duplicate prefixes and IP addresses in the global table (that is, those which are not assigned to any VRF). This behavior can be disabled by setting `ENFORCE_GLOBAL_UNIQUE` to True.
---
## GRAPHQL_ENABLED
Default: True
Setting this to False will disable the GraphQL API.
---
## JOBRESULT_RETENTION
Default: 90
The number of days to retain job results (scripts and reports). Set this to `0` to retain
job results in the database indefinitely.
!!! warning
If enabling indefinite job results retention, it is recommended to periodically delete old entries. Otherwise, the database may eventually exceed capacity.
---
## MAINTENANCE_MODE
Default: False
Setting this to True will display a "maintenance mode" banner at the top of every page. Additionally, NetBox will no longer update a user's "last active" time upon login. This is to allow new logins when the database is in a read-only state. Recording of login times will resume when maintenance mode is disabled.
---
## MAPS_URL
Default: `https://maps.google.com/?q=` (Google Maps)
This specifies the URL to use when presenting a map of a physical location by street address or GPS coordinates. The URL must accept either a free-form street address or a comma-separated pair of numeric coordinates appended to it.
---
## MAX_PAGE_SIZE
Default: 1000
A web user or API consumer can request an arbitrary number of objects by appending the "limit" parameter to the URL (e.g. `?limit=1000`). This parameter defines the maximum acceptable limit. Setting this to `0` or `None` will allow a client to retrieve _all_ matching objects at once with no limit by specifying `?limit=0`.
---
## NAPALM_USERNAME
## NAPALM_PASSWORD
NetBox will use these credentials when authenticating to remote devices via the supported [NAPALM integration](../additional-features/napalm.md), if installed. Both parameters are optional.
!!! note
If SSH public key authentication has been set up on the remote device(s) for the system account under which NetBox runs, these parameters are not needed.
---
## NAPALM_ARGS
A dictionary of optional arguments to pass to NAPALM when instantiating a network driver. See the NAPALM documentation for a [complete list of optional arguments](https://napalm.readthedocs.io/en/latest/support/#optional-arguments). An example:
```python
NAPALM_ARGS = {
'api_key': '472071a93b60a1bd1fafb401d9f8ef41',
'port': 2222,
}
```
Some platforms (e.g. Cisco IOS) require an argument named `secret` to be passed in addition to the normal password. If desired, you can use the configured `NAPALM_PASSWORD` as the value for this argument:
```python
NAPALM_USERNAME = 'username'
NAPALM_PASSWORD = 'MySecretPassword'
NAPALM_ARGS = {
'secret': NAPALM_PASSWORD,
# Include any additional args here
}
```
---
## NAPALM_TIMEOUT
Default: 30 seconds
The amount of time (in seconds) to wait for NAPALM to connect to a device.
---
## PAGINATE_COUNT
Default: 50
The default maximum number of objects to display per page within each list of objects.
---
## POWERFEED_DEFAULT_AMPERAGE
Default: 15
The default value for the `amperage` field when creating new power feeds.
---
## POWERFEED_DEFAULT_MAX_UTILIZATION
Default: 80
The default value (percentage) for the `max_utilization` field when creating new power feeds.
---
## POWERFEED_DEFAULT_VOLTAGE
Default: 120
The default value for the `voltage` field when creating new power feeds.
---
## PREFER_IPV4
Default: False
When determining the primary IP address for a device, IPv6 is preferred over IPv4 by default. Set this to True to prefer IPv4 instead.
---
## RACK_ELEVATION_DEFAULT_UNIT_HEIGHT
Default: 22
Default height (in pixels) of a unit within a rack elevation. For best results, this should be approximately one tenth of `RACK_ELEVATION_DEFAULT_UNIT_WIDTH`.
---
## RACK_ELEVATION_DEFAULT_UNIT_WIDTH
Default: 220
Default width (in pixels) of a unit within a rack elevation.

View File

@@ -18,6 +18,9 @@ Default: False
Set to True to enable automatic error reporting via [Sentry](https://sentry.io/).
!!! note
The `sentry-sdk` Python package is required to enable Sentry integration.
---
## SENTRY_SAMPLE_RATE

View File

@@ -1,27 +1,49 @@
# NetBox Configuration
NetBox's local configuration is stored in `$INSTALL_ROOT/netbox/netbox/configuration.py` by default. An example configuration is provided as `configuration_example.py`. You may copy or rename the example configuration and make changes as appropriate. NetBox will not run without a configuration file. While NetBox has many configuration settings, only a few of them must be defined at the time of installation: these are defined under "required settings" below.
## Configuration File
NetBox's configuration file contains all the important parameters which control how NetBox functions: database settings, security controls, user preferences, and so on. While the default configuration suffices out of the box for most use cases, there are a few [required parameters](./required-parameters.md) which **must** be defined during installation.
The configuration file is loaded from `$INSTALL_ROOT/netbox/netbox/configuration.py` by default. An example configuration is provided at `configuration_example.py`, which you may copy to use as your default config. Note that a configuration file must be defined; NetBox will not run without one.
!!! info "Customizing the Configuration Module"
A custom configuration module may be specified by setting the `NETBOX_CONFIGURATION` environment variable. This must be a dotted path to the desired Python module. For example, a file named `my_config.py` in the same directory as `settings.py` would be referenced as `netbox.my_config`.
For the sake of brevity, the NetBox documentation refers to the configuration file simply as `configuration.py`.
To keep things simple, the NetBox documentation refers to the configuration file simply as `configuration.py`.
Some configuration parameters may alternatively be defined either in `configuration.py` or within the administrative section of the user interface. Settings which are "hard-coded" in the configuration file take precedence over those defined via the UI.
## Configuration Parameters
## Dynamic Configuration Parameters
* [Required settings](required-settings.md)
* [Optional settings](optional-settings.md)
* [Dynamic settings](dynamic-settings.md)
* [Remote authentication settings](remote-authentication.md)
Some configuration parameters are primarily controlled via NetBox's admin interface (under Admin > Extras > Configuration Revisions). These are noted where applicable in the documentation. These settings may also be overridden in `configuration.py` to prevent them from being modified via the UI. A complete list of supported parameters is provided below:
## Changing the Configuration
* [`ALLOWED_URL_SCHEMES`](./security.md#allowed_url_schemes)
* [`BANNER_BOTTOM`](./miscellaneous.md#banner_bottom)
* [`BANNER_LOGIN`](./miscellaneous.md#banner_login)
* [`BANNER_TOP`](./miscellaneous.md#banner_top)
* [`CHANGELOG_RETENTION`](./miscellaneous.md#changelog_retention)
* [`CUSTOM_VALIDATORS`](./data-validation.md#custom_validators)
* [`DEFAULT_USER_PREFERENCES`](./default-values.md#default_user_preferences)
* [`ENFORCE_GLOBAL_UNIQUE`](./miscellaneous.md#enforce_global_unique)
* [`GRAPHQL_ENABLED`](./miscellaneous.md#graphql_enabled)
* [`JOB_RETENTION`](./miscellaneous.md#job_retention)
* [`MAINTENANCE_MODE`](./miscellaneous.md#maintenance_mode)
* [`MAPS_URL`](./miscellaneous.md#maps_url)
* [`MAX_PAGE_SIZE`](./miscellaneous.md#max_page_size)
* [`PAGINATE_COUNT`](./default-values.md#paginate_count)
* [`POWERFEED_DEFAULT_AMPERAGE`](./default-values.md#powerfeed_default_amperage)
* [`POWERFEED_DEFAULT_MAX_UTILIZATION`](./default-values.md#powerfeed_default_max_utilization)
* [`POWERFEED_DEFAULT_VOLTAGE`](./default-values.md#powerfeed_default_voltage)
* [`PREFER_IPV4`](./miscellaneous.md#prefer_ipv4)
* [`RACK_ELEVATION_DEFAULT_UNIT_HEIGHT`](./default-values.md#rack_elevation_default_unit_height)
* [`RACK_ELEVATION_DEFAULT_UNIT_WIDTH`](./default-values.md#rack_elevation_default_unit_width)
The configuration file may be modified at any time. However, the WSGI service (e.g. Gunicorn) must be restarted before the changes will take effect:
## Modifying the Configuration
The configuration file may be modified at any time. However, the WSGI service (e.g. Gunicorn) must be restarted before these changes will take effect:
```no-highlight
$ sudo systemctl restart netbox
```
Configuration parameters which are set via the admin UI (those listed under "dynamic settings") take effect immediately.
Dynamic configuration parameters (those which can be modified via the UI) take effect immediately.

View File

@@ -0,0 +1,250 @@
# Miscellaneous Parameters
## ADMINS
NetBox will email details about critical errors to the administrators listed here. This should be a list of (name, email) tuples. For example:
```python
ADMINS = [
['Hank Hill', 'hhill@example.com'],
['Dale Gribble', 'dgribble@example.com'],
]
```
---
## BANNER_BOTTOM
!!! tip "Dynamic Configuration Parameter"
Sets content for the bottom banner in the user interface.
---
## BANNER_LOGIN
!!! tip "Dynamic Configuration Parameter"
This defines custom content to be displayed on the login page above the login form. HTML is allowed.
---
## BANNER_MAINTENANCE
!!! tip "Dynamic Configuration Parameter"
!!! note
This parameter was added in NetBox v3.5.
This adds a banner to the top of every page when maintenance mode is enabled. HTML is allowed.
---
## BANNER_TOP
!!! tip "Dynamic Configuration Parameter"
Sets content for the top banner in the user interface.
!!! tip
If you'd like the top and bottom banners to match, set the following:
```python
BANNER_TOP = 'Your banner text'
BANNER_BOTTOM = BANNER_TOP
```
---
## CENSUS_REPORTING_ENABLED
Default: True
Enables anonymous census reporting. To opt out of census reporting, set this to False.
This data enables the project maintainers to estimate how many NetBox deployments exist and track the adoption of new versions over time. Census reporting effects a single HTTP request each time a worker starts. The only data reported by this function are the NetBox version, Python version, and a pseudorandom unique identifier.
---
## CHANGELOG_RETENTION
!!! tip "Dynamic Configuration Parameter"
Default: 90
The number of days to retain logged changes (object creations, updates, and deletions). Set this to `0` to retain
changes in the database indefinitely.
!!! warning
If enabling indefinite changelog retention, it is recommended to periodically delete old entries. Otherwise, the database may eventually exceed capacity.
---
## CHANGELOG_SKIP_EMPTY_CHANGES
Default: True
If enabled, a change log record will not be created when an object is updated without any changes to its existing field values.
!!! note
The object's `last_updated` field will always reflect the time of the most recent update, regardless of this parameter.
---
## DATA_UPLOAD_MAX_MEMORY_SIZE
Default: `2621440` (2.5 MB)
The maximum size (in bytes) of an incoming HTTP request (i.e. `GET` or `POST` data). Requests which exceed this size will raise a `RequestDataTooBig` exception.
---
## ENFORCE_GLOBAL_UNIQUE
!!! tip "Dynamic Configuration Parameter"
Default: True
By default, NetBox will prevent the creation of duplicate prefixes and IP addresses in the global table (that is, those which are not assigned to any VRF). This validation can be disabled by setting `ENFORCE_GLOBAL_UNIQUE` to False.
!!! info "Changed in v3.7"
The default value for this parameter was changed from False to True in NetBox v3.7.
---
## FILE_UPLOAD_MAX_MEMORY_SIZE
Default: `2621440` (2.5 MB)
The maximum amount (in bytes) of uploaded data that will be held in memory before being written to the filesystem. Changing this setting can be useful for example to be able to upload files bigger than 2.5MB to custom scripts for processing.
---
## GRAPHQL_ENABLED
!!! tip "Dynamic Configuration Parameter"
Default: True
Setting this to False will disable the GraphQL API.
---
## JOB_RETENTION
!!! tip "Dynamic Configuration Parameter"
!!! note
This parameter was renamed from `JOBRESULT_RETENTION` in NetBox v3.5.
Default: 90
The number of days to retain job results (scripts and reports). Set this to `0` to retain job results in the database indefinitely.
!!! warning
If enabling indefinite job results retention, it is recommended to periodically delete old entries. Otherwise, the database may eventually exceed capacity.
---
## MAINTENANCE_MODE
!!! tip "Dynamic Configuration Parameter"
Default: False
Setting this to True will display a "maintenance mode" banner at the top of every page. Additionally, NetBox will no longer update a user's "last active" time upon login. This is to allow new logins when the database is in a read-only state. Recording of login times will resume when maintenance mode is disabled.
---
## MAPS_URL
!!! tip "Dynamic Configuration Parameter"
Default: `https://maps.google.com/?q=` (Google Maps)
This specifies the URL to use when presenting a map of a physical location by street address or GPS coordinates. The URL must accept either a free-form street address or a comma-separated pair of numeric coordinates appended to it. Set this to `None` to disable the "map it" button within the UI.
---
## MAX_PAGE_SIZE
!!! tip "Dynamic Configuration Parameter"
Default: 1000
A web user or API consumer can request an arbitrary number of objects by appending the "limit" parameter to the URL (e.g. `?limit=1000`). This parameter defines the maximum acceptable limit. Setting this to `0` or `None` will allow a client to retrieve _all_ matching objects at once with no limit by specifying `?limit=0`.
---
## METRICS_ENABLED
Default: False
Toggle the availability Prometheus-compatible metrics at `/metrics`. See the [Prometheus Metrics](../integrations/prometheus-metrics.md) documentation for more details.
---
## PREFER_IPV4
!!! tip "Dynamic Configuration Parameter"
Default: False
When determining the primary IP address for a device, IPv6 is preferred over IPv4 by default. Set this to True to prefer IPv4 instead.
---
## QUEUE_MAPPINGS
Allows changing which queues are used internally for background tasks.
```python
QUEUE_MAPPINGS = {
'webhook': 'low',
'report': 'high',
'script': 'high',
}
```
If no queue is defined the queue named `default` will be used.
---
## RELEASE_CHECK_URL
Default: None (disabled)
This parameter defines the URL of the repository that will be checked for new NetBox releases. When a new release is detected, a message will be displayed to administrative users on the home page. This can be set to the official repository (`'https://api.github.com/repos/netbox-community/netbox/releases'`) or a custom fork. Set this to `None` to disable automatic update checks.
!!! note
The URL provided **must** be compatible with the [GitHub REST API](https://docs.github.com/en/rest).
---
## RQ_DEFAULT_TIMEOUT
Default: `300`
The maximum execution time of a background task (such as running a custom script), in seconds.
---
## RQ_RETRY_INTERVAL
!!! note
This parameter was added in NetBox v3.5.
Default: `60`
This parameter controls how frequently a failed job is retried, up to the maximum number of times specified by `RQ_RETRY_MAX`. This must be either an integer specifying the number of seconds to wait between successive attempts, or a list of such values. For example, `[60, 300, 3600]` will retry the task after 1 minute, 5 minutes, and 1 hour.
---
## RQ_RETRY_MAX
!!! note
This parameter was added in NetBox v3.5.
Default: `0` (retries disabled)
The maximum number of times a background task will be retried before being marked as failed.

View File

@@ -1,487 +0,0 @@
# Optional Configuration Settings
## ADMINS
NetBox will email details about critical errors to the administrators listed here. This should be a list of (name, email) tuples. For example:
```python
ADMINS = [
['Hank Hill', 'hhill@example.com'],
['Dale Gribble', 'dgribble@example.com'],
]
```
---
## AUTH_PASSWORD_VALIDATORS
This parameter acts as a pass-through for configuring Django's built-in password validators for local user accounts. If configured, these will be applied whenever a user's password is updated to ensure that it meets minimum criteria such as length or complexity. An example is provided below. For more detail on the available options, please see [the Django documentation](https://docs.djangoproject.com/en/stable/topics/auth/passwords/#password-validation).
```python
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
'OPTIONS': {
'min_length': 10,
}
},
]
```
---
## BASE_PATH
Default: None
The base URL path to use when accessing NetBox. Do not include the scheme or domain name. For example, if installed at https://example.com/netbox/, set:
```python
BASE_PATH = 'netbox/'
```
---
## CORS_ORIGIN_ALLOW_ALL
Default: False
If True, cross-origin resource sharing (CORS) requests will be accepted from all origins. If False, a whitelist will be used (see below).
---
## CORS_ORIGIN_WHITELIST
## CORS_ORIGIN_REGEX_WHITELIST
These settings specify a list of origins that are authorized to make cross-site API requests. Use
`CORS_ORIGIN_WHITELIST` to define a list of exact hostnames, or `CORS_ORIGIN_REGEX_WHITELIST` to define a set of regular
expressions. (These settings have no effect if `CORS_ORIGIN_ALLOW_ALL` is True.) For example:
```python
CORS_ORIGIN_WHITELIST = [
'https://example.com',
]
```
---
## CSRF_COOKIE_NAME
Default: `csrftoken`
The name of the cookie to use for the cross-site request forgery (CSRF) authentication token. See the [Django documentation](https://docs.djangoproject.com/en/stable/ref/settings/#csrf-cookie-name) for more detail.
---
## CSRF_TRUSTED_ORIGINS
Default: `[]`
Defines a list of trusted origins for unsafe (e.g. `POST`) requests. This is a pass-through to Django's [`CSRF_TRUSTED_ORIGINS`](https://docs.djangoproject.com/en/4.0/ref/settings/#std:setting-CSRF_TRUSTED_ORIGINS) setting. Note that each host listed must specify a scheme (e.g. `http://` or `https://).
```python
CSRF_TRUSTED_ORIGINS = (
'http://netbox.local',
'https://netbox.local',
)
```
---
## DEBUG
Default: False
This setting enables debugging. Debugging should be enabled only during development or troubleshooting. Note that only
clients which access NetBox from a recognized [internal IP address](#internal_ips) will see debugging tools in the user
interface.
!!! warning
Never enable debugging on a production system, as it can expose sensitive data to unauthenticated users and impose a
substantial performance penalty.
---
## DEVELOPER
Default: False
This parameter serves as a safeguard to prevent some potentially dangerous behavior, such as generating new database schema migrations. Set this to `True` **only** if you are actively developing the NetBox code base.
---
## DOCS_ROOT
Default: `$INSTALL_ROOT/docs/`
The filesystem path to NetBox's documentation. This is used when presenting context-sensitive documentation in the web UI. By default, this will be the `docs/` directory within the root NetBox installation path. (Set this to `None` to disable the embedded documentation.)
---
## EMAIL
In order to send email, NetBox needs an email server configured. The following items can be defined within the `EMAIL` configuration parameter:
* `SERVER` - Hostname or IP address of the email server (use `localhost` if running locally)
* `PORT` - TCP port to use for the connection (default: `25`)
* `USERNAME` - Username with which to authenticate
* `PASSSWORD` - Password with which to authenticate
* `USE_SSL` - Use SSL when connecting to the server (default: `False`)
* `USE_TLS` - Use TLS when connecting to the server (default: `False`)
* `SSL_CERTFILE` - Path to the PEM-formatted SSL certificate file (optional)
* `SSL_KEYFILE` - Path to the PEM-formatted SSL private key file (optional)
* `TIMEOUT` - Amount of time to wait for a connection, in seconds (default: `10`)
* `FROM_EMAIL` - Sender address for emails sent by NetBox
!!! note
The `USE_SSL` and `USE_TLS` parameters are mutually exclusive.
Email is sent from NetBox only for critical events or if configured for [logging](#logging). If you would like to test the email server configuration, Django provides a convenient [send_mail()](https://docs.djangoproject.com/en/stable/topics/email/#send-mail) function accessible within the NetBox shell:
```no-highlight
# python ./manage.py nbshell
>>> from django.core.mail import send_mail
>>> send_mail(
'Test Email Subject',
'Test Email Body',
'noreply-netbox@example.com',
['users@example.com'],
fail_silently=False
)
```
---
## EXEMPT_VIEW_PERMISSIONS
Default: Empty list
A list of NetBox models to exempt from the enforcement of view permissions. Models listed here will be viewable by all users, both authenticated and anonymous.
List models in the form `<app>.<model>`. For example:
```python
EXEMPT_VIEW_PERMISSIONS = [
'dcim.site',
'dcim.region',
'ipam.prefix',
]
```
To exempt _all_ models from view permission enforcement, set the following. (Note that `EXEMPT_VIEW_PERMISSIONS` must be an iterable.)
```python
EXEMPT_VIEW_PERMISSIONS = ['*']
```
!!! note
Using a wildcard will not affect certain potentially sensitive models, such as user permissions. If there is a need to exempt these models, they must be specified individually.
---
## FIELD_CHOICES
Some static choice fields on models can be configured with custom values. This is done by defining `FIELD_CHOICES` as a dictionary mapping model fields to their choices. Each choice in the list must have a database value and a human-friendly label, and may optionally specify a color. (A list of available colors is provided below.)
The choices provided can either replace the stock choices provided by NetBox, or append to them. To _replace_ the available choices, specify the app, model, and field name separated by dots. For example, the site model would be referenced as `dcim.Site.status`. To _extend_ the available choices, append a plus sign to the end of this string (e.g. `dcim.Site.status+`).
For example, the following configuration would replace the default site status choices with the options Foo, Bar, and Baz:
```python
FIELD_CHOICES = {
'dcim.Site.status': (
('foo', 'Foo', 'red'),
('bar', 'Bar', 'green'),
('baz', 'Baz', 'blue'),
)
}
```
Appending a plus sign to the field identifier would instead _add_ these choices to the ones already offered:
```python
FIELD_CHOICES = {
'dcim.Site.status+': (
...
)
}
```
The following model fields support configurable choices:
* `circuits.Circuit.status`
* `dcim.Device.status`
* `dcim.PowerFeed.status`
* `dcim.Rack.status`
* `dcim.Site.status`
* `extras.JournalEntry.kind`
* `ipam.IPAddress.status`
* `ipam.IPRange.status`
* `ipam.Prefix.status`
* `ipam.VLAN.status`
* `virtualization.VirtualMachine.status`
The following colors are supported:
* `blue`
* `indigo`
* `purple`
* `pink`
* `red`
* `orange`
* `yellow`
* `green`
* `teal`
* `cyan`
* `gray`
* `black`
* `white`
---
## HTTP_PROXIES
Default: None
A dictionary of HTTP proxies to use for outbound requests originating from NetBox (e.g. when sending webhook requests). Proxies should be specified by schema (HTTP and HTTPS) as per the [Python requests library documentation](https://2.python-requests.org/en/master/user/advanced/). For example:
```python
HTTP_PROXIES = {
'http': 'http://10.10.1.10:3128',
'https': 'http://10.10.1.10:1080',
}
```
---
## JINJA2_FILTERS
Default: `{}`
A dictionary of custom jinja2 filters with the key being the filter name and the value being a callable. For more information see the [Jinja2 documentation](https://jinja.palletsprojects.com/en/3.1.x/api/#custom-filters). For example:
```python
def uppercase(x):
return str(x).upper()
JINJA2_FILTERS = {
'uppercase': uppercase,
}
```
---
## INTERNAL_IPS
Default: `('127.0.0.1', '::1')`
A list of IP addresses recognized as internal to the system, used to control the display of debugging output. For
example, the debugging toolbar will be viewable only when a client is accessing NetBox from one of the listed IP
addresses (and [`DEBUG`](#debug) is true).
---
## LOGGING
By default, all messages of INFO severity or higher will be logged to the console. Additionally, if [`DEBUG`](#debug) is False and email access has been configured, ERROR and CRITICAL messages will be emailed to the users defined in [`ADMINS`](#admins).
The Django framework on which NetBox runs allows for the customization of logging format and destination. Please consult the [Django logging documentation](https://docs.djangoproject.com/en/stable/topics/logging/) for more information on configuring this setting. Below is an example which will write all INFO and higher messages to a local file:
```python
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'file': {
'level': 'INFO',
'class': 'logging.FileHandler',
'filename': '/var/log/netbox.log',
},
},
'loggers': {
'django': {
'handlers': ['file'],
'level': 'INFO',
},
},
}
```
### Available Loggers
* `netbox.<app>.<model>` - Generic form for model-specific log messages
* `netbox.auth.*` - Authentication events
* `netbox.api.views.*` - Views which handle business logic for the REST API
* `netbox.reports.*` - Report execution (`module.name`)
* `netbox.scripts.*` - Custom script execution (`module.name`)
* `netbox.views.*` - Views which handle business logic for the web UI
---
## LOGIN_PERSISTENCE
Default: False
If true, the lifetime of a user's authentication session will be automatically reset upon each valid request. For example, if [`LOGIN_TIMEOUT`](#login_timeout) is configured to 14 days (the default), and a user whose session is due to expire in five days makes a NetBox request (with a valid session cookie), the session's lifetime will be reset to 14 days.
Note that enabling this setting causes NetBox to update a user's session in the database (or file, as configured per [`SESSION_FILE_PATH`](#session_file_path)) with each request, which may introduce significant overhead in very active environments. It also permits an active user to remain authenticated to NetBox indefinitely.
---
## LOGIN_REQUIRED
Default: False
Setting this to True will permit only authenticated users to access any part of NetBox. By default, anonymous users are permitted to access most data in NetBox but not make any changes.
---
## LOGIN_TIMEOUT
Default: 1209600 seconds (14 days)
The lifetime (in seconds) of the authentication cookie issued to a NetBox user upon login.
---
## MEDIA_ROOT
Default: $INSTALL_ROOT/netbox/media/
The file path to the location where media files (such as image attachments) are stored. By default, this is the `netbox/media/` directory within the base NetBox installation path.
---
## METRICS_ENABLED
Default: False
Toggle the availability Prometheus-compatible metrics at `/metrics`. See the [Prometheus Metrics](../additional-features/prometheus-metrics.md) documentation for more details.
---
## PLUGINS
Default: Empty
A list of installed [NetBox plugins](../../plugins/) to enable. Plugins will not take effect unless they are listed here.
!!! warning
Plugins extend NetBox by allowing external code to run with the same access and privileges as NetBox itself. Only install plugins from trusted sources. The NetBox maintainers make absolutely no guarantees about the integrity or security of your installation with plugins enabled.
---
## PLUGINS_CONFIG
Default: Empty
This parameter holds configuration settings for individual NetBox plugins. It is defined as a dictionary, with each key using the name of an installed plugin. The specific parameters supported are unique to each plugin: Reference the plugin's documentation to determine the supported parameters. An example configuration is shown below:
```python
PLUGINS_CONFIG = {
'plugin1': {
'foo': 123,
'bar': True
},
'plugin2': {
'foo': 456,
},
}
```
Note that a plugin must be listed in `PLUGINS` for its configuration to take effect.
---
## RELEASE_CHECK_URL
Default: None (disabled)
This parameter defines the URL of the repository that will be checked for new NetBox releases. When a new release is detected, a message will be displayed to administrative users on the home page. This can be set to the official repository (`'https://api.github.com/repos/netbox-community/netbox/releases'`) or a custom fork. Set this to `None` to disable automatic update checks.
!!! note
The URL provided **must** be compatible with the [GitHub REST API](https://docs.github.com/en/rest).
---
## REPORTS_ROOT
Default: `$INSTALL_ROOT/netbox/reports/`
The file path to the location where [custom reports](../customization/reports.md) will be kept. By default, this is the `netbox/reports/` directory within the base NetBox installation path.
---
## RQ_DEFAULT_TIMEOUT
Default: `300`
The maximum execution time of a background task (such as running a custom script), in seconds.
---
## SCRIPTS_ROOT
Default: `$INSTALL_ROOT/netbox/scripts/`
The file path to the location where [custom scripts](../customization/custom-scripts.md) will be kept. By default, this is the `netbox/scripts/` directory within the base NetBox installation path.
---
## SESSION_COOKIE_NAME
Default: `sessionid`
The name used for the session cookie. See the [Django documentation](https://docs.djangoproject.com/en/stable/ref/settings/#session-cookie-name) for more detail.
---
## SESSION_FILE_PATH
Default: None
HTTP session data is used to track authenticated users when they access NetBox. By default, NetBox stores session data in its PostgreSQL database. However, this inhibits authentication to a standby instance of NetBox without write access to the database. Alternatively, a local file path may be specified here and NetBox will store session data as files instead of using the database. Note that the NetBox system user must have read and write permissions to this path.
---
## STORAGE_BACKEND
Default: None (local storage)
The backend storage engine for handling uploaded files (e.g. image attachments). NetBox supports integration with the [`django-storages`](https://django-storages.readthedocs.io/en/stable/) package, which provides backends for several popular file storage services. If not configured, local filesystem storage will be used.
The configuration parameters for the specified storage backend are defined under the `STORAGE_CONFIG` setting.
---
## STORAGE_CONFIG
Default: Empty
A dictionary of configuration parameters for the storage backend configured as `STORAGE_BACKEND`. The specific parameters to be used here are specific to each backend; see the [`django-storages` documentation](https://django-storages.readthedocs.io/en/stable/) for more detail.
If `STORAGE_BACKEND` is not defined, this setting will be ignored.
---
## TIME_ZONE
Default: UTC
The time zone NetBox will use when dealing with dates and times. It is recommended to use UTC time unless you have a specific need to use a local time zone. Please see the [list of available time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
---
## Date and Time Formatting
You may define custom formatting for date and times. For detailed instructions on writing format strings, please see [the Django documentation](https://docs.djangoproject.com/en/stable/ref/templates/builtins/#date). Default formats are listed below.
```python
DATE_FORMAT = 'N j, Y' # June 26, 2016
SHORT_DATE_FORMAT = 'Y-m-d' # 2016-06-26
TIME_FORMAT = 'g:i a' # 1:23 p.m.
SHORT_TIME_FORMAT = 'H:i:s' # 13:23:00
DATETIME_FORMAT = 'N j, Y g:i a' # June 26, 2016 1:23 p.m.
SHORT_DATETIME_FORMAT = 'Y-m-d H:i' # 2016-06-26 13:23
```

View File

@@ -0,0 +1,35 @@
# Plugin Parameters
## PLUGINS
Default: Empty
A list of installed [NetBox plugins](../plugins/index.md) to enable. Plugins will not take effect unless they are listed here.
!!! warning
Plugins extend NetBox by allowing external code to run with the same access and privileges as NetBox itself. Only install plugins from trusted sources. The NetBox maintainers make absolutely no guarantees about the integrity or security of your installation with plugins enabled.
---
## PLUGINS_CONFIG
Default: Empty
This parameter holds configuration settings for individual NetBox plugins. It is defined as a dictionary, with each key using the name of an installed plugin. The specific parameters supported are unique to each plugin: Reference the plugin's documentation to determine the supported parameters. An example configuration is shown below:
```python
PLUGINS_CONFIG = {
'plugin1': {
'foo': 123,
'bar': True
},
'plugin2': {
'foo': 456,
},
}
```
Note that a plugin must be listed in `PLUGINS` for its configuration to take effect.
---

View File

@@ -4,6 +4,14 @@ The configuration parameters listed here control remote authentication for NetBo
---
## REMOTE_AUTH_AUTO_CREATE_GROUPS
Default: `False`
If true, NetBox will automatically create groups specified in the `REMOTE_AUTH_GROUP_HEADER` header if they don't already exist. (Requires `REMOTE_AUTH_ENABLED`.)
---
## REMOTE_AUTH_AUTO_CREATE_USER
Default: `False`
@@ -16,7 +24,7 @@ If true, NetBox will automatically create local accounts for users authenticated
Default: `'netbox.authentication.RemoteUserBackend'`
This is the Python path to the custom [Django authentication backend](https://docs.djangoproject.com/en/stable/topics/auth/customizing/) to use for external user authentication. NetBox provides two built-in backends (listed below), though custom authentication backends may also be provided by other packages or plugins.
This is the Python path to the custom [Django authentication backend](https://docs.djangoproject.com/en/stable/topics/auth/customizing/) to use for external user authentication. NetBox provides two built-in backends (listed below), though custom authentication backends may also be provided by other packages or plugins. Provide a string for a single backend, or an iterable for multiple backends, which will be attempted in the order given.
* `netbox.authentication.RemoteUserBackend`
* `netbox.authentication.LDAPBackend`
@@ -47,6 +55,22 @@ NetBox can be configured to support remote user authentication by inferring user
---
## REMOTE_AUTH_GROUP_HEADER
Default: `'HTTP_REMOTE_USER_GROUP'`
When remote user authentication is in use, this is the name of the HTTP header which informs NetBox of the currently authenticated user. For example, to use the request header `X-Remote-User-Groups` it needs to be set to `HTTP_X_REMOTE_USER_GROUPS`. (Requires `REMOTE_AUTH_ENABLED` and `REMOTE_AUTH_GROUP_SYNC_ENABLED` )
---
## REMOTE_AUTH_GROUP_SEPARATOR
Default: `|` (Pipe)
The Seperator upon which `REMOTE_AUTH_GROUP_HEADER` gets split into individual Groups. This needs to be coordinated with your authentication Proxy. (Requires `REMOTE_AUTH_ENABLED` and `REMOTE_AUTH_GROUP_SYNC_ENABLED` )
---
## REMOTE_AUTH_GROUP_SYNC_ENABLED
Default: `False`
@@ -63,11 +87,27 @@ When remote user authentication is in use, this is the name of the HTTP header w
---
## REMOTE_AUTH_GROUP_HEADER
## REMOTE_AUTH_USER_EMAIL
Default: `'HTTP_REMOTE_USER_GROUP'`
Default: `'HTTP_REMOTE_USER_EMAIL'`
When remote user authentication is in use, this is the name of the HTTP header which informs NetBox of the currently authenticated user. For example, to use the request header `X-Remote-User-Groups` it needs to be set to `HTTP_X_REMOTE_USER_GROUPS`. (Requires `REMOTE_AUTH_ENABLED` and `REMOTE_AUTH_GROUP_SYNC_ENABLED` )
When remote user authentication is in use, this is the name of the HTTP header which informs NetBox of the email address of the currently authenticated user. For example, to use the request header `X-Remote-User-Email` it needs to be set to `HTTP_X_REMOTE_USER_EMAIL`. (Requires `REMOTE_AUTH_ENABLED`.)
---
## REMOTE_AUTH_USER_FIRST_NAME
Default: `'HTTP_REMOTE_USER_FIRST_NAME'`
When remote user authentication is in use, this is the name of the HTTP header which informs NetBox of the first name of the currently authenticated user. For example, to use the request header `X-Remote-User-First-Name` it needs to be set to `HTTP_X_REMOTE_USER_FIRST_NAME`. (Requires `REMOTE_AUTH_ENABLED`.)
---
## REMOTE_AUTH_USER_LAST_NAME
Default: `'HTTP_REMOTE_USER_LAST_NAME'`
When remote user authentication is in use, this is the name of the HTTP header which informs NetBox of the last name of the currently authenticated user. For example, to use the request header `X-Remote-User-Last-Name` it needs to be set to `HTTP_X_REMOTE_USER_LAST_NAME`. (Requires `REMOTE_AUTH_ENABLED`.)
---
@@ -100,11 +140,3 @@ The list of groups that promote an remote User to Staff on Login. If group isn't
Default: `[]` (Empty list)
The list of users that get promoted to Staff on Login. If user isn't present in list on next Login, the Role gets revoked. (Requires `REMOTE_AUTH_ENABLED` and `REMOTE_AUTH_GROUP_SYNC_ENABLED` )
---
## REMOTE_AUTH_GROUP_SEPARATOR
Default: `|` (Pipe)
The Seperator upon which `REMOTE_AUTH_GROUP_HEADER` gets split into individual Groups. This needs to be coordinated with your authentication Proxy. (Requires `REMOTE_AUTH_ENABLED` and `REMOTE_AUTH_GROUP_SYNC_ENABLED` )

View File

@@ -25,7 +25,7 @@ ALLOWED_HOSTS = ['*']
## DATABASE
NetBox requires access to a PostgreSQL 10 or later database service to store data. This service can run locally on the NetBox server or on a remote system. The following parameters must be defined within the `DATABASE` dictionary:
NetBox requires access to a PostgreSQL 12 or later database service to store data. This service can run locally on the NetBox server or on a remote system. The following parameters must be defined within the `DATABASE` dictionary:
* `NAME` - Database name
* `USER` - PostgreSQL username
@@ -33,11 +33,13 @@ NetBox requires access to a PostgreSQL 10 or later database service to store dat
* `HOST` - Name or IP address of the database server (use `localhost` if running locally)
* `PORT` - TCP port of the PostgreSQL service; leave blank for default port (TCP/5432)
* `CONN_MAX_AGE` - Lifetime of a [persistent database connection](https://docs.djangoproject.com/en/stable/ref/databases/#persistent-connections), in seconds (300 is the default)
* `ENGINE` - The database backend to use; must be a PostgreSQL-compatible backend (e.g. `django.db.backends.postgresql`)
Example:
```python
DATABASE = {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'netbox', # Database name
'USER': 'netbox', # PostgreSQL username
'PASSWORD': 'J5brHrAXFLQSif0K', # PostgreSQL password
@@ -50,19 +52,20 @@ DATABASE = {
!!! note
NetBox supports all PostgreSQL database options supported by the underlying Django framework. For a complete list of available parameters, please see [the Django documentation](https://docs.djangoproject.com/en/stable/ref/settings/#databases).
!!! warning
Make sure to use a PostgreSQL-compatible backend for the ENGINE setting. If you don't specify an ENGINE, the default will be django.db.backends.postgresql.
---
## REDIS
[Redis](https://redis.io/) is an in-memory data store similar to memcached. While Redis has been an optional component of
NetBox since the introduction of webhooks in version 2.4, it is required starting in 2.6 to support NetBox's caching
functionality (as well as other planned features). In 2.7, the connection settings were broken down into two sections for
task queuing and caching, allowing the user to connect to different Redis instances/databases per feature.
[Redis](https://redis.io/) is a lightweight in-memory data store similar to memcached. NetBox employs Redis for background task queuing and other features.
Redis is configured using a configuration setting similar to `DATABASE` and these settings are the same for both of the `tasks` and `caching` subsections:
* `HOST` - Name or IP address of the Redis server (use `localhost` if running locally)
* `PORT` - TCP port of the Redis service; leave blank for default port (6379)
* `USERNAME` - Redis username (if set)
* `PASSWORD` - Redis password (if set)
* `DATABASE` - Numeric database ID
* `SSL` - Use SSL connection to Redis
@@ -75,6 +78,7 @@ REDIS = {
'tasks': {
'HOST': 'redis.example.com',
'PORT': 1234,
'USERNAME': 'netbox',
'PASSWORD': 'foobar',
'DATABASE': 0,
'SSL': False,
@@ -82,6 +86,7 @@ REDIS = {
'caching': {
'HOST': 'localhost',
'PORT': 6379,
'USERNAME': '',
'PASSWORD': '',
'DATABASE': 1,
'SSL': False,
@@ -141,8 +146,6 @@ REDIS = {
## SECRET_KEY
This is a secret, random string used to assist in the creation new cryptographic hashes for passwords and HTTP cookies. The key defined here should not be shared outside of the configuration file. `SECRET_KEY` can be changed at any time, however be aware that doing so will invalidate all existing sessions.
This is a secret, pseudorandom string used to assist in the creation new cryptographic hashes for passwords and HTTP cookies. The key defined here should not be shared outside the configuration file. `SECRET_KEY` can be changed at any time without impacting stored data, however be aware that doing so will invalidate all existing user sessions. NetBox deployments comprising multiple nodes must have the same secret key configured on all nodes.
Please note that this key is **not** used directly for hashing user passwords or for the encrypted storage of secret data in NetBox.
`SECRET_KEY` should be at least 50 characters in length and contain a random mix of letters, digits, and symbols. The script located at `$INSTALL_ROOT/netbox/generate_secret_key.py` may be used to generate a suitable key.
`SECRET_KEY` **must** be at least 50 characters in length, and should contain a mix of letters, digits, and symbols. The script located at `$INSTALL_ROOT/netbox/generate_secret_key.py` may be used to generate a suitable key. Please note that this key is **not** used directly for hashing user passwords or for the encrypted storage of secret data in NetBox.

View File

@@ -0,0 +1,217 @@
# Security & Authentication Parameters
## ALLOW_TOKEN_RETRIEVAL
Default: True
If disabled, the values of API tokens will not be displayed after each token's initial creation. A user **must** record the value of a token prior to its creation, or it will be lost. Note that this affects _all_ users, regardless of assigned permissions.
---
## ALLOWED_URL_SCHEMES
!!! tip "Dynamic Configuration Parameter"
Default: `('file', 'ftp', 'ftps', 'http', 'https', 'irc', 'mailto', 'sftp', 'ssh', 'tel', 'telnet', 'tftp', 'vnc', 'xmpp')`
A list of permitted URL schemes referenced when rendering links within NetBox. Note that only the schemes specified in this list will be accepted: If adding your own, be sure to replicate all the default values as well (excluding those schemes which are not desirable).
---
## AUTH_PASSWORD_VALIDATORS
This parameter acts as a pass-through for configuring Django's built-in password validators for local user accounts. If configured, these will be applied whenever a user's password is updated to ensure that it meets minimum criteria such as length or complexity. An example is provided below. For more detail on the available options, please see [the Django documentation](https://docs.djangoproject.com/en/stable/topics/auth/passwords/#password-validation).
```python
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
'OPTIONS': {
'min_length': 10,
}
},
]
```
---
## CORS_ORIGIN_ALLOW_ALL
Default: False
If True, cross-origin resource sharing (CORS) requests will be accepted from all origins. If False, a whitelist will be used (see below).
---
## CORS_ORIGIN_WHITELIST
## CORS_ORIGIN_REGEX_WHITELIST
These settings specify a list of origins that are authorized to make cross-site API requests. Use
`CORS_ORIGIN_WHITELIST` to define a list of exact hostnames, or `CORS_ORIGIN_REGEX_WHITELIST` to define a set of regular
expressions. (These settings have no effect if `CORS_ORIGIN_ALLOW_ALL` is True.) For example:
```python
CORS_ORIGIN_WHITELIST = [
'https://example.com',
]
```
---
## CSRF_COOKIE_NAME
Default: `csrftoken`
The name of the cookie to use for the cross-site request forgery (CSRF) authentication token. See the [Django documentation](https://docs.djangoproject.com/en/stable/ref/settings/#csrf-cookie-name) for more detail.
---
## CSRF_COOKIE_SECURE
Default: False
If true, the cookie employed for cross-site request forgery (CSRF) protection will be marked as secure, meaning that it can only be sent across an HTTPS connection.
---
## CSRF_TRUSTED_ORIGINS
Default: `[]`
Defines a list of trusted origins for unsafe (e.g. `POST`) requests. This is a pass-through to Django's [`CSRF_TRUSTED_ORIGINS`](https://docs.djangoproject.com/en/4.0/ref/settings/#std:setting-CSRF_TRUSTED_ORIGINS) setting. Note that each host listed must specify a scheme (e.g. `http://` or `https://).
```python
CSRF_TRUSTED_ORIGINS = (
'http://netbox.local',
'https://netbox.local',
)
```
---
## DEFAULT_PERMISSIONS
!!! info "This parameter was introduced in NetBox v3.6."
Default:
```python
{
'users.view_token': ({'user': '$user'},),
'users.add_token': ({'user': '$user'},),
'users.change_token': ({'user': '$user'},),
'users.delete_token': ({'user': '$user'},),
}
```
This parameter defines object permissions that are applied automatically to _any_ authenticated user, regardless of what permissions have been defined in the database. By default, this parameter is defined to allow all users to manage their own API tokens, however it can be overriden for any purpose.
For example, to allow all users to create a device role beginning with the word "temp," you could configure the following:
```python
DEFAULT_PERMISSIONS = {
'dcim.add_devicerole': (
{'name__startswith': 'temp'},
)
}
```
!!! warning
Setting a custom value for this parameter will overwrite the default permission mapping shown above. If you want to retain the default mapping, be sure to reproduce it in your custom configuration.
---
## EXEMPT_VIEW_PERMISSIONS
Default: Empty list
A list of NetBox models to exempt from the enforcement of view permissions. Models listed here will be viewable by all users, both authenticated and anonymous.
List models in the form `<app>.<model>`. For example:
```python
EXEMPT_VIEW_PERMISSIONS = [
'dcim.site',
'dcim.region',
'ipam.prefix',
]
```
To exempt _all_ models from view permission enforcement, set the following. (Note that `EXEMPT_VIEW_PERMISSIONS` must be an iterable.)
```python
EXEMPT_VIEW_PERMISSIONS = ['*']
```
!!! note
Using a wildcard will not affect certain potentially sensitive models, such as user permissions. If there is a need to exempt these models, they must be specified individually.
---
## LOGIN_PERSISTENCE
Default: False
If true, the lifetime of a user's authentication session will be automatically reset upon each valid request. For example, if [`LOGIN_TIMEOUT`](#login_timeout) is configured to 14 days (the default), and a user whose session is due to expire in five days makes a NetBox request (with a valid session cookie), the session's lifetime will be reset to 14 days.
Note that enabling this setting causes NetBox to update a user's session in the database (or file, as configured per [`SESSION_FILE_PATH`](#session_file_path)) with each request, which may introduce significant overhead in very active environments. It also permits an active user to remain authenticated to NetBox indefinitely.
---
## LOGIN_REQUIRED
Default: False
Setting this to True will permit only authenticated users to access any part of NetBox. By default, anonymous users are permitted to access most data in NetBox but not make any changes.
---
## LOGIN_TIMEOUT
Default: 1209600 seconds (14 days)
The lifetime (in seconds) of the authentication cookie issued to a NetBox user upon login.
---
## LOGOUT_REDIRECT_URL
Default: `'home'`
The view name or URL to which a user is redirected after logging out.
---
## SECURE_SSL_REDIRECT
Default: False
If true, all non-HTTPS requests will be automatically redirected to use HTTPS.
!!! warning
Ensure that your frontend HTTP daemon has been configured to forward the HTTP scheme correctly before enabling this option. An incorrectly configured frontend may result in a looping redirect.
---
## SESSION_COOKIE_NAME
Default: `sessionid`
The name used for the session cookie. See the [Django documentation](https://docs.djangoproject.com/en/stable/ref/settings/#session-cookie-name) for more detail.
---
## SESSION_COOKIE_SECURE
Default: False
If true, the cookie employed for session authentication will be marked as secure, meaning that it can only be sent across an HTTPS connection.
---
## SESSION_FILE_PATH
Default: None
HTTP session data is used to track authenticated users when they access NetBox. By default, NetBox stores session data in its PostgreSQL database. However, this inhibits authentication to a standby instance of NetBox without write access to the database. Alternatively, a local file path may be specified here and NetBox will store session data as files instead of using the database. Note that the NetBox system user must have read and write permissions to this path.

View File

@@ -0,0 +1,205 @@
# System Parameters
## BASE_PATH
Default: None
The base URL path to use when accessing NetBox. Do not include the scheme or domain name. For example, if installed at https://example.com/netbox/, set:
```python
BASE_PATH = 'netbox/'
```
---
## DEFAULT_LANGUAGE
Default: `en-us` (US English)
Defines the default preferred language/locale for requests that do not specify one. This is used to alter e.g. the display of dates and numbers to fit the user's locale. See [this list](http://www.i18nguy.com/unicode/language-identifiers.html) of standard language codes. (This parameter maps to Django's [`LANGUAGE_CODE`](https://docs.djangoproject.com/en/stable/ref/settings/#language-code) internal setting.)
!!! note
Altering this parameter will *not* change the language used in NetBox. We hope to provide translation support in a future NetBox release.
---
## DOCS_ROOT
Default: `$INSTALL_ROOT/docs/`
The filesystem path to NetBox's documentation. This is used when presenting context-sensitive documentation in the web UI. By default, this will be the `docs/` directory within the root NetBox installation path. (Set this to `None` to disable the embedded documentation.)
---
## EMAIL
In order to send email, NetBox needs an email server configured. The following items can be defined within the `EMAIL` configuration parameter:
* `SERVER` - Hostname or IP address of the email server (use `localhost` if running locally)
* `PORT` - TCP port to use for the connection (default: `25`)
* `USERNAME` - Username with which to authenticate
* `PASSWORD` - Password with which to authenticate
* `USE_SSL` - Use SSL when connecting to the server (default: `False`)
* `USE_TLS` - Use TLS when connecting to the server (default: `False`)
* `SSL_CERTFILE` - Path to the PEM-formatted SSL certificate file (optional)
* `SSL_KEYFILE` - Path to the PEM-formatted SSL private key file (optional)
* `TIMEOUT` - Amount of time to wait for a connection, in seconds (default: `10`)
* `FROM_EMAIL` - Sender address for emails sent by NetBox
!!! note
The `USE_SSL` and `USE_TLS` parameters are mutually exclusive.
Email is sent from NetBox only for critical events or if configured for [logging](#logging). If you would like to test the email server configuration, Django provides a convenient [send_mail()](https://docs.djangoproject.com/en/stable/topics/email/#send-mail) function accessible within the NetBox shell:
```no-highlight
# python ./manage.py nbshell
>>> from django.core.mail import send_mail
>>> send_mail(
'Test Email Subject',
'Test Email Body',
'noreply-netbox@example.com',
['users@example.com'],
fail_silently=False
)
```
---
## ENABLE_LOCALIZATION
Default: False
Determines if localization features are enabled or not. This should only be enabled for development or testing purposes as netbox is not yet fully localized. Turning this on will localize numeric and date formats (overriding any configured [system defaults](./date-time.md#date-and-time-formatting)) based on the browser locale as well as translate certain strings from third party modules.
---
## HTTP_PROXIES
Default: None
A dictionary of HTTP proxies to use for outbound requests originating from NetBox (e.g. when sending webhook requests). Proxies should be specified by schema (HTTP and HTTPS) as per the [Python requests library documentation](https://requests.readthedocs.io/en/latest/user/advanced/#proxies). For example:
```python
HTTP_PROXIES = {
'http': 'http://10.10.1.10:3128',
'https': 'http://10.10.1.10:1080',
}
```
---
## INTERNAL_IPS
Default: `('127.0.0.1', '::1')`
A list of IP addresses recognized as internal to the system, used to control the display of debugging output. For
example, the debugging toolbar will be viewable only when a client is accessing NetBox from one of the listed IP
addresses (and [`DEBUG`](#debug) is true).
---
## JINJA2_FILTERS
Default: `{}`
A dictionary of custom jinja2 filters with the key being the filter name and the value being a callable. For more information see the [Jinja2 documentation](https://jinja.palletsprojects.com/en/3.1.x/api/#custom-filters). For example:
```python
def uppercase(x):
return str(x).upper()
JINJA2_FILTERS = {
'uppercase': uppercase,
}
```
---
## LOGGING
By default, all messages of INFO severity or higher will be logged to the console. Additionally, if [`DEBUG`](#debug) is False and email access has been configured, ERROR and CRITICAL messages will be emailed to the users defined in [`ADMINS`](#admins).
The Django framework on which NetBox runs allows for the customization of logging format and destination. Please consult the [Django logging documentation](https://docs.djangoproject.com/en/stable/topics/logging/) for more information on configuring this setting. Below is an example which will write all INFO and higher messages to a local file:
```python
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'file': {
'level': 'INFO',
'class': 'logging.FileHandler',
'filename': '/var/log/netbox.log',
},
},
'loggers': {
'django': {
'handlers': ['file'],
'level': 'INFO',
},
},
}
```
### Available Loggers
* `netbox.<app>.<model>` - Generic form for model-specific log messages
* `netbox.auth.*` - Authentication events
* `netbox.api.views.*` - Views which handle business logic for the REST API
* `netbox.reports.*` - Report execution (`module.name`)
* `netbox.scripts.*` - Custom script execution (`module.name`)
* `netbox.views.*` - Views which handle business logic for the web UI
---
## MEDIA_ROOT
Default: $INSTALL_ROOT/netbox/media/
The file path to the location where media files (such as image attachments) are stored. By default, this is the `netbox/media/` directory within the base NetBox installation path.
---
## REPORTS_ROOT
Default: `$INSTALL_ROOT/netbox/reports/`
The file path to the location where [custom reports](../customization/reports.md) will be kept. By default, this is the `netbox/reports/` directory within the base NetBox installation path.
---
## SCRIPTS_ROOT
Default: `$INSTALL_ROOT/netbox/scripts/`
The file path to the location where [custom scripts](../customization/custom-scripts.md) will be kept. By default, this is the `netbox/scripts/` directory within the base NetBox installation path.
---
## SEARCH_BACKEND
Default: `'netbox.search.backends.CachedValueSearchBackend'`
The dotted path to the desired search backend class. `CachedValueSearchBackend` is currently the only search backend provided in NetBox, however this setting can be used to enable a custom backend.
---
## STORAGE_BACKEND
Default: None (local storage)
The backend storage engine for handling uploaded files (e.g. image attachments). NetBox supports integration with the [`django-storages`](https://django-storages.readthedocs.io/en/stable/) package, which provides backends for several popular file storage services. If not configured, local filesystem storage will be used.
The configuration parameters for the specified storage backend are defined under the `STORAGE_CONFIG` setting.
---
## STORAGE_CONFIG
Default: Empty
A dictionary of configuration parameters for the storage backend configured as `STORAGE_BACKEND`. The specific parameters to be used here are specific to each backend; see the [`django-storages` documentation](https://django-storages.readthedocs.io/en/stable/) for more detail.
If `STORAGE_BACKEND` is not defined, this setting will be ignored.
---

View File

@@ -1,10 +0,0 @@
# Circuits
{!models/circuits/provider.md!}
{!models/circuits/providernetwork.md!}
---
{!models/circuits/circuit.md!}
{!models/circuits/circuittype.md!}
{!models/circuits/circuittermination.md!}

View File

@@ -1,5 +0,0 @@
# Contacts
{!models/tenancy/contact.md!}
{!models/tenancy/contactgroup.md!}
{!models/tenancy/contactrole.md!}

View File

@@ -1,41 +0,0 @@
# Device Types
{!models/dcim/devicetype.md!}
{!models/dcim/manufacturer.md!}
---
## Device Component Templates
Each device type is assigned a number of component templates which define the physical components within a device. These are:
* Console ports
* Console server ports
* Power ports
* Power outlets
* Network interfaces
* Front ports
* Rear ports
* Device bays (which house child devices)
Whenever a new device is created, its components are automatically created per the templates assigned to its device type. For example, a Juniper EX4300-48T device type might have the following component templates defined:
* One template for a console port ("Console")
* Two templates for power ports ("PSU0" and "PSU1")
* 48 templates for 1GE interfaces ("ge-0/0/0" through "ge-0/0/47")
* Four templates for 10GE interfaces ("xe-0/2/0" through "xe-0/2/3")
Once component templates have been created, every new device that you create as an instance of this type will automatically be assigned each of the components listed above.
!!! note
Assignment of components from templates occurs only at the time of device creation. If you modify the templates of a device type, it will not affect devices which have already been created. However, you always have the option of adding, modifying, or deleting components on existing devices.
{!models/dcim/consoleporttemplate.md!}
{!models/dcim/consoleserverporttemplate.md!}
{!models/dcim/powerporttemplate.md!}
{!models/dcim/poweroutlettemplate.md!}
{!models/dcim/interfacetemplate.md!}
{!models/dcim/frontporttemplate.md!}
{!models/dcim/rearporttemplate.md!}
{!models/dcim/modulebaytemplate.md!}
{!models/dcim/devicebaytemplate.md!}

View File

@@ -1,40 +0,0 @@
# Devices and Cabling
{!models/dcim/device.md!}
{!models/dcim/devicerole.md!}
{!models/dcim/platform.md!}
---
## Device Components
Device components represent discrete objects within a device which are used to terminate cables, house child devices, or track resources.
{!models/dcim/consoleport.md!}
{!models/dcim/consoleserverport.md!}
{!models/dcim/powerport.md!}
{!models/dcim/poweroutlet.md!}
{!models/dcim/interface.md!}
{!models/dcim/frontport.md!}
{!models/dcim/rearport.md!}
{!models/dcim/modulebay.md!}
{!models/dcim/devicebay.md!}
{!models/dcim/inventoryitem.md!}
---
{!models/dcim/virtualchassis.md!}
---
{!models/dcim/cable.md!}
In the example below, three individual cables comprise a path between devices A and D:
![Cable path](../media/models/dcim_cable_trace.png)
Traced from Interface 1 on Device A, NetBox will show the following path:
* Cable 1: Interface 1 to Front Port 1
* Cable 2: Rear Port 1 to Rear Port 2
* Cable 3: Front Port 2 to Interface 2

View File

@@ -1,28 +0,0 @@
# IP Address Management
{!models/ipam/aggregate.md!}
{!models/ipam/rir.md!}
---
{!models/ipam/prefix.md!}
{!models/ipam/role.md!}
---
{!models/ipam/iprange.md!}
{!models/ipam/ipaddress.md!}
---
{!models/ipam/vrf.md!}
{!models/ipam/routetarget.md!}
---
{!models/ipam/fhrpgroup.md!}
{!models/ipam/fhrpgroupassignment.md!}
---
{!models/ipam/asn.md!}

View File

@@ -1,4 +0,0 @@
# Modules
{!models/dcim/moduletype.md!}
{!models/dcim/module.md!}

View File

@@ -1,8 +0,0 @@
# Power Tracking
{!models/dcim/powerpanel.md!}
{!models/dcim/powerfeed.md!}
# Example Power Topology
![Power distribution model](../media/power_distribution.png)

View File

@@ -1,4 +0,0 @@
# Service Mapping
{!models/ipam/servicetemplate.md!}
{!models/ipam/service.md!}

View File

@@ -1,12 +0,0 @@
# Sites and Racks
{!models/dcim/region.md!}
{!models/dcim/sitegroup.md!}
{!models/dcim/site.md!}
{!models/dcim/location.md!}
---
{!models/dcim/rack.md!}
{!models/dcim/rackrole.md!}
{!models/dcim/rackreservation.md!}

View File

@@ -1,4 +0,0 @@
# Tenancy Assignment
{!models/tenancy/tenant.md!}
{!models/tenancy/tenantgroup.md!}

View File

@@ -1,10 +0,0 @@
# Virtualization
{!models/virtualization/cluster.md!}
{!models/virtualization/clustertype.md!}
{!models/virtualization/clustergroup.md!}
---
{!models/virtualization/virtualmachine.md!}
{!models/virtualization/vminterface.md!}

View File

@@ -1,4 +0,0 @@
# VLAN Management
{!models/ipam/vlan.md!}
{!models/ipam/vlangroup.md!}

View File

@@ -1,8 +0,0 @@
# Wireless Networks
{!models/wireless/wirelesslan.md!}
{!models/wireless/wirelesslangroup.md!}
---
{!models/wireless/wirelesslink.md!}

View File

@@ -1,4 +1,80 @@
{!models/extras/customfield.md!}
# Custom Fields
Each model in NetBox is represented in the database as a discrete table, and each attribute of a model exists as a column within its table. For example, sites are stored in the `dcim_site` table, which has columns named `name`, `facility`, `physical_address`, and so on. As new attributes are added to objects throughout the development of NetBox, tables are expanded to include new rows.
However, some users might want to store additional object attributes that are somewhat esoteric in nature, and that would not make sense to include in the core NetBox database schema. For instance, suppose your organization needs to associate each device with a ticket number correlating it with an internal support system record. This is certainly a legitimate use for NetBox, but it's not a common enough need to warrant including a field for _every_ NetBox installation. Instead, you can create a custom field to hold this data.
Within the database, custom fields are stored as JSON data directly alongside each object. This alleviates the need for complex queries when retrieving objects.
## Creating Custom Fields
Custom fields may be created by navigating to Customization > Custom Fields. NetBox supports many types of custom field:
* Text: Free-form text (intended for single-line use)
* Long text: Free-form of any length; supports Markdown rendering
* Integer: A whole number (positive or negative)
* Decimal: A fixed-precision decimal number (4 decimal places)
* Boolean: True or false
* Date: A date in ISO 8601 format (YYYY-MM-DD)
* Date & time: A date and time in ISO 8601 format (YYYY-MM-DD HH:MM:SS)
* URL: This will be presented as a link in the web UI
* JSON: Arbitrary data stored in JSON format
* Selection: A selection of one of several pre-defined custom choices
* Multiple selection: A selection field which supports the assignment of multiple values
* Object: A single NetBox object of the type defined by `object_type`
* Multiple object: One or more NetBox objects of the type defined by `object_type`
Each custom field must have a name. This should be a simple database-friendly string (e.g. `tps_report`) and may contain only alphanumeric characters and underscores. You may also assign a corresponding human-friendly label (e.g. "TPS report"); the label will be displayed on web forms. A weight is also required: Higher-weight fields will be ordered lower within a form. (The default weight is 100.) If a description is provided, it will appear beneath the field in a form.
Marking a field as required will force the user to provide a value for the field when creating a new object or when saving an existing object. A default value for the field may also be provided. Use "true" or "false" for boolean fields, or the exact value of a choice for selection fields.
A custom field must be assigned to one or more object types, or models, in NetBox. Once created, custom fields will automatically appear as part of these models in the web UI and REST API. Note that not all models support custom fields.
### Filtering
The filter logic controls how values are matched when filtering objects by the custom field. Loose filtering (the default) matches on a partial value, whereas exact matching requires a complete match of the given string to a field's value. For example, exact filtering with the string "red" will only match the exact value "red", whereas loose filtering will match on the values "red", "red-orange", or "bored". Setting the filter logic to "disabled" disables filtering by the field entirely.
### Grouping
Related custom fields can be grouped together within the UI by assigning each the same group name. When at least one custom field for an object type has a group defined, it will appear under the group heading within the custom fields panel under the object view. All custom fields with the same group name will appear under that heading. (Note that the group names must match exactly, or each will appear as a separate heading.)
This parameter has no effect on the API representation of custom field data.
### Visibility & Editing
!!! info "This feature was improved in NetBox v3.7."
When creating a custom field, users can control the conditions under which it may be displayed and edited within the NetBox user interface. The following choices are available for controlling the display of a custom field on an object:
* **Always** (default): The custom field is included when viewing an object.
* **If Set**: The custom field is included only if a value has been defined for the object.
* **Hidden**: The custom field will never be displayed within the UI. This option is recommended for fields which are not intended for use by human users.
Additionally, the following options are available for controlling whether custom field values can be altered within the NetBox UI:
* **Yes** (default): The custom field's value may be modified when editing an object.
* **No**: The custom field is displayed for reference when editing an object, but its value may not be modified.
* **Hidden**: The custom field is not displayed when editing an object.
Note that this setting has no impact on the REST or GraphQL APIs: Custom field data will always be available via either API.
### Validation
NetBox supports limited custom validation for custom field values. Following are the types of validation enforced for each field type:
* Text: Regular expression (optional)
* Integer: Minimum and/or maximum value (optional)
* Selection: Must exactly match one of the prescribed choices
### Custom Selection Fields
Each custom selection field must designate a [choice set](../models/extras/customfieldchoiceset.md) containing at least two choices. These are specified as a comma-separated list.
If a default value is specified for a selection field, it must exactly match one of the provided choices. The value of a multiple selection field will always return a list, even if only one value is selected.
### Custom Object Fields
An object or multi-object custom field can be used to refer to a particular NetBox object or objects as the "value" for a custom field. These custom fields must define an `object_type`, which determines the type of object to which custom field instances point.
## Custom Fields in Templates

View File

@@ -0,0 +1,65 @@
# Custom Links
Custom links allow users to display arbitrary hyperlinks to external content within NetBox object views. These are helpful for cross-referencing related records in systems outside NetBox. For example, you might create a custom link on the device view which links to the current device in a Network Monitoring System (NMS).
Custom links are created by navigating to Customization > Custom Links. Each link is associated with a particular NetBox object type (site, device, prefix, etc.) and will be displayed on relevant views. Each link has display text and a URL, and data from the NetBox item being viewed can be included in the link using [Jinja2 template code](https://jinja2docs.readthedocs.io/en/stable/) through the variable `object`, and custom fields through `object.cf`.
For example, you might define a link like this:
* Text: `View NMS`
* URL: `https://nms.example.com/nodes/?name={{ object.name }}`
When viewing a device named Router4, this link would render as:
```no-highlight
<a href="https://nms.example.com/nodes/?name=Router4">View NMS</a>
```
Custom links appear as buttons in the top right corner of the page. Numeric weighting can be used to influence the ordering of links, and each link can be enabled or disabled individually.
!!! warning
Custom links rely on user-created code to generate arbitrary HTML output, which may be dangerous. Only grant permission to create or modify custom links to trusted users.
## Context Data
The following context data is available within the template when rendering a custom link's text or URL.
| Variable | Description |
|-----------|-------------------------------------------------------------------------------------------------------------------|
| `object` | The NetBox object being displayed |
| `debug` | A boolean indicating whether debugging is enabled |
| `request` | The current WSGI request |
| `user` | The current user (if authenticated) |
| `perms` | The [permissions](https://docs.djangoproject.com/en/stable/topics/auth/default/#permissions) assigned to the user |
While most of the context variables listed above will have consistent attributes, the object will be an instance of the specific object being viewed when the link is rendered. Different models have different fields and properties, so you may need to some research to determine the attributes available for use within your template for a specific object type.
Checking the REST API representation of an object is generally a convenient way to determine what attributes are available. You can also reference the NetBox source code directly for a comprehensive list.
## Conditional Rendering
Only links which render with non-empty text are included on the page. You can employ conditional Jinja2 logic to control the conditions under which a link gets rendered.
For example, if you only want to display a link for active devices, you could set the link text to
```jinja2
{% if object.status == 'active' %}View NMS{% endif %}
```
The link will not appear when viewing a device with any status other than "active."
As another example, if you wanted to show only devices belonging to a certain manufacturer, you could do something like this:
```jinja2
{% if object.device_type.manufacturer.name == 'Cisco' %}View NMS{% endif %}
```
The link will only appear when viewing a device with a manufacturer name of "Cisco."
## Link Groups
Group names can be specified to organize links into groups. Links with the same group name will render as a dropdown menu beneath a single button bearing the name of the group.
## Table Columns
Custom links can also be included in object tables by selecting the desired links from the table configuration form. When displayed, each link will render as a hyperlink for its corresponding object. When exported (e.g. as CSV data), each link render only its URL.

View File

@@ -35,12 +35,9 @@ class MyScript(Script):
The `run()` method should accept two arguments:
* `data` - A dictionary containing all of the variable data passed via the web form.
* `data` - A dictionary containing all the variable data passed via the web form.
* `commit` - A boolean indicating whether database changes will be committed.
!!! note
The `commit` argument was introduced in NetBox v2.7.8. Backward compatibility is maintained for scripts which accept only the `data` argument, however beginning with v2.10 NetBox will require the `run()` method of every script to accept both arguments. (Either argument may still be ignored within the method.)
Defining script variables is optional: You may create a script with only a `run()` method if no user input is needed.
Any output generated by the script during its execution will be displayed under the "output" tab in the UI.
@@ -79,7 +76,22 @@ A human-friendly description of what your script does.
### `field_order`
By default, script variables will be ordered in the form as they are defined in the script. `field_order` may be defined as an iterable of field names to determine the order in which variables are rendered. Any fields not included in this iterable be listed last.
By default, script variables will be ordered in the form as they are defined in the script. `field_order` may be defined as an iterable of field names to determine the order in which variables are rendered within a default "Script Data" group. Any fields not included in this iterable be listed last. If `fieldsets` is defined, `field_order` will be ignored. A fieldset group for "Script Execution Parameters" will be added to the end of the form by default for the user.
### `fieldsets`
`fieldsets` may be defined as an iterable of field groups and their field names to determine the order in which variables are group and rendered. Any fields not included in this iterable will not be displayed in the form. If `fieldsets` is defined, `field_order` will be ignored. A fieldset group for "Script Execution Parameters" will be added to the end of the fieldsets by default for the user.
An example fieldset definition is provided below:
```python
class MyScript(Script):
class Meta:
fieldsets = (
('First group', ('field1', 'field2', 'field3')),
('Second group', ('field4', 'field5')),
)
```
### `commit_default`
@@ -89,12 +101,14 @@ The checkbox to commit database changes when executing a script is checked by de
commit_default = False
```
### `scheduling_enabled`
By default, a script can be scheduled for execution at a later time. Setting `scheduling_enabled` to False disables this ability: Only immediate execution will be possible. (This also disables the ability to set a recurring execution interval.)
### `job_timeout`
Set the maximum allowed runtime for the script. If not set, `RQ_DEFAULT_TIMEOUT` will be used.
!!! info "This feature was introduced in v3.2.1"
## Accessing Request Data
Details of the current HTTP request (the one being made to execute the script) are available as the instance attribute `self.request`. This can be used to infer, for example, the user executing the script and the client IP address:
@@ -129,6 +143,32 @@ The Script object provides a set of convenient functions for recording messages
Log messages are returned to the user upon execution of the script. Markdown rendering is supported for log messages.
## Change Logging
To generate the correct change log data when editing an existing object, a snapshot of the object must be taken before making any changes to the object.
```python
if obj.pk and hasattr(obj, 'snapshot'):
obj.snapshot()
obj.property = "New Value"
obj.full_clean()
obj.save()
```
## Error handling
Sometimes things go wrong and a script will run into an `Exception`. If that happens and an uncaught exception is raised by the custom script, the execution is aborted and a full stack trace is reported.
Although this is helpful for debugging, in some situations it might be required to cleanly abort the execution of a custom script (e.g. because of invalid input data) and thereby make sure no changes are performed on the database. In this case the script can throw an `AbortScript` exception, which will prevent the stack trace from being reported, but still terminating the script's execution and reporting a given error message.
```python
from utilities.exceptions import AbortScript
if some_error:
raise AbortScript("Some meaningful error message")
```
## Variable Reference
### Default Options
@@ -248,13 +288,13 @@ An IPv4 or IPv6 network with a mask. Returns a `netaddr.IPNetwork` object. Two a
## Running Custom Scripts
!!! note
To run a custom script, a user must be assigned the `extras.run_script` permission. This is achieved by assigning the user (or group) a permission on the Script object and specifying the `run` action in the admin UI as shown below.
To run a custom script, a user must be assigned permissions for `Extras > Script`, `Extras > Script Module`, and `Core > Managed File` objects. They must also be assigned the `extras.run_script` permission. This is achieved by assigning the user (or group) a permission on the Script object and specifying the `run` action in "Permissions" as shown below.
![Adding the run action to a permission](../media/admin_ui_run_permission.png)
![Adding the run action to a permission](../media/run_permission.png)
### Via the Web UI
Custom scripts can be run via the web UI by navigating to the script, completing any required form data, and clicking the "run script" button.
Custom scripts can be run via the web UI by navigating to the script, completing any required form data, and clicking the "run script" button. It is possible to schedule a script to be executed at specified time in the future. A scheduled script can be canceled by deleting the associated job result object.
### Via the API
@@ -269,12 +309,14 @@ http://netbox/api/extras/scripts/example.MyReport/ \
--data '{"data": {"foo": "somevalue", "bar": 123}, "commit": true}'
```
Optionally `schedule_at` can be passed in the form data with a datetime string to schedule a script at the specified date and time.
### Via the CLI
Scripts can be run on the CLI by invoking the management command:
```
python3 manage.py runscript [--commit] [--loglevel {debug,info,warning,error,critical}] [--data "<data>"] <module>.<script>
python3 manage.py runscript [--commit] [--loglevel {debug,info,warning,error,critical}] [--data "<data>"] <module>.<script>
```
The required ``<module>.<script>`` argument is the script to run where ``<module>`` is the name of the python file in the ``scripts`` directory without the ``.py`` extension and ``<script>`` is the name of the script class in the ``<module>`` to run.
@@ -336,6 +378,7 @@ class NewBranchScript(Script):
slug=slugify(data['site_name']),
status=SiteStatusChoices.STATUS_PLANNED
)
site.full_clean()
site.save()
self.log_success(f"Created new site: {site}")
@@ -347,8 +390,9 @@ class NewBranchScript(Script):
name=f'{site.slug}-switch{i}',
site=site,
status=DeviceStatusChoices.STATUS_PLANNED,
device_role=switch_role
role=switch_role
)
switch.full_clean()
switch.save()
self.log_success(f"Created new switch: {switch}")

View File

@@ -26,6 +26,8 @@ The `CustomValidator` class supports several validation types:
* `regex`: Application of a [regular expression](https://en.wikipedia.org/wiki/Regular_expression)
* `required`: A value must be specified
* `prohibited`: A value must _not_ be specified
* `eq`: A value must be equal to the specified value
* `neq`: A value must _not_ be equal to the specified value
The `min` and `max` types should be defined for numeric values, whereas `min_length`, `max_length`, and `regex` are suitable for character strings (text values). The `required` and `prohibited` validators may be used for any field, and should be passed a value of `True`.
@@ -50,7 +52,7 @@ The `fail()` method may optionally specify a field with which to associate the s
## Assigning Custom Validators
Custom validators are associated with specific NetBox models under the [CUSTOM_VALIDATORS](../configuration/dynamic-settings.md#custom_validators) configuration parameter. There are three manners by which custom validation rules can be defined:
Custom validators are associated with specific NetBox models under the [CUSTOM_VALIDATORS](../configuration/data-validation.md#custom_validators) configuration parameter. There are three manners by which custom validation rules can be defined:
1. Plain JSON mapping (no custom logic)
2. Dotted path to a custom validator class

View File

@@ -1,8 +1,45 @@
{!models/extras/exporttemplate.md!}
# Export Templates
NetBox allows users to define custom templates that can be used when exporting objects. To create an export template, navigate to Customization > Export Templates.
Each export template is associated with a certain type of object. For instance, if you create an export template for VLANs, your custom template will appear under the "Export" button on the VLANs list. Each export template must have a name, and may optionally designate a specific export [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) and/or file extension.
Export templates must be written in [Jinja2](https://jinja.palletsprojects.com/).
!!! note
The name `table` is reserved for internal use.
!!! warning
Export templates are rendered using user-submitted code, which may pose security risks under certain conditions. Only grant permission to create or modify export templates to trusted users.
The list of objects returned from the database when rendering an export template is stored in the `queryset` variable, which you'll typically want to iterate through using a `for` loop. Object properties can be access by name. For example:
```jinja2
{% for rack in queryset %}
Rack: {{ rack.name }}
Site: {{ rack.site.name }}
Height: {{ rack.u_height }}U
{% endfor %}
```
To access custom fields of an object within a template, use the `cf` attribute. For example, `{{ obj.cf.color }}` will return the value (if any) for a custom field named `color` on `obj`.
If you need to use the config context data in an export template, you'll should use the function `get_config_context` to get all the config context data. For example:
```
{% for server in queryset %}
{% set data = server.get_config_context() %}
{{ data.syslog }}
{% endfor %}
```
The `as_attachment` attribute of an export template controls its behavior when rendered. If true, the rendered content will be returned to the user as a downloadable file. If false, it will be displayed within the browser. (This may be handy e.g. for generating HTML content.)
A MIME type and file extension can optionally be defined for each export template. The default MIME type is `text/plain`.
## REST API Integration
When it is necessary to provide authentication credentials (such as when [`LOGIN_REQUIRED`](../configuration/optional-settings.md#login_required) has been enabled), it is recommended to render export templates via the REST API. This allows the client to specify an authentication token. To render an export template via the REST API, make a `GET` request to the model's list endpoint and append the `export` parameter specifying the export template name. For example:
When it is necessary to provide authentication credentials (such as when [`LOGIN_REQUIRED`](../configuration/security.md#login_required) has been enabled), it is recommended to render export templates via the REST API. This allows the client to specify an authentication token. To render an export template via the REST API, make a `GET` request to the model's list endpoint and append the `export` parameter specifying the export template name. For example:
```
GET /api/dcim/sites/?export=MyTemplateName

View File

@@ -12,7 +12,7 @@ A NetBox report is a mechanism for validating the integrity of data within NetBo
## Writing Reports
Reports must be saved as files in the [`REPORTS_ROOT`](../configuration/optional-settings.md#reports_root) path (which defaults to `netbox/reports/`). Each file created within this path is considered a separate module. Each module holds one or more reports (Python classes), each of which performs a certain function. The logic of each report is broken into discrete test methods, each of which applies a small portion of the logic comprising the overall test.
Reports must be saved as files in the [`REPORTS_ROOT`](../configuration/system.md#reports_root) path (which defaults to `netbox/reports/`). Each file created within this path is considered a separate module. Each module holds one or more reports (Python classes), each of which performs a certain function. The logic of each report is broken into discrete test methods, each of which applies a small portion of the logic comprising the overall test.
!!! warning
The reports path includes a file named `__init__.py`, which registers the path as a Python module. Do not delete this file.
@@ -45,7 +45,7 @@ class DeviceConnectionsReport(Report):
# Check that every console port for every active device has a connection defined.
active = DeviceStatusChoices.STATUS_ACTIVE
for console_port in ConsolePort.objects.prefetch_related('device').filter(device__status=active):
if console_port.connected_endpoint is None:
if not console_port.connected_endpoints:
self.log_failure(
console_port.device,
"No console connection defined for {}".format(console_port.name)
@@ -64,7 +64,7 @@ class DeviceConnectionsReport(Report):
for device in Device.objects.filter(status=DeviceStatusChoices.STATUS_ACTIVE):
connected_ports = 0
for power_port in PowerPort.objects.filter(device=device):
if power_port.connected_endpoint is not None:
if power_port.connected_endpoints:
connected_ports += 1
if not power_port.path.is_active:
self.log_warning(
@@ -91,12 +91,14 @@ As you can see, reports are completely customizable. Validation logic can be as
A human-friendly description of what your report does.
### `scheduling_enabled`
By default, a report can be scheduled for execution at a later time. Setting `scheduling_enabled` to False disables this ability: Only immediate execution will be possible. (This also disables the ability to set a recurring execution interval.)
### `job_timeout`
Set the maximum allowed runtime for the report. If not set, `RQ_DEFAULT_TIMEOUT` will be used.
!!! info "This feature was introduced in v3.2.1"
## Logging
The following methods are available to log results within a report:
@@ -109,7 +111,7 @@ The following methods are available to log results within a report:
The recording of one or more failure messages will automatically flag a report as failed. It is advised to log a success for each object that is evaluated so that the results will reflect how many objects are being reported on. (The inclusion of a log message is optional for successes.) Messages recorded with `log()` will appear in a report's results but are not associated with a particular object or status. Log messages also support using markdown syntax and will be rendered on the report result page.
To perform additional tasks, such as sending an email or calling a webhook, before or after a report is run, extend the `pre_run()` and/or `post_run()` methods, respectively. The status of a completed report is available as `self.failed` and the results object is `self.result`.
To perform additional tasks, such as sending an email or calling a webhook, before or after a report is run, extend the `pre_run()` and/or `post_run()` methods, respectively.
By default, reports within a module are ordered alphabetically in the reports list page. To return reports in a specific order, you can define the `report_order` variable at the end of your module. The `report_order` variable is a tuple which contains each Report class in the desired order. Any reports that are omitted from this list will be listed last.
@@ -130,13 +132,13 @@ Once you have created a report, it will appear in the reports list. Initially, r
## Running Reports
!!! note
To run a report, a user must be assigned the `extras.run_report` permission. This is achieved by assigning the user (or group) a permission on the Report object and specifying the `run` action in the admin UI as shown below.
To run a report, a user must be assigned permissions for `Extras > Report`, `Extras > Report Module`, and `Core > Managed File` objects. They must also be assigned the `extras.run_report` permission. This is achieved by assigning the user (or group) a permission on the Report object and specifying the `run` action in "Permissions" as shown below.
![Adding the run action to a permission](/media/admin_ui_run_permission.png)
![Adding the run action to a permission](../media/run_permission.png)
### Via the Web UI
Reports can be run via the web UI by navigating to the report and clicking the "run report" button at top right. Once a report has been run, its associated results will be included in the report view.
Reports can be run via the web UI by navigating to the report and clicking the "run report" button at top right. Once a report has been run, its associated results will be included in the report view. It is possible to schedule a report to be executed at specified time in the future. A scheduled report can be canceled by deleting the associated job result object.
### Via the API
@@ -152,6 +154,8 @@ Our example report above would be called as:
POST /api/extras/reports/devices.DeviceConnectionsReport/run/
```
Optionally `schedule_at` can be passed in the form data with a datetime string to schedule a script at the specified date and time.
### Via the CLI
Reports can be run on the CLI by invoking the management command:

View File

@@ -54,15 +54,19 @@ Each model should have a corresponding FilterSet class defined. This is used to
Create a table class for the model in `tables.py` by subclassing `utilities.tables.BaseTable`. Under the table's `Meta` class, be sure to list both the fields and default columns.
## 9. Create the object template
## 9. Create a SearchIndex subclass
If this model will be included in global search results, create a subclass of `netbox.search.SearchIndex` for it and specify the fields to be indexed.
## 10. Create the object template
Create the HTML template for the object view. (The other views each typically employ a generic template.) This template should extend `generic/object.html`.
## 10. Add the model to the navigation menu
## 11. Add the model to the navigation menu
Add the relevant navigation menu items in `netbox/netbox/navigation_menu.py`.
Add the relevant navigation menu items in `netbox/netbox/navigation/menu.py`.
## 11. REST API components
## 12. REST API components
Create the following for each model:
@@ -71,13 +75,13 @@ Create the following for each model:
* API view in `api/views.py`
* Endpoint route in `api/urls.py`
## 12. GraphQL API components
## 13. GraphQL API components
Create a Graphene object type for the model in `graphql/types.py` by subclassing the appropriate class from `netbox.graphql.types`.
Also extend the schema class defined in `graphql/schema.py` with the individual object and object list fields per the established convention.
## 13. Add tests
## 14. Add tests
Add tests for the following:
@@ -85,7 +89,7 @@ Add tests for the following:
* API views
* Filter sets
## 14. Documentation
## 15. Documentation
Create a new documentation page for the model in `docs/models/<app_label>/<model_name>.md`. Include this file under the "features" documentation where appropriate.

View File

@@ -8,6 +8,18 @@ The registry can be inspected by importing `registry` from `extras.registry`.
## Stores
### `counter_fields`
A dictionary mapping of models to foreign keys with which cached counter fields are associated.
### `data_backends`
A dictionary mapping data backend types to their respective classes. These are used to interact with [remote data sources](../models/core/datasource.md).
### `denormalized_fields`
Stores registration made using `netbox.denormalized.register()`. For each model, a list of related models and their field mappings is maintained to facilitate automatic updates.
### `model_features`
A dictionary of particular features (e.g. custom fields) mapped to the NetBox models which support them, arranged by app. For example:
@@ -19,39 +31,32 @@ A dictionary of particular features (e.g. custom fields) mapped to the NetBox mo
'dcim': ['site', 'rack', 'devicetype', ...],
...
},
'webhooks': {
...
'event_rules': {
'extras': ['configcontext', 'tag', ...],
'dcim': ['site', 'rack', 'devicetype', ...],
},
...
}
```
### `plugin_menu_items`
Supported model features are listed in the [features matrix](./models.md#features-matrix).
Navigation menu items provided by NetBox plugins. Each plugin is registered as a key with the list of menu items it provides. An example:
### `models`
```python
{
'Plugin A': (
<MenuItem>, <MenuItem>, <MenuItem>,
),
'Plugin B': (
<MenuItem>, <MenuItem>, <MenuItem>,
),
}
```
This key lists all models which have been registered in NetBox which are not designated for private use. (Setting `_netbox_private` to True on a model excludes it from this list.) As with individual features under `model_features`, models are organized by app label.
### `plugin_template_extensions`
### `plugins`
Plugin content that gets embedded into core NetBox templates. The store comprises NetBox models registered as dictionary keys, each pointing to a list of applicable template extension classes that exist. An example:
This store maintains all registered items for plugins, such as navigation menus, template extensions, etc.
```python
{
'dcim.site': [
<TemplateExtension>, <TemplateExtension>, <TemplateExtension>,
],
'dcim.rack': [
<TemplateExtension>, <TemplateExtension>,
],
}
```
### `search`
A dictionary mapping each model (identified by its app and label) to its search index class, if one has been registered for it.
### `tables`
A dictionary mapping table classes to lists of extra columns that have been registered by plugins using the `register_table_column()` utility function. Each column is defined as a tuple of name and column instance.
### `views`
A hierarchical mapping of registered views for each model. Mappings are added using the `register_model_view()` decorator, and URLs paths can be generated from these using `get_model_urls()`.

View File

@@ -2,12 +2,25 @@
Below is a list of tasks to consider when adding a new field to a core model.
## 1. Generate and run database migrations
## 1. Add the field to the model class
Add the field to the model, taking care to address any of the following conditions.
* When adding a GenericForeignKey field, also add an index under `Meta` for its two concrete fields. For example:
```python
class Meta:
indexes = (
models.Index(fields=('object_type', 'object_id')),
)
```
## 2. Generate and run database migrations
[Django migrations](https://docs.djangoproject.com/en/stable/topics/migrations/) are used to express changes to the database schema. In most cases, Django can generate these automatically, however very complex changes may require manual intervention. Always remember to specify a short but descriptive name when generating a new migration.
```
./manage.py makemigrations <app> -n <name>
./manage.py makemigrations <app> -n <name> --no-header
./manage.py migrate
```
@@ -16,7 +29,7 @@ Where possible, try to merge related changes into a single migration. For exampl
!!! warning "Do not alter existing migrations"
Migrations can only be merged within a release. Once a new release has been published, its migrations cannot be altered (other than for the purpose of correcting a bug).
## 2. Add validation logic to `clean()`
## 3. Add validation logic to `clean()`
If the new field introduces additional validation requirements (beyond what's included with the field itself), implement them in the model's `clean()` method. Remember to call the model's original method using `super()` before or after your custom validation as appropriate:
@@ -31,15 +44,15 @@ class Foo(models.Model):
raise ValidationError()
```
## 3. Update relevant querysets
## 4. Update relevant querysets
If you're adding a relational field (e.g. `ForeignKey`) and intend to include the data when retrieving a list of objects, be sure to include the field using `prefetch_related()` as appropriate. This will optimize the view and avoid extraneous database queries.
## 4. Update API serializer
## 5. Update API serializer
Extend the model's API serializer in `<app>.api.serializers` to include the new field. In most cases, it will not be necessary to also extend the nested serializer, which produces a minimal representation of the model.
## 5. Add fields to forms
## 6. Add fields to forms
Extend any forms to include the new field(s) as appropriate. These are found under the `forms/` directory within each app. Common forms include:
@@ -48,19 +61,23 @@ Extend any forms to include the new field(s) as appropriate. These are found und
* **CSV import** - The form used when bulk importing objects in CSV format
* **Filter** - Displays the options available for filtering a list of objects (both UI and API)
## 6. Extend object filter set
## 7. Extend object filter set
If the new field should be filterable, add it to the `FilterSet` for the model. If the field should be searchable, remember to query it in the FilterSet's `search()` method.
## 7. Add column to object table
## 8. Add column to object table
If the new field will be included in the object list view, add a column to the model's table. For simple fields, adding the field name to `Meta.fields` will be sufficient. More complex fields may require declaring a custom column. Also add the field name to `default_columns` if the column should be present in the table by default.
## 8. Update the UI templates
## 9. Update the SearchIndex
Where applicable, add the new field to the model's SearchIndex for inclusion in global search.
## 10. Update the UI templates
Edit the object's view template to display the new field. There may also be a custom add/edit form template that needs to be updated.
## 9. Create/extend test cases
## 11. Create/extend test cases
Create or extend the relevant test cases to verify that the new field and any accompanying validation logic perform as expected. This is especially important for relational fields. NetBox incorporates various test suites, including:
@@ -70,8 +87,8 @@ Create or extend the relevant test cases to verify that the new field and any ac
* Model tests
* View tests
Be diligent to ensure all of the relevant test suites are adapted or extended as necessary to test any new functionality.
Be diligent to ensure all the relevant test suites are adapted or extended as necessary to test any new functionality.
## 10. Update the model's documentation
## 12. Update the model's documentation
Each model has a dedicated page in the documentation, at `models/<app>/<model>.md`. Update this file to include any relevant information about the new field.

View File

@@ -4,12 +4,12 @@
Getting started with NetBox development is pretty straightforward, and should feel very familiar to anyone with Django development experience. There are a few things you'll need:
* A Linux system or environment
* A Linux system or compatible environment
* A PostgreSQL server, which can be installed locally [per the documentation](../installation/1-postgresql.md)
* A Redis server, which can also be [installed locally](../installation/2-redis.md)
* A supported version of Python
* Python 3.8 or later
### Fork the Repo
### 1. Fork the Repo
Assuming you'll be working on your own fork, your first step will be to fork the [official git repository](https://github.com/netbox-community/netbox). (If you're a maintainer who's going to be working directly with the official repo, skip this step.) Click the "fork" button at top right (be sure that you've logged into GitHub first).
@@ -21,7 +21,7 @@ Copy the URL provided in the dialog box.
You can then clone your GitHub fork locally for development:
```no-highlight
```no-highlight hl_lines="1 9"
$ git clone https://github.com/$username/netbox.git
Cloning into 'netbox'...
remote: Enumerating objects: 85949, done.
@@ -35,93 +35,114 @@ base_requirements.txt contrib docs mkdocs.yml NOTICE requ
CHANGELOG.md CONTRIBUTING.md LICENSE.txt netbox README.md scripts
```
### 2. Create a New Branch
The NetBox project utilizes three persistent git branches to track work:
* `master` - Serves as a snapshot of the current stable release
* `develop` - All development on the upcoming stable release occurs here
* `feature` - Tracks work on an upcoming major release
* `develop` - All development on the upcoming stable (patch) release occurs here
* `feature` - Tracks work on an upcoming minor release
Typically, you'll base pull requests off of the `develop` branch, or off of `feature` if you're working on a new major release. **Never** merge pull requests into the `master` branch: This branch only ever merges pull requests from the `develop` branch, to effect a new release.
Typically, you'll base pull requests off of the `develop` branch, or off of `feature` if you're working on a new major release. For example, assume that the current NetBox release is v3.3.5. Work applied to the `develop` branch will appear in v3.3.6, and work done under the `feature` branch will be included in the next minor release (v3.4.0).
For example, assume that the current NetBox release is v3.1.1. Work applied to the `develop` branch will appear in v3.1.2, and work done under the `feature` branch will be included in the next minor release (v3.2.0).
!!! warning
**Never** merge pull requests into the `master` branch: This branch only ever merges pull requests from the `develop` branch, to effect a new release.
### Enable Pre-Commit Hooks
To create a new branch, first ensure that you've checked out the desired base branch, then run:
```no-highlight
git checkout -B $branchname
```
When naming a new git branch, contributors are strongly encouraged to use the relevant issue number followed by a very brief description of the work:
```no-highlight
$issue-$description
```
The description should be just two or three words to imply the focus of the work being performed. For example, bug #1234 to fix a TypeError exception when creating a device might be named `1234-device-typerror`. This ensures that branches are always follow some logical ordering (e.g. when running `git branch -a`) and helps other developers quickly identify the purpose of each.
### 3. Enable Pre-Commit Hooks
NetBox ships with a [git pre-commit hook](https://githooks.com/) script that automatically checks for style compliance and missing database migrations prior to committing changes. This helps avoid erroneous commits that result in CI test failures. You are encouraged to enable it by creating a link to `scripts/git-hooks/pre-commit`:
```no-highlight
$ cd .git/hooks/
$ ln -s ../../scripts/git-hooks/pre-commit
cd .git/hooks/
ln -s ../../scripts/git-hooks/pre-commit
```
For the pre-commit hooks to work, you will also need to install the pycodestyle package:
### Create a Python Virtual Environment
```no-highlight
python -m pip install pycodestyle
```
...and set up the yarn packages as shown in the [Web UI Development Guide](web-ui.md)
### 4. Create a Python Virtual Environment
A [virtual environment](https://docs.python.org/3/tutorial/venv.html) (or "venv" for short) is like a container for a set of Python packages. These allow you to build environments suited to specific projects without interfering with system packages or other projects. When installed per the documentation, NetBox uses a virtual environment in production.
Create a virtual environment using the `venv` Python module:
```no-highlight
$ mkdir ~/.venv
$ python3 -m venv ~/.venv/netbox
mkdir ~/.venv
python3 -m venv ~/.venv/netbox
```
This will create a directory named `.venv/netbox/` in your home directory, which houses a virtual copy of the Python executable and its related libraries and tooling. When running NetBox for development, it will be run using the Python binary at `~/.venv/netbox/bin/python`.
!!! info "Where to Create Your Virtual Environments"
Keeping virtual environments in `~/.venv/` is a common convention but entirely optional: Virtual environments can be created almost wherever you please. Also consider using [`virtualenvwrapper`](https://virtualenvwrapper.readthedocs.io/en/stable/) to simplify the management of multiple venvs.
!!! tip "Virtual Environments"
Keeping virtual environments in `~/.venv/` is a common convention but entirely optional: Virtual environments can be created almost wherever you please. Also consider using [`virtualenvwrapper`](https://virtualenvwrapper.readthedocs.io/en/stable/) to simplify the management of multiple environments.
Once created, activate the virtual environment:
```no-highlight
$ source ~/.venv/netbox/bin/activate
(netbox) $
source ~/.venv/netbox/bin/activate
```
Notice that the console prompt changes to indicate the active environment. This updates the necessary system environment variables to ensure that any Python scripts are run within the virtual environment.
### Install Dependencies
### 5. Install Required Packages
With the virtual environment activated, install the project's required Python packages using the `pip` module:
With the virtual environment activated, install the project's required Python packages using the `pip` module. Required packages are defined in `requirements.txt`. Each line in this file specifies the name and specific version of a required package.
```no-highlight
(netbox) $ python -m pip install -r requirements.txt
Collecting Django==3.1 (from -r requirements.txt (line 1))
Cache entry deserialization failed, entry ignored
Using cached https://files.pythonhosted.org/packages/2b/5a/4bd5624546912082a1bd2709d0edc0685f5c7827a278d806a20cf6adea28/Django-3.1-py3-none-any.whl
...
python -m pip install -r requirements.txt
```
### Configure NetBox
### 6. Configure NetBox
Within the `netbox/netbox/` directory, copy `configuration_example.py` to `configuration.py` and update the following parameters:
* `ALLOWED_HOSTS`: This can be set to `['*']` for development purposes
* `DATABASE`: PostgreSQL database connection parameters
* `REDIS`: Redis configuration, if different from the defaults
* `REDIS`: Redis configuration (if different from the defaults)
* `SECRET_KEY`: Set to a random string (use `generate_secret_key.py` in the parent directory to generate a suitable key)
* `DEBUG`: Set to `True`
* `DEVELOPER`: Set to `True` (this enables the creation of new database migrations)
### Start the Development Server
### 7. Start the Development Server
Django provides a lightweight, auto-updating HTTP/WSGI server for development use. It is started with the `runserver` management command:
Django provides a lightweight, auto-updating [HTTP/WSGI server](https://docs.djangoproject.com/en/stable/ref/django-admin/#runserver) for development use. It is started with the `runserver` management command:
```no-highlight
```no-highlight hl_lines="1"
$ ./manage.py runserver
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
February 18, 2022 - 20:29:57
Django version 4.0.2, using settings 'netbox.settings'
August 18, 2022 - 15:17:52
Django version 4.0.7, using settings 'netbox.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
```
This ensures that your development environment is now complete and operational. Any changes you make to the code base will be automatically adapted by the development server.
This ensures that your development environment is now complete and operational. The development server will monitor the development environment and automatically reload in response to any changes made.
!!! info "IDE Integration"
Some IDEs, such as PyCharm, will integrate with Django's development server and allow you to run it directly within the IDE. This is strongly encouraged as it makes for a much more convenient development environment.
!!! tip "IDE Integration"
Some IDEs, such as the highly-recommended [PyCharm](https://www.jetbrains.com/pycharm/), will integrate with Django's development server and allow you to run it directly within the IDE. This is strongly encouraged as it makes for a much more convenient development environment.
## UI Development
For UI development you will need to review the [Web UI Development Guide](web-ui.md)
## Populating Demo Data
@@ -131,48 +152,51 @@ The demo data is provided in JSON format and loaded into an empty database using
## Running Tests
Prior to committing any substantial changes to the code base, be sure to run NetBox's test suite to catch any potential errors. Tests are run using the `test` management command, which employs Python's [`unittest`](https://docs.python.org/3/library/unittest.html#module-unittest) library. Remember to ensure the Python virtual environment is active before running this command. Also keep in mind that these commands are executed in the `netbox/` directory, not the root directory of the repository.
Prior to committing any substantial changes to the code base, be sure to run NetBox's test suite to catch potential errors. Tests are run using the `test` management command, which employs Python's [`unittest`](https://docs.python.org/3/library/unittest.html#module-unittest) library. Remember to ensure that the Python virtual environment is active before running this command. Also keep in mind that these commands are executed in the `netbox/` directory, not the root directory of the repository.
To avoid potential issues with your local configuration file, set the `NETBOX_CONFIGURATION` to point to the packaged test configuration at `netbox/configuration_testing.py`. This will handle things like ensuring that the dummy plugin is enabled for comprehensive testing.
```no-highlight
$ export NETBOX_CONFIGURATION=netbox.configuration_testing
$ cd netbox/
$ python manage.py test
export NETBOX_CONFIGURATION=netbox.configuration_testing
cd netbox/
python manage.py test
```
In cases where you haven't made any changes to the database schema (which is typical), you can append the `--keepdb` argument to this command to reuse the test database between runs. This cuts down on the time it takes to run the test suite since the database doesn't have to be rebuilt each time. (Note that this argument will cause errors if you've modified any model fields since the previous test run.)
```no-highlight
$ python manage.py test --keepdb
python manage.py test --keepdb
```
You can also reduce testing time by enabling parallel test execution with the `--parallel` flag. (By default, this will run as many parallel tests as you have processors. To avoid sluggishness, it's a good idea to specify a lower number of parallel tests.) This flag can be combined with `--keepdb`, although if you encounter any strange errors, try running the test suite again with parallelization disabled.
```no-highlight
$ python manage.py test --parallel <n>
python manage.py test --parallel <n>
```
Finally, it's possible to limit the run to a specific set of tests, specified by their Python path. For example, to run only IPAM and DCIM view tests:
```no-highlight
$ python manage.py test dcim.tests.test_views ipam.tests.test_views
python manage.py test dcim.tests.test_views ipam.tests.test_views
```
This is handy for instances where just a few tests are failing and you want to re-run them individually.
!!! info
NetBox uses [django-rich](https://github.com/adamchainz/django-rich) to enhance Django's default `test` management command.
## Submitting Pull Requests
Once you're happy with your work and have verified that all tests pass, commit your changes and push it upstream to your fork. Always provide descriptive (but not excessively verbose) commit messages. When working on a specific issue, be sure to prefix your commit message with the word "Fixes" or "Closes" and the issue number (with a hash mark). This tells GitHub to automatically close the referenced issue once the commit has been merged.
Once you're happy with your work and have verified that all tests pass, commit your changes and push it upstream to your fork. Always provide descriptive (but not excessively verbose) commit messages. Be sure to prefix your commit message with the word "Fixes" or "Closes" and the relevant issue number (with a hash mark). This tells GitHub to automatically close the referenced issue once the commit has been merged.
```no-highlight
$ git commit -m "Closes #1234: Add IPv5 support"
$ git push origin
git commit -m "Closes #1234: Add IPv5 support"
git push origin
```
Once your fork has the new commit, submit a [pull request](https://github.com/netbox-community/netbox/compare) to the NetBox repo to propose the changes. Be sure to provide a detailed accounting of the changes being made and the reasons for doing so.
Once submitted, a maintainer will review your pull request and either merge it or request changes. If changes are needed, you can make them via new commits to your fork: The pull request will update automatically.
!!! note "Remember to Open an Issue First"
!!! warning
Remember, pull requests are permitted only for **accepted** issues. If an issue you want to work on hasn't been approved by a maintainer yet, it's best to avoid risking your time and effort on a change that might not be accepted. (The one exception to this is trivial changes to the documentation or other non-critical resources.)

View File

@@ -0,0 +1,388 @@
# git Cheat Sheet
This cheat sheet serves as a convenient reference for NetBox contributors who already somewhat familiar with using git. For a general introduction to the tooling and workflows involved, please see GitHub's guide [Getting started with git](https://docs.github.com/en/get-started/getting-started-with-git/setting-your-username-in-git).
## Common Operations
### Clone a Repo
This copies a remote git repository (e.g. from GitHub) to your local workstation. It will create a new directory bearing the repo's name in the current path.
``` title="Command"
git clone https://github.com/$org-name/$repo-name
```
``` title="Example"
$ git clone https://github.com/netbox-community/netbox
Cloning into 'netbox'...
remote: Enumerating objects: 95112, done.
remote: Counting objects: 100% (682/682), done.
remote: Compressing objects: 100% (246/246), done.
remote: Total 95112 (delta 448), reused 637 (delta 436), pack-reused 94430
Receiving objects: 100% (95112/95112), 60.40 MiB | 45.82 MiB/s, done.
Resolving deltas: 100% (74979/74979), done.
```
### Pull New Commits
To update your local branch with any recent upstream commits, run `git pull`.
``` title="Command"
git pull
```
``` title="Example"
$ git pull
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), done.
From https://github.com/netbox-community/netbox
28bc76695..e0741cc9a develop -> origin/develop
Updating 28bc76695..e0741cc9a
Fast-forward
docs/release-notes/version-3.3.md | 1 +
netbox/netbox/settings.py | 1 +
2 files changed, 2 insertions(+)
```
### List Branches
`git branch` lists all local branches. Appending `-a` to this command will list both local (green) and remote (red) branches.
``` title="Command"
git branch -a
```
``` title="Example"
$ git branch -a
* develop
remotes/origin/10170-changelog
remotes/origin/HEAD -> origin/develop
remotes/origin/develop
remotes/origin/feature
remotes/origin/master
```
### Switch Branches
To switch to a different branch, use the `checkout` command.
``` title="Command"
git checkout $branchname
```
``` title="Example"
$ git checkout feature
Branch 'feature' set up to track remote branch 'feature' from 'origin'.
Switched to a new branch 'feature'
```
### Create a New Branch
Use the `-b` argument with `checkout` to create a new _local_ branch from the current branch.
``` title="Command"
git checkout -b $newbranch
```
``` title="Example"
$ git checkout -b 123-fix-foo
Switched to a new branch '123-fix-foo'
```
### Rename a Branch
To rename the current branch, use the `git branch` command with the `-m` argument (for "modify").
``` title="Command"
git branch -m $newname
```
``` title="Example"
$ git branch -m jstretch-testing
$ git branch
develop
feature
* jstretch-testing
```
### Merge a Branch
To merge one branch into another, use the `git merge` command. Start by checking out the _destination_ branch, and merge the _source_ branch into it.
``` title="Command"
git merge $sourcebranch
```
``` title="Example"
$ git checkout testing
Switched to branch 'testing'
Your branch is up to date with 'origin/testing'.
$ git merge branch2
Updating 9a12b5b5f..8ee42390b
Fast-forward
newfile.py | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 newfile.py
```
!!! warning "Avoid Merging Remote Branches"
You generally want to avoid merging branches that exist on the remote (upstream) repository, such as `develop` and `feature`: Merges into these branches should be done via a pull request on GitHub. Only merge branches when it is necessary to consolidate work you've done locally.
### Show Pending Changes
After making changes to files in the repo, `git status` will display a summary of created, modified, and deleted files.
``` title="Command"
git status
```
``` title="Example"
$ git status
On branch 123-fix-foo
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: README.md
Untracked files:
(use "git add <file>..." to include in what will be committed)
foo.py
no changes added to commit (use "git add" and/or "git commit -a")
```
### Stage Changed Files
Before creating a new commit, modified files must be staged. This is typically done with the `git add` command. You can specify a particular path, or just append `-A` to automatically staged _all_ changed files within the current directory. Run `git status` again to verify what files have been staged.
``` title="Command"
git add -A
```
``` title="Example"
$ git add -A
$ git status
On branch 123-fix-foo
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: README.md
new file: foo.py
```
### Review Staged Files
It's a good idea to thoroughly review all staged changes immediately prior to creating a new commit. This can be done using the `git diff` command. Appending the `--staged` argument will show staged changes; omitting it will show changes that have not yet been staged.
``` title="Command"
git diff --staged
```
``` title="Example"
$ git diff --staged
diff --git a/README.md b/README.md
index 93e125079..4344fb514 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,8 @@
+
+Added some lines here
+and here
+and here too
+
<div align="center">
<img src="https://raw.githubusercontent.com/netbox-community/netbox/develop/docs/netbox_logo.svg" width="400" alt="NetBox logo" />
</div>
diff --git a/foo.py b/foo.py
new file mode 100644
index 000000000..e69de29bb
```
### Create a New Commit
The `git commit` command records your changes to the current branch. Specify a commit message with the `-m` argument. (If omitted, a file editor will be opened to provide a message.
``` title="Command"
git commit -m "Fixes #123: Fixed the thing that was broken"
```
``` title="Example"
$ git commit -m "Fixes #123: Fixed the thing that was broken"
[123-fix-foo 9a12b5b5f] Fixes #123: Fixed the thing that was broken
2 files changed, 5 insertions(+)
create mode 100644 foo.py
```
!!! tip "Automatically Closing Issues"
GitHub will [automatically close](https://github.blog/2013-01-22-closing-issues-via-commit-messages/) any issues referenced in a commit message by `Fixes:` or `Closes:` when the commit is merged into the repository's default branch. Contributors are strongly encouraged to follow this convention when forming commit messages. (Use "Closes" for feature requests and "Fixes" for bugs.)
### Push a Commit Upstream
Once you've made a commit locally, it needs to be pushed upstream to the _remote_ repository (typically called "origin"). This is done with the `git push` command. If this is a new branch that doesn't yet exist on the remote repository, you'll need to set the upstream for it when pushing.
``` title="Command"
git push -u origin $branchname
```
``` title="Example"
$ git push -u origin testing
Counting objects: 3, done.
Delta compression using up to 16 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 377 bytes | 377.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
remote:
remote: Create a pull request for 'testing' on GitHub by visiting:
remote: https://github.com/netbox-community/netbox/pull/new/testing
remote:
To https://github.com/netbox-community/netbox
* [new branch] testing -> testing
Branch 'testing' set up to track remote branch 'testing' from 'origin'.
```
!!! tip
You can apply the following git configuration to automatically set the upstream for all new branches. This obviates the need to specify `-u origin`.
```
git config --global push.default current
```
## The GitHub CLI Client
GitHub provides a [free CLI client](https://cli.github.com/) to simplify many aspects of interacting with GitHub repositories. Note that this utility is separate from `git`, and must be [installed separately](https://github.com/cli/cli#installation).
This guide provides some examples of common operations, but be sure to check out the [GitHub CLI manual](https://cli.github.com/manual/) for a complete accounting of available commands.
### List Open Pull Requests
``` title="Command"
gh pr list
```
``` title="Example"
$ gh pr list
Showing 3 of 3 open pull requests in netbox-community/netbox
#10223 #7503 API Bulk-Create of Devices does not check Rack-Space 7503-bulkdevice about 17 hours ago
#9716 Closes #9599: Add cursor pagination mode lyuyangh:cursor-pagination about 1 month ago
#9498 Adds replication and adoption for module import sleepinggenius2:issue_9361 about 2 months ago
```
### Check Out a PR
This command will automatically check out the remote branch associated with an open pull request.
``` title="Command"
gh pr checkout $number
```
``` title="Example"
$ gh pr checkout 10223
Branch '7503-bulkdevice' set up to track remote branch '7503-bulkdevice' from 'origin'.
Switched to a new branch '7503-bulkdevice'
```
## Fixing Mistakes
### Modify the Previous Commit
Sometimes you'll find that you've overlooked a necessary change and need to commit again. If you haven't pushed your most recent commit and just need to make a small tweak or two, you can _amend_ your most recent commit instead of creating a new one.
First, stage the desired files with `git add` and verify the changes, the issue the `git commit` command with the `--amend` argument. You can also append the `--no-edit` argument if you would like to keep the previous commit message.
``` title="Command"
git commit --amend --no-edit
```
``` title="Example"
$ git add -A
$ git diff --staged
$ git commit --amend --no-edit
[testing 239b16921] Added a new file
Date: Fri Aug 26 16:30:05 2022 -0400
2 files changed, 1 insertion(+)
create mode 100644 newfile.py
```
!!! danger "Don't Amend After Pushing"
Never amend a commit you've already pushed upstream unless you're **certain** no one else is working on the same branch. Force-pushing will overwrite the change history, which will break any commits from other contributors. When in doubt, create a new commit instead.
### Undo the Last Commit
The `git reset` command can be used to undo the most recent commit. (`HEAD~` is equivalent to `HEAD~1` and references the commit prior to the current HEAD.) After making and staging your changes, commit using `-c ORIG_HEAD` to replace the erroneous commit.
``` title="Command"
git reset HEAD~
```
``` title="Example"
$ git add -A
$ git commit -m "Erroneous commit"
[testing 09ce06736] Erroneous commit
Date: Mon Aug 29 15:20:04 2022 -0400
1 file changed, 1 insertion(+)
create mode 100644 BADCHANGE
$ git reset HEAD~
$ rm BADFILE
$ git add -A
$ git commit -m "Fixed commit"
[testing c585709f3] Fixed commit
Date: Mon Aug 29 15:22:38 2022 -0400
1 file changed, 65 insertions(+), 20 deletions(-)
```
!!! danger "Don't Reset After Pushing"
Resetting only works until you've pushed your local changes upstream. If you've already pushed upstream, use `git revert` instead. This will create a _new_ commit that reverts the erroneous one, but ensures that the git history remains intact.
### Rebase from Upstream
If a change has been pushed to the upstream branch since you most recently pulled it, attempting to push a new local commit will fail:
```
$ git push
To https://github.com/netbox-community/netbox.git
! [rejected] develop -> develop (fetch first)
error: failed to push some refs to 'https://github.com/netbox-community/netbox.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
```
To resolve this, first fetch the upstream branch to update your local copy, and then [rebase](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) your local branch to include the new changes. Once the rebase has completed, you can push your local commits upstream.
``` title="Commands"
git fetch
git rebase origin/$branchname
```
``` title="Example"
$ git fetch
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), done.
From https://github.com/netbox-community/netbox
815b2d8a2..8c35ebbb7 develop -> origin/develop
$ git rebase origin/develop
First, rewinding head to replay your work on top of it...
Applying: Further tweaks to the PR template
Applying: Changelog for #10176, #10217
$ git push
Counting objects: 9, done.
Delta compression using up to 16 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 1.02 KiB | 1.02 MiB/s, done.
Total 9 (delta 6), reused 0 (delta 0)
remote: Resolving deltas: 100% (6/6), completed with 5 local objects.
To https://github.com/netbox-community/netbox.git
8c35ebbb7..ada745324 develop -> develop
```

View File

@@ -1,22 +1,18 @@
# NetBox Development
NetBox is maintained as a [GitHub project](https://github.com/netbox-community/netbox) under the Apache 2 license. Users are encouraged to submit GitHub issues for feature requests and bug reports, however we are very selective about pull requests. Each pull request must be preceded by an **approved** issue. Please see the `CONTRIBUTING` guide for more direction on contributing to NetBox.
Thanks for your interest in contributing to NetBox! This introduction covers a few important things to know before you get started.
## Communication
## The Code
There are several official forums for communication among the developers and community members:
NetBox and many of its related projects are maintained on [GitHub](https://github.com/netbox-community/netbox). GitHub also serves as one of our primary discussion forums. While all the code and discussion is publicly accessible, you'll need register for a [free GitHub account](https://github.com/signup) to engage in participation. Most people begin by [forking](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the NetBox repository under their own GitHub account to begin working on the code.
* [GitHub issues](https://github.com/netbox-community/netbox/issues) - All feature requests, bug reports, and other substantial changes to the code base **must** be documented in a GitHub issue.
* [GitHub discussions](https://github.com/netbox-community/netbox/discussions) - The preferred forum for general discussion and support issues. Ideal for shaping a feature request prior to submitting an issue.
* [#netbox on NetDev Community Slack](https://netdev.chat/) - Good for quick chats. Avoid any discussion that might need to be referenced later on, as the chat history is not retained long.
![GitHub](../media/development/github.png)
## Governance
There are three permanent branches in the repository:
NetBox follows the [benevolent dictator](http://oss-watch.ac.uk/resources/benevolentdictatorgovernancemodel) model of governance, with [Jeremy Stretch](https://github.com/jeremystretch) ultimately responsible for all changes to the code base. While community contributions are welcomed and encouraged, the lead maintainer's primary role is to ensure the project's long-term maintainability and continued focus on its primary functions.
## Project Structure
All development of the current NetBox release occurs in the `develop` branch; releases are packaged from the `master` branch. The `master` branch should _always_ represent the current stable release in its entirety, such that installing NetBox by either downloading a packaged release or cloning the `master` branch provides the same code base. Only pull requests representing new releases should be merged into `master`.
* `master` - The current stable release. Individual changes should never be pushed directly to this branch, but rather merged from `develop`.
* `develop` - Active development for the upcoming patch release. Pull requests will typically be based on this branch unless they introduce breaking changes that must be deferred until the next minor release.
* `feature` - New feature work to be introduced in the next minor release (e.g. from v3.3 to v3.4).
NetBox components are arranged into Django apps. Each app holds the models, views, and other resources relevant to a particular function:
@@ -31,3 +27,34 @@ NetBox components are arranged into Django apps. Each app holds the models, view
* `wireless`: Wireless links and LANs
All core functionality is stored within the `netbox/` subdirectory. HTML templates are stored in a common `templates/` directory, with model- and view-specific templates arranged by app. Documentation is kept in the `docs/` root directory.
## Proposing Changes
All substantial changes made to the code base are tracked using [GitHub issues](https://docs.github.com/en/issues). Feature requests, bug reports, and similar proposals must all be filed as issues and approved by a maintainer before work begins. This ensures that all changes to the code base are properly documented for future reference.
To submit a new feature request or bug report for NetBox, select and complete the appropriate [issue template](https://github.com/netbox-community/netbox/issues/new/choose). Once your issue has been approved, you're welcome to submit a [pull request](https://docs.github.com/en/pull-requests) containing your proposed changes.
![Opening a new GitHub issue](../media/development/github_new_issue.png)
Check out our [issue intake policy](https://github.com/netbox-community/netbox/wiki/Issue-Intake-Policy) for an overview of the issue triage and approval processes.
!!! tip
Avoid starting work on a proposal before it has been accepted. Not all proposed changes will be accepted, and we'd hate for you to waste time working on code that might not make it into the project.
## Getting Help
There are two primary forums for getting assistance with NetBox development:
* [GitHub discussions](https://github.com/netbox-community/netbox/discussions) - The preferred forum for general discussion and support issues. Ideal for shaping a feature requests prior to submitting an issue.
* [#netbox on NetDev Community Slack](https://netdev.chat/) - Good for quick chats. Avoid any discussion that might need to be referenced later on, as the chat history is not retained indefinitely.
!!! note
Don't use GitHub issues to ask for help: These are reserved for proposed code changes only.
## Governance
NetBox follows the [benevolent dictator](http://oss-watch.ac.uk/resources/benevolentdictatorgovernancemodel) model of governance, with [Jeremy Stretch](https://github.com/jeremystretch) ultimately responsible for all changes to the code base. While community contributions are welcomed and encouraged, the lead maintainer's primary role is to ensure the project's long-term maintainability and continued focus on its primary functions.
## Licensing
The entire NetBox project is licensed as open source under the [Apache 2.0 license](https://github.com/netbox-community/netbox/blob/master/LICENSE.txt). This is a very permissive license which allows unlimited redistribution of all code within the project. Note that all submissions to the project are subject to the same license.

View File

@@ -0,0 +1,123 @@
# Internationalization
Beginning with NetBox v4.0, NetBox will leverage [Django's automatic translation](https://docs.djangoproject.com/en/stable/topics/i18n/translation/) to support languages other than English. This page details the areas of the project which require special attention to ensure functioning translation support. Briefly, these include:
* The `verbose_name` and `verbose_name_plural` Meta attributes for each model
* The `verbose_name` and (if defined) `help_text` for each model field
* The `label` for each form field
* Headers for `fieldsets` on each form class
* The `verbose_name` for each table column
* All human-readable strings within templates must be wrapped with `{% trans %}` or `{% blocktrans %}`
The rest of this document elaborates on each of the items above.
## General Guidance
* Wrap human-readable strings with Django's `gettext()` or `gettext_lazy()` utility functions to enable automatic translation. Generally, `gettext_lazy()` is preferred (and sometimes required) to defer translation until the string is displayed.
* By convention, the preferred translation function is typically imported as an underscore (`_`) to minimize boilerplate code. Thus, you will often see translation as e.g. `_("Some text")`. It is still an option to import and use alternative translation functions (e.g. `pgettext()` and `ngettext()`) normally as needed.
* Avoid passing markup and other non-natural language where possible. Everything wrapped by a translation function gets exported to a messages file for translation by a human.
* Where the intended meaning of the translated string may not be obvious, use `pgettext()` or `pgettext_lazy()` to include assisting context for the translator. For example:
```python
# Context, string
pgettext("month name", "May")
```
* **Format strings do not support translation.** Avoid "f" strings for messages that must support translation. Instead, use `format()` to accomplish variable replacement:
```python
# Translation will not work
f"There are {count} objects"
# Do this instead
"There are {count} objects".format(count=count)
```
## Models
1. Import `gettext_lazy` as `_`.
2. Ensure both `verbose_name` and `verbose_name_plural` are defined under the model's `Meta` class and wrapped with the `gettext_lazy()` shortcut.
3. Ensure each model field specifies a `verbose_name` wrapped with `gettext_lazy()`.
4. Ensure any `help_text` attributes on model fields are also wrapped with `gettext_lazy()`.
```python
from django.utils.translation import gettext_lazy as _
class Circuit(PrimaryModel):
commit_rate = models.PositiveIntegerField(
...
verbose_name=_('commit rate (Kbps)'),
help_text=_("Committed rate")
)
class Meta:
verbose_name = _('circuit')
verbose_name_plural = _('circuits')
```
## Forms
1. Import `gettext_lazy` as `_`.
2. All form fields must specify a `label` wrapped with `gettext_lazy()`.
3. All headers under a form's `fieldsets` property must be wrapped with `gettext_lazy()`.
```python
from django.utils.translation import gettext_lazy as _
class CircuitBulkEditForm(NetBoxModelBulkEditForm):
description = forms.CharField(
label=_('Description'),
...
)
fieldsets = (
(_('Circuit'), ('provider', 'type', 'status', 'description')),
)
```
## Tables
1. Import `gettext_lazy` as `_`.
2. All table columns must specify a `verbose_name` wrapped with `gettext_lazy()`.
```python
from django.utils.translation import gettext_lazy as _
class CircuitTable(TenancyColumnsMixin, ContactsColumnMixin, NetBoxTable):
provider = tables.Column(
verbose_name=_('Provider'),
...
)
```
## Templates
1. Ensure translation support is enabled by including `{% load i18n %}` at the top of the template.
2. Use the [`{% trans %}`](https://docs.djangoproject.com/en/stable/topics/i18n/translation/#translate-template-tag) tag (short for "translate") to wrap short strings.
3. Longer strings may be enclosed between [`{% blocktrans %}`](https://docs.djangoproject.com/en/stable/topics/i18n/translation/#blocktranslate-template-tag) and `{% endblocktrans %}` tags to improve readability and to enable variable replacement. (Remember to include the `trimmed` argument to trim whitespace between the tags.)
4. Avoid passing HTML within translated strings where possible, as this can complicate the work needed of human translators to develop message maps.
```
{% load i18n %}
{# A short string #}
<h5 class="card-header">{% trans "Circuit List" %}</h5>
{# A longer string with a context variable #}
{% blocktrans trimmed with count=object.circuits.count %}
There are {count} circuits. Would you like to continue?
{% endblocktrans %}
```
!!! warning
The `{% blocktrans %}` tag supports only **limited variable replacement**, comparable to the `format()` method on Python strings. It does not permit access to object attributes or the use of other template tags or filters inside it. Ensure that any necessary context is passed as simple variables.
!!! info
The `{% trans %}` and `{% blocktrans %}` support the inclusion of contextual hints for translators using the `context` argument:
```nohighlight
{% trans "May" context "month name" %}
```

View File

@@ -2,44 +2,51 @@
## Model Types
A NetBox model represents a discrete object type such as a device or IP address. Each model is defined as a Python class and has its own SQL table. All NetBox data models can be categorized by type.
A NetBox model represents a discrete object type such as a device or IP address. Per [Django convention](https://docs.djangoproject.com/en/stable/topics/db/models/), each model is defined as a Python class and has its own table in the PostgreSQL database. All NetBox data models can be categorized by type.
The Django [content types](https://docs.djangoproject.com/en/stable/ref/contrib/contenttypes/) framework can be used to reference models within the database. A ContentType instance references a model by its `app_label` and `name`: For example, the Site model is referred to as `dcim.site`. The content type combined with an object's primary key form a globally unique identifier for the object (e.g. `dcim.site:123`).
The Django [content types](https://docs.djangoproject.com/en/stable/ref/contrib/contenttypes/) framework is used to map Django models to database tables. A ContentType instance references a model by its `app_label` and `name`: For example, the Site model within the DCIM app is referred to as `dcim.site`. The content type combined with an object's primary key form a globally unique identifier for the object (e.g. `dcim.site:123`).
### Features Matrix
* [Change logging](../additional-features/change-logging.md) - Changes to these objects are automatically recorded in the change log
* [Webhooks](../additional-features/webhooks.md) - NetBox is capable of generating outgoing webhooks for these objects
* [Custom fields](../customization/custom-fields.md) - These models support the addition of user-defined fields
* [Export templates](../customization/export-templates.md) - Users can create custom export templates for these models
* [Tagging](../models/extras/tag.md) - The models can be tagged with user-defined tags
* [Journaling](../additional-features/journaling.md) - These models support persistent historical commentary
* Nesting - These models can be nested recursively to create a hierarchy
Depending on its classification, each NetBox model may support various features which enhance its operation. Each feature is enabled by inheriting from its designated mixin class, and some features also make use of the [application registry](./application-registry.md#model_features).
| Type | Change Logging | Webhooks | Custom Fields | Export Templates | Tags | Journaling | Nesting |
| ------------------ | ---------------- | ---------------- |------------------| ---------------- | ---------------- | ---------------- | ---------------- |
| Primary | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | |
| Organizational | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | | |
| Nested Group | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | | :material-check: |
| Component | :material-check: | :material-check: | :material-check: | :material-check: | :material-check: | | |
| Component Template | :material-check: | :material-check: | | | | | |
| Feature | Feature Mixin | Registry Key | Description |
|------------------------------------------------------------|-------------------------|--------------------|-----------------------------------------------------------------------------------------|
| [Change logging](../features/change-logging.md) | `ChangeLoggingMixin` | - | Changes to these objects are automatically recorded in the change log |
| Cloning | `CloningMixin` | - | Provides the `clone()` method to prepare a copy |
| [Custom fields](../customization/custom-fields.md) | `CustomFieldsMixin` | `custom_fields` | These models support the addition of user-defined fields |
| [Custom links](../customization/custom-links.md) | `CustomLinksMixin` | `custom_links` | These models support the assignment of custom links |
| [Custom validation](../customization/custom-validation.md) | `CustomValidationMixin` | - | Supports the enforcement of custom validation rules |
| [Export templates](../customization/export-templates.md) | `ExportTemplatesMixin` | `export_templates` | Users can create custom export templates for these models |
| [Job results](../features/background-jobs.md) | `JobsMixin` | `jobs` | Users can create custom export templates for these models |
| [Journaling](../features/journaling.md) | `JournalingMixin` | `journaling` | These models support persistent historical commentary |
| [Synchronized data](../integrations/synchronized-data.md) | `SyncedDataMixin` | `synced_data` | Certain model data can be automatically synchronized from a remote data source |
| [Tagging](../models/extras/tag.md) | `TagsMixin` | `tags` | The models can be tagged with user-defined tags |
| [Event rules](../features/event-rules.md) | `EventRulesMixin` | `event_rules` | Event rules can send webhooks or run custom scripts automatically in response to events |
## Models Index
### Primary Models
These are considered the "core" application models which are used to model network infrastructure.
* [circuits.Circuit](../models/circuits/circuit.md)
* [circuits.Provider](../models/circuits/provider.md)
* [circuits.ProviderAccount](../models/circuits/provideraccount.md)
* [circuits.ProviderNetwork](../models/circuits/providernetwork.md)
* [core.DataSource](../models/core/datasource.md)
* [dcim.Cable](../models/dcim/cable.md)
* [dcim.Device](../models/dcim/device.md)
* [dcim.DeviceType](../models/dcim/devicetype.md)
* [dcim.Module](../models/dcim/module.md)
* [dcim.ModuleType](../models/dcim/moduletype.md)
* [dcim.PowerFeed](../models/dcim/powerfeed.md)
* [dcim.PowerPanel](../models/dcim/powerpanel.md)
* [dcim.Rack](../models/dcim/rack.md)
* [dcim.RackReservation](../models/dcim/rackreservation.md)
* [dcim.Site](../models/dcim/site.md)
* [dcim.VirtualChassis](../models/dcim/virtualchassis.md)
* [dcim.VirtualDeviceContext](../models/dcim/virtualdevicecontext.md)
* [ipam.Aggregate](../models/ipam/aggregate.md)
* [ipam.ASN](../models/ipam/asn.md)
* [ipam.FHRPGroup](../models/ipam/fhrpgroup.md)
@@ -48,22 +55,33 @@ The Django [content types](https://docs.djangoproject.com/en/stable/ref/contrib/
* [ipam.Prefix](../models/ipam/prefix.md)
* [ipam.RouteTarget](../models/ipam/routetarget.md)
* [ipam.Service](../models/ipam/service.md)
* [ipam.ServiceTemplate](../models/ipam/servicetemplate.md)
* [ipam.VLAN](../models/ipam/vlan.md)
* [ipam.VRF](../models/ipam/vrf.md)
* [tenancy.Contact](../models/tenancy/contact.md)
* [tenancy.Tenant](../models/tenancy/tenant.md)
* [virtualization.Cluster](../models/virtualization/cluster.md)
* [virtualization.VirtualMachine](../models/virtualization/virtualmachine.md)
* [vpn.IKEPolicy](../models/vpn/ikepolicy.md)
* [vpn.IKEProposal](../models/vpn/ikeproposal.md)
* [vpn.IPSecPolicy](../models/vpn/ipsecpolicy.md)
* [vpn.IPSecProfile](../models/vpn/ipsecprofile.md)
* [vpn.IPSecProposal](../models/vpn/ipsecproposal.md)
* [vpn.L2VPN](../models/vpn/l2vpn.md)
* [vpn.Tunnel](../models/vpn/tunnel.md)
* [wireless.WirelessLAN](../models/wireless/wirelesslan.md)
* [wireless.WirelessLink](../models/wireless/wirelesslink.md)
### Organizational Models
Organization models are used to organize and classify primary models.
* [circuits.CircuitType](../models/circuits/circuittype.md)
* [dcim.DeviceRole](../models/dcim/devicerole.md)
* [dcim.Manufacturer](../models/dcim/manufacturer.md)
* [dcim.Platform](../models/dcim/platform.md)
* [dcim.RackRole](../models/dcim/rackrole.md)
* [ipam.ASNRange](../models/ipam/asnrange.md)
* [ipam.RIR](../models/ipam/rir.md)
* [ipam.Role](../models/ipam/role.md)
* [ipam.VLANGroup](../models/ipam/vlangroup.md)
@@ -73,6 +91,8 @@ The Django [content types](https://docs.djangoproject.com/en/stable/ref/contrib/
### Nested Group Models
Nested group models behave like organizational model, but self-nest within a recursive hierarchy. For example, the Region model can be used to represent a hierarchy of countries, states, and cities.
* [dcim.Location](../models/dcim/location.md) (formerly RackGroup)
* [dcim.Region](../models/dcim/region.md)
* [dcim.SiteGroup](../models/dcim/sitegroup.md)
@@ -82,24 +102,32 @@ The Django [content types](https://docs.djangoproject.com/en/stable/ref/contrib/
### Component Models
Component models represent individual physical or virtual components belonging to a device or virtual machine.
* [dcim.ConsolePort](../models/dcim/consoleport.md)
* [dcim.ConsoleServerPort](../models/dcim/consoleserverport.md)
* [dcim.DeviceBay](../models/dcim/devicebay.md)
* [dcim.FrontPort](../models/dcim/frontport.md)
* [dcim.Interface](../models/dcim/interface.md)
* [dcim.InventoryItem](../models/dcim/inventoryitem.md)
* [dcim.ModuleBay](../models/dcim/modulebay.md)
* [dcim.PowerOutlet](../models/dcim/poweroutlet.md)
* [dcim.PowerPort](../models/dcim/powerport.md)
* [dcim.RearPort](../models/dcim/rearport.md)
* [virtualization.VirtualDisk](../models/virtualization/virtualdisk.md)
* [virtualization.VMInterface](../models/virtualization/vminterface.md)
### Component Template Models
These function as templates to effect the replication of device and virtual machine components. Component template models support a limited feature set, including change logging, custom validation, and event rules.
* [dcim.ConsolePortTemplate](../models/dcim/consoleporttemplate.md)
* [dcim.ConsoleServerPortTemplate](../models/dcim/consoleserverporttemplate.md)
* [dcim.DeviceBayTemplate](../models/dcim/devicebaytemplate.md)
* [dcim.FrontPortTemplate](../models/dcim/frontporttemplate.md)
* [dcim.InterfaceTemplate](../models/dcim/interfacetemplate.md)
* [dcim.InventoryItemTemplate](../models/dcim/inventoryitemtemplate.md)
* [dcim.ModuleBayTemplate](../models/dcim/modulebaytemplate.md)
* [dcim.PowerOutletTemplate](../models/dcim/poweroutlettemplate.md)
* [dcim.PowerPortTemplate](../models/dcim/powerporttemplate.md)
* [dcim.RearPortTemplate](../models/dcim/rearporttemplate.md)

View File

@@ -1,62 +1,96 @@
# Release Checklist
## Minor Version Bumps
This documentation describes the process of packaging and publishing a new NetBox release. There are three types of release:
### Address Pinned Dependencies
* Major release (e.g. v2.11 to v3.0)
* Minor release (e.g. v3.2 to v3.3)
* Patch release (e.g. v3.3.0 to v3.3.1)
Check `base_requirements.txt` for any dependencies pinned to a specific version, and upgrade them to their most stable release (where possible).
While major releases generally introduce some very substantial change to the application, they are typically treated the same as minor version increments for the purpose of release packaging.
### Link to the Release Notes Page
## Minor Version Releases
Add the release notes (`/docs/release-notes/X.Y.md`) to the table of contents within `mkdocs.yml`, and add a summary of the major changes to `index.md`.
### Address Constrained Dependencies
### Manually Perform a New Install
Install `mkdocs` in your local environment, then start the documentation server:
```no-highlight
$ pip install -r docs/requirements.txt
$ mkdocs serve
```
Follow these instructions to perform a new installation of NetBox. This process must _not_ be automated: The goal of this step is to catch any errors or omissions in the documentation, and ensure that it is kept up-to-date for each release. Make any necessary changes to the documentation before proceeding with the release.
### Close the Release Milestone
Close the release milestone on GitHub after ensuring there are no remaining open issues associated with it.
### Merge the Release Branch
Submit a pull request to merge the `feature` branch into the `develop` branch in preparation for its release.
---
## All Releases
### Update Requirements
Required Python packages are maintained in two files. `base_requirements.txt` contains a list of all the packages required by NetBox. Some of them may be pinned to a specific version of the package due to a known issue. For example:
Sometimes it becomes necessary to constrain dependencies to a particular version, e.g. to work around a bug in a newer release or to avoid a breaking change that we have yet to accommodate. (Another common example is to limit the upstream Django release.) For example:
```
# https://github.com/encode/django-rest-framework/issues/6053
djangorestframework==3.8.1
```
The other file is `requirements.txt`, which lists each of the required packages pinned to its current stable version. When NetBox is installed, the Python environment is configured to match this file. This helps ensure that a new release of a dependency doesn't break NetBox.
These version constraints are added to `base_requirements.txt` to ensure that newer packages are not installed when updating the pinned dependencies in `requirements.txt` (see the [Update Requirements](#update-requirements) section below). Before each new minor version of NetBox is released, all such constraints on dependent packages should be addressed if feasible. This guards against the collection of stale constraints over time.
Every release should refresh `requirements.txt` so that it lists the most recent stable release of each package. To do this:
### Close the Release Milestone
1. Create a new virtual environment.
2. Install the latest version of all required packages `pip install -U -r base_requirements.txt`).
3. Run all tests and check that the UI and API function as expected.
4. Review each requirement's release notes for any breaking or otherwise noteworthy changes.
5. Update the package versions in `requirements.txt` as appropriate.
Close the [release milestone](https://github.com/netbox-community/netbox/milestones) on GitHub after ensuring there are no remaining open issues associated with it.
In cases where upgrading a dependency to its most recent release is breaking, it should be pinned to its current minor version in `base_requirements.txt` (with an explanatory comment) and revisited for the next major NetBox release.
### Update the Release Notes
### Verify CI Build Status
Check that a link to the release notes for the new version is present in the navigation menu (defined in `mkdocs.yml`), and that a summary of all major new features has been added to `docs/index.md`.
Ensure that continuous integration testing on the `develop` branch is completing successfully.
### Manually Perform a New Install
Start the documentation server and navigate to the current version of the installation docs:
```no-highlight
mkdocs serve
```
Follow these instructions to perform a new installation of NetBox in a temporary environment. This process must not be automated: The goal of this step is to catch any errors or omissions in the documentation, and ensure that it is kept up-to-date for each release. Make any necessary changes to the documentation before proceeding with the release.
### Merge the Release Branch
Submit a pull request to merge the `feature` branch into the `develop` branch in preparation for its release. Once it has been merged, continue with the section for patch releases below.
### Rebuild Demo Data (After Release)
After the release of a new minor version, generate a new demo data snapshot compatible with the new release. See the [`netbox-demo-data`](https://github.com/netbox-community/netbox-demo-data) repository for instructions.
---
## Patch Releases
### Notify netbox-docker Project of Any Relevant Changes
Notify the [`netbox-docker`](https://github.com/netbox-community/netbox-docker) maintainers (in **#netbox-docker**) of any changes that may be relevant to their build process, including:
* Significant changes to `upgrade.sh`
* Increases in minimum versions for service dependencies (PostgreSQL, Redis, etc.)
* Any changes to the reference installation
### Update Requirements
Before each release, update each of NetBox's Python dependencies to its most recent stable version. These are defined in `requirements.txt`, which is updated from `base_requirements.txt` using `pip`. To do this:
1. Upgrade the installed version of all required packages in your environment (`pip install -U -r base_requirements.txt`).
2. Run all tests and check that the UI and API function as expected.
3. Review each requirement's release notes for any breaking or otherwise noteworthy changes.
4. Update the package versions in `requirements.txt` as appropriate.
In cases where upgrading a dependency to its most recent release is breaking, it should be constrained to its current minor version in `base_requirements.txt` with an explanatory comment and revisited for the next major NetBox release (see the [Address Constrained Dependencies](#address-constrained-dependencies) section above).
### Rebuild the Device Type Definition Schema
Run the following command to update the device type definition validation schema:
```nohighlight
./manage.py buildschema --write
```
This will automatically update the schema file at `contrib/generated_schema.json`.
### Update & Compile Translations
Log into [Transifex](https://app.transifex.com/netbox-community/netbox/dashboard/) to download the updated string maps. Download the resource (portable object, or `.po`) file for each language and save them to `netbox/translations/$lang/LC_MESSAGES/django.po`, overwriting the current files. (Be sure to click the **Download for use** link.)
![Transifex download](../media/development/transifex_download.png)
Once the resource files for all languages have been updated, compile the machine object (`.mo`) files using the `compilemessages` management command:
```nohighlight
./manage.py compilemessages
```
### Update Version and Changelog
@@ -64,28 +98,35 @@ Ensure that continuous integration testing on the `develop` branch is completing
* Update the example version numbers in the feature request and bug report templates under `.github/ISSUE_TEMPLATES/`.
* Replace the "FUTURE" placeholder in the release notes with the current date.
Commit these changes to the `develop` branch.
Commit these changes to the `develop` branch and push upstream.
### Verify CI Build Status
Ensure that continuous integration testing on the `develop` branch is completing successfully. If it fails, take action to correct the failure before proceeding with the release.
### Submit a Pull Request
Submit a pull request title **"Release vX.Y.Z"** to merge the `develop` branch into `master`. Copy the documented release notes into the pull request's body.
Submit a pull request titled **"Release vX.Y.Z"** to merge the `develop` branch into `master`. Copy the documented release notes into the pull request's body.
Once CI has completed on the PR, merge it.
Once CI has completed on the PR, merge it. This effects a new release in the `master` branch.
### Create a New Release
Draft a [new release](https://github.com/netbox-community/netbox/releases/new) with the following parameters.
Create a [new release](https://github.com/netbox-community/netbox/releases/new) on GitHub with the following parameters.
* **Tag:** Current version (e.g. `v2.9.9`)
* **Tag:** Current version (e.g. `v3.3.1`)
* **Target:** `master`
* **Title:** Version and date (e.g. `v2.9.9 - 2020-11-09`)
* **Title:** Version and date (e.g. `v3.3.1 - 2022-08-25`)
* **Description:** Copy from the pull request body
Copy the description from the pull request to the release.
Once created, the release will become available for users to install.
### Update the Development Version
On the `develop` branch, update `VERSION` in `settings.py` to point to the next release. For example, if you just released v2.9.9, set:
On the `develop` branch, update `VERSION` in `settings.py` to point to the next release. For example, if you just released v3.3.1, set:
```
VERSION = 'v2.9.10-dev'
VERSION = 'v3.3.2-dev'
```
Commit this change with the comment "PRVB" (for _post-release version bump_) and push the commit upstream.

View File

@@ -0,0 +1,38 @@
# Search
NetBox v3.4 introduced a new global search mechanism, which employs the `extras.CachedValue` model to store discrete field values from many models in a single table.
## SearchIndex
To enable search support for a model, declare and register a subclass of `netbox.search.SearchIndex` for it. Typically, this will be done within an app's `search.py` module.
```python
from netbox.search import SearchIndex, register_search
@register_search
class MyModelIndex(SearchIndex):
model = MyModel
fields = (
('name', 100),
('description', 500),
('comments', 5000),
)
display_attrs = ('site', 'device', 'status', 'description')
```
A SearchIndex subclass defines both its model and a list of two-tuples specifying which model fields to be indexed and the weight (precedence) associated with each. Guidance on weight assignment for fields is provided below.
### Field Weight Guidance
| Weight | Field Role | Examples |
|--------|--------------------------------------------------|----------------------------------------------------|
| 50 | Unique serialized attribute | Device.asset_tag |
| 60 | Unique serialized attribute (per related object) | Device.serial |
| 100 | Primary human identifier | Device.name, Circuit.cid, Cable.label |
| 110 | Slug | Site.slug |
| 200 | Secondary identifier | ProviderAccount.account, DeviceType.part_number |
| 300 | Highly unique descriptive attribute | CircuitTermination.xconnect_id, IPAddress.dns_name |
| 500 | Description | Site.description |
| 1000 | Custom field default | - |
| 2000 | Other discrete attribute | CircuitTermination.port_speed |
| 5000 | Comment field | Site.comments |

View File

@@ -9,3 +9,27 @@ This signal is sent by models which inherit from `CustomValidationMixin` at the
### Receivers
* `extras.signals.run_custom_validators()`
## core.job_start
This signal is sent whenever a [background job](../features/background-jobs.md) is started.
### Receivers
* `extras.signals.process_job_start_event_rules()`
## core.job_end
This signal is sent whenever a [background job](../features/background-jobs.md) is terminated.
### Receivers
* `extras.signals.process_job_end_event_rules()`
## core.pre_sync
This signal is sent when the [DataSource](../models/core/datasource.md) model's `sync()` method is called.
## core.post_sync
This signal is sent when a [DataSource](../models/core/datasource.md) finishes synchronizing.

View File

@@ -1,34 +1,53 @@
# Style Guide
NetBox generally follows the [Django style guide](https://docs.djangoproject.com/en/stable/internals/contributing/writing-code/coding-style/), which is itself based on [PEP 8](https://www.python.org/dev/peps/pep-0008/). [Pycodestyle](https://github.com/pycqa/pycodestyle) is used to validate code formatting, ignoring certain violations. See `scripts/cibuild.sh` for details.
NetBox generally follows the [Django style guide](https://docs.djangoproject.com/en/stable/internals/contributing/writing-code/coding-style/), which is itself based on [PEP 8](https://www.python.org/dev/peps/pep-0008/). [Pycodestyle](https://github.com/pycqa/pycodestyle) is used to validate code formatting, ignoring certain violations.
## PEP 8 Exceptions
## Code
* Wildcard imports (for example, `from .constants import *`) are acceptable under any of the following conditions:
* The library being import contains only constant declarations (e.g. `constants.py`)
* The library being imported explicitly defines `__all__`
### General Guidance
* Maximum line length is 120 characters (E501)
* This does not apply to HTML templates or to automatically generated code (e.g. database migrations).
* When in doubt, remain consistent: It is better to be consistently incorrect than inconsistently correct. If you notice in the course of unrelated work a pattern that should be corrected, continue to follow the pattern for now and submit a separate bug report so that the entire code base can be evaluated at a later point.
* Line breaks are permitted following binary operators (W504)
* Prioritize readability over concision. Python is a very flexible language that typically offers several multiple options for expressing a given piece of logic, but some may be more friendly to the reader than others. (List comprehensions are particularly vulnerable to over-optimization.) Always remain considerate of the future reader who may need to interpret your code without the benefit of the context within which you are writing it.
## Enforcing Code Style
* Include a newline at the end of every file.
The `pycodestyle` utility (previously `pep8`) is used by the CI process to enforce code style. It is strongly recommended to include as part of your commit process. A git commit hook is provided in the source at `scripts/git-hooks/pre-commit`. Linking to this script from `.git/hooks/` will invoke `pycodestyle` prior to every commit attempt and abort if the validation fails.
* No easter eggs. While they can be fun, NetBox must be considered as a business-critical tool. The potential, however minor, for introducing a bug caused by unnecessary code is best avoided entirely.
```
$ cd .git/hooks/
$ ln -s ../../scripts/git-hooks/pre-commit
```
* Constants (variables which do not change) should be declared in `constants.py` within each app. Wildcard imports from the file are acceptable.
To invoke `pycodestyle` manually, run:
* Every model must have a [docstring](https://peps.python.org/pep-0257/). Every custom method should include an explanation of its function.
* Nested API serializers generate minimal representations of an object. These are stored separately from the primary serializers to avoid circular dependencies. Always import nested serializers from other apps directly. For example, from within the DCIM app you would write `from ipam.api.nested_serializers import NestedIPAddressSerializer`.
### PEP 8 Exceptions
NetBox ignores certain PEP8 assertions. These are listed below.
#### Wildcard Imports
Wildcard imports (for example, `from .constants import *`) are acceptable under any of the following conditions:
* The library being import contains only constant declarations (e.g. `constants.py`)
* The library being imported explicitly defines `__all__`
#### Maximum Line Length (E501)
NetBox does not restrict lines to a maximum length of 79 characters. We use a maximum line length of 120 characters, however this is not enforced by CI. The maximum length does not apply to HTML templates or to automatically generated code (e.g. database migrations).
#### Line Breaks Following Binary Operators (W504)
Line breaks are permitted following binary operators.
### Enforcing Code Style
The [`pycodestyle`](https://pypi.org/project/pycodestyle/) utility (formerly `pep8`) is used by the CI process to enforce code style. A [pre-commit hook](./getting-started.md#2-enable-pre-commit-hooks) which runs this automatically is included with NetBox. To invoke `pycodestyle` manually, run:
```
pycodestyle --ignore=W504,E501 netbox/
```
## Introducing New Dependencies
### Introducing New Dependencies
The introduction of a new dependency is best avoided unless it is absolutely necessary. For small features, it's generally preferable to replicate functionality within the NetBox code base rather than to introduce reliance on an external project. This reduces both the burden of tracking new releases and our exposure to outside bugs and supply chain attacks.
@@ -39,24 +58,22 @@ If there's a strong case for introducing a new dependency, it must meet the foll
* It must be actively maintained, with no longer than one year between releases.
* It must be available via the [Python Package Index](https://pypi.org/) (PyPI).
When adding a new dependency, a short description of the package and the URL of its code repository must be added to `base_requirements.txt`. Additionally, a line specifying the package name pinned to the current stable release must be added to `requirements.txt`. This ensures that NetBox will install only the known-good release and simplify support efforts.
When adding a new dependency, a short description of the package and the URL of its code repository must be added to `base_requirements.txt`. Additionally, a line specifying the package name pinned to the current stable release must be added to `requirements.txt`. This ensures that NetBox will install only the known-good release.
## General Guidance
## Written Works
* When in doubt, remain consistent: It is better to be consistently incorrect than inconsistently correct. If you notice in the course of unrelated work a pattern that should be corrected, continue to follow the pattern for now and submit a separate bug report so that the entire code base can be evaluated at a later point.
### General Guidance
* Prioritize readability over concision. Python is a very flexible language that typically offers several options for expressing a given piece of logic, but some may be more friendly to the reader than others. (List comprehensions are particularly vulnerable to over-optimization.) Always remain considerate of the future reader who may need to interpret your code without the benefit of the context within which you are writing it.
* Written material must always meet a reasonable professional standard, with proper grammar, spelling, and punctuation.
* No easter eggs. While they can be fun, NetBox must be considered as a business-critical tool. The potential, however minor, for introducing a bug caused by unnecessary logic is best avoided entirely.
* Use two line breaks between paragraphs.
* Constants (variables which generally do not change) should be declared in `constants.py` within each app. Wildcard imports from the file are acceptable.
* Use only a single space between sentences.
* Every model should have a docstring. Every custom method should include an explanation of its function.
* All documentation is to be written in [Markdown](../reference/markdown.md), with modest amounts of HTML permitted where needed to overcome technical limitations.
* Nested API serializers generate minimal representations of an object. These are stored separately from the primary serializers to avoid circular dependencies. Always import nested serializers from other apps directly. For example, from within the DCIM app you would write `from ipam.api.nested_serializers import NestedIPAddressSerializer`.
### Branding
## Branding
* When referring to NetBox in writing, use the proper form "NetBox," with the letters N and B capitalized. The lowercase form "netbox" should be used in code, filenames, etc. But never "Netbox" or any other deviation.
* When referring to NetBox in writing, use the proper form "NetBox," with the letters N and B capitalized. The lowercase form "netbox" should be used in code, filenames, etc. but never "Netbox" or any other deviation.
* There is an SVG form of the NetBox logo at [docs/netbox_logo.svg](../netbox_logo.svg). It is preferred to use this logo for all purposes as it scales to arbitrary sizes without loss of resolution. If a raster image is required, the SVG logo should be converted to a PNG image of the prescribed size.

View File

@@ -0,0 +1,30 @@
# Translations
NetBox coordinates all translation work using the [Transifex](https://explore.transifex.com/netbox-community/netbox/) platform. Signing up for a Transifex account is free.
All language translations in NetBox are generated from the source file found at `netbox/translations/en/LC_MESSAGES/django.po`. This file contains the original English strings with empty mappings, and is generated as part of NetBox's release process. Transifex updates source strings from this file on a recurring basis, so new translation strings will appear in the platform automatically as it is updated in the code base.
Reviewers log into Transifex and navigate to their designated language(s) to translate strings. The initial translation for most strings will be machine-generated via the AWS Translate service. Human reviewers are responsible for reviewing these translations and making corrections where necessary.
Immediately prior to each NetBox release, the translation maps for all completed languages will be downloaded from Transifex, compiled, and checked into the NetBox code base by a maintainer.
## Updating Translation Sources
To update the English `.po` file from which all translations are derived, use the `makemessages` management command:
```nohighlight
./manage.py makemessages -l en
```
Then, commit the change and push to the `develop` branch on GitHub. After some time, any new strings will appear for translation on Transifex automatically.
## Proposing New Languages
If you'd like to add support for a new language to NetBox, the first step is to [submit a GitHub issue](https://github.com/netbox-community/netbox/issues/new?assignees=&labels=type%3A+translation&projects=&template=translation.yaml) to capture the proposal. While we'd like to add as many languages as possible, we do need to limit the rate at which new languages are added. New languages will be selected according to community interest and the number of volunteers who sign up as translators.
Once a proposed language has been approved, a NetBox maintainer will:
* Add it to the Transifex platform
* Designate one or more reviewers
* Create the initial machine-generated translations for review
* Add it to the list of supported languages

View File

@@ -0,0 +1,35 @@
# API & Integration
NetBox includes a slew of features which enable integration with other tools and resources powering your network.
## REST API
NetBox's REST API, powered by the [Django REST Framework](https://www.django-rest-framework.org/), provides a robust yet accessible interface for creating, modifying, and deleting objects. Employing HTTP for transfer and JSON for data encapsulation, the REST API is easily consumed by clients on any platform and extremely well suited for automation tasks.
```no-highlight
curl -s -X POST \
-H "Authorization: Token $TOKEN" \
-H "Content-Type: application/json" \
http://netbox/api/ipam/prefixes/ \
--data '{"prefix": "192.0.2.0/24", "site": {"name": "Branch 12"}}'
```
The REST API employs token-based authentication, which maps API clients to user accounts and their assigned permissions. The API endpoints are fully documented using OpenAPI, and NetBox even includes a convenient browser-based version of the API for exploration. The open source [pynetbox](https://github.com/netbox-community/pynetbox) and [go-netbox](https://github.com/netbox-community/go-netbox) API client libraries are also available for Python and Go, respectively.
To learn more about this feature, check out the [REST API documentation](../integrations/rest-api.md).
## GraphQL API
NetBox also provides a [GraphQL](https://graphql.org/) API to complement its REST API. GraphQL enables complex queries for arbitrary objects and fields, enabling the client to retrieve only the specific data it needs from NetBox. This is a special-purpose read-only API intended for efficient queries. Like the REST API, the GraphQL API employs token-based authentication.
To learn more about this feature, check out the [GraphQL API documentation](../integrations/graphql-api.md).
## Webhooks
A webhook is a mechanism for conveying to some external system a change that has taken place in NetBox. For example, you may want to notify a monitoring system whenever the status of a device is updated in NetBox. To do this, first create a [webhook](../models/extras/webhook.md) identifying the remote receiver (URL), HTTP method, and any other necessary parameters. Then, define an [event rule](../models/extras/eventrule.md) which is triggered by device changes to transmit the webhook.
When NetBox detects a change to a device, an HTTP request containing the details of the change and who made it be sent to the specified receiver. Webhooks are an excellent mechanism for building event-based automation processes. To learn more about this feature, check out the [webhooks documentation](../integrations/webhooks.md).
## Prometheus Metrics
NetBox includes a special `/metrics` view which exposes metrics for a [Prometheus](https://prometheus.io/) scraper, powered by the open source [django-prometheus](https://github.com/korfuri/django-prometheus) library. To learn more about this feature, check out the [Prometheus metrics documentation](../integrations/prometheus-metrics.md).

View File

@@ -0,0 +1,49 @@
# Authentication & Permissions
## Object-Based Permissions
NetBox boasts a very robust permissions system which extends well beyond the model-based permissions of the underlying Django framework. Assigning permissions in NetBox involves several dimensions:
* The type(s) of object to which the permission applies
* The users and/or groups being granted the permissions
* The action(s) permitted by the permission (e.g. view, add, change, etc.)
* Any constraints limiting application of the permission to a particular subset of objects
The implementation of constrains is what enables NetBox administrators to assign per-object permissions: Users can be limited to viewing or interacting with arbitrary subsets of objects based on the objects' attributes. For example, you might restrict a particular user to viewing only those prefixes or IP addresses within a particular VRF. Or you might restrict a group to modifying devices within a particular region.
Permission constraints are declared in JSON format when creating a permission, and operate very similarly to Django ORM queries. For instance, here's a constraint that matches reserved VLANs with a VLAN ID between 100 and 199:
```json
[
{
"vid__gte": 100,
"vid__lt": 200
},
{
"status": "reserved"
}
]
```
Check out the [permissions documentation](../administration/permissions.md) for more information about permission constraints.
## LDAP Authentication
NetBox includes a built-in authentication backend for authenticating users against a remote LDAP server. The [installation documentation](../installation/6-ldap.md) provides more detail on this capability.
## Single Sign-On (SSO)
NetBox integrates with the open source [python-social-auth](https://github.com/python-social-auth) library to provide [myriad options](https://python-social-auth.readthedocs.io/en/latest/backends/index.html#supported-backends) for single sign-on (SSO) authentication. These include:
* Cognito
* GitHub & GitHub Enterprise
* GitLab
* Google
* Hashicorp Vault
* Keycloak
* Microsoft Azure AD
* Microsoft Graph
* Okta
* OIDC
...and many others. It's also possible to build your own custom backends as needed using python-social-auth's base OAuth, OpenID, and SAML classes. You can find some examples of configuring SSO in NetBox' [authentication documentation](../administration/authentication/overview.md).

View File

@@ -0,0 +1,13 @@
# Background Jobs
NetBox includes the ability to execute certain functions as background tasks. These include:
* [Report](../customization/reports.md) execution
* [Custom script](../customization/custom-scripts.md) execution
* Synchronization of [remote data sources](../integrations/synchronized-data.md)
Additionally, NetBox plugins can enqueue their own background tasks. This is accomplished using the [Job model](../models/core/job.md). Background tasks are executed by the `rqworker` process(es).
## Scheduled Jobs
Background jobs can be configured to run immediately, or at a set time in the future. Scheduled jobs can also be configured to repeat at a set interval.

View File

@@ -1,9 +1,13 @@
# Change Logging
Every time an object in NetBox is created, updated, or deleted, a serialized copy of that object taken both before and after the change is saved to the database, along with meta data including the current time and the user associated with the change. These records form a persistent record of changes both for each individual object as well as NetBox as a whole. The global change log can be viewed by navigating to Other > Change Log.
Every time an object in NetBox is created, updated, or deleted, a serialized copy of that object taken both before and after the change is saved to the database, along with metadata including the current time and the user associated with the change. These records form a persistent record of changes both for each individual object as well as NetBox as a whole. The global change log can be viewed by navigating to Other > Change Log.
A serialized representation of the instance being modified is included in JSON format. This is similar to how objects are conveyed within the REST API, but does not include any nested representations. For instance, the `tenant` field of a site will record only the tenant's ID, not a representation of the tenant.
When a request is made, a UUID is generated and attached to any change records resulting from that request. For example, editing three objects in bulk will create a separate change record for each (three in total), and each of those objects will be associated with the same UUID. This makes it easy to identify all the change records resulting from a particular request.
Change records are exposed in the API via the read-only endpoint `/api/extras/object-changes/`. They may also be exported via the web UI in CSV format.
## Correlating Changes by Request
Every request made to NetBox is assigned a random unique ID that can be used to correlate change records. For example, if you change the status of three sites using the UI's bulk edit feature, you will see three new change records (one for each site) all referencing the same request ID. This shows that all three changes were made as part of the same request.

35
docs/features/circuits.md Normal file
View File

@@ -0,0 +1,35 @@
# Circuits
NetBox is ideal for managing your network's transit and peering providers and circuits. It provides all the flexibility needed to model physical circuits in both data center and enterprise environments, and allows for "connecting" circuits directly to device interfaces via cables.
```mermaid
flowchart TD
ASN --> Provider
Provider --> ProviderNetwork & ProviderAccount & Circuit
ProviderAccount --> Circuit
CircuitType --> Circuit
click ASN "../../models/circuits/asn/"
click Circuit "../../models/circuits/circuit/"
click CircuitType "../../models/circuits/circuittype/"
click Provider "../../models/circuits/provider/"
click ProviderAccount "../../models/circuits/provideraccount/"
click ProviderNetwork "../../models/circuits/providernetwork/"
```
## Providers
A provider is any organization which provides Internet or private connectivity. Typically, these are large carriers, however they might also include regional providers or even internal services. Each provider can be assigned account and contact details, and may have one or more AS numbers assigned to it.
Sometimes you'll need to model provider networks into which you don't have full visibility; these are typically represented on topology diagrams with cloud icons. NetBox facilitates this through its provider network model: A provider network represents a "black box" network to which your circuits can connect. A common example is a provider MPLS network connecting multiple sites.
## Circuits
A circuit is a physical connection between two points, which is installed and maintained by an external provider. For example, an Internet connection delivered as a fiber optic cable would be modeled as a circuit in NetBox.
Each circuit is associated with a provider and assigned a circuit ID, which must be unique to that provider. A circuit is also assigned a user-defined type, operational status, and various other operating characteristics. Provider accounts can also be employed to further categorize circuits belonging to a common provider: These may represent different business units or technologies.
Each circuit may have up to two terminations (A and Z) defined. Each termination can be associated with a particular site or provider network. In the case of the former, a cable can be connected between the circuit termination and a device component to map its physical connectivity.
!!! warning "Physical vs. Virtual Circuits"
The circuit model in NetBox represents **physical** connections. Don't confuse these with _virtual_ circuits which may be offered by providers overlaid on physical infrastructure. (For example, a VLAN-tagged subinterface would be a virtual circuit.) A good rule of thumb: If you can't point to it, it's not a physical circuit.

View File

@@ -0,0 +1,92 @@
# Configuration Rendering
One of the critical aspects of operating a network is ensuring that every network node is configured correctly. By leveraging configuration templates and [context data](./context-data.md), NetBox can render complete configuration files for each device on your network.
```mermaid
flowchart TD
ConfigContext & ConfigTemplate --> Config{{Rendered configuration}}
click ConfigContext "../../models/extras/configcontext/"
click ConfigTemplate "../../models/extras/configtemplate/"
```
## Configuration Templates
Configuration templates are written in the [Jinja2 templating language](https://jinja.palletsprojects.com/), and may be automatically populated from remote data sources. Context data is applied to a template during rendering to output a complete configuration file. Below is an example Jinja2 template which renders a simple network switch configuration file.
```jinja2
{% extends 'base.j2' %}
{% block content %}
system {
host-name {{ device.name }};
domain-name example.com;
time-zone UTC;
authentication-order [ password radius ];
ntp {
{% for server in ntp_servers %}
server {{ server }};
{% endfor %}
}
}
{% for interface in device.interfaces.all() %}
{% include 'common/interface.j2' %}
{% endfor %}
{% endblock %}
```
When rendered for a specific NetBox device, the template's `device` variable will be populated with the device instance, and `ntp_servers` will be pulled from the device's available context data. The resulting output will be a valid configuration segment that can be applied directly to a compatible network device.
### Context Data
The object for which the configuration is being rendered is made available as template context as `device` or `virtualmachine` for devices and virtual machines, respectively. Additionally, NetBox model classes can be accessed by the app or plugin in which they reside. For example:
```
There are {{ dcim.Site.objects.count() }} sites.
```
## Rendering Templates
### Device Configurations
NetBox provides a REST API endpoint specifically for rendering the default configuration template for a specific device. This is accomplished by sending a POST request to the device's unique URL, optionally including additional context data.
```no-highlight
curl -X POST \
-H "Authorization: Token $TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json; indent=4" \
http://netbox:8000/api/dcim/devices/123/render-config/ \
--data '{
"extra_data": "abc123"
}'
```
This request will trigger resolution of the device's preferred config template in the following order:
* The config template assigned to the individual device
* The config template assigned to the device's role
* The config template assigned to the device's platform
If no config template has been assigned to any of these three objects, the request will fail.
The configuration can be rendered as JSON or as plaintext by setting the `Accept:` HTTP header. For example:
* `Accept: application/json`
* `Accept: text/plain`
### General Purpose Use
NetBox config templates can also be rendered without being tied to any specific device, using a separate general purpose REST API endpoint. Any data included with a POST request to this endpoint will be passed as context data for the template.
```no-highlight
curl -X POST \
-H "Authorization: Token $TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json; indent=4" \
http://netbox:8000/api/extras/config-templates/123/render/ \
--data '{
"foo": "abc",
"bar": 123
}'
```

46
docs/features/contacts.md Normal file
View File

@@ -0,0 +1,46 @@
# Contacts
Much like [tenancy](./tenancy.md), contact assignment enables you to track ownership of resources modeled in NetBox. A contact represents an individual responsible for a resource within the context of its assigned role.
```mermaid
flowchart TD
ContactGroup --> ContactGroup & Contact
ContactRole & Contact --> assignment([Assignment])
assignment --> Object
click Contact "../../models/tenancy/contact/"
click ContactGroup "../../models/tenancy/contactgroup/"
click ContactRole "../../models/tenancy/contactrole/"
```
## Contact Groups
Contacts can be grouped arbitrarily into a recursive hierarchy, and a contact can be assigned to a group at any level within the hierarchy.
## Contact Roles
A contact role defines the relationship of a contact to an assigned object. For example, you might define roles for administrative, operational, and emergency contacts.
## Contacts
A contact should represent an individual or permanent point of contact. Each contact must define a name, and may optionally include a title, phone number, email address, and related details.
Contacts are reused for assignments, so each unique contact must be created only once and can be assigned to any number of NetBox objects, and there is no limit to the number of assigned contacts an object may have. Most core objects in NetBox can have contacts assigned to them.
The following models support the assignment of contacts:
* circuits.Circuit
* circuits.Provider
* circuits.ProviderAccount
* dcim.Device
* dcim.Location
* dcim.Manufacturer
* dcim.PowerPanel
* dcim.Rack
* dcim.Region
* dcim.Site
* dcim.SiteGroup
* tenancy.Tenant
* virtualization.Cluster
* virtualization.ClusterGroup
* virtualization.VirtualMachine

View File

@@ -0,0 +1,86 @@
# Context Data
Configuration context data (or "config contexts" for short) is a powerful feature that enables users to define arbitrary data that applies to device and virtual machines based on certain characteristics. For example, suppose you want to define syslog servers for devices assigned to sites within a particular region. In NetBox, you can create a config context instance containing this data and apply it to the desired region. All devices within this region will now include this data when fetched via an API.
```json
{
"syslog-servers": [
"192.168.43.107",
"192.168.48.112"
]
}
```
Context data can be consumed by remote API clients, or it can be employed natively to render [configuration templates](./configuration-rendering.md).
Config contexts can be computed for objects based on the following criteria:
| Type | Devices | Virtual Machines |
|---------------|------------------|------------------|
| Region | :material-check: | :material-check: |
| Site group | :material-check: | :material-check: |
| Site | :material-check: | :material-check: |
| Location | :material-check: | |
| Device type | :material-check: | |
| Role | :material-check: | :material-check: |
| Platform | :material-check: | :material-check: |
| Cluster type | | :material-check: |
| Cluster group | | :material-check: |
| Cluster | | :material-check: |
| Tenant group | :material-check: | :material-check: |
| Tenant | :material-check: | :material-check: |
| Tag | :material-check: | :material-check: |
There are no restrictions around what data can be stored in a configuration context, so long as it can be expressed in JSON.
## Hierarchical Rendering
While this is handy on its own, the real power of context data stems from its ability to be merged and overridden using multiple instances. For example, perhaps you need to define _different_ syslog servers within the region for a particular device role. You can create a second config context with the appropriate data and a higher weight, and apply it to the desired role. This will override the lower-weight data that applies to the entire region. As you can imagine, this flexibility can cater to many complex use cases.
For example, suppose we want to specify a set of syslog and NTP servers for all devices within a region. We could create a config context instance with a weight of 1000 assigned to the region, with the following JSON data:
```json
{
"ntp-servers": [
"172.16.10.22",
"172.16.10.33"
],
"syslog-servers": [
"172.16.9.100",
"172.16.9.101"
]
}
```
But suppose there's a problem at one particular site within this region preventing traffic from reaching the regional syslog server. Devices there need to use a local syslog server instead of the two defined above. We'll create a second config context assigned only to that site with a weight of 2000 and the following data:
```json
{
"syslog-servers": [
"192.168.43.107"
]
}
```
When the context data for a device at this site is rendered, the second, higher-weight data overwrite the first, resulting in the following:
```json
{
"ntp-servers": [
"172.16.10.22",
"172.16.10.33"
],
"syslog-servers": [
"192.168.43.107"
]
}
```
Data from the higher-weight context overwrites conflicting data from the lower-weight context, while the non-conflicting portion of the lower-weight context (the list of NTP servers) is preserved.
## Local Context Data
Devices and virtual machines may also have a local context data defined. This local context will _always_ take precedence over any separate config context objects which apply to the device/VM. This is useful in situations where we need to call out a specific deviation in the data for a particular object.
!!! warning
If you find that you're routinely defining local context data for many individual devices or virtual machines, [custom fields](./customization.md#custom-fields) may offer a more effective solution.

View File

@@ -0,0 +1,90 @@
# Customization
While NetBox strives to meet the needs of every network, the needs of users to cater to their own unique environments cannot be ignored. NetBox was built with this in mind, and can be customized in many ways to better suit your particular needs.
## Tags
Most objects in NetBox can be assigned user-created tags to aid with organization and filtering. Tag values are completely arbitrary: They may be used to store data in key-value pairs, or they may be employed simply as labels against which objects can be filtered. Each tag can also be assigned a color for quicker differentiation in the user interface.
Objects can be filtered by the tags they have applied. For example, the following API request will retrieve all devices tagged as "monitored":
```no-highlight
GET /api/dcim/devices/?tag=monitored
```
The `tag` filter can be specified multiple times to match only objects which have _all_ the specified tags assigned:
```no-highlight
GET /api/dcim/devices/?tag=monitored&tag=deprecated
```
## Bookmarks
!!! info "This feature was introduced in NetBox v3.6."
Users can bookmark their most commonly visited objects for convenient access. Bookmarks are listed under a user's profile, and can be displayed with custom filtering and ordering on the user's personal dashboard.
## Custom Fields
While NetBox provides a rather extensive data model out of the box, the need may arise to store certain additional data associated with NetBox objects. For example, you might need to record the invoice ID alongside an installed device, or record an approving authority when creating a new IP prefix. NetBox administrators can create custom fields on built-in objects to meet these needs.
NetBox supports many types of custom field, from basic data types like strings and integers, to complex structures like selection lists or raw JSON. It's even possible to add a custom field which references other NetBox objects. Custom field data is stored directly alongside the object to which it is applied in the database, which ensures minimal performance impact. And custom field data can be written and read via the REST API, just like built-in fields.
To learn more about this feature, check out the [custom field documentation](../customization/custom-fields.md).
## Custom Links
Custom links allow you to conveniently reference external resources related to NetBox objects from within the NetBox UI. For example, you might wish to link each virtual machine modeled in NetBox to its corresponding view in some orchestration application. You can do this by creating a templatized custom link for the virtual machine model, specifying something like the following for the link URL:
```no-highlight
http://server.local/vms/?name={{ object.name }}
```
Now, when viewing a virtual machine in NetBox, a user will see a handy button with the chosen title and link (complete with the name of the VM being viewed). Both the text and URL of custom links can be templatized in this manner, and custom links can be grouped together into dropdowns for more efficient display.
To learn more about this feature, check out the [custom link documentation](../customization/custom-links.md).
## Custom Validation
While NetBox employs robust built-in object validation to ensure the integrity of its database, you might wish to enforce additional rules governing the creation and modification of certain objects. For example, perhaps you require that every device defined in NetBox adheres to a particular naming scheme and includes an asset tag. You can configure a custom validation rule in NetBox to enforce these requirements for the device model:
```python
CUSTOM_VALIDATORS = {
"dcim.device": [
{
"name": {
"regex": "[a-z]+\d{3}"
},
"asset_tag": {
"required": True
}
}
]
}
```
To learn more about this feature, check out the [custom validation documentation](../customization/custom-validation.md).
## Export Templates
Most NetBox objects can be exported in bulk in two built-in CSV formats: The current view (what the user currently sees in the objects list), or all available data. NetBox also provides the capability to define your own custom data export formats via export templates. An export template is essentially [Jinja2](https://jinja.palletsprojects.com/) template code associated with a particular object type. From the objects list in the NetBox UI, a user can select any of the created export templates to export the objects according to the template logic.
An export template doesn't have to render CSV data: Its output can be in any character-based format. For example, you might want to render data using tabs as delimiters, or even create DNS address records directly from the IP addresses list. Export templates are a great way to get the data you need in the format you need quickly.
To learn more about this feature, check out the [export template documentation](../customization/export-templates.md).
## Reports
NetBox administrators can install custom Python scripts, known as _reports_, which run within NetBox and can be executed and analyzed within the NetBox UI. Reports are a great way to evaluate NetBox objects against a set of arbitrary rules. For example, you could write a report to check that every router has a loopback interface with an IP address assigned, or that every site has a minimum set of VLANs defined.
When a report runs, its logs messages pertaining to the operations being performed, and will ultimately result in either a pass or fail. Reports can be executed via the UI, REST API, or CLI (as a management command). They can be run immediately or scheduled to run at a future time.
To learn more about this feature, check out the [documentation for reports](../customization/reports.md).
## Custom Scripts
Custom scripts are similar to reports, but more powerful. A custom script can prompt the user for input via a form (or API data), and is built to do much more than just reporting. Custom scripts are generally used to automate tasks, such as the population of new objects in NetBox, or exchanging data with external systems. As with reports, they can be run via the UI, REST API, or CLI, and be scheduled to execute at a future time.
The complete Python environment is available to a custom script, including all of NetBox's internal mechanisms: There are no artificial restrictions on what a script can do. As such, custom scripting is considered an advanced feature and requires sufficient familiarity with Python and NetBox's data model.
To learn more about this feature, check out the [documentation for custom scripts](../customization/custom-scripts.md).

View File

@@ -0,0 +1,91 @@
# Devices & Cabling
At its heart, NetBox is a tool for modeling your network infrastructure, and the device object is pivotal to that function. A device can be any piece of physical hardware installed within your network, such as server, router, or switch, and may optionally be mounted within a rack. Within each device, resources such as network interfaces and console ports are modeled as discrete components, which may optionally be grouped into modules.
NetBox uses device types to represent unique real-world device models. This allows a user to define a device type and all its components once, and easily replicate an unlimited number of device instances from it.
```mermaid
flowchart TD
Manufacturer -.-> Platform & DeviceType & ModuleType
Manufacturer --> DeviceType & ModuleType
DeviceRole & Platform & DeviceType --> Device
Device & ModuleType ---> Module
Device & Module --> Interface & ConsolePort & PowerPort & ...
click Device "../../models/dcim/device/"
click DeviceRole "../../models/dcim/devicerole/"
click DeviceType "../../models/dcim/devicetype/"
click Manufacturer "../../models/dcim/manufacturer/"
click Module "../../models/dcim/module/"
click ModuleType "../../models/dcim/moduletype/"
click Platform "../../models/dcim/platform/"
```
## Manufacturers
A manufacturer generally represents an organization which produces hardware devices. These can be defined by users, however they should represent an actual entity rather than some abstract idea.
## Device Types
A device type represents a unique combination of manufacturer and hardware model which maps to discrete make and model of device which exists in the real world. Each device type typically has a number of components created on it, representing network interfaces, device bays, and so on. New devices of this type can then be created in NetBox, and any associated components will be automatically replicated from the device type. This avoids needing to tediously recreate components for each device as it is added in NetBox.
!!! tip "The Device Type Library"
While users are always free to create their own device types in NetBox, many find it convenient to draw from our [community library](https://github.com/netbox-community/devicetype-library) of pre-defined device types. This is possible because a particular make and model of device is applicable universally and never changes.
All the following can be modeled as components:
* Interfaces
* Console ports
* Console server ports
* Power ports
* Power outlets
* Pass-through ports (front and rear)
* Module bays (which house modules)
* Device bays (which house child devices)
For example, a Juniper EX4300-48T device type might have the following component templates defined:
* One template for a console port ("Console")
* Two templates for power ports ("PSU0" and "PSU1")
* 48 templates for 1GE interfaces ("ge-0/0/0" through "ge-0/0/47")
* Four templates for 10GE interfaces ("xe-0/2/0" through "xe-0/2/3")
Once component templates have been created, every new device that you create as an instance of this type will automatically be assigned each of the components listed above.
!!! note "Component Instantiation is not Retroactive"
The instantiation of components from a device type definition occurs only at the time of device creation. If you modify the components assigned to a device type, it will not affect devices which have already been created. This guards against any inadvertent changes to existing devices. However, you always have the option of adding, modifying, or deleting components on existing devices. (These changes can easily be applied to multiple devices at once using the bulk operations available in the UI.)
## Devices
Whereas a device type defines the make and model of a device, a device itself represents an actual piece of installed hardware somewhere in the real world. A device can be installed at a particular position within an equipment rack, or simply associated with a site (and optionally with a location within that site).
Each device can have an operational status, functional role, and software platform assigned. Device components are instantiated automatically from the assigned device type upon creation.
### Virtual Chassis
Sometimes it is necessary to model a set of physical devices as sharing a single management plane. Perhaps the most common example of such a scenario is stackable switches. These can be modeled as virtual chassis in NetBox, with one device acting as the chassis master and the rest as members. All components of member devices will appear on the master.
### Virtual Device Contexts
A virtual device context (VDC) is a logical partition within a device. Each VDC operates autonomously but shares a common pool of resources. Each interface can be assigned to one or more VDCs on its device.
## Module Types & Modules
Much like device types and devices, module types can instantiate discrete modules, which are hardware components installed within devices. Modules often have their own child components, which become available to the parent device. For example, when modeling a chassis-based switch with multiple line cards in NetBox, the chassis would be created (from a device type) as a device, and each of its line cards would be instantiated from a module type as a module installed in one of the device's module bays.
!!! tip "Device Bays vs. Module Bays"
What's the difference between device bays and module bays? Device bays are appropriate when the installed hardware has its own management plane, isolated from the parent device. A common example is a blade server chassis in which the blades share power but operate independently. In contrast, a module bay holds a module which does _not_ operate independently of its parent device, as with the chassis switch line card example mentioned above.
One especially nice feature of modules is that templated components can be automatically renamed according to the module bay into which the parent module is installed. For example, if we create a module type with interfaces named `Gi{module}/0/1-48` and install a module of this type into module bay 7 of a device, NetBox will create interfaces named `Gi7/0/1-48`.
## Cables
NetBox models cables as connections among certain types of device components and other objects. Each cable can be assigned a type, color, length, and label. NetBox will enforce basic sanity checks to prevent invalid connections. (For example, a network interface cannot be connected to a power outlet.)
Either end of a cable may terminate to multiple objects of the same type. For example, a network interface can be connected via a fiber optic cable to two discrete ports on a patch panel (each port attaching to an individual fiber strand in the patch cable).
```mermaid
flowchart LR
Interface --> Cable
Cable --> fp1[Front Port] & fp2[Front Port]
```

View File

@@ -0,0 +1,31 @@
# Event Rules
NetBox includes the ability to execute certain functions in response to internal object changes. These include:
* [Scripts](../customization/custom-scripts.md) execution
* [Webhooks](../integrations/webhooks.md) execution
For example, suppose you want to automatically configure a monitoring system to start monitoring a device when its operational status is changed to active, and remove it from monitoring for any other status. You can create a webhook in NetBox for the device model and craft its content and destination URL to effect the desired change on the receiving system. You can then associate an event rule with this webhook and the webhook will be sent automatically by NetBox whenever the configured constraints are met.
Each event must be associated with at least one NetBox object type and at least one event (e.g. create, update, or delete).
## Conditional Event Rules
An event rule may include a set of conditional logic expressed in JSON used to control whether an event triggers for a specific object. For example, you may wish to trigger an event for devices only when the `status` field of an object is "active":
```json
{
"and": [
{
"attr": "status.value",
"value": "active"
}
]
}
```
For more detail, see the reference documentation for NetBox's [conditional logic](../reference/conditions.md).
## Event Rule Processing
When a change is detected, any resulting events are placed into a Redis queue for processing. This allows the user's request to complete without needing to wait for the outgoing event(s) to be processed. The events are then extracted from the queue by the `rqworker` process. The current event queue and any failed events can be inspected in the admin UI under System > Background Tasks.

View File

@@ -0,0 +1,66 @@
# Facilities
From global regions down to individual equipment racks, NetBox allows you to model your network's entire presence. This is accomplished through the use of several purpose-built models. The graph below illustrates these models and their relationships.
```mermaid
flowchart TD
Region --> Region
SiteGroup --> SiteGroup
Region & SiteGroup --> Site
Site --> Location & Device
Location --> Location
Location --> Rack & Device
Rack --> Device
Site --> Rack
RackRole --> Rack
click Device "../../models/dcim/device/"
click Location "../../models/dcim/location/"
click Rack "../../models/dcim/rack/"
click RackRole "../../models/dcim/rackrole/"
click Region "../../models/dcim/region/"
click Site "../../models/dcim/site/"
click SiteGroup "../../models/dcim/sitegroup/"
```
## Regions
Regions represent geographic domains in which your network or its customers have a presence. These are typically used to model countries, states, and cities, although NetBox does not prescribe any precise uses and your needs may differ.
Regions are self-nesting, so you can define child regions within a parent, and grandchildren within each child. For example, you might create a hierarchy like this:
* Europe
* France
* Germany
* Spain
* North America
* Canada
* United States
* California
* New York
* Texas
Regions will always be listed alphabetically by name within each parent, and there is no maximum depth for the hierarchy.
## Site Groups
Like regions, site groups can be arranged in a recursive hierarchy for grouping sites. However, whereas regions are intended for geographic organization, site groups may be used for functional grouping. For example, you might classify sites as corporate, branch, or customer sites in addition to where they are physically located.
The use of both regions and site groups affords to independent but complementary dimensions across which sites can be organized.
## Sites
A site typically represents a building within a region and/or site group. Each site is assigned an operational status (e.g. active or planned), and can have a discrete mailing address and GPS coordinates assigned to it.
## Locations
A location can be any logical subdivision within a building, such as a floor or room. Like regions and site groups, locations can be nested into a self-recursive hierarchy for maximum flexibility. And like sites, each location has an operational status assigned to it.
## Racks
Finally, NetBox models each equipment rack as a discrete object within a site and location. These are physical objects into which devices are installed. Each rack can be assigned an operational status, type, facility ID, and other attributes related to inventory tracking. Each rack also must define a height (in rack units) and width, and may optionally specify its physical dimensions.
Each rack must be associated to a site, but the assignment to a location within that site is optional. Users can also create custom roles to which racks can be assigned. NetBox supports tracking rack space in half-unit increments, so it's possible to mount devices at e.g. position 2.5 within a rack.
!!! tip "Devices"
You'll notice in the diagram above that a device can be installed within a site, location, or rack. This approach affords plenty of flexibility as not all sites need to define child locations, and not all devices reside in racks.

69
docs/features/ipam.md Normal file
View File

@@ -0,0 +1,69 @@
# IP Address Management
IP address management (IPAM) is one of NetBox's core features. It supports full parity for IP4 and IPv6, advanced VRF assignment, automatic hierarchy formation, and much more.
## IP Hierarchy
NetBox employs several object types to represent a hierarchy of IP resources:
* **Aggregate** - A prefix which represents the root of an addressing hierarchy. This is typically a large swath of public or private address space allocated for use by your organization. Each aggregate is assigned to an authoritative RIR.
* **Prefix** - A subnet defined within an aggregate. Prefixes extend the hierarchy by nesting within one another. (For example, 192.168.123.0/24 will appear within 192.168.0.0/16.) Each prefix can be assigned a functional role as well as an operational status.
* **IP Range** - An arbitrary range of individual IP addresses within a prefix, all sharing the same mask. Ranges are commonly affiliated with DHCP scopes, but can be used for any similar purpose.
* **IP Address** - An individual IP address along with its subnet mask, automatically arranged beneath its parent prefix.
```mermaid
flowchart TD
RIR --> Aggregate
Aggregate & Role --> Prefix
Prefix --> Prefix
Prefix --> IPRange & IPAddress
click Aggregate "../../models/ipam/aggregate/"
click IPAddress "../../models/ipam/ipaddress/"
click IPRange "../../models/ipam/iprange/"
click Prefix "../../models/ipam/prefix/"
click RIR "../../models/ipam/rir/"
click Role "../../models/ipam/role/"
```
!!! tip "Automatic Hierarchies"
IP objects in NetBox never need to be manually assigned to the parent objects. The construction of hierarchies is handled automatically by the application according to the inherent rules of IP addressing.
An example hierarchy might look like this:
* 100.64.0.0/10 (aggregate)
* 100.64.0.0/20 (prefix)
* 100.64.16.0/20 (prefix)
* 100.64.16.0/24 (prefix)
* 100.64.16.1/24 (address)
* 100.64.16.2/24 (address)
* 100.64.16.3/24 (address)
* 100.64.19.0/24 (prefix)
* 100.64.32.0/20 (prefix)
* 100.64.32.1/24 (address)
* 100.64.32.10-99/24 (range)
## Utilization Stats
The utilization rate for each prefix is calculated automatically depending on its status. _Container_ prefixes are those which house child prefixes; their utilization rate is determined based on how much of their available IP space is consumed by child prefixes. The utilization rate for any other type of prefix is determined by the aggregate usage of any child IP addresses and/or ranges defined.
Similarly, utilization rates for aggregates is determined based on the space consumed by their child prefixes.
## VRF Tracking
NetBox supports the modeling of discrete virtual routing and forwarding (VRF) instances to represent multiple routing tables, including those with overlapping address space. Each type of IP object within an aggregate - prefix, IP range, and IP address - can be assigned to a particular VRF. Consequently, each VRF maintains its own isolated IP hierarchy. This makes it very easy to track overlapping IP space.
VRF modeling in NetBox very closely follows what you find in real-world network configurations, with each VRF assigned a standards-compliant route distinguisher. You can even create route targets to manage the import and export of routing information among VRFs.
!!! tip "Enforcing Unique IP Space"
Each VRF can be independently configured to permit or prohibit duplicate IP objects. For example, a VRF which has been configured to enforce unique IP space will not allow the creation of two 192.0.2.0/24 prefixes. The ability to toggle this restriction per VRF affords the user maximum flexibility in modeling their IP space.
## AS Numbers
An often overlooked component of IPAM, NetBox also tracks autonomous system (AS) numbers and their assignment to sites. Both 16- and 32-bit AS numbers are supported, and like aggregates each ASN is assigned to an authoritative RIR.
## Service Mapping
NetBox models network applications as discrete service objects associated with devices and/or virtual machines, and optionally with specific IP addresses attached to those parent objects. These can be used to catalog the applications running on your network for reference by other objects or integrated tools.
To model services in NetBox, begin by creating a service template defining the name, protocol, and port number(s) on which the service listens. This template can then be easily instantiated to "attach" new services to a device or virtual machine. It's also possible to create new services by hand, without a template, however this approach can be tedious.

View File

@@ -0,0 +1,5 @@
# Journaling
All primary and organizational models in NetBox support journaling. A journal is a collection of human-generated notes and comments about an object maintained for historical context. It supplements NetBox's change log to provide additional information about why changes have been made or to convey events which occur outside NetBox. Unlike the change log, in which records typically expire after a configurable period of time, journal entries persist for the life of their associated object.
Each journal entry has a selectable kind (info, success, warning, or danger) and a user-populated `comments` field. Each entry automatically records the date, time, and associated user upon being created.

View File

@@ -0,0 +1,5 @@
# L2VPN & Overlay
L2VPN and overlay networks, such as VXLAN and EVPN, can be defined in NetBox and tied to interfaces and VLANs. This allows for easy tracking of overlay assets and their relationships with underlay resources.
Each L2VPN instance has a type and optional unique identifier. Like VRFs, L2VPNs can also have import and export route targets assigned to them. Terminations can then be created to assign VLANs and/or device and virtual machine interfaces to the overlay.

View File

@@ -0,0 +1,20 @@
# Power Tracking
As part of its DCIM feature set, NetBox supports modeling facility power as discrete power panels and feeds. These are most commonly used to document power distribution within a data center, but can serve more traditional environments as well.
![Power distribution model](../media/power_distribution.png)
## Power Panels
A power panel is the furthest upstream power element modeled in NetBox. It typically represents a power distribution panel (or breaker panel) where facility power is split into multiple discrete circuits, which are modeled as feeds.
Each power panel is associated with a site, and may optionally be associated with a particular location within that site. There is no limit to how many power feeds a single panel can supply, however both of these object types should map to real-world objects.
## Power Feeds
A power feed represents a discrete power circuit originating from an upstream power panel. Each power feed can be assigned a name, operational status, and various electrical characteristics such as supply (AC or DC), voltage, amperage, and so on.
A device power port can be connected to a power feed via a cable. Only one port can be connected to a feed: Where multiple devices draw power from the same feed, a power distribution unit (PDU) must be modeled as an individual device mapping a power port to multiple power outlets to which the downstream devices can connect (as in the example above).
!!! tip "Primary and Redundant Power"
Each power feed in NetBox is assigned a type: primary or redundant. This allows easily modeling redundant power distribution topologies. In scenarios involving only a single, non-redundant power supply, mark all power feeds as primary.

30
docs/features/search.md Normal file
View File

@@ -0,0 +1,30 @@
# Search
## Global Search
NetBox includes a powerful global search engine, providing a single convenient interface to search across its complex data model. Relevant fields on each model are indexed according to their precedence, so that the most relevant results are returned first. When objects are created or modified, the search index is updated immediately, ensuring real-time accuracy.
When entering a search query, the user can choose a specific lookup type: exact match, partial match, etc. When a partial match is found, the matching portion of the applicable field value is included with each result so that the user can easily determine its relevance.
Custom fields defined by NetBox administrators are also included in search results if configured with a search weight. Additionally, NetBox plugins can register their own custom models for inclusion alongside core models.
!!! note
NetBox does not index any static choice field's (including custom fields of type "Selection" or "Multiple selection").
## Saved Filters
Each type of object in NetBox is accompanied by an extensive set of filters, each tied to a specific attribute, which enable the creation of complex queries. Often you'll find that certain queries are used routinely to apply some set of prescribed conditions to a query. Once a set of filters has been applied, NetBox offers the option to save it for future use.
For example, suppose you often need to locate all planned devices of a certain type within a region. The applicable filters can be applied and then saved as custom named filter for reuse, such that
```
?status=planned&device_type_id=78&region_id=12
```
becomes
```
?filter=my-custom-filter
```
These saved filters can be used both within the UI and for API queries.

View File

@@ -0,0 +1,27 @@
# Synchronized Data
Several models in NetBox support the automatic synchronization of local data from a designated remote source. For example, [configuration templates](./configuration-rendering.md) defined in NetBox can source their content from text files stored in a remote git repository. This is accomplished using the core [data source](../models/core/datasource.md) and [data file](../models/core/datafile.md) models.
To enable remote data synchronization, the NetBox administrator first designates one or more remote data sources. NetBox currently supports the following source types:
* Git repository
* Amazon S3 bucket (or compatible product)
* Local disk path
(Local disk paths are considered "remote" in this context as they exist outside NetBox's database. These paths could also be mapped to external network shares.)
!!! info
Data backends which connect to external sources typically require the installation of one or more supporting Python libraries. The Git backend requires the [`dulwich`](https://www.dulwich.io/) package, and the S3 backend requires the [`boto3`](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html) package. These must be installed within NetBox's environment to enable these backends.
Each type of remote source has its own configuration parameters. For instance, a git source will ask the user to specify a branch and authentication credentials. Once the source has been created, a synchronization job is run to automatically replicate remote files in the local database.
The following NetBox models can be associated with replicated data files:
* Config contexts
* Config templates
* Export templates
Once a data has been designated for a local instance, its data will be replaced with the content of the replicated file. When the replicated file is updated in the future (via synchronization jobs), the local instance will be flagged as having out-of-date data. A user can then synchronize these objects individually or in bulk to effect the update. This two-stage process ensures that automated synchronization tasks do not immediately affect production data.
!!! note "Permissions"
A user must be assigned the `core.sync_datasource` permission in order to synchronize local files from a remote data source.

38
docs/features/tenancy.md Normal file
View File

@@ -0,0 +1,38 @@
# Tenancy
Most core objects within NetBox's data model support _tenancy_. This is the association of an object with a particular tenant to convey ownership or dependency. For example, an enterprise might represent its internal business units as tenants, whereas a managed services provider might create a tenant in NetBox to represent each of its customers.
```mermaid
flowchart TD
TenantGroup --> TenantGroup & Tenant
Tenant --> Site & Device & Prefix & Circuit & ...
click Tenant "../../models/tenancy/tenant/"
click TenantGroup "../../models/tenancy/tenantgroup/"
```
## Tenant Groups
Tenants can be grouped by any logic that your use case demands, and groups can be nested recursively for maximum flexibility. For example, You might define a parent "Customers" group with child groups "Current" and "Past" within it. A tenant can be assigned to a group at any level within the hierarchy.
## Tenants
Typically, the tenant model is used to represent a customer or internal organization, however it can be used for whatever purpose meets your needs.
Most core objects within NetBox can be assigned to particular tenant, so this model provides a very convenient way to correlate ownership across object types. For example, each of your customers might have its own racks, devices, IP addresses, circuits and so on: These can all be easily tracked via tenant assignment.
The following objects can be assigned to tenants:
* Sites
* Racks
* Rack reservations
* Devices
* VRFs
* Prefixes
* IP addresses
* VLANs
* Circuits
* Clusters
* Virtual machines
Tenant assignment is used to signify the ownership of an object in NetBox. As such, each object may only be owned by a single tenant. For example, if you have a firewall dedicated to a particular customer, you would assign it to the tenant which represents that customer. However, if the firewall serves multiple customers, it doesn't *belong* to any particular customer, so tenant assignment would not be appropriate.

View File

@@ -0,0 +1,26 @@
# Virtualization
Virtual machines and clusters can be modeled in NetBox alongside physical infrastructure. IP addresses and other resources are assigned to these objects just like physical objects, providing a seamless integration between physical and virtual networks.
```mermaid
flowchart TD
ClusterGroup & ClusterType --> Cluster
Cluster --> VirtualMachine
Platform --> VirtualMachine
VirtualMachine --> VMInterface
click Cluster "../../models/virtualization/cluster/"
click ClusterGroup "../../models/virtualization/clustergroup/"
click ClusterType "../../models/virtualization/clustertype/"
click Platform "../../models/dcim/platform/"
click VirtualMachine "../../models/virtualization/virtualmachine/"
click VMInterface "../../models/virtualization/vminterface/"
```
## Clusters
A cluster is one or more physical host devices on which virtual machines can run. Each cluster must have a type and operational status, and may be assigned to a group. (Both types and groups are user-defined.) Each cluster may designate one or more devices as hosts, however this is optional.
## Virtual Machines
A virtual machine is a virtualized compute instance. These behave in NetBox very similarly to device objects, but without any physical attributes. For example, a VM may have interfaces assigned to it with IP addresses and VLANs, however its interfaces cannot be connected via cables (because they are virtual). Each VM may also define its compute, memory, and storage resources as well.

View File

@@ -0,0 +1,24 @@
# VLAN Management
Complementing its IPAM capabilities, NetBox also tracks VLAN information to assist with layer two network configurations. VLANs are defined per IEEE 802.1Q and related standards, and can be assigned to groups and functional roles.
```mermaid
flowchart TD
VLANGroup & Role --> VLAN
click Role "../../models/ipam/role/"
click VLAN "../../models/ipam/vlan/"
click VLANGroup "../../models/ipam/vlangroup/"
```
## VLAN Groups
A VLAN group is a collection of VLANs defined within a particular scope. Each VLAN group can be associated with a particular site, location, rack, or similar object to indicate its domain, and designates a minimum and maximum VLAN ID within the group. (By default, these are the standard minimum and maximum values of 1 and 4094, respectively.)
Within a group, each VLAN must have a unique ID and name. There is no limit to how many groups can be created per scope.
## VLANs
NetBox models VLANs according to their definition under IEEE 802.1Q, with a 12-bit VLAN ID and a name. Each VLAN also has an operational status, and may be assigned a function role, just like prefixes. Each VLAN can be assigned to a VLAN group or site to convey the domain in which the VLAN exists.
Once defined, VLANs can be associated with device and virtual machine interfaces. Each interface can be assigned an 802.1Q mode (access or tagged), and the relevant VLANs can be applied as tagged or untagged.

Some files were not shown because too many files have changed in this diff Show More