* 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>
* 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
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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