Commit Graph

3883 Commits

Author SHA1 Message Date
Jeremy Stretch
685264c757 Merge branch 'develop' into feature 2024-12-30 12:30:34 -05:00
Jeremy Stretch
28eada13d3 Release v4.1.10 2024-12-23 10:59:52 -05:00
Jeremy Stretch
e396097f3c Release v4.1.9 2024-12-17 15:59:39 -05:00
Jeremy Stretch
39ca3ce571 Merge branch 'develop' into feature 2024-12-12 12:13:45 -05:00
Jeremy Stretch
e63fe23af8 Release v4.1.8 2024-12-12 10:37:21 -05:00
Jeremy Stretch
8e427e57ea
Closes #18211: Enable dynamic registration of request processors (#18212)
* Closes #18211: Enable dynamic registration of request processors

* Tweak syntax
2024-12-12 08:36:56 -05:00
Jeremy Stretch
ce365dab0a Release v4.2-beta1 2024-12-02 10:00:56 -05:00
Jeremy Stretch
678d89d406 Update documentation for v4.2 2024-11-26 12:38:29 -05:00
Jeremy Stretch
99339501cd Merge branch 'develop' into feature 2024-11-26 12:23:13 -05:00
Jeremy Stretch
3ee951b0d0 Fix missing/incorrect documentation links 2024-11-26 10:45:30 -05:00
Jeremy Stretch
64e56cd7c8 #16971: Improve example in documentation 2024-11-26 10:35:30 -05:00
Jeremy Stretch
24b76792a9 Closed #18091: Include summary for v4.1 release 2024-11-25 10:32:03 -05:00
Jeremy Stretch
14d769a501 Draft v4.2 release notes 2024-11-22 13:39:52 -05:00
Jeremy Stretch
f08e36e538 Merge branch 'develop' into feature 2024-11-21 14:00:57 -05:00
Jeremy Stretch
3b3990a4e6 Release v4.1.7 2024-11-21 13:36:20 -05:00
Jeremy Stretch
a0b4b0afe0
Closes #18023: Employ register_model_view() for list views (#18029)
* Extend register_model_view() to enable registering list views

* Register circuits list views with register_model_view()

* Register core list views with register_model_view()

* Fix bulk_edit & bulk_delete URL paths

* Register dcim list views with register_model_view() (WIP)

* Register dcim list views with register_model_view()

* Register extras list views with register_model_view()

* Register ipam list views with register_model_view()

* Register tenancy list views with register_model_view()

* Register users list views with register_model_view()

* Register virtualization list views with register_model_view()

* Register vpn list views with register_model_view()

* Register wireless list views with register_model_view()

* Add change note for register_model_view()
2024-11-20 15:54:37 -05:00
Jeremy Stretch
d2168b107f
Closes #13086: Virtual circuits (#17933)
* WIP

* Add API tests

* Add remaining tests

* Add model docs

* Show virtual circuit connections on interfaces

* Misc cleanup per PR feedback

* Renumber migration

* Support nested terminations for virtual circuit bulk import
2024-11-19 10:58:39 -05:00
bctiemann
353214098b
4867 multiple mac addresses (#17902)
* Create MACAddress model and migrations to convert existing .mac_address fields to standalone objects

* Add migrations

* All views/filtering working and documentation done; no unit tests yet

* Redo migrations following VLAN Translation

* Remove mac_address filter fields and add table columns for device/vm

* Remove unnecessary "bulk rename"

* Fix filterset tests for Device

* Fix filterset tests for Interface

* Fix tests on single-object forms

* Fix serializer tests

* Fix filterset tests for VMInterface

* Fix filterset tests for Device and VirtualMachine

* Move new field check into lookup_map iteration

* Fix general MACAddress filter tests

* Add GraphQL types/filters/schema

* Fix bulk edit/create tests (bulk editing Interfaces will be unsupported because of inheritance from ComponentBulkEditForm)

* Make mac_address read_only on InterfaceSerializer/VMInterfaceSerializer

* Undo unrelated work

* Cleanup unused IPAddress derived stuff

* API endpoints

* Add serializer objects to interface serializers

* Clean up unnecessary bulk create forms/views/routes

* Add SearchIndex and adjust indexable fields for Interface and VMInterface

* Reorganize MACAddress classes out of association with DeviceComponents

* Move MACAddressSerializer

* Enforce saving only a single is_primary MACAddress per interface/vminterface

* Perform is_primary validation on MACAddress model and just check if one already exists for the interface

* Remove form-level validation

* Fix check for current is_primary setting when reassigning

* Model cleanup

* Documentation notes and cleanup

* Simplify serializer and add ip_addresses

* Add to VMInterfaceSerializer too

* Style cleanup

* Standardize "MAC Address" instead of "MAC"

* Remove unused views

* Add is_primary field for bulk edit

* HTML cleanup and add copy-to-clipboard button

* Remove mac_address from Interface and VMInterface bulk-edit forms

* Add device and VM filtering

* Use combined assigned_object_parent in table to match structure of IPAddressTable

* Add GFK fields to MACAddressSerializer

* Reorganize "Addressing" sections to remove from proximity to "Device Components" and related groupings

* Clean up migrations

* Misc cleanup

* Add filterset test

* Remove mac_address field from interface forms

* Designate primary MAC address via a ForeignKey on the interface models

* Add serializer fields for primary_mac_address

* Update docs

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-18 15:11:24 -05:00
Joel L. McGuire
0ff0edd477 fix typo in #17970 2024-11-14 08:06:52 -05:00
Jeremy Stretch
256d69d08b Update changelog 2024-11-12 15:56:29 -05:00
Arthur Hanson
812ce8471a
10711 Add Scope to WirelessLAN (#17877)
* 7699 Add Scope to Cluster

* 7699 Serializer

* 7699 filterset

* 7699 bulk_edit

* 7699 bulk_import

* 7699 model_form

* 7699 graphql, tables

* 7699 fixes

* 7699 fixes

* 7699 fixes

* 7699 fixes

* 7699 fix tests

* 7699 fix graphql tests for clusters reference

* 7699 fix dcim tests

* 7699 fix ipam tests

* 7699 fix tests

* 7699 use mixin for model

* 7699 change mixin name

* 7699 scope form

* 7699 scope form

* 7699 scoped form, fitlerset

* 7699 review changes

* 7699 move ScopedFilterset

* 7699 move CachedScopeMixin

* 7699 review changes

* 10711 Add Scope to WirelessLAN

* 10711 Add Scope to WirelessLAN

* 10711 Add Scope to WirelessLAN

* 10711 Add Scope to WirelessLAN

* 10711 Add Scope to WirelessLAN

* 7699 review changes

* 7699 refactor mixins

* 7699 _sitegroup -> _site_group

* 7699 update docstring

* fix model

* remove old constants, update filtersets

* 10711 fix GraphQL

* 10711 fix API

* 10711 add tests

* 10711 review changes

* 10711 add tests

* 10711 add scope to detail template

* 10711 add api test

* Extend CSV test data

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-07 10:28:02 -05:00
Jeremy Stretch
6035ad139a
Closes #16903: Update release process to use Transifex CLI client (#17916)
* Closes #16903: Update release process to use Transifex CLI client

* Add token environment variable to tx command
2024-11-07 08:57:02 -05:00
Alexander Haase
4bba92617d
Closes #16971: Add system jobs (#17716)
* Fix check for existing jobs

If a job is to be enqueued once and no specific scheduled time is
specified, any scheduled time of existing jobs will be valid. Only if a
specific scheduled time is specified for 'enqueue_once()' can it be
evaluated.

* Allow system jobs to be registered

A new registry key allows background system jobs to be registered and
automatically scheduled when rqworker starts.

* Test scheduling of system jobs

* Fix plugins scheduled job documentation

The documentation reflected a non-production state of the JobRunner
framework left over from development. Now a more practical example
demonstrates the usage.

* Allow plugins to register system jobs

* Rename system job metadata

To clarify which meta-attributes belong to system jobs, each of them is
now prefixed with 'system_'.

* Add predefined job interval choices

* Remove 'system_enabled' JobRunner attribute

Previously, the 'system_enabled' attribute was used to control whether a
job should run or not. However, this can also be accomplished by
evaluating the job's interval.

* Fix test

* Use a decorator to register system jobs

* Specify interval when registering system job

* Update documentation

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-01 14:56:08 -04:00
Arthur Hanson
6dc75d8db1
7699 Add Scope to Cluster (#17848)
* 7699 Add Scope to Cluster

* 7699 Serializer

* 7699 filterset

* 7699 bulk_edit

* 7699 bulk_import

* 7699 model_form

* 7699 graphql, tables

* 7699 fixes

* 7699 fixes

* 7699 fixes

* 7699 fixes

* 7699 fix tests

* 7699 fix graphql tests for clusters reference

* 7699 fix dcim tests

* 7699 fix ipam tests

* 7699 fix tests

* 7699 use mixin for model

* 7699 change mixin name

* 7699 scope form

* 7699 scope form

* 7699 scoped form, fitlerset

* 7699 review changes

* 7699 move ScopedFilterset

* 7699 move CachedScopeMixin

* 7699 review changes

* 7699 review changes

* 7699 refactor mixins

* 7699 _sitegroup -> _site_group

* 7699 update docstring

* Misc cleanup

* Update migrations

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-01 14:18:23 -04:00
Jeremy Stretch
8767fd8186
Closes #13428: Q-in-Q VLANs (#17822)
* Initial work on #13428 (QinQ)

* Misc cleanup; add tests for Q-in-Q fields

* Address PR feedback
2024-10-31 14:17:06 -04:00
Jeremy Stretch
74315080a3 Release v4.1.6 2024-10-31 13:31:11 -04:00
Arthur Hanson
a8eb455f3e
9604 Add Termination to CircuitTermination (#17821)
* 9604 add scope type to CircuitTermination

* 9604 add scope type to CircuitTermination

* 9604 add scope type to CircuitTermination

* 9604 model_forms

* 9604 form filtersets

* 9604 form bulk_import

* 9604 form bulk_edit

* 9604 serializers

* 9604 graphql

* 9604 tests and detail template

* 9604 fix migration merge

* 9604 fix tests

* 9604 fix tests

* 9604 fix table

* 9604 updates

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* 9604 remove provider_network

* 9604 fix tests

* 9604 fix tests

* 9604 fix forms

* 9604 review changes

* 9604 scope->termination

* 9604 fix _circuit_terminations

* 9604 fix _circuit_terminations

* 9604 sitegroup -> site_group

* 9604 update docs

* 9604 fix form termination side reference

* Misc cleanup

* Fix terminations in circuits table

* Fix missing imports

* Clean up termination attrs display

* Add termination & type to CircuitTerminationTable

* Update cable tracing logic

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-31 09:55:08 -04:00
bctiemann
f74a9a1c76
Fixes: #7336 - VLAN Translation (#17745)
* VLANTranslationPolicy and VLANTranslationRule models and all associated UI classes

* Change VLANTranslationPolicy to a PrimaryModel and make name unique

* Add serializer classes to InterfaceSerializer

* Remake migrations

* Add GraphQL typing

* Skip tagged models in test

* Missing migration

* Remove get_absolute_url methods

* Remove package-lock.json

* Rebuild migration and add constraints and field options

* Rebuild migrations

* Use DynamicModelChoiceField for policy field

* Make vlan_translation_policy fields on filtersets more consistent with existing __name convention

* Add vlan_translation_table to VMInterface detail page

* Add vlan_translation_policy to VMInterfaceSerializer

* Move vlan_translation_policy fields to model and filterset mixins

* Protect in-use policies against deletion

* Add vlan_translation_policy to fields in VMInterfaceSerializer

* Cleanup indentation

* Remove unnecessary ordering column

* Rebuild migrations

* Search methods and registration

* Ensure 'id' column is present by default

* Add graphql types/filters/schema for VLANTranslationRule

* Filterset tests

* View tests

* API and viewset tests (incomplete)

* Add tags to VLANTranslationRuleForm

* Complete viewset tests for VLANTranslationRule

* Make VLANTranslationRule.policy nullable (but still required)

* Revert "Make VLANTranslationRule.policy nullable (but still required)"

This reverts commit 4c1bb437ef.

* Revert nullability

* Explicitly prefetch policy in graphql

* Documentation of new and affected models

* Add note about select_related in graphql

* Rework policy/rule documentation

* Move vlan_translation_policy into 802.1Q Switching fieldset

* Remove redundant InterfaceVLANTranslationTable

* Conditionally include vlan_translation_table in interface.html and vminterface.html

* Add description field to VLANTranslationRule

* Define vlan_translation_table conditionally

* Add policy (name) filter to VLANTranslationRuleFilterSet

* Revert changes to adding-models.md (moved to another PR)

* Dynamic table for linked rules in vlantranslationpolicy.html

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-30 17:09:46 -04:00
Brian Tiemann
572aad0e20 Update adding-models.md to reflect changes to get_absolute_url 2024-10-29 09:15:24 -04:00
Arthur Hanson
99904c1518 Merge branch 'develop' into feature 2024-10-28 14:29:48 -07:00
Jeremy Stretch
813347121e Release v4.1.5 2024-10-28 16:59:44 -04:00
Jeremy Stretch
5940f5fa61 Changelog for #17374, #17635, #17774, #17802, #17789 2024-10-21 10:35:59 -04:00
Jeremy Stretch
c78da79ce6 Merge branch 'develop' into feature 2024-10-18 13:18:11 -04:00
Arthur Hanson
b9c6def8ab
15093 Allow plugins to register events pipeline (#17717)
* 15093 add events_pipeline registration to plugins

* 15093 use list

* 15093 add documentation

* Update docs/configuration/index.md

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

* Update docs/configuration/miscellaneous.md

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

* 15093 review changes

* 15093 review changes

* Formatting & readability

* 15093 review changes

* 15093 add test

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-18 12:47:16 -04:00
bctiemann
d8c5147e02
Fixes: #17732 - Add a background-color to img elements in docs to ensure readability in dark mode (#17790)
* Add a background-color to img elements in docs to ensure readability in dark mode

* Limit style changes to those within CMS content blocks; update colors of main netbox_logo.svg

* Add a white stroke to the main logo

* Add light & dark mode versions of the NetBox logo

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-18 10:47:05 -04:00
Alexander Haase
ac9f561372 Fix social auth for Entra ID
Previously Azure AD was renamed to Entra ID. However, as django social
auth didn't change its API, just the display names must be changed but
not the API names.
2024-10-18 10:45:34 -04:00
Ian Bishop
e6f41f73f7
Add instructions for authenticating using Google oauth2 (#17527)
* Add instructions for authenticating using Google oauth2

Signed-off-by: Ian Bishop <151477169+ianb-mp@users.noreply.github.com>

* Add navigation link

* Misc cleanup

---------

Signed-off-by: Ian Bishop <151477169+ianb-mp@users.noreply.github.com>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-18 09:36:29 -04:00
Jeremy Stretch
33bc1320c4 Changelog for #177109, #17740, #17749, #17754, #17759 2024-10-16 16:57:10 -04:00
Arthur Hanson
35307d213f 17468 add warning to documentation about overriding custom script properties 2024-10-16 12:57:26 -04:00
Jeremy Stretch
e370cadcef Merge branch 'develop' into feature 2024-10-16 08:13:43 -04:00
Jeremy Stretch
d2cbdfe7d7 Release v4.1.4 2024-10-15 13:42:25 -04:00
Jeremy Stretch
dfce55ceff Changelog for #17614, #17644, #17713 2024-10-11 16:16:07 -04:00
Jeremy Stretch
a964645c0a Closes #16248: Replace git commit hook script with pre-commit 2024-10-11 15:55:02 -04:00
Jeremy Stretch
256b5dc676 Merge branch 'develop' into feature 2024-10-11 11:29:36 -04:00
Jeremy Stretch
7ac6dff96d
Closes #17733: Replace pycodestyle with ruff (#17734)
* Resolve F541 errors

* Resolve F841 errors

* Resolve F811 errors

* Resolve F901 errors

* Resolve E714 errors

* Ignore F821 errors for GraphQL mixins

* Replace pycodestyle with ruff

* Move ignores to ruff.toml
2024-10-11 07:43:46 -04:00
Arthur Hanson
65687851fe
16547 Add distance to Circuit (#17629)
* 16547 Add distance to Circuit

* 16547 fix test cases

* 16547 fix test cases

* 16547 add distance to API, forms, tables

* 16547 fixes

* 16547 fixes

* 16547 review changes

* 16547 review changes

* Clean up DistanceColumn

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-10 14:37:33 -04:00
Jeremy Stretch
bc597c3c5d Closes #17472: Deprecate the staged changes API 2024-10-10 14:32:39 -04:00
Jeremy Stretch
8e636c5427 Changelog for #17216, #17562, #17636 2024-10-09 16:07:13 -04:00
Craig Askings
2172ddde61
Add EVPN-VPWS to L2VPNTypeChoices (#17694)
* Add EVPN-VPWS to the availbable L2VPN Connection Types

* Updated documentation to reference the new L2VPN type.
2024-10-09 10:28:53 -04:00
Jeremy Stretch
ebd6c59934 Changelog for #17079, #17566, #17648, #17655 2024-10-07 10:53:27 -04:00
Jeremy Stretch
74727786c1 Update changelog 2024-10-07 08:03:14 -04:00
Alexander Haase
bfcae8088d Rename Microsoft Azure AD to Entra ID
Occurrences of the old term have been replaced by the new term. However,
the documentation still needs some work to reflect the new Entra ID
screenshots and terminology.
2024-10-03 13:25:48 -04:00
Jeremy Stretch
6a6154f02f Release v4.1.3 2024-10-02 14:41:09 +01:00
Jeremy Stretch
5b2f2e1da6 Remove old logos 2024-10-02 14:16:39 +01:00
Arthur Hanson
2c68aca344
17195 Add color to PowerOutlet (#17623)
* 17195 Add color to PowerOutlet

* 17195 Add color to PowerOutlet

* Reorder serializer fields

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-02 08:51:41 -04:00
Arthur Hanson
92d8aa583a
Add support for socks connection to Git backend (#17640)
* Add support for socks connection to Git backend

* cleanup socks detection

* add documentation for installing python_socks

* dont need lower()

* cleanup

* refactor Socks to utilities

* fix imports

* fix missing comma

* Update docs/features/synchronized-data.md

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

* review feedback

* Update docs/features/synchronized-data.md

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

* review changes

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-01 12:11:44 -04:00
Arthur Hanson
8cd0a3215c
16783 Add status field to InventoryItem (#17627)
* 16783 Add status field to InventoryItem

* 16783 fix tests

* 16783 fix tests

* 16783 review changes
2024-09-30 18:26:14 -04:00
Jeremy Stretch
976f9310f9 Changelog for #17558 2024-09-30 14:59:39 -04:00
DM3740
5013a6c692
Fixes: #17612 : Update ASN types in asn.md (#17625)
* Update asn.md

There are no 64-bit AS Numbers - 16- and 32-bit only :
https://www.iana.org/assignments/as-numbers/as-numbers.xhtml

* Update docs/models/ipam/asn.md

Co-authored-by: bluikko <14869000+bluikko@users.noreply.github.com>

---------

Co-authored-by: bluikko <14869000+bluikko@users.noreply.github.com>
2024-09-27 16:20:49 -04:00
Arthur Hanson
c60a0f4f56
16136 remove Django Admin (#17619)
* 16136 remove Django Admin

* 16136 fix plugin test

* 16136 fix migrations

* Revert "16136 fix migrations"

This reverts commit 80296fa1ec.

* Remove obsolete admin module from dummy plugin

* Remove obsolete admin site configuration

* Remove unused import statement

* Remove obsolete admin module

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-09-27 08:33:02 -04:00
Jeremy Stretch
b4e181c015 Release v4.1.2 2024-09-26 16:13:57 -04:00
Jeremy Stretch
01db481bc3 Update changelog 2024-09-24 17:14:02 -04:00
Jeremy Stretch
dd0774d8d4 Update changelog 2024-09-24 09:23:14 -04:00
Jeremy Stretch
3000407a5f Closes #16669: Include a notice when rendering docs locally 2024-09-17 14:44:51 -04:00
Jeremy Stretch
18935687ae Release v4.1.1 2024-09-12 14:28:56 -04:00
Brian Tiemann
89604ceade Add a step to the release checklist documentation for testing migrations on all supported upgrade paths 2024-09-11 08:40:32 -04:00
Jeremy Stretch
ce38484bf3 Changelog for #16926, #17066, #17347, #17387, #17414 2024-09-10 09:31:46 -04:00
Arthur Hanson
ed1b8bc88d 16349 add warning to custom script docs 2024-09-05 12:52:16 -04:00
Jeremy Stretch
2a1710b82c Changelog for #17332, #17353, #17354, #17364 2024-09-04 17:05:24 -04:00
Jeremy Stretch
9cfb3bf24d Release v4.1.0 2024-09-03 14:45:28 -04:00
Jeremy Stretch
16dfafa35b Update changelog 2024-09-03 13:56:29 -04:00
Jeremy Stretch
39c5f57c1e Fix broken link 2024-09-03 13:36:39 -04:00
Jeremy Stretch
7c0bdf3fb8 #17289: Document new default configuration 2024-09-03 12:17:56 -04:00
Jeremy Stretch
a777850702 Merge branch 'develop' into feature 2024-09-03 11:59:59 -04:00
Jeremy Stretch
e174a8af09 Release v4.0.11 2024-09-03 10:33:47 -04:00
bctiemann
ce33e0bc0c
Fixes: #17320 - New screenshots for 4.1 UI (#17331)
* New screenshots for 4.1

* Remove footer info

* Add bookmarks to dashboard to match previous

* Reverse ordering of bookmarks

* Fix colors of cables in cable-trace.png

* New screenshots for 4.1

* Recapture screenshots with better rendering gradient

* Better sidebar on cable-trace.png
2024-09-03 09:03:41 -04:00
Jeremy Stretch
56f110c2a9
Closes #17288: Limit the number of aliases within a GraphQL API requests to 10 (#17329)
* Closes #17288: Limit the number of aliases within a GraphQL API request to 10

* Introduce GRAPHQL_MAX_ALIASES config parameter
2024-09-02 09:30:41 -04:00
Jeremy Stretch
b4dd57f3c7
#8198: Rename CustomField.validation_unique to unique (#17325)
* #8198: Rename CustomField.validation_unique to unique

* Update CustomField model documentation
2024-08-30 13:44:03 -04:00
Jeremy Stretch
6db29880cc Update changelog 2024-08-30 13:31:41 -04:00
Arthur Hanson
829bef041d
11969 remove airflow from racktype (#17324)
* 11969 remove airflow from racktype

* 11969 remove airflow from racktype

* 11969 update docs

* 11969 fix rack edit

* Rename migration

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-30 13:30:51 -04:00
Jeremy Stretch
af93b47f94 #17051: Tag ISOLATED_DEPLOYMENT as a v4.1 feature 2024-08-30 10:19:22 -04:00
Jeremy Stretch
10a74492f6 #17143: Update docs for nested serializer use 2024-08-30 10:18:29 -04:00
Jeremy Stretch
cdf2fdee83 #14692: Correct VirtualDisk model docs 2024-08-29 16:48:48 -04:00
Jeremy Stretch
db6246a437
#10500: Cleanup (#17305)
* Use MPTTColumn for module bays

* Fix return URLs

* Omit extraneous relationships from nested serializers

* Add note re: v4.1
2024-08-29 15:38:53 -04:00
Jeremy Stretch
6f7bf5baf4 Merge branch 'develop' into feature 2024-08-29 10:51:38 -04:00
Jeremy Stretch
97cd6b89fd Release v4.0.10 2024-08-29 09:25:58 -04:00
Jeremy Stretch
a9fd5bbf55 Fix broken intra-page links 2024-08-29 09:13:02 -04:00
Jeremy Stretch
e325a4b2e0 Update change log 2024-08-29 09:01:23 -04:00
Jeremy Stretch
c3276b7d2e Update changelog 2024-08-27 17:09:16 -04:00
Jeremy Stretch
263664ae52 Update changelog 2024-08-27 12:08:02 -04:00
Jeremy Stretch
ee0af15073 Update changelog 2024-08-26 15:41:12 -04:00
Arthur Hanson
3412139acc
17193 update logo in Readme (#17194)
* 17193 update logo in Readme

* 17193 update logo in Readme

* 17193 remove .png

* 17194 favicon, apple
2024-08-19 11:22:40 -04:00
Jeremy Stretch
8e70e3ad20 Update release checklist for v4.1 2024-08-15 12:59:44 -04:00
Jeremy Stretch
33e8e04281 Update change log 2024-08-15 12:36:53 -04:00
Jeremy Stretch
8b91fb8d2d Merge branch 'develop' into feature 2024-08-14 10:54:31 -04:00
Jeremy Stretch
370c1209f4 PRVB 2024-08-14 10:27:03 -04:00
Jeremy Stretch
f3f1aa3841 Release v4.0.9 2024-08-14 09:30:41 -04:00
Jeremy Stretch
8789aaaa39 Changelog for #16692, #17006, #17124, #17131, #17144 2024-08-13 16:12:58 -04:00
Jeremy Stretch
20967bf88d Changelog for #13459, #16176, #17038, #17064 2024-08-10 11:49:34 -04:00
Jeremy Stretch
23490d3336 Release v4.1-beta1 2024-08-05 13:34:05 -04:00
Arthur Hanson
796b9e84af
Closes #10500: Introduce support for nested modules (#16983)
* 10500 add ModularComponentModel

* 10500 add ModularComponentModel

* 10500 add to forms

* 10500 add to serializer, tables

* 10500 template

* 10500 add docs

* 10500 check recursion

* 10500 fix graphql

* 10500 fix conflicting migration from merge

* 10500 token resolution

* 10500 don't return reverse

* 10500 don't return reverse / optimize

* Add ModuleTypeModuleBaysView

* Fix replication of module bays on new modules

* Clean up tables & templates

* Adjust uniqueness constraints

* Correct URL

* Clean up docs

* Fix up serializers

* 10500 add filterset tests

* 10500 add nested validation to Module

* Misc cleanup

* 10500 ModuleBay recursion Test

* 10500 ModuleBay recursion Test

* 10500 ModuleBay recursion Test

* 10500 ModuleBay recursion Test

* Enable MPTT for module bays

* Fix tests

* Fix validation of module token in component names

* Misc cleanup

* Merge migrations

* Fix table ordering

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-05 13:13:59 -04:00
Arthur Hanson
ca63aed9ee
17061 add new models to docs (#17062)
* 17061 add new models to docs

* Reorder; remove CircuitGroupAssignment

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-08-02 10:00:51 -04:00
Jeremy Stretch
472fbdc654
Closes #17051: Introduce the ISOLATED_DEPLOYMENT config parameter (#17067)
* Closes #17051: Introduce ISOLATED_DEPLOYMENT config parameter

* Revert omission of external footer links
2024-08-02 08:05:08 -04:00
Jeremy Stretch
80fc9abb03 16927: Move JobRunner from utilities to netbox 2024-08-01 14:18:33 -04:00
Arthur Hanson
d6f2fc7d29
17058 RackType name -> model (#17059)
* 17058 RackType name -> model

* 17058 RackType name -> model

* 17058 fix tests

* 17058 fix tests
2024-08-01 09:06:51 -04:00
Jeremy Stretch
28b867bde4 Documentation updates for v4.1 2024-07-31 16:26:21 -04:00
Jeremy Stretch
a49a74236b #16886: Misc cleanup 2024-07-31 16:02:20 -04:00
Jeremy Stretch
6e59db7310 #16886: Updated documentation for event types 2024-07-31 15:54:31 -04:00
Jeremy Stretch
d1e16013f0 #16886: Rename Event to EventType 2024-07-31 15:39:05 -04:00
Jeremy Stretch
5cfa2bb561 #15621: Add feature documentation for user notifications 2024-07-31 15:11:40 -04:00
Alexander Haase
d3a3a6ba46
15692: Introduce background jobs (#16927)
* Introduce reusable BackgroundJob framework

A new abstract class can be used to implement job function classes. It
handles the necessary logic for starting and stopping jobs, including
exception handling and rescheduling of recurring jobs.

This commit also includes the migration of data source jobs to the new
framework.

* Restore using import_string for jobs

Using the 'import_string()' utility from Django allows the job script
class to be simplified, as module imports no longer need to avoid loops.
This should make it easier to queue and maintain jobs.

* Use SyncDataSourceJob for management command

Instead of maintaining two separate job execution logics, the same job
is now used for both background and interactive execution.

* Implement BackgroundJob for running scripts

The independent implementations of interactive and background script
execution have been merged into a single BackgroundJob implementation.

* Fix documentation of model features

* Ensure consitent code style

* Introduce reusable ScheduledJob

A new abstract class can be used to implement job function classes that
specialize in scheduling. These use the same logic as regular
BackgroundJobs, but ensure that they are only scheduled once at any given
time.

* Introduce reusable SystemJob

A new abstract class can be used to implement job function classes that
specialize in system background tasks (e.g. synchronization or
housekeeping). In addition to the features of the BackgroundJob and
ScheduledJob classes, these implement additional logic to not need to be
bound to an existing NetBox object and to setup job schedules on plugin
load instead of an interactive request.

* Add documentation for jobs framework

* Revert "Use SyncDataSourceJob for management"

This partially reverts commit db591d4. The 'run_now' parameter of
'enqueue()' remains, as its being used by following commits.

* Merge enqueued status into JobStatusChoices

* Fix logger for ScriptJob

* Remove job name for scripts

Because scripts are already linked through the Job Instance field, the
name is displayed twice. Removing this reduces redundancy and opens up
the possibility of simplifying the BackgroundJob framework in future
commits.

* Merge ScheduledJob into BackgroundJob

Instead of using separate classes, the logic of ScheduledJob is now
merged into the generic BackgroundJob class. This allows reusing the
same logic, but dynamically deciding whether to enqueue the same job
once or multiple times.

* Add name attribute for BackgroundJob

Instead of defining individual names on enqueue, BackgroundJob classes
can now set a job name in their meta class. This is equivalent to other
Django classes and NetBox scripts.

* Drop enqueue_sync_job() method from DataSource

* Import ScriptJob directly

* Relax requirement for Jobs to reference a specific object

* Rename 'run_now' arg on Job.enqueue() to 'immediate'

* Fix queue lookup in Job enqueue

* Collapse SystemJob into BackgroundJob

* Remove legacy JobResultStatusChoices

ChoiceSet was moved to core in 40572b5.

* Use queue 'low' for system jobs by default

System jobs usually perform low-priority background tasks and therefore
can use a different queue than 'default', which is used for regular jobs
related to specific objects.

* Add test cases for BackgroundJob handling

* Fix enqueue interval jobs

As the job's name is set by enqueue(), it must not be passed in handle()
to avoid duplicate kwargs with the same name.

* Honor schedule_at for job's enqueue_once

Not only can a job's interval change, but so can the time at which it is
scheduled to run. If a specific scheduled time is set, it will also be
checked against the current job schedule. If there are any changes, the
job is rescheduled with the new time.

* Switch BackgroundJob to regular methods

Instead of using a class method for run(), a regular method is used for
this purpose. This gives the possibility to add more convenience methods
in the future, e.g. for interacting with the job object or for logging,
as implemented for scripts.

* Fix background tasks documentation

* Test enqueue in combination with enqueue_once

* Rename background jobs to tasks (to differentiate from RQ)

* Touch up docs

* Revert "Use queue 'low' for system jobs by default"

This reverts commit b17b2050df.

* Remove system background job

This commit reverts commits 4880d81 and 0b15ecf. Using the database
'connection_created' signal for job registration feels a little wrong at
this point, as it would trigger registration very often. However, the
background job framework is prepared for this use case and can be used
by plugins once the auto-registration of jobs is solved.

* Fix runscript management command

Defining names for background jobs was disabled with fb75389. The
preceeding changes in 257976d did forget the management command.

* Use regular imports for ScriptJob

* Rename BackgroundJob to JobRunner

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-30 13:31:21 -04:00
Jeremy Stretch
dde84b47da Flesh out v4.1 changelog 2024-07-29 20:58:29 -04:00
samk-acw
650898719e
Fixes #16782: Add object filtering for custom fields (#16994)
* Fixes #16782: Add object filtering for custom fields

* Add validation for related_object_filter

* Extend documentation & misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-29 15:45:48 -04:00
Jeremy Stretch
a12fdd6e2d Merge branch 'develop' into feature 2024-07-26 16:39:58 -04:00
Jeremy Stretch
8bfcb1c816 PRVB 2024-07-26 16:25:32 -04:00
Jeremy Stretch
303c1ce00c Release v4.0.8 2024-07-26 15:37:05 -04:00
Jeremy Stretch
4d55d7d964 Changelog for #16933, #16943, #16964 2024-07-26 08:01:08 -04:00
Arthur Hanson
e62a42286a
11969 airflow (#16967)
* 11960 Add airflow

* 11960 Add airflow

* 11960 fix tests

* 11960 fix racktype form

* 11969 different choices type

* 11969 update docs

* 11969 fix racktype copy

* 11969 fix

* Misc cleanup & reordering of form fields

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-25 15:14:02 -04:00
Arthur Hanson
8237c6accc
7025 circuit redundancy (#16945)
* 7025 CircuitRedundancyGroups

* 7025 CircuitRedundancyGroups api

* 7025 CircuitRedundancyGroups api

* 7025 CircuitRedundancyGroups tests

* 7025 CircuitRedundancyGroup -> CircuitGroup

* 7025 add tenancy

* 7025 linkify name

* 7025 missing file

* 7025 circuitgroupassignment

* 7025 base group assignment working

* 7025 assignments

* 7025 fix forms/tests for CircuitGroup

* 7025 fix api tests

* 7025 view tests

* 7025 CircuitGroupAssignment tests

* 7025 fix typo

* 7025 fix typo

* 7025 fix tests

* 7025 remove m2m

* 7025 add count to serializer

* 7025 fix test

* 7025 documentation

* 7025 review comments

* 7025 review comments

* 7025 add search index

* Make CircuitPriorityChoices extensible

* Add group assignment table to circuit view

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-24 12:24:44 -04:00
Jeremy Stretch
44a9350986
Closes #16886: Dynamic event types (#16938)
* Initial work on #16886

* Restore GraphQL filter

* Remove namespace

* Add Event documentation

* Use MultipleChoiceField for event_types

* Fix event_types field class on EventRuleImportForm

* Fix tests

* Simplify event queue handling logic

* Misc cleanup
2024-07-22 08:12:04 -04:00
Arthur Hanson
cf1024a12b
9627 use ArrayField on VLANGroup for allowed VLANs (#16710)
* 9627 initial commit

* 9627 numeric range field

* 9627 numeric range field

* 9627 numeric range field

* 9627 numeric range field

* 9627 add stuff for utilization calc

* 9627 update views

* 9627 fixes

* 9627 available_vlans

* 9627 available_vlans

* 9627 fixes

* 9627 bulk import / edit

* 9627 test fixes

* 9627 test fixes

* 9627 update validation

* 9627 fix tests

* 9627 fix tests

* 9627 fix tests

* 9627 fix tests

* 9627 fix tests

* 9627 fix tests

* 9627 review changes

* 9627 temp vlan_id filter

* Clean up labels

* Remove annotate_vlan_ranges() from VLANGroupQuerySet

* Misc cleanup

* Implement contains_vid filter

* Serialize VID ranges as integer lists in REST API

* Remove default value from vlan_id_ranges

* 9627 fix typo in test

* Require vlan_id_ranges & set default value

* Fix logic for upper range boundaries

* Add field to VLANGroup model documentation

* Rename vlan_id_ranges to vid_ranges

* Fix computation of available VLAN IDs

* Clean up migration

* Add tests for range utility functions

* Clean up add_available_vlans()

* Misc cleanup, add test for VID validation

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-16 10:47:18 -04:00
Arthur Hanson
5a6ffde67e
12826 Add Rack Type (#16739)
* 12826 add RackType

* 12826 add forms, filters, tables

* 12826 add to menu

* 12826 remove role

* 12826 add api/serializers

* 12826 add tests and fixes

* 12826 fix tests

* 12826 fix tests

* 12826 fix tests

* 12826 fix tests

* 12826 add device_type to device and instantiation

* 12826 test device creation

* 12826 add slug

* 12826 fix tests

* 12826 fix slug field

* 12826 prevent modification of rack fields if rack_type set

* 12826 update rack fields on rack_type edit

* Misc cleanup

* Update model docs

* Add manufacturer field to RackType

* Add test for mounting_depth

* Rename 'type' to 'form_factor'

* Create base classes for Rack & RackType models, serializers

* Hide RackType-defined fields on RackForm when a rack type is set

* Establish a base filter form for Rack & RackType

* Clean up RackType attr inheritance

* Clean up templates

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-16 08:58:22 -04:00
Jeremy Stretch
b0e7294bc1
Closes #15621: User notifications (#16800)
* Initial work on #15621

* Signal receiver should ignore models which don't support notifications

* Flesh out NotificationGroup functionality

* Add NotificationGroup filters for users & groups

* Separate read & dimiss actions

* Enable one-click dismissals from notifications list

* Include total notification count in dropdown

* Drop 'kind' field from Notification model

* Register event types in the registry; add colors & icons

* Enable event rules to target notification groups

* Define dynamic choices for Notification.event_name

* Move event registration to core

* Add more job events

* Misc cleanup

* Misc cleanup

* Correct absolute URLs for notifications & subscriptions

* Optimize subscriber notifications

* Use core event types when queuing events

* Standardize queued event attribute to event_type; change content_type to object_type

* Rename Notification.event_name to event_type

* Restore NotificationGroupBulkEditView

* Add API tests

* Add view & filterset tests

* Add model documentation

* Fix tests

* Update notification bell when notifications have been cleared

* Ensure subscribe button appears only on relevant models

* Notifications/subscriptions cannot be ordered by object

* Misc cleanup

* Add event icon & type to notifications table

* Adjust icon sizing

* Mute color of read notifications

* Misc cleanup
2024-07-15 14:24:11 -04:00
Jeremy Stretch
95cb7b2c34 Changelog for #16402, #16536, #16624, #16819 2024-07-15 09:12:36 -04:00
Eric Oswald
e216bebd41 Fix incorrect import in rest-api.md 2024-07-13 10:28:43 -04:00
Jeremy Stretch
1c2336be60
Closes #16776: Extend PluginTemplateExtension to render custom alerts for objects (#16889)
* Closes #16776: Extend PluginTemplateExtension to render custom alerts for objects

* Fix bug in _get_registered_content()
2024-07-12 09:52:07 -04:00
Jeremy Stretch
b2ca6df50a Changelog for #14640, #14792, #15660, #15696, #16793 2024-07-11 14:21:41 -04:00
Jeremy Stretch
6f3a2a599f Changelog for #15375, #16357, #16760, #16838, #16867 2024-07-10 09:16:23 -04:00
Jeff Gehlbach
bf97138c78 Small additions and tweaks to release checklist from releasing v4.0.7 2024-07-10 08:45:36 -04:00
Théophile Bastian
4ca1494127
SSO: custom name for identity providers (#16732) 2024-07-10 13:09:03 +07:00
Jeremy Stretch
02ae91589d Merge branch 'develop' into feature 2024-07-09 15:16:05 -04:00
Jeremy Stretch
dd413b248a PRVB 2024-07-09 13:49:24 -04:00
Jeff Gehlbach
596514ce74 Release v4.0.7 2024-07-09 13:27:13 -04:00
Jeremy Stretch
aceed94787 Changelog for #14554, #16721, #16758, #16802, #16808, #16817, #16843 2024-07-09 12:19:39 -04:00
Mattias L
96ff796b94
Allowed configuration of Sentry send_default_pii parameter (#16803)
* Allowed configuration of Sentry send_default_pii parameter.

Also changed default value of send_default_pii to False to avoid sending sensitive data to Sentry.

Closes #16802

* Order alphabetically & link to Sentry parameter documentation

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-09 08:39:43 -04:00
Arzhel Younsi
22348cdbfc
Extend STORAGE_BACKEND config to support Swift (#16319)
* Extend STORAGE_BACKEND config to support Swift

Requires django-storage-swift >= 1.4.0 when used.

Bug: T310717
Change-Id: I67cf439e9152608cbba3a3de4173d54ba5fbddc2

* Update system.md from suggestions

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

* Update settings.py from suggestions

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

* Update system.md from suggestions 2

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

* Remove SWIFT storage from configuration_example.py

* Load swift config as global instead of monkey path

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-07-08 12:04:17 -04:00
Jeremy Stretch
9ab7960a66 Changelog for #16679, #16716, #16779, #16780, #16791, #16796, #16806, #16807, #16813 2024-07-04 10:00:50 -04:00
Jeremy Stretch
12cd2a7d6f Changelog for #8984, #15156, #16580, #16726 2024-07-03 16:30:02 -04:00
Jeremy Stretch
82d8de32df Closes #16726: Extend PluginTemplateExtension to allow registering multiple models 2024-07-01 15:25:27 -04:00
Jeremy Stretch
d3d27d8111 Changelog for #16424, #16523, #16654, #16657, #16689, #16714, #16723, #16725, #16735, #16747 2024-07-01 09:40:21 -04:00
Peter Eckel
96338c002b Updated the documentation section about removing plugins 2024-06-30 15:08:11 -04:00
Jeff Gehlbach
33004dfab0 Added missing CDN cache clearing step to release checklist in docs 2024-06-25 16:21:32 -04:00
Arthur Hanson
52546608f6
15156 Add display_url to REST API (#16412)
* 15156 add display_url to REST API

* 15156 fix view name

* 15156 fix typo

* 15156 fix tests

* 15156 add url display_url to base class

* 15156 add url display_url to base class

* 15156 add url display_url to base class

* 15156 review changes

* 15156 review changes

* 15156 review changes

* 15156 review changes

* 15156 remove bogus code

* 15156 remove bogus code

* 15156 review changes

* 15156 review changes

* 15156 review changes

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-06-25 09:59:58 -04:00
Jeremy Stretch
2b4577e365
Closes #8198: Custom field uniqueness (#16661)
* Closes #8198: Implement ability to enforce custom field uniqueness

* Add missing form fields & table columns for validation attributes

* Remove obsolete code
2024-06-25 08:37:10 -04:00
Jeremy Stretch
08ac5cd52c Merge branch 'develop' into feature 2024-06-24 15:40:43 -04:00
Jeremy Stretch
7702b0ebb0 PRVB 2024-06-24 15:04:46 -04:00
Jeremy Stretch
8107d72961 Release v4.0.6 2024-06-24 14:37:26 -04:00
Jeremy Stretch
5f3e147634 Changelog for #15717, #16149, #16252, #16273, #16307, #16702 2024-06-24 12:46:11 -04:00
Jeremy Stretch
8b62e40874 Closes #16307: Enable calling log_* methods on Script without a log message 2024-06-24 10:45:33 -04:00
Arthur Hanson
85fd232614
16149 add (optional) obj hyperlink to script list table (#16271)
* 16149 add (optional) obj hyperlink to script list table

* 16149 add (optional) obj hyperlink to script list table

* 16149 review feedback

* 16149 review changes
2024-06-21 10:04:52 -04:00