* Move Module & ModuleType models to a separate file
* Add ModuleTypeProfile & related fields
* Initial work on JSON schema validation
* Add attributes property on ModuleType
* Introduce MultipleOfValidator
* Introduce JSONSchemaProperty
* Enable dynamic form field rendering
* Misc cleanup
* Fix migration conflict
* Ensure deterministic ordering of attriubte fields
* Support choices & default values
* Include module type attributes on module view
* Enable modifying individual attributes via REST API
* Enable filtering by attribute values
* Add documentation & tests
* Schema should be optional
* Include attributes column for profiles
* Profile is nullable
* Include some initial profiles to be installed via migration
* Fix migrations conflict
* Fix filterset test
* Misc cleanup
* Fixes#19023: get_field_value() should respect null values in bound forms (#19024)
* Skip filters which do not specify a JSON-serializable value
* Fix handling of array item types
* Fix initial data in schema field during bulk edit
* Implement sanity checking for JSON schema definitions
* Fall back to filtering by string value
Made DeviceRoles hierarchical, had to also change the filtersets for Device, ConfigContext and VirtualMachine to use the TreeNodeMultipleChoiceFilter.
Note: The model was changed to use NestedGroupModel, a side-effect of this is it also adds comments field, but I thought that was better then doing a one-off just for DeviceRole and having to define the fields, validators, etc.. - keeps everything DRY / consistent.
* 18981 Make Device Roles Hierarchical
* 18981 forms, serializer
* 18981 fix tests
* 18981 fix tests
* 18981 fix tests
* 18981 fix tests
* 18981 fix tests
* 18981 fix migration merge
* 18981 fix tests
* 18981 fix filtersets
* 18981 fix tests
* 18981 comments
* 18981 review changes
- [x] 1. Add the field to the model class
- [x] 2. Generate and run database migrations
- [NA] 3. Add validation logic to clean()
- [NA] 4. Update relevant querysets
- [x] 5. Update API serializer
- [x] 6. Add fields to forms
- [x] dcim.forms.model_forms.LocationForm, create/edit (e.g. model_forms.py)
- [x] dcim.forms.buld_edit.LocationBulkEditForm, bulk edit
- [x] dcim.dorms.bulk_import.LocationImportForm, CSV import
- [x] filter (UI and API)
- [NA] UI
- Note: could not find any comments related things in filtersets
- [x] API
- [x] 7. Extend object filter set
- [x] 8. Add column to object table
- [x] 9. Update the SearchIndex
- [x] 10. Update the UI templates
- [x] 11. Create/extend test cases
- [NA] models
- [x] views
- [NA] forms
- [x] filtersets
- [x] api
- [NA] 12. Update the model's documentation
* 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>
* 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
* 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>
* 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
* 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>
* 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>