1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

208 Commits

Author SHA1 Message Date
a9bb4c5c3e Move choice sets from utilities.choices to netbox.choices 2024-03-22 08:59:52 -04:00
01fa2710eb Fixes #15067: Fix uncaught exception when attempting invalid device bay import 2024-02-13 12:15:15 -05:00
2221a9d71f Fixes #14749: Remove errant translation wrapper from DeviceBay installed_device 2024-01-10 14:18:46 -05:00
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
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
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
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
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
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
35bcc2ce9d Revert "Fixes #13741: Enforce unique names for inventory items with no parent item"
This reverts commit 68966db23d22edcd81423e717a4157428ebfb896.
2023-09-20 08:44:25 -04:00
68966db23d Fixes #13741: Enforce unique names for inventory items with no parent item 2023-09-18 11:10:00 -04:00
75b71890a4 Misc i18n cleanup 2023-09-11 15:59:50 -04:00
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
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
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
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
f49e4ee512 Merge branch 'develop' into feature 2023-04-26 15:09:51 -04:00
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
59a6b3e71b Merge branch 'develop' into feature 2023-04-12 17:38:16 -04:00
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
08017c51f6 Merge branch 'develop' into feature 2023-04-07 13:00:00 -04:00
b032742418 Closes #12133: Move any instance mutations inside clean() to save() 2023-04-03 16:26:07 -04:00
c44eb65993 Closes #11325: Move help_texts from model forms to models 2023-03-01 17:31:54 -05:00
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
064e3ff605 Merge branch 'develop' into feature 2022-12-13 17:17:05 -05:00
a57378e780 Add missing newline and change wording of InventoryItem validation 2022-12-13 08:58:57 -05:00
41f631b65b Allow re-assigning inventoryitems to other devices 2022-12-13 08:58:57 -05:00
d0e0c2ff8b Merge branch 'develop' into feature 2022-11-30 16:21:20 -05:00
cf0258204f 11048 fix connected_endpoint refs 2022-11-30 15:13:45 -05:00
6eba5d4d96 10300 initial translation support use gettext 2022-11-11 08:47:29 -05:00
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
e2f5ee661a Clean up redundant NestedGroupModel, OrganizationalModel fields 2022-11-03 13:59:44 -04:00
f51415cf2c Replace unique_together with UniqueConstraints 2022-09-27 15:35:24 -04:00
1eb0e5d307 Merge branch 'develop' into feature 2022-09-15 14:30:24 -04:00
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
ce6bf9e5c1 #10172 fixes for Django 4.1 2022-09-12 09:59:37 -07:00
8cd5a24409 #9414: Clean up clone_fields on all models 2022-08-11 09:58:37 -04:00
262a0cf397 Fixes #9789: Fix rendering of cable traces ending at provider networks 2022-08-01 13:29:39 -04:00
43b27cc052 Misc cleanup 2022-07-12 16:29:26 -04:00
c380fd00bf Merge branch 'develop' into feature 2022-07-11 12:58:24 -04:00
6415661b61 Remove extraneous argument to GenericRelation 2022-07-11 10:33:14 -04:00
42e5282283 Improve filtering cables by termination device/rack/site 2022-07-08 11:44:28 -04:00
11707cb3b1 Fix trace() loop 2022-07-07 19:08:20 -04:00
d444aa1110 Fix support for tracing across bridge relationships 2022-07-07 14:35:02 -04:00
a858e041e4 Cache properties which return related objects 2022-07-07 14:23:05 -04:00
13ef5dc0b3 Extend Interface.link_peers() to support WirelessLinks 2022-07-07 13:57:39 -04:00
9a7f3f8c1a Cleanup for #9102 2022-07-07 12:48:44 -04:00
af14bfdd84 Rename LinkTermination to CabledObjectModel 2022-07-06 15:56:10 -04:00
ba079b9ee5 Merge branch 'feature' into 9102-cabling 2022-07-06 14:09:25 -04:00
3be9f6c4f3 #8157 - Final work on L2VPN model 2022-06-29 16:01:20 -05:00