Commit Graph

13332 Commits

Author SHA1 Message Date
Brian Tiemann
4655372585 HTML cleanup and add copy-to-clipboard button 2024-11-14 18:10:32 -05:00
Brian Tiemann
b0663305b7 Add is_primary field for bulk edit 2024-11-14 16:19:24 -05:00
Brian Tiemann
57bc1887bc Remove unused views 2024-11-14 15:58:01 -05:00
Brian Tiemann
944eadaf95 Standardize "MAC Address" instead of "MAC" 2024-11-14 15:54:04 -05:00
Brian Tiemann
3d244bfa37 Style cleanup 2024-11-14 15:48:33 -05:00
Brian Tiemann
563caa9af8 Add to VMInterfaceSerializer too 2024-11-14 15:27:14 -05:00
Brian Tiemann
17a2b53521 Simplify serializer and add ip_addresses 2024-11-14 15:24:43 -05:00
Brian Tiemann
e2e5af5303 Documentation notes and cleanup 2024-11-14 14:02:13 -05:00
Brian Tiemann
e46d9a6d29 Model cleanup 2024-11-14 13:12:31 -05:00
Brian Tiemann
90cf71ba58 Fix check for current is_primary setting when reassigning 2024-11-14 10:46:19 -05:00
Brian Tiemann
640a325551 Remove form-level validation 2024-11-14 10:34:05 -05:00
Brian Tiemann
5029dd4eaf Perform is_primary validation on MACAddress model and just check if one already exists for the interface 2024-11-14 10:33:29 -05:00
Brian Tiemann
3a7a4f83d6 Enforce saving only a single is_primary MACAddress per interface/vminterface 2024-11-12 20:44:35 -05:00
Brian Tiemann
3f32c5b123 Merge branch 'feature' into 4867-multiple-mac-addresses 2024-11-12 20:29:44 -05:00
Jeremy Stretch
03d413565f Fix linter error 2024-11-07 14:10:15 -05:00
Jeremy Stretch
a183048891 Closes #17951: Extend Ruff ruleset 2024-11-07 11:52:02 -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
Brian Tiemann
5913ae0e94 Move MACAddressSerializer 2024-11-05 16:01:54 -05:00
Brian Tiemann
016a5335ae Reorganize MACAddress classes out of association with DeviceComponents 2024-11-05 15:50:25 -05:00
Brian Tiemann
eff2225464 Add SearchIndex and adjust indexable fields for Interface and VMInterface 2024-11-05 14:42:22 -05:00
Brian Tiemann
6d604e2609 Merge branch 'feature' into 4867-multiple-mac-addresses 2024-11-05 14:24:16 -05:00
Brian Tiemann
3fd3bdbfff Clean up unnecessary bulk create forms/views/routes 2024-11-05 14:23:09 -05:00
Brian Tiemann
5ab8c4cdeb Add serializer objects to interface serializers 2024-11-04 14:56:53 -05:00
Brian Tiemann
4f660fa882 API endpoints 2024-11-04 14:51:05 -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
Brian Tiemann
1b42b9076b Cleanup unused IPAddress derived stuff 2024-11-01 14:33:20 -04:00
Brian Tiemann
e763207181 Undo unrelated work 2024-11-01 14:29:19 -04:00
Brian Tiemann
62315161af Merge feature and rebuild migrations 2024-11-01 14:27:54 -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
Brian Tiemann
6d2a0a4968 Merge feature and rebuild migrations 2024-11-01 11:26:31 -04:00
Brian Tiemann
9206054b9d Make mac_address read_only on InterfaceSerializer/VMInterfaceSerializer 2024-10-31 21:44:05 -04:00
Brian Tiemann
2d767b619c Fix bulk edit/create tests (bulk editing Interfaces will be unsupported because of inheritance from ComponentBulkEditForm) 2024-10-31 21:23:22 -04:00
Brian Tiemann
2536f941cb Add GraphQL types/filters/schema 2024-10-31 19:32:41 -04:00
Brian Tiemann
a3eb80b975 Fix general MACAddress filter tests 2024-10-31 15:18:36 -04:00
Brian Tiemann
8d91407dcf Move new field check into lookup_map iteration 2024-10-31 14:55:12 -04:00
Brian Tiemann
8e27d2b7bf Fix filterset tests for Device and VirtualMachine 2024-10-31 14:36:59 -04:00
Brian Tiemann
5be20924e7 Fix filterset tests for VMInterface 2024-10-31 14:31:49 -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
Brian Tiemann
a631b69dc0 Fix serializer tests 2024-10-31 10:01:23 -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
Brian Tiemann
dfaa354140 Fix tests on single-object forms 2024-10-31 09:31:24 -04:00
Brian Tiemann
f64c941f65 Fix filterset tests for Interface 2024-10-30 21:44:25 -04:00
Brian Tiemann
de4cafe5d0 Fix filterset tests for Device 2024-10-30 21:11:17 -04:00
Brian Tiemann
0fc5157f3b Remove unnecessary "bulk rename" 2024-10-30 20:47:06 -04:00
Brian Tiemann
eec59cfd61 Remove mac_address filter fields and add table columns for device/vm 2024-10-30 20:44:15 -04:00
Brian Tiemann
03bc2f3a32 Redo migrations following VLAN Translation 2024-10-30 17:59:04 -04:00
Brian Tiemann
5849f8d2dc Merge branch 'feature' into 4867-multiple-mac-addresses 2024-10-30 17:55:33 -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
b8572dc33f All views/filtering working and documentation done; no unit tests yet 2024-10-30 16:06:10 -04:00
Jeremy Stretch
19c5c32965 Merge branch 'develop' into feature 2024-10-30 13:10:47 -04:00