nautobot 2.4.0__py3-none-any.whl → 2.4.0b1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of nautobot might be problematic. Click here for more details.
- nautobot/apps/__init__.py +1 -1
- nautobot/apps/api.py +8 -8
- nautobot/apps/change_logging.py +2 -2
- nautobot/apps/choices.py +4 -4
- nautobot/apps/events.py +3 -3
- nautobot/apps/factory.py +2 -2
- nautobot/apps/filters.py +1 -1
- nautobot/apps/forms.py +20 -20
- nautobot/apps/graphql.py +2 -2
- nautobot/apps/jobs.py +8 -8
- nautobot/apps/models.py +19 -19
- nautobot/apps/tables.py +1 -1
- nautobot/apps/testing.py +10 -10
- nautobot/apps/ui.py +2 -2
- nautobot/apps/utils.py +7 -7
- nautobot/apps/views.py +7 -7
- nautobot/circuits/api/serializers.py +0 -1
- nautobot/circuits/api/views.py +8 -4
- nautobot/circuits/tables.py +1 -2
- nautobot/circuits/templates/circuits/circuit_create.html +7 -1
- nautobot/circuits/views.py +3 -3
- nautobot/cloud/api/views.py +10 -6
- nautobot/cloud/models.py +1 -1
- nautobot/cloud/views.py +16 -0
- nautobot/core/api/fields.py +5 -5
- nautobot/core/api/filter_backends.py +9 -3
- nautobot/core/api/schema.py +2 -13
- nautobot/core/api/serializers.py +34 -40
- nautobot/core/api/views.py +4 -56
- nautobot/core/celery/log.py +4 -4
- nautobot/core/celery/schedulers.py +1 -1
- nautobot/core/choices.py +2 -2
- nautobot/core/events/__init__.py +3 -3
- nautobot/core/filters.py +16 -21
- nautobot/core/fixtures/user-data.json +59 -0
- nautobot/core/forms/__init__.py +19 -19
- nautobot/core/forms/fields.py +11 -14
- nautobot/core/forms/forms.py +2 -33
- nautobot/core/graphql/types.py +1 -1
- nautobot/core/jobs/__init__.py +7 -28
- nautobot/core/jobs/cleanup.py +12 -48
- nautobot/core/jobs/groups.py +1 -1
- nautobot/core/management/commands/validate_models.py +1 -1
- nautobot/core/models/__init__.py +1 -1
- nautobot/core/models/query_functions.py +2 -2
- nautobot/core/models/tree_queries.py +3 -6
- nautobot/core/settings.py +2 -29
- nautobot/core/settings.yaml +0 -21
- nautobot/core/tables.py +60 -74
- nautobot/core/templates/inc/media.html +0 -3
- nautobot/core/templates/inc/nav_menu.html +0 -1
- nautobot/core/templates/nautobot_config.py.j2 +0 -13
- nautobot/core/templates/search.html +0 -7
- nautobot/core/templates/utilities/render_jinja2.html +1 -1
- nautobot/core/templates/utilities/templatetags/tag.html +1 -1
- nautobot/core/templates/utilities/theme_preview.html +0 -7
- nautobot/core/templatetags/helpers.py +2 -11
- nautobot/core/testing/__init__.py +8 -8
- nautobot/core/testing/api.py +15 -170
- nautobot/core/testing/filters.py +2 -25
- nautobot/core/testing/forms.py +0 -2
- nautobot/core/testing/mixins.py +2 -7
- nautobot/core/testing/views.py +29 -44
- nautobot/core/tests/integration/test_app_home.py +1 -0
- nautobot/core/tests/integration/test_app_navbar.py +1 -0
- nautobot/core/tests/integration/test_filters.py +2 -0
- nautobot/core/tests/integration/test_home.py +1 -0
- nautobot/core/tests/integration/test_navbar.py +1 -0
- nautobot/core/tests/integration/test_view_authentication.py +0 -1
- nautobot/core/tests/runner.py +1 -1
- nautobot/core/tests/test_api.py +1 -98
- nautobot/core/tests/test_csv.py +3 -25
- nautobot/core/tests/test_forms.py +0 -1
- nautobot/core/tests/test_jobs.py +1 -303
- nautobot/core/tests/test_settings_schema.py +0 -7
- nautobot/core/tests/test_tables.py +0 -100
- nautobot/core/tests/test_utils.py +1 -63
- nautobot/core/tests/test_views.py +3 -30
- nautobot/core/ui/nav.py +0 -1
- nautobot/core/ui/object_detail.py +1 -15
- nautobot/core/urls.py +0 -11
- nautobot/core/utils/lookup.py +8 -11
- nautobot/core/utils/requests.py +9 -24
- nautobot/core/views/__init__.py +0 -42
- nautobot/core/views/generic.py +176 -78
- nautobot/core/views/mixins.py +34 -94
- nautobot/core/views/renderers.py +6 -6
- nautobot/dcim/api/serializers.py +62 -54
- nautobot/dcim/api/views.py +113 -47
- nautobot/dcim/filters/__init__.py +2 -31
- nautobot/dcim/forms.py +17 -36
- nautobot/dcim/graphql/types.py +2 -2
- nautobot/dcim/models/__init__.py +1 -1
- nautobot/dcim/models/device_component_templates.py +2 -2
- nautobot/dcim/models/device_components.py +20 -22
- nautobot/dcim/models/devices.py +1 -10
- nautobot/dcim/models/locations.py +3 -3
- nautobot/dcim/models/power.py +5 -6
- nautobot/dcim/models/racks.py +4 -4
- nautobot/dcim/tables/__init__.py +3 -3
- nautobot/dcim/tables/devices.py +5 -7
- nautobot/dcim/tables/devicetypes.py +2 -2
- nautobot/dcim/tables/racks.py +1 -1
- nautobot/dcim/templates/dcim/controller_create.html +7 -1
- nautobot/dcim/templates/dcim/controller_retrieve.html +9 -1
- nautobot/dcim/templates/dcim/controllermanageddevicegroup_create.html +0 -2
- nautobot/dcim/templates/dcim/controllermanageddevicegroup_retrieve.html +0 -5
- nautobot/dcim/templates/dcim/device.html +9 -1
- nautobot/dcim/templates/dcim/device_edit.html +37 -36
- nautobot/dcim/templates/dcim/location.html +9 -1
- nautobot/dcim/templates/dcim/location_edit.html +7 -1
- nautobot/dcim/templates/dcim/rack.html +9 -1
- nautobot/dcim/templates/dcim/rack_edit.html +7 -1
- nautobot/dcim/templates/dcim/rackreservation.html +9 -1
- nautobot/dcim/templates/dcim/virtualdevicecontext_retrieve.html +9 -1
- nautobot/dcim/templates/dcim/virtualdevicecontext_update.html +7 -1
- nautobot/dcim/tests/test_api.py +3 -16
- nautobot/dcim/tests/test_filters.py +0 -33
- nautobot/dcim/tests/test_forms.py +2 -51
- nautobot/dcim/tests/test_graphql.py +0 -52
- nautobot/dcim/tests/test_models.py +5 -34
- nautobot/dcim/tests/test_views.py +83 -21
- nautobot/dcim/views.py +13 -1
- nautobot/extras/api/customfields.py +2 -2
- nautobot/extras/api/serializers.py +85 -90
- nautobot/extras/api/views.py +27 -22
- nautobot/extras/constants.py +0 -2
- nautobot/extras/filters/__init__.py +6 -8
- nautobot/extras/forms/base.py +2 -2
- nautobot/extras/forms/forms.py +31 -139
- nautobot/extras/forms/mixins.py +5 -13
- nautobot/extras/group_sync.py +3 -3
- nautobot/extras/health_checks.py +2 -1
- nautobot/extras/jobs.py +12 -70
- nautobot/extras/managers.py +1 -3
- nautobot/extras/migrations/0018_joblog_data_migration.py +9 -7
- nautobot/extras/models/__init__.py +1 -1
- nautobot/extras/models/contacts.py +1 -1
- nautobot/extras/models/customfields.py +11 -12
- nautobot/extras/models/groups.py +9 -11
- nautobot/extras/models/jobs.py +4 -23
- nautobot/extras/models/models.py +2 -2
- nautobot/extras/plugins/__init__.py +2 -13
- nautobot/extras/plugins/marketplace_manifest.yml +79 -84
- nautobot/extras/plugins/tables.py +14 -16
- nautobot/extras/plugins/views.py +69 -65
- nautobot/extras/registry.py +1 -1
- nautobot/extras/secrets/__init__.py +2 -2
- nautobot/extras/tables.py +5 -7
- nautobot/extras/templates/extras/dynamicgroup.html +9 -1
- nautobot/extras/templates/extras/job_detail.html +0 -16
- nautobot/extras/templates/extras/job_edit.html +0 -1
- nautobot/extras/templates/extras/jobqueue_retrieve.html +9 -1
- nautobot/extras/templates/extras/marketplace.html +11 -29
- nautobot/extras/templates/extras/plugin_detail.html +15 -32
- nautobot/extras/templates/extras/plugins_tiles.html +10 -21
- nautobot/extras/test_jobs/api_test_job.py +1 -1
- nautobot/extras/test_jobs/atomic_transaction.py +2 -2
- nautobot/extras/test_jobs/dry_run.py +1 -1
- nautobot/extras/test_jobs/fail.py +5 -5
- nautobot/extras/test_jobs/file_output.py +1 -1
- nautobot/extras/test_jobs/file_upload_fail.py +1 -1
- nautobot/extras/test_jobs/file_upload_pass.py +1 -1
- nautobot/extras/test_jobs/ipaddress_vars.py +1 -3
- nautobot/extras/test_jobs/jobs_module/jobs_submodule/jobs.py +1 -1
- nautobot/extras/test_jobs/location_with_custom_field.py +1 -1
- nautobot/extras/test_jobs/log_redaction.py +1 -1
- nautobot/extras/test_jobs/log_skip_db_logging.py +1 -1
- nautobot/extras/test_jobs/modify_db.py +1 -1
- nautobot/extras/test_jobs/object_var_optional.py +1 -1
- nautobot/extras/test_jobs/object_var_required.py +1 -1
- nautobot/extras/test_jobs/object_vars.py +1 -1
- nautobot/extras/test_jobs/pass.py +3 -3
- nautobot/extras/test_jobs/profiling.py +1 -1
- nautobot/extras/test_jobs/relative_import.py +3 -3
- nautobot/extras/test_jobs/soft_time_limit_greater_than_time_limit.py +1 -1
- nautobot/extras/test_jobs/task_queues.py +1 -1
- nautobot/extras/tests/integration/test_plugin_banner.py +2 -0
- nautobot/extras/tests/test_api.py +13 -13
- nautobot/extras/tests/test_customfields.py +1 -1
- nautobot/extras/tests/test_datasources.py +1 -2
- nautobot/extras/tests/test_dynamicgroups.py +1 -1
- nautobot/extras/tests/test_filters.py +6 -6
- nautobot/extras/tests/test_forms.py +1 -20
- nautobot/extras/tests/test_jobs.py +19 -160
- nautobot/extras/tests/test_models.py +10 -10
- nautobot/extras/tests/test_plugins.py +9 -62
- nautobot/extras/tests/test_relationships.py +9 -120
- nautobot/extras/tests/test_views.py +191 -52
- nautobot/extras/utils.py +2 -3
- nautobot/extras/views.py +98 -30
- nautobot/ipam/api/fields.py +3 -3
- nautobot/ipam/api/serializers.py +33 -41
- nautobot/ipam/api/views.py +117 -68
- nautobot/ipam/factory.py +1 -1
- nautobot/ipam/filters.py +2 -3
- nautobot/ipam/lookups.py +62 -101
- nautobot/ipam/models.py +16 -66
- nautobot/ipam/querysets.py +2 -2
- nautobot/ipam/tables.py +7 -23
- nautobot/ipam/templates/ipam/ipaddress.html +9 -1
- nautobot/ipam/templates/ipam/ipaddress_bulk_add.html +7 -1
- nautobot/ipam/templates/ipam/ipaddress_edit.html +7 -1
- nautobot/ipam/templates/ipam/prefix.html +9 -1
- nautobot/ipam/templates/ipam/prefix_edit.html +7 -1
- nautobot/ipam/templates/ipam/vlan.html +9 -1
- nautobot/ipam/templates/ipam/vlan_edit.html +7 -1
- nautobot/ipam/templates/ipam/vrf_edit.html +7 -1
- nautobot/ipam/tests/test_api.py +3 -416
- nautobot/ipam/tests/test_forms.py +47 -49
- nautobot/ipam/tests/test_migrations.py +30 -30
- nautobot/ipam/tests/test_models.py +34 -95
- nautobot/ipam/tests/test_querysets.py +1 -63
- nautobot/ipam/tests/test_views.py +0 -3
- nautobot/ipam/utils/__init__.py +6 -36
- nautobot/ipam/views.py +87 -61
- nautobot/project-static/bootstrap-3.4.1-dist/css/bootstrap-theme.css.map +1 -1
- nautobot/project-static/bootstrap-3.4.1-dist/css/bootstrap-theme.min.css.map +1 -1
- nautobot/project-static/bootstrap-3.4.1-dist/css/bootstrap.css +2 -40
- nautobot/project-static/bootstrap-3.4.1-dist/css/bootstrap.css.map +1 -1
- nautobot/project-static/bootstrap-3.4.1-dist/css/bootstrap.min.css +1 -1
- nautobot/project-static/bootstrap-3.4.1-dist/css/bootstrap.min.css.map +1 -1
- nautobot/project-static/docs/404.html +4 -46
- nautobot/project-static/docs/apps/index.html +4 -46
- nautobot/project-static/docs/apps/nautobot-apps.html +6 -47
- nautobot/project-static/docs/assets/_mkdocstrings.css +1 -25
- nautobot/project-static/docs/assets/javascripts/{bundle.88dd0f4e.min.js → bundle.83f73b43.min.js} +2 -2
- nautobot/project-static/docs/assets/javascripts/{bundle.88dd0f4e.min.js.map → bundle.83f73b43.min.js.map} +2 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/__init__.html +10 -62
- nautobot/project-static/docs/code-reference/nautobot/apps/admin.html +7 -59
- nautobot/project-static/docs/code-reference/nautobot/apps/api.html +122 -374
- nautobot/project-static/docs/code-reference/nautobot/apps/change_logging.html +18 -90
- nautobot/project-static/docs/code-reference/nautobot/apps/choices.html +21 -95
- nautobot/project-static/docs/code-reference/nautobot/apps/config.html +6 -53
- nautobot/project-static/docs/code-reference/nautobot/apps/constants.html +5 -52
- nautobot/project-static/docs/code-reference/nautobot/apps/datasources.html +17 -79
- nautobot/project-static/docs/code-reference/nautobot/apps/events.html +28 -102
- nautobot/project-static/docs/code-reference/nautobot/apps/exceptions.html +21 -108
- nautobot/project-static/docs/code-reference/nautobot/apps/factory.html +38 -131
- nautobot/project-static/docs/code-reference/nautobot/apps/filters.html +65 -239
- nautobot/project-static/docs/code-reference/nautobot/apps/forms.html +165 -581
- nautobot/project-static/docs/code-reference/nautobot/apps/graphql.html +36 -109
- nautobot/project-static/docs/code-reference/nautobot/apps/jobs.html +167 -453
- nautobot/project-static/docs/code-reference/nautobot/apps/models.html +211 -493
- nautobot/project-static/docs/code-reference/nautobot/apps/querysets.html +8 -60
- nautobot/project-static/docs/code-reference/nautobot/apps/secrets.html +15 -71
- nautobot/project-static/docs/code-reference/nautobot/apps/tables.html +55 -407
- nautobot/project-static/docs/code-reference/nautobot/apps/testing.html +205 -585
- nautobot/project-static/docs/code-reference/nautobot/apps/ui.html +412 -858
- nautobot/project-static/docs/code-reference/nautobot/apps/urls.html +7 -59
- nautobot/project-static/docs/code-reference/nautobot/apps/utils.html +186 -448
- nautobot/project-static/docs/code-reference/nautobot/apps/views.html +147 -365
- nautobot/project-static/docs/development/apps/api/configuration-view.html +4 -46
- nautobot/project-static/docs/development/apps/api/database-backend-config.html +4 -46
- nautobot/project-static/docs/development/apps/api/models/django-admin.html +4 -46
- nautobot/project-static/docs/development/apps/api/models/global-search.html +4 -46
- nautobot/project-static/docs/development/apps/api/models/graphql.html +4 -46
- nautobot/project-static/docs/development/apps/api/models/index.html +4 -46
- nautobot/project-static/docs/development/apps/api/nautobot-app-config.html +4 -46
- nautobot/project-static/docs/development/apps/api/platform-features/custom-validators.html +4 -46
- nautobot/project-static/docs/development/apps/api/platform-features/filter-extensions.html +4 -46
- nautobot/project-static/docs/development/apps/api/platform-features/git-repository-content.html +4 -46
- nautobot/project-static/docs/development/apps/api/platform-features/index.html +4 -46
- nautobot/project-static/docs/development/apps/api/platform-features/jinja2-filters.html +4 -46
- nautobot/project-static/docs/development/apps/api/platform-features/jobs.html +4 -46
- nautobot/project-static/docs/development/apps/api/platform-features/populating-extensibility-features.html +4 -46
- nautobot/project-static/docs/development/apps/api/platform-features/secrets-providers.html +4 -46
- nautobot/project-static/docs/development/apps/api/platform-features/table-extensions.html +7 -68
- nautobot/project-static/docs/development/apps/api/platform-features/uniquely-identify-objects.html +4 -46
- nautobot/project-static/docs/development/apps/api/prometheus.html +4 -46
- nautobot/project-static/docs/development/apps/api/setup.html +4 -46
- nautobot/project-static/docs/development/apps/api/testing.html +4 -46
- nautobot/project-static/docs/development/apps/api/ui-extensions/banners.html +4 -46
- nautobot/project-static/docs/development/apps/api/ui-extensions/home-page.html +4 -46
- nautobot/project-static/docs/development/apps/api/ui-extensions/index.html +4 -46
- nautobot/project-static/docs/development/apps/api/ui-extensions/navigation.html +4 -46
- nautobot/project-static/docs/development/apps/api/ui-extensions/object-views.html +4 -46
- nautobot/project-static/docs/development/apps/api/views/base-template.html +4 -46
- nautobot/project-static/docs/development/apps/api/views/core-view-overrides.html +4 -46
- nautobot/project-static/docs/development/apps/api/views/django-generic-views.html +4 -46
- nautobot/project-static/docs/development/apps/api/views/help-documentation.html +4 -46
- nautobot/project-static/docs/development/apps/api/views/index.html +4 -46
- nautobot/project-static/docs/development/apps/api/views/nautobot-generic-views.html +4 -46
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewset.html +4 -46
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewsetrouter.html +4 -46
- nautobot/project-static/docs/development/apps/api/views/notes.html +4 -46
- nautobot/project-static/docs/development/apps/api/views/rest-api.html +6 -52
- nautobot/project-static/docs/development/apps/api/views/urls.html +4 -46
- nautobot/project-static/docs/development/apps/index.html +4 -46
- nautobot/project-static/docs/development/apps/migration/code-updates.html +4 -46
- nautobot/project-static/docs/development/apps/migration/dependency-updates.html +4 -46
- nautobot/project-static/docs/development/apps/migration/from-v1.html +4 -46
- nautobot/project-static/docs/development/apps/migration/model-updates/dcim.html +4 -46
- nautobot/project-static/docs/development/apps/migration/model-updates/extras.html +4 -46
- nautobot/project-static/docs/development/apps/migration/model-updates/global.html +4 -46
- nautobot/project-static/docs/development/apps/migration/model-updates/ipam.html +4 -46
- nautobot/project-static/docs/development/apps/migration/ui-component-framework/best-practices.html +8 -50
- nautobot/project-static/docs/development/apps/migration/ui-component-framework/custom-content.html +4 -46
- nautobot/project-static/docs/development/apps/migration/ui-component-framework/index.html +14 -211
- nautobot/project-static/docs/development/apps/migration/ui-component-framework/migration-steps.html +4 -46
- nautobot/project-static/docs/development/apps/porting-from-netbox.html +4 -46
- nautobot/project-static/docs/development/core/application-registry.html +4 -46
- nautobot/project-static/docs/development/core/best-practices.html +4 -46
- nautobot/project-static/docs/development/core/bootstrap-ui.html +4 -46
- nautobot/project-static/docs/development/core/caching.html +4 -46
- nautobot/project-static/docs/development/core/controllers.html +4 -46
- nautobot/project-static/docs/development/core/docker-compose-advanced-use-cases.html +74 -73
- nautobot/project-static/docs/development/core/generic-views.html +4 -46
- nautobot/project-static/docs/development/core/getting-started.html +224 -249
- nautobot/project-static/docs/development/core/homepage.html +7 -49
- nautobot/project-static/docs/development/core/index.html +4 -46
- nautobot/project-static/docs/development/core/{minikube-dev-environment-for-k8s-jobs.html → local-k8s.html} +168 -469
- nautobot/project-static/docs/development/core/model-checklist.html +12 -56
- nautobot/project-static/docs/development/core/model-features.html +4 -46
- nautobot/project-static/docs/development/core/natural-keys.html +4 -46
- nautobot/project-static/docs/development/core/navigation-menu.html +4 -46
- nautobot/project-static/docs/development/core/release-checklist.html +7 -49
- nautobot/project-static/docs/development/core/role-internals.html +4 -46
- nautobot/project-static/docs/development/core/settings.html +4 -46
- nautobot/project-static/docs/development/core/style-guide.html +7 -49
- nautobot/project-static/docs/development/core/templates.html +4 -46
- nautobot/project-static/docs/development/core/testing.html +4 -46
- nautobot/project-static/docs/development/core/ui-component-framework.html +273 -369
- nautobot/project-static/docs/development/core/user-preferences.html +4 -46
- nautobot/project-static/docs/development/index.html +4 -46
- nautobot/project-static/docs/development/jobs/index.html +122 -216
- nautobot/project-static/docs/development/jobs/migration/from-v1.html +4 -46
- nautobot/project-static/docs/index.html +23 -54
- nautobot/project-static/docs/objects.inv +0 -0
- nautobot/project-static/docs/overview/application_stack.html +7 -47
- nautobot/project-static/docs/overview/design_philosophy.html +4 -46
- nautobot/project-static/docs/release-notes/index.html +12 -52
- nautobot/project-static/docs/release-notes/version-1.0.html +193 -234
- nautobot/project-static/docs/release-notes/version-1.1.html +190 -231
- nautobot/project-static/docs/release-notes/version-1.2.html +265 -306
- nautobot/project-static/docs/release-notes/version-1.3.html +291 -332
- nautobot/project-static/docs/release-notes/version-1.4.html +377 -417
- nautobot/project-static/docs/release-notes/version-1.5.html +566 -605
- nautobot/project-static/docs/release-notes/version-1.6.html +447 -904
- nautobot/project-static/docs/release-notes/version-2.0.html +489 -528
- nautobot/project-static/docs/release-notes/version-2.1.html +324 -363
- nautobot/project-static/docs/release-notes/version-2.2.html +317 -356
- nautobot/project-static/docs/release-notes/version-2.3.html +352 -997
- nautobot/project-static/docs/release-notes/version-2.4.html +101 -417
- nautobot/project-static/docs/requirements.txt +2 -2
- nautobot/project-static/docs/search/search_index.json +1 -1
- nautobot/project-static/docs/sitemap.xml +287 -295
- nautobot/project-static/docs/sitemap.xml.gz +0 -0
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/ldap.html +4 -46
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/remote.html +4 -46
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/sso.html +6 -48
- nautobot/project-static/docs/user-guide/administration/configuration/index.html +4 -46
- nautobot/project-static/docs/user-guide/administration/configuration/redis.html +4 -46
- nautobot/project-static/docs/user-guide/administration/configuration/settings.html +8 -110
- nautobot/project-static/docs/user-guide/administration/configuration/time-zones.html +4 -46
- nautobot/project-static/docs/user-guide/administration/guides/celery-queues.html +4 -46
- nautobot/project-static/docs/user-guide/administration/guides/docker.html +4 -46
- nautobot/project-static/docs/user-guide/administration/guides/health-checks.html +4 -46
- nautobot/project-static/docs/user-guide/administration/guides/permissions.html +4 -46
- nautobot/project-static/docs/user-guide/administration/guides/prometheus-metrics.html +4 -46
- nautobot/project-static/docs/user-guide/administration/guides/replicating-nautobot.html +4 -46
- nautobot/project-static/docs/user-guide/administration/guides/request-profiling.html +4 -46
- nautobot/project-static/docs/user-guide/administration/guides/s3-django-storage.html +6 -48
- nautobot/project-static/docs/user-guide/administration/guides/selinux-troubleshooting.html +4 -46
- nautobot/project-static/docs/user-guide/administration/installation/app-install.html +4 -46
- nautobot/project-static/docs/user-guide/administration/installation/external-authentication.html +4 -46
- nautobot/project-static/docs/user-guide/administration/installation/http-server.html +8 -66
- nautobot/project-static/docs/user-guide/administration/installation/index.html +4 -46
- nautobot/project-static/docs/user-guide/administration/installation/install_system.html +5 -47
- nautobot/project-static/docs/user-guide/administration/installation/nautobot.html +4 -46
- nautobot/project-static/docs/user-guide/administration/installation/services.html +4 -46
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-netbox.html +4 -46
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-postgresql.html +4 -46
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-server.html +4 -46
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-shell.html +4 -46
- nautobot/project-static/docs/user-guide/administration/upgrading/database-backup.html +4 -46
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/after-you-upgrade.html +4 -46
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/before-you-upgrade.html +4 -46
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/for-developers.html +4 -46
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/index.html +4 -46
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/whats-changed.html +8 -49
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/region-and-site-data-migration-guide.html +4 -46
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +4 -46
- nautobot/project-static/docs/user-guide/administration/upgrading/upgrading.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuit.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittermination.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittype.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/circuits/provider.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/circuits/providernetwork.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloud.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudaccount.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudnetwork.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudnetworkprefixassignment.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudresourcetype.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudservice.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudservicenetworkassignment.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/cable.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleport.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleporttemplate.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverport.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverporttemplate.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/controller.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/controllermanageddevicegroup.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/device.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebay.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebaytemplate.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicefamily.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/deviceredundancygroup.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicetype.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontport.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontporttemplate.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interface.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfaceredundancygroup.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfacetemplate.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/inventoryitem.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/location.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/locationtype.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/manufacturer.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/module.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/modulebay.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/modulebaytemplate.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/moduletype.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/platform.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerfeed.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlet.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlettemplate.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerpanel.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerport.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerporttemplate.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rack.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackgroup.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackreservation.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearport.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearporttemplate.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareimagefile.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareversion.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualchassis.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualdevicecontext.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontext.html +12 -50
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontextschema.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/extras/contact.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/extras/team.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/ipam/ipaddress.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/ipam/namespace.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/ipam/prefix.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/ipam/rir.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/ipam/routetarget.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/ipam/service.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlan.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlangroup.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vrf.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/overview/introduction.html +7 -49
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenant.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenantgroup.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/cluster.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustergroup.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustertype.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/virtualmachine.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/vminterface.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/wireless/index.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/wireless/radioprofile.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/wireless/supporteddatarate.html +4 -46
- nautobot/project-static/docs/user-guide/core-data-model/wireless/wirelessnetwork.html +4 -46
- nautobot/project-static/docs/user-guide/feature-guides/contacts-and-teams.html +4 -46
- nautobot/project-static/docs/user-guide/feature-guides/custom-fields.html +4 -46
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-devices.html +4 -46
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-location-types-and-locations.html +4 -46
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/index.html +4 -46
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/interfaces.html +4 -46
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/ipam.html +4 -46
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/platforms.html +4 -46
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/search-bar.html +4 -46
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/tenants.html +4 -46
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/vlans-and-vlan-groups.html +4 -46
- nautobot/project-static/docs/user-guide/feature-guides/git-data-source.html +7 -51
- nautobot/project-static/docs/user-guide/feature-guides/graphql.html +4 -46
- nautobot/project-static/docs/user-guide/feature-guides/ip-address-merge-tool.html +4 -46
- nautobot/project-static/docs/user-guide/feature-guides/relationships.html +4 -46
- nautobot/project-static/docs/user-guide/feature-guides/software-image-files-and-versions.html +7 -49
- nautobot/project-static/docs/user-guide/index.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/change-logging.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/computedfield.html +8 -50
- nautobot/project-static/docs/user-guide/platform-functionality/customfield.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/customlink.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/dynamicgroup.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/events.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/exporttemplate.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/externalintegration.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/gitrepository.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/graphql.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/graphqlquery.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/imageattachment.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/index.html +7 -50
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/job-scheduling-and-approvals.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobbutton.html +7 -49
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobhook.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobqueue.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/models.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/napalm.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/note.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/objectmetadata.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/relationship.html +5 -47
- nautobot/project-static/docs/user-guide/platform-functionality/rendering-jinja-templates.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/authentication.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/filtering.html +25 -94
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/overview.html +5 -74
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/ui-related-endpoints.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/role.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/savedview.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/secret.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/staticgroupassociation.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/status.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/tag.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/template-filters.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/users/objectpermission.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/users/token.html +4 -46
- nautobot/project-static/docs/user-guide/platform-functionality/webhook.html +4 -46
- nautobot/project-static/js/forms.js +1 -1
- nautobot/tenancy/api/views.py +13 -9
- nautobot/tenancy/views.py +2 -4
- nautobot/users/admin.py +1 -1
- nautobot/users/api/serializers.py +4 -5
- nautobot/users/api/views.py +3 -3
- nautobot/virtualization/api/serializers.py +4 -4
- nautobot/virtualization/api/views.py +24 -5
- nautobot/virtualization/filters.py +3 -20
- nautobot/virtualization/models.py +1 -1
- nautobot/virtualization/tables.py +2 -2
- nautobot/virtualization/templates/virtualization/cluster_edit.html +7 -1
- nautobot/virtualization/templates/virtualization/virtualmachine.html +9 -1
- nautobot/virtualization/templates/virtualization/virtualmachine_edit.html +8 -2
- nautobot/virtualization/tests/test_filters.py +0 -17
- nautobot/wireless/filters.py +2 -2
- nautobot/wireless/forms.py +1 -1
- nautobot/wireless/templates/wireless/wirelessnetwork_retrieve.html +9 -1
- nautobot/wireless/tests/test_filters.py +1 -29
- nautobot/wireless/views.py +10 -0
- {nautobot-2.4.0.dist-info → nautobot-2.4.0b1.dist-info}/METADATA +6 -6
- {nautobot-2.4.0.dist-info → nautobot-2.4.0b1.dist-info}/RECORD +543 -591
- {nautobot-2.4.0.dist-info → nautobot-2.4.0b1.dist-info}/WHEEL +1 -1
- nautobot/core/api/constants.py +0 -11
- nautobot/core/jobs/bulk_actions.py +0 -248
- nautobot/core/templates/about.html +0 -67
- nautobot/core/templates/inc/tenancy_form_panel.html +0 -9
- nautobot/core/templates/inc/tenant_table_row.html +0 -11
- nautobot/core/utils/querysets.py +0 -64
- nautobot/dcim/migrations/0067_controllermanageddevicegroup_tenant.py +0 -25
- nautobot/dcim/tests/integration/test_controller.py +0 -62
- nautobot/dcim/tests/integration/test_controller_managed_device_group.py +0 -71
- nautobot/dcim/tests/test_jobs.py +0 -118
- nautobot/extras/migrations/0120_job_is_singleton_job_is_singleton_override.py +0 -22
- nautobot/extras/migrations/0121_alter_team_contacts.py +0 -17
- nautobot/extras/test_jobs/singleton.py +0 -16
- nautobot/project-static/docs/media/development/core/kubernetes/k8s_job_edit.png +0 -0
- nautobot/project-static/docs/media/development/core/kubernetes/k8s_job_edit_button.png +0 -0
- nautobot/project-static/docs/media/development/core/kubernetes/k8s_job_list_nav.png +0 -0
- nautobot/project-static/docs/media/development/core/kubernetes/k8s_job_list_view.png +0 -0
- nautobot/project-static/docs/media/development/core/kubernetes/k8s_job_queue.png +0 -0
- nautobot/project-static/docs/media/development/core/kubernetes/k8s_job_queue_add.png +0 -0
- nautobot/project-static/docs/media/development/core/kubernetes/k8s_job_queue_config.png +0 -0
- nautobot/project-static/docs/media/development/core/kubernetes/k8s_job_result_completed.png +0 -0
- nautobot/project-static/docs/media/development/core/kubernetes/k8s_job_result_nav.png +0 -0
- nautobot/project-static/docs/media/development/core/kubernetes/k8s_job_result_pending.png +0 -0
- nautobot/project-static/docs/media/development/core/kubernetes/k8s_job_run_form.png +0 -0
- nautobot/project-static/docs/media/development/core/kubernetes/k8s_nautobot_login.png +0 -0
- nautobot/project-static/docs/media/development/core/kubernetes/k8s_run_job.png +0 -0
- nautobot/project-static/docs/media/development/core/kubernetes/k8s_run_scheduled_job_form.png +0 -0
- nautobot/project-static/docs/media/development/core/kubernetes/k8s_scheduled_job_result.png +0 -0
- nautobot/project-static/docs/media/development/core/ui-component-framework/buttons-example.png +0 -0
- nautobot/project-static/docs/media/development/core/ui-component-framework/cluster-type-before-after-example.png +0 -0
- nautobot/project-static/docs/media/development/core/ui-component-framework/object-fields-panel-example_2.png +0 -0
- nautobot/project-static/docs/media/development/core/ui-component-framework/stats-panel-example-code.png +0 -0
- nautobot/project-static/docs/user-guide/feature-guides/images/wireless/central-mode.png +0 -0
- nautobot/project-static/docs/user-guide/feature-guides/images/wireless/device-group-add.png +0 -0
- nautobot/project-static/docs/user-guide/feature-guides/images/wireless/device-group-create-1.png +0 -0
- nautobot/project-static/docs/user-guide/feature-guides/images/wireless/device-group-create-2.png +0 -0
- nautobot/project-static/docs/user-guide/feature-guides/images/wireless/radio-profile-add.png +0 -0
- nautobot/project-static/docs/user-guide/feature-guides/images/wireless/radio-profile-create.png +0 -0
- nautobot/project-static/docs/user-guide/feature-guides/images/wireless/supported-data-rate-add.png +0 -0
- nautobot/project-static/docs/user-guide/feature-guides/images/wireless/supported-data-rate-create.png +0 -0
- nautobot/project-static/docs/user-guide/feature-guides/images/wireless/wireless-controller-add.png +0 -0
- nautobot/project-static/docs/user-guide/feature-guides/images/wireless/wireless-controller-create-1.png +0 -0
- nautobot/project-static/docs/user-guide/feature-guides/images/wireless/wireless-controller-create-2.png +0 -0
- nautobot/project-static/docs/user-guide/feature-guides/images/wireless/wireless-network-add.png +0 -0
- nautobot/project-static/docs/user-guide/feature-guides/images/wireless/wireless-network-create.png +0 -0
- nautobot/project-static/docs/user-guide/feature-guides/wireless-networks-and-controllers.html +0 -9444
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/kubernetes-job-support.html +0 -9722
- nautobot/wireless/tests/integration/__init__.py +0 -0
- nautobot/wireless/tests/integration/test_radio_profile.py +0 -42
- {nautobot-2.4.0.dist-info → nautobot-2.4.0b1.dist-info}/LICENSE.txt +0 -0
- {nautobot-2.4.0.dist-info → nautobot-2.4.0b1.dist-info}/NOTICE +0 -0
- {nautobot-2.4.0.dist-info → nautobot-2.4.0b1.dist-info}/entry_points.txt +0 -0
nautobot/dcim/api/views.py
CHANGED
|
@@ -11,7 +11,6 @@ from drf_spectacular.types import OpenApiTypes
|
|
|
11
11
|
from drf_spectacular.utils import extend_schema, OpenApiParameter
|
|
12
12
|
from rest_framework.decorators import action
|
|
13
13
|
from rest_framework.mixins import ListModelMixin
|
|
14
|
-
from rest_framework.parsers import JSONParser, MultiPartParser
|
|
15
14
|
from rest_framework.permissions import IsAuthenticated
|
|
16
15
|
from rest_framework.response import Response
|
|
17
16
|
from rest_framework.viewsets import GenericViewSet, ViewSet
|
|
@@ -19,7 +18,6 @@ from rest_framework.viewsets import GenericViewSet, ViewSet
|
|
|
19
18
|
from nautobot.circuits.models import Circuit
|
|
20
19
|
from nautobot.cloud.models import CloudAccount
|
|
21
20
|
from nautobot.core.api.exceptions import ServiceUnavailable
|
|
22
|
-
from nautobot.core.api.parsers import NautobotCSVParser
|
|
23
21
|
from nautobot.core.api.utils import get_serializer_for_model
|
|
24
22
|
from nautobot.core.api.views import ModelViewSet
|
|
25
23
|
from nautobot.core.models.querysets import count_related
|
|
@@ -78,7 +76,7 @@ from nautobot.extras.api.views import (
|
|
|
78
76
|
)
|
|
79
77
|
from nautobot.extras.choices import SecretsGroupAccessTypeChoices, SecretsGroupSecretTypeChoices
|
|
80
78
|
from nautobot.extras.secrets.exceptions import SecretError
|
|
81
|
-
from nautobot.ipam.models import
|
|
79
|
+
from nautobot.ipam.models import Prefix, VLAN
|
|
82
80
|
from nautobot.virtualization.models import VirtualMachine
|
|
83
81
|
|
|
84
82
|
from . import serializers
|
|
@@ -142,7 +140,7 @@ class PassThroughPortMixin:
|
|
|
142
140
|
|
|
143
141
|
|
|
144
142
|
class LocationTypeViewSet(NautobotModelViewSet):
|
|
145
|
-
queryset = LocationType.objects.
|
|
143
|
+
queryset = LocationType.objects.select_related("parent").prefetch_related("content_types")
|
|
146
144
|
serializer_class = serializers.LocationTypeSerializer
|
|
147
145
|
filterset_class = filters.LocationTypeFilterSet
|
|
148
146
|
|
|
@@ -153,13 +151,17 @@ class LocationTypeViewSet(NautobotModelViewSet):
|
|
|
153
151
|
|
|
154
152
|
|
|
155
153
|
class LocationViewSet(NautobotModelViewSet):
|
|
156
|
-
queryset =
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
154
|
+
queryset = (
|
|
155
|
+
Location.objects.select_related("location_type", "parent", "status", "tenant")
|
|
156
|
+
.prefetch_related("tags")
|
|
157
|
+
.annotate(
|
|
158
|
+
device_count=count_related(Device, "location"),
|
|
159
|
+
rack_count=count_related(Rack, "location"),
|
|
160
|
+
prefix_count=count_related(Prefix, "locations"),
|
|
161
|
+
vlan_count=count_related(VLAN, "locations"),
|
|
162
|
+
circuit_count=count_related(Circuit, "circuit_terminations__location"),
|
|
163
|
+
virtual_machine_count=count_related(VirtualMachine, "cluster__location"),
|
|
164
|
+
)
|
|
163
165
|
)
|
|
164
166
|
serializer_class = serializers.LocationSerializer
|
|
165
167
|
filterset_class = filters.LocationFilterSet
|
|
@@ -171,7 +173,7 @@ class LocationViewSet(NautobotModelViewSet):
|
|
|
171
173
|
|
|
172
174
|
|
|
173
175
|
class RackGroupViewSet(NautobotModelViewSet):
|
|
174
|
-
queryset = RackGroup.objects.annotate(rack_count=count_related(Rack, "rack_group"))
|
|
176
|
+
queryset = RackGroup.objects.annotate(rack_count=count_related(Rack, "rack_group")).select_related("location")
|
|
175
177
|
serializer_class = serializers.RackGroupSerializer
|
|
176
178
|
filterset_class = filters.RackGroupFilterSet
|
|
177
179
|
|
|
@@ -182,9 +184,13 @@ class RackGroupViewSet(NautobotModelViewSet):
|
|
|
182
184
|
|
|
183
185
|
|
|
184
186
|
class RackViewSet(NautobotModelViewSet):
|
|
185
|
-
queryset =
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
queryset = (
|
|
188
|
+
Rack.objects.select_related("location", "rack_group__location", "status", "role", "tenant")
|
|
189
|
+
.prefetch_related("tags")
|
|
190
|
+
.annotate(
|
|
191
|
+
device_count=count_related(Device, "rack"),
|
|
192
|
+
power_feed_count=count_related(PowerFeed, "rack"),
|
|
193
|
+
)
|
|
188
194
|
)
|
|
189
195
|
serializer_class = serializers.RackSerializer
|
|
190
196
|
filterset_class = filters.RackFilterSet
|
|
@@ -249,7 +255,7 @@ class RackViewSet(NautobotModelViewSet):
|
|
|
249
255
|
|
|
250
256
|
|
|
251
257
|
class RackReservationViewSet(NautobotModelViewSet):
|
|
252
|
-
queryset = RackReservation.objects.
|
|
258
|
+
queryset = RackReservation.objects.select_related("rack", "user", "tenant")
|
|
253
259
|
serializer_class = serializers.RackReservationSerializer
|
|
254
260
|
filterset_class = filters.RackReservationFilterSet
|
|
255
261
|
|
|
@@ -289,10 +295,13 @@ class DeviceFamilyViewSet(NautobotModelViewSet):
|
|
|
289
295
|
|
|
290
296
|
|
|
291
297
|
class DeviceTypeViewSet(NautobotModelViewSet):
|
|
292
|
-
queryset =
|
|
298
|
+
queryset = (
|
|
299
|
+
DeviceType.objects.select_related("manufacturer")
|
|
300
|
+
.prefetch_related("software_image_files", "tags")
|
|
301
|
+
.annotate(device_count=count_related(Device, "device_type"))
|
|
302
|
+
)
|
|
293
303
|
serializer_class = serializers.DeviceTypeSerializer
|
|
294
304
|
filterset_class = filters.DeviceTypeFilterSet
|
|
295
|
-
parser_classes = [JSONParser, NautobotCSVParser, MultiPartParser]
|
|
296
305
|
|
|
297
306
|
|
|
298
307
|
#
|
|
@@ -378,8 +387,21 @@ class PlatformViewSet(NautobotModelViewSet):
|
|
|
378
387
|
class DeviceViewSet(ConfigContextQuerySetMixin, NautobotModelViewSet):
|
|
379
388
|
queryset = Device.objects.select_related(
|
|
380
389
|
"device_type__manufacturer",
|
|
390
|
+
"role",
|
|
391
|
+
"tenant",
|
|
392
|
+
"platform",
|
|
393
|
+
"rack",
|
|
394
|
+
"location",
|
|
395
|
+
"parent_bay",
|
|
396
|
+
"primary_ip4",
|
|
397
|
+
"primary_ip6",
|
|
398
|
+
"software_version",
|
|
381
399
|
"virtual_chassis__master",
|
|
382
|
-
|
|
400
|
+
"device_redundancy_group",
|
|
401
|
+
"controller_managed_device_group",
|
|
402
|
+
"secrets_group",
|
|
403
|
+
"status",
|
|
404
|
+
).prefetch_related("tags", "primary_ip4__nat_outside_list", "primary_ip6__nat_outside_list", "software_image_files")
|
|
383
405
|
serializer_class = serializers.DeviceSerializer
|
|
384
406
|
filterset_class = filters.DeviceFilterSet
|
|
385
407
|
|
|
@@ -542,65 +564,85 @@ class DeviceViewSet(ConfigContextQuerySetMixin, NautobotModelViewSet):
|
|
|
542
564
|
|
|
543
565
|
|
|
544
566
|
class ConsolePortViewSet(PathEndpointMixin, NautobotModelViewSet):
|
|
545
|
-
queryset = ConsolePort.objects.
|
|
567
|
+
queryset = ConsolePort.objects.select_related("device", "cable").prefetch_related(
|
|
568
|
+
"_path__destination", "_cable_peer", "tags"
|
|
569
|
+
)
|
|
546
570
|
serializer_class = serializers.ConsolePortSerializer
|
|
547
571
|
filterset_class = filters.ConsolePortFilterSet
|
|
548
572
|
|
|
549
573
|
|
|
550
574
|
class ConsoleServerPortViewSet(PathEndpointMixin, NautobotModelViewSet):
|
|
551
|
-
queryset = ConsoleServerPort.objects.
|
|
575
|
+
queryset = ConsoleServerPort.objects.select_related("device", "cable").prefetch_related(
|
|
576
|
+
"_path__destination", "_cable_peer", "tags"
|
|
577
|
+
)
|
|
552
578
|
serializer_class = serializers.ConsoleServerPortSerializer
|
|
553
579
|
filterset_class = filters.ConsoleServerPortFilterSet
|
|
554
580
|
|
|
555
581
|
|
|
556
582
|
class PowerPortViewSet(PathEndpointMixin, NautobotModelViewSet):
|
|
557
|
-
queryset = PowerPort.objects.
|
|
583
|
+
queryset = PowerPort.objects.select_related("device", "cable").prefetch_related(
|
|
584
|
+
"_path__destination", "_cable_peer", "tags"
|
|
585
|
+
)
|
|
558
586
|
serializer_class = serializers.PowerPortSerializer
|
|
559
587
|
filterset_class = filters.PowerPortFilterSet
|
|
560
588
|
|
|
561
589
|
|
|
562
590
|
class PowerOutletViewSet(PathEndpointMixin, NautobotModelViewSet):
|
|
563
|
-
queryset = PowerOutlet.objects.
|
|
591
|
+
queryset = PowerOutlet.objects.select_related("device", "cable").prefetch_related(
|
|
592
|
+
"_path__destination", "_cable_peer", "tags"
|
|
593
|
+
)
|
|
564
594
|
serializer_class = serializers.PowerOutletSerializer
|
|
565
595
|
filterset_class = filters.PowerOutletFilterSet
|
|
566
596
|
|
|
567
597
|
|
|
568
598
|
class InterfaceViewSet(PathEndpointMixin, NautobotModelViewSet):
|
|
569
|
-
queryset = Interface.objects.
|
|
570
|
-
|
|
599
|
+
queryset = Interface.objects.select_related(
|
|
600
|
+
"device",
|
|
601
|
+
"parent_interface",
|
|
602
|
+
"bridge",
|
|
603
|
+
"lag",
|
|
604
|
+
"status",
|
|
605
|
+
"cable",
|
|
606
|
+
"untagged_vlan",
|
|
607
|
+
).prefetch_related(
|
|
608
|
+
"tags", "_path__destination", "_cable_peer", "ip_addresses", "tagged_vlans", "virtual_device_contexts"
|
|
571
609
|
)
|
|
572
610
|
serializer_class = serializers.InterfaceSerializer
|
|
573
611
|
filterset_class = filters.InterfaceFilterSet
|
|
574
612
|
|
|
575
613
|
|
|
576
614
|
class FrontPortViewSet(PassThroughPortMixin, NautobotModelViewSet):
|
|
577
|
-
queryset = FrontPort.objects.select_related(
|
|
615
|
+
queryset = FrontPort.objects.select_related(
|
|
616
|
+
"device__device_type__manufacturer", "rear_port", "cable"
|
|
617
|
+
).prefetch_related("tags")
|
|
578
618
|
serializer_class = serializers.FrontPortSerializer
|
|
579
619
|
filterset_class = filters.FrontPortFilterSet
|
|
580
620
|
|
|
581
621
|
|
|
582
622
|
class RearPortViewSet(PassThroughPortMixin, NautobotModelViewSet):
|
|
583
|
-
queryset = RearPort.objects.select_related("device__device_type__manufacturer")
|
|
623
|
+
queryset = RearPort.objects.select_related("device__device_type__manufacturer", "cable").prefetch_related("tags")
|
|
584
624
|
serializer_class = serializers.RearPortSerializer
|
|
585
625
|
filterset_class = filters.RearPortFilterSet
|
|
586
626
|
|
|
587
627
|
|
|
588
628
|
class DeviceBayViewSet(NautobotModelViewSet):
|
|
589
|
-
queryset = DeviceBay.objects.
|
|
629
|
+
queryset = DeviceBay.objects.select_related("installed_device").prefetch_related("tags")
|
|
590
630
|
serializer_class = serializers.DeviceBaySerializer
|
|
591
631
|
filterset_class = filters.DeviceBayFilterSet
|
|
592
632
|
|
|
593
633
|
|
|
594
634
|
class InventoryItemViewSet(NautobotModelViewSet):
|
|
595
|
-
queryset = InventoryItem.objects.
|
|
635
|
+
queryset = InventoryItem.objects.select_related("device", "manufacturer", "software_version").prefetch_related(
|
|
636
|
+
"tags"
|
|
637
|
+
)
|
|
596
638
|
serializer_class = serializers.InventoryItemSerializer
|
|
597
639
|
filterset_class = filters.InventoryItemFilterSet
|
|
598
640
|
|
|
599
641
|
|
|
600
642
|
class ModuleBayViewSet(NautobotModelViewSet):
|
|
601
|
-
queryset = ModuleBay.objects.select_related(
|
|
602
|
-
"
|
|
603
|
-
)
|
|
643
|
+
queryset = ModuleBay.objects.select_related(
|
|
644
|
+
"parent_device__tenant", "parent_device__location", "parent_module"
|
|
645
|
+
).prefetch_related("installed_module", "tags")
|
|
604
646
|
serializer_class = serializers.ModuleBaySerializer
|
|
605
647
|
filterset_class = filters.ModuleBayFilterSet
|
|
606
648
|
|
|
@@ -639,7 +681,7 @@ class InterfaceConnectionViewSet(ListModelMixin, GenericViewSet):
|
|
|
639
681
|
|
|
640
682
|
|
|
641
683
|
class CableViewSet(NautobotModelViewSet):
|
|
642
|
-
queryset = Cable.objects.prefetch_related("termination_a", "termination_b")
|
|
684
|
+
queryset = Cable.objects.select_related("status").prefetch_related("termination_a", "termination_b")
|
|
643
685
|
serializer_class = serializers.CableSerializer
|
|
644
686
|
filterset_class = filters.CableFilterSet
|
|
645
687
|
|
|
@@ -650,7 +692,9 @@ class CableViewSet(NautobotModelViewSet):
|
|
|
650
692
|
|
|
651
693
|
|
|
652
694
|
class VirtualChassisViewSet(NautobotModelViewSet):
|
|
653
|
-
queryset = VirtualChassis.objects.
|
|
695
|
+
queryset = VirtualChassis.objects.prefetch_related("tags").annotate(
|
|
696
|
+
member_count=count_related(Device, "virtual_chassis")
|
|
697
|
+
)
|
|
654
698
|
serializer_class = serializers.VirtualChassisSerializer
|
|
655
699
|
filterset_class = filters.VirtualChassisFilterSet
|
|
656
700
|
|
|
@@ -661,7 +705,9 @@ class VirtualChassisViewSet(NautobotModelViewSet):
|
|
|
661
705
|
|
|
662
706
|
|
|
663
707
|
class PowerPanelViewSet(NautobotModelViewSet):
|
|
664
|
-
queryset = PowerPanel.objects.
|
|
708
|
+
queryset = PowerPanel.objects.select_related("location", "rack_group").annotate(
|
|
709
|
+
power_feed_count=count_related(PowerFeed, "power_panel")
|
|
710
|
+
)
|
|
665
711
|
serializer_class = serializers.PowerPanelSerializer
|
|
666
712
|
filterset_class = filters.PowerPanelFilterSet
|
|
667
713
|
|
|
@@ -672,7 +718,12 @@ class PowerPanelViewSet(NautobotModelViewSet):
|
|
|
672
718
|
|
|
673
719
|
|
|
674
720
|
class PowerFeedViewSet(PathEndpointMixin, NautobotModelViewSet):
|
|
675
|
-
queryset = PowerFeed.objects.
|
|
721
|
+
queryset = PowerFeed.objects.select_related(
|
|
722
|
+
"power_panel",
|
|
723
|
+
"rack",
|
|
724
|
+
"cable",
|
|
725
|
+
"status",
|
|
726
|
+
).prefetch_related("tags", "_cable_peer", "_path__destination")
|
|
676
727
|
serializer_class = serializers.PowerFeedSerializer
|
|
677
728
|
filterset_class = filters.PowerFeedFilterSet
|
|
678
729
|
|
|
@@ -683,7 +734,7 @@ class PowerFeedViewSet(PathEndpointMixin, NautobotModelViewSet):
|
|
|
683
734
|
|
|
684
735
|
|
|
685
736
|
class DeviceRedundancyGroupViewSet(NautobotModelViewSet):
|
|
686
|
-
queryset = DeviceRedundancyGroup.objects.
|
|
737
|
+
queryset = DeviceRedundancyGroup.objects.select_related("status").prefetch_related("devices")
|
|
687
738
|
serializer_class = serializers.DeviceRedundancyGroupSerializer
|
|
688
739
|
filterset_class = filters.DeviceRedundancyGroupFilterSet
|
|
689
740
|
|
|
@@ -694,7 +745,7 @@ class DeviceRedundancyGroupViewSet(NautobotModelViewSet):
|
|
|
694
745
|
|
|
695
746
|
|
|
696
747
|
class InterfaceRedundancyGroupViewSet(NautobotModelViewSet):
|
|
697
|
-
queryset = InterfaceRedundancyGroup.objects.
|
|
748
|
+
queryset = InterfaceRedundancyGroup.objects.select_related("status").prefetch_related("interfaces")
|
|
698
749
|
serializer_class = serializers.InterfaceRedundancyGroupSerializer
|
|
699
750
|
filterset_class = filters.InterfaceRedundancyGroupFilterSet
|
|
700
751
|
|
|
@@ -770,19 +821,21 @@ class ConnectedDeviceViewSet(ViewSet):
|
|
|
770
821
|
|
|
771
822
|
|
|
772
823
|
class SoftwareImageFileViewSet(NautobotModelViewSet):
|
|
773
|
-
queryset = SoftwareImageFile.objects.
|
|
824
|
+
queryset = SoftwareImageFile.objects.select_related("software_version").prefetch_related("device_types")
|
|
774
825
|
serializer_class = serializers.SoftwareImageFileSerializer
|
|
775
826
|
filterset_class = filters.SoftwareImageFileFilterSet
|
|
776
827
|
|
|
777
828
|
|
|
778
829
|
class SoftwareVersionViewSet(NautobotModelViewSet):
|
|
779
|
-
queryset = SoftwareVersion.objects.
|
|
830
|
+
queryset = SoftwareVersion.objects.select_related("platform").prefetch_related(
|
|
831
|
+
"devices", "software_image_files", "inventory_items", "virtual_machines"
|
|
832
|
+
)
|
|
780
833
|
serializer_class = serializers.SoftwareVersionSerializer
|
|
781
834
|
filterset_class = filters.SoftwareVersionFilterSet
|
|
782
835
|
|
|
783
836
|
|
|
784
837
|
class DeviceTypeToSoftwareImageFileViewSet(ModelViewSet):
|
|
785
|
-
queryset = DeviceTypeToSoftwareImageFile.objects.
|
|
838
|
+
queryset = DeviceTypeToSoftwareImageFile.objects.select_related("device_type", "software_image_file")
|
|
786
839
|
serializer_class = serializers.DeviceTypeToSoftwareImageFileSerializer
|
|
787
840
|
filterset_class = filters.DeviceTypeToSoftwareImageFileFilterSet
|
|
788
841
|
|
|
@@ -793,13 +846,23 @@ class DeviceTypeToSoftwareImageFileViewSet(ModelViewSet):
|
|
|
793
846
|
|
|
794
847
|
|
|
795
848
|
class ControllerViewSet(NautobotModelViewSet):
|
|
796
|
-
queryset = Controller.objects.
|
|
849
|
+
queryset = Controller.objects.select_related(
|
|
850
|
+
"location",
|
|
851
|
+
"platform",
|
|
852
|
+
"role",
|
|
853
|
+
"tenant",
|
|
854
|
+
"status",
|
|
855
|
+
).prefetch_related("tags")
|
|
797
856
|
serializer_class = serializers.ControllerSerializer
|
|
798
857
|
filterset_class = filters.ControllerFilterSet
|
|
799
858
|
|
|
800
859
|
|
|
801
860
|
class ControllerManagedDeviceGroupViewSet(NautobotModelViewSet):
|
|
802
|
-
queryset = ControllerManagedDeviceGroup.objects.
|
|
861
|
+
queryset = ControllerManagedDeviceGroup.objects.select_related(
|
|
862
|
+
"controller",
|
|
863
|
+
"parent",
|
|
864
|
+
).prefetch_related("tags")
|
|
865
|
+
|
|
803
866
|
serializer_class = serializers.ControllerManagedDeviceGroupSerializer
|
|
804
867
|
filterset_class = filters.ControllerManagedDeviceGroupFilterSet
|
|
805
868
|
|
|
@@ -814,24 +877,27 @@ class ModuleViewSet(NautobotModelViewSet):
|
|
|
814
877
|
"parent_module_bay__parent_device__location",
|
|
815
878
|
"parent_module_bay__parent_device__tenant",
|
|
816
879
|
"module_type__manufacturer",
|
|
817
|
-
|
|
880
|
+
"tenant",
|
|
881
|
+
"role",
|
|
882
|
+
"location",
|
|
883
|
+
).prefetch_related("module_bays", "tags")
|
|
818
884
|
serializer_class = serializers.ModuleSerializer
|
|
819
885
|
filterset_class = filters.ModuleFilterSet
|
|
820
886
|
|
|
821
887
|
|
|
822
888
|
class ModuleTypeViewSet(NautobotModelViewSet):
|
|
823
|
-
queryset = ModuleType.objects.
|
|
889
|
+
queryset = ModuleType.objects.select_related("manufacturer").prefetch_related("tags", "modules")
|
|
824
890
|
serializer_class = serializers.ModuleTypeSerializer
|
|
825
891
|
filterset_class = filters.ModuleTypeFilterSet
|
|
826
892
|
|
|
827
893
|
|
|
828
894
|
class VirtualDeviceContextViewSet(NautobotModelViewSet):
|
|
829
|
-
queryset = VirtualDeviceContext.objects.
|
|
895
|
+
queryset = VirtualDeviceContext.objects.select_related("device", "tenant", "primary_ip4", "primary_ip6", "role")
|
|
830
896
|
serializer_class = serializers.VirtualDeviceContextSerializer
|
|
831
897
|
filterset_class = filters.VirtualDeviceContextFilterSet
|
|
832
898
|
|
|
833
899
|
|
|
834
900
|
class InterfaceVDCAssignmentViewSet(NautobotModelViewSet):
|
|
835
|
-
queryset = InterfaceVDCAssignment.objects.
|
|
901
|
+
queryset = InterfaceVDCAssignment.objects.select_related("virtual_device_context", "interface")
|
|
836
902
|
serializer_class = serializers.InterfaceVDCAssignmentSerializer
|
|
837
903
|
filterset_class = filters.InterfaceVDCAssignmentFilterSet
|
|
@@ -128,8 +128,8 @@ __all__ = (
|
|
|
128
128
|
"FrontPortTemplateFilterSet",
|
|
129
129
|
"InterfaceConnectionFilterSet",
|
|
130
130
|
"InterfaceFilterSet",
|
|
131
|
-
"InterfaceRedundancyGroupAssociationFilterSet",
|
|
132
131
|
"InterfaceRedundancyGroupFilterSet",
|
|
132
|
+
"InterfaceRedundancyGroupAssociationFilterSet",
|
|
133
133
|
"InterfaceTemplateFilterSet",
|
|
134
134
|
"InventoryItemFilterSet",
|
|
135
135
|
"LocationFilterSet",
|
|
@@ -907,12 +907,6 @@ class DeviceFilterSet(
|
|
|
907
907
|
to_field_name="version",
|
|
908
908
|
label="Software version (version or ID)",
|
|
909
909
|
)
|
|
910
|
-
ip_addresses = MultiValueCharFilter(
|
|
911
|
-
method="filter_ip_addresses",
|
|
912
|
-
label="IP addresses (address or ID)",
|
|
913
|
-
distinct=True,
|
|
914
|
-
)
|
|
915
|
-
has_ip_addresses = RelatedMembershipBooleanFilter(field_name="interfaces__ip_addresses", label="Has IP addresses")
|
|
916
910
|
radio_profiles = NaturalKeyOrPKMultipleChoiceFilter(
|
|
917
911
|
field_name="controller_managed_device_group__radio_profiles",
|
|
918
912
|
queryset=RadioProfile.objects.all(),
|
|
@@ -934,13 +928,6 @@ class DeviceFilterSet(
|
|
|
934
928
|
label="Has wireless networks",
|
|
935
929
|
)
|
|
936
930
|
|
|
937
|
-
def filter_ip_addresses(self, queryset, name, value):
|
|
938
|
-
pk_values = set(item for item in value if is_uuid(item))
|
|
939
|
-
addresses = set(item for item in value if item not in pk_values)
|
|
940
|
-
|
|
941
|
-
ip_queryset = IPAddress.objects.filter_address_or_pk_in(addresses, pk_values)
|
|
942
|
-
return queryset.filter(interfaces__ip_addresses__in=ip_queryset).distinct()
|
|
943
|
-
|
|
944
931
|
class Meta:
|
|
945
932
|
model = Device
|
|
946
933
|
fields = [
|
|
@@ -1167,12 +1154,6 @@ class InterfaceFilterSet(
|
|
|
1167
1154
|
queryset=InterfaceRedundancyGroup.objects.all(),
|
|
1168
1155
|
to_field_name="name",
|
|
1169
1156
|
)
|
|
1170
|
-
ip_addresses = MultiValueCharFilter(
|
|
1171
|
-
method="filter_ip_addresses",
|
|
1172
|
-
label="IP addresses (address or ID)",
|
|
1173
|
-
distinct=True,
|
|
1174
|
-
)
|
|
1175
|
-
has_ip_addresses = RelatedMembershipBooleanFilter(field_name="ip_addresses", label="Has IP addresses")
|
|
1176
1157
|
virtual_device_contexts = NaturalKeyOrPKMultipleChoiceFilter(
|
|
1177
1158
|
queryset=VirtualDeviceContext.objects.all(),
|
|
1178
1159
|
to_field_name="name",
|
|
@@ -1183,13 +1164,6 @@ class InterfaceFilterSet(
|
|
|
1183
1164
|
label="Has Virtual Device Context",
|
|
1184
1165
|
)
|
|
1185
1166
|
|
|
1186
|
-
def filter_ip_addresses(self, queryset, name, value):
|
|
1187
|
-
pk_values = set(item for item in value if is_uuid(item))
|
|
1188
|
-
addresses = set(item for item in value if item not in pk_values)
|
|
1189
|
-
|
|
1190
|
-
ip_queryset = IPAddress.objects.filter_address_or_pk_in(addresses, pk_values)
|
|
1191
|
-
return queryset.filter(ip_addresses__in=ip_queryset).distinct()
|
|
1192
|
-
|
|
1193
1167
|
class Meta:
|
|
1194
1168
|
model = Interface
|
|
1195
1169
|
fields = [
|
|
@@ -1910,10 +1884,7 @@ class ControllerFilterSet(
|
|
|
1910
1884
|
fields = "__all__"
|
|
1911
1885
|
|
|
1912
1886
|
|
|
1913
|
-
class ControllerManagedDeviceGroupFilterSet(
|
|
1914
|
-
NautobotFilterSet,
|
|
1915
|
-
TenancyModelFilterSetMixin,
|
|
1916
|
-
):
|
|
1887
|
+
class ControllerManagedDeviceGroupFilterSet(NautobotFilterSet):
|
|
1917
1888
|
"""Filters for ControllerManagedDeviceGroup model."""
|
|
1918
1889
|
|
|
1919
1890
|
q = SearchFilter(
|
nautobot/dcim/forms.py
CHANGED
|
@@ -588,7 +588,7 @@ class RackBulkEditForm(
|
|
|
588
588
|
required=False,
|
|
589
589
|
widget=StaticSelect2(),
|
|
590
590
|
)
|
|
591
|
-
u_height = forms.IntegerField(required=False, label="Height (U)"
|
|
591
|
+
u_height = forms.IntegerField(required=False, label="Height (U)")
|
|
592
592
|
desc_units = forms.NullBooleanField(required=False, widget=BulkEditNullBooleanSelect, label="Descending units")
|
|
593
593
|
outer_width = forms.IntegerField(required=False, min_value=1)
|
|
594
594
|
outer_depth = forms.IntegerField(required=False, min_value=1)
|
|
@@ -796,7 +796,7 @@ class DeviceFamilyFilterForm(NautobotFilterForm):
|
|
|
796
796
|
tags = TagFilterField(model)
|
|
797
797
|
|
|
798
798
|
|
|
799
|
-
class DeviceFamilyBulkEditForm(
|
|
799
|
+
class DeviceFamilyBulkEditForm(NautobotBulkEditForm, TagsBulkEditFormMixin):
|
|
800
800
|
pk = forms.ModelMultipleChoiceField(queryset=DeviceFamily.objects.all(), widget=forms.MultipleHiddenInput())
|
|
801
801
|
description = forms.CharField(required=False)
|
|
802
802
|
|
|
@@ -878,7 +878,7 @@ class DeviceTypeBulkEditForm(TagsBulkEditFormMixin, NautobotBulkEditForm):
|
|
|
878
878
|
manufacturer = DynamicModelChoiceField(queryset=Manufacturer.objects.all(), required=False)
|
|
879
879
|
device_family = DynamicModelChoiceField(queryset=DeviceFamily.objects.all(), required=False)
|
|
880
880
|
software_image_files = DynamicModelMultipleChoiceField(queryset=SoftwareImageFile.objects.all(), required=False)
|
|
881
|
-
u_height = forms.IntegerField(required=False
|
|
881
|
+
u_height = forms.IntegerField(required=False)
|
|
882
882
|
is_full_depth = forms.NullBooleanField(required=False, widget=BulkEditNullBooleanSelect(), label="Is full depth")
|
|
883
883
|
comments = CommentField(label="Comments", required=False)
|
|
884
884
|
|
|
@@ -1655,8 +1655,6 @@ class ComponentTemplateImportForm(BootstrapMixin, CustomFieldModelCSVForm):
|
|
|
1655
1655
|
netbox-community/devicetype-library repository.
|
|
1656
1656
|
"""
|
|
1657
1657
|
|
|
1658
|
-
Meta: type # to be defined by concrete subclasses
|
|
1659
|
-
|
|
1660
1658
|
def __init__(self, data=None, *args, **kwargs):
|
|
1661
1659
|
super().__init__(data, *args, **kwargs)
|
|
1662
1660
|
|
|
@@ -2129,8 +2127,6 @@ class DeviceBulkEditForm(
|
|
|
2129
2127
|
rack_group = DynamicModelChoiceField(
|
|
2130
2128
|
queryset=RackGroup.objects.all(), required=False, query_params={"location": "$location"}
|
|
2131
2129
|
)
|
|
2132
|
-
cluster = DynamicModelChoiceField(queryset=Cluster.objects.all(), required=False)
|
|
2133
|
-
comments = CommentField(widget=SmallTextarea, label="Comments")
|
|
2134
2130
|
tenant = DynamicModelChoiceField(queryset=Tenant.objects.all(), required=False)
|
|
2135
2131
|
platform = DynamicModelChoiceField(queryset=Platform.objects.all(), required=False)
|
|
2136
2132
|
serial = forms.CharField(max_length=CHARFIELD_MAX_LENGTH, required=False, label="Serial Number")
|
|
@@ -2154,8 +2150,6 @@ class DeviceBulkEditForm(
|
|
|
2154
2150
|
"position",
|
|
2155
2151
|
"face",
|
|
2156
2152
|
"rack_group",
|
|
2157
|
-
"cluster",
|
|
2158
|
-
"comments",
|
|
2159
2153
|
"secrets_group",
|
|
2160
2154
|
"device_redundancy_group",
|
|
2161
2155
|
"device_redundancy_group_priority",
|
|
@@ -3220,6 +3214,9 @@ class InterfaceBulkEditForm(
|
|
|
3220
3214
|
untagged_vlan = DynamicModelChoiceField(
|
|
3221
3215
|
queryset=VLAN.objects.all(),
|
|
3222
3216
|
required=False,
|
|
3217
|
+
query_params={
|
|
3218
|
+
"locations": "null",
|
|
3219
|
+
},
|
|
3223
3220
|
)
|
|
3224
3221
|
tagged_vlans = DynamicModelMultipleChoiceField(
|
|
3225
3222
|
queryset=VLAN.objects.all(),
|
|
@@ -3269,12 +3266,8 @@ class InterfaceBulkEditForm(
|
|
|
3269
3266
|
# Limit VLAN choices by Location
|
|
3270
3267
|
if locations.count() == 1:
|
|
3271
3268
|
location = locations.first()
|
|
3272
|
-
|
|
3273
|
-
# to those available on the devices in that location and in the ancestors of the location.
|
|
3274
|
-
self.fields["untagged_vlan"].widget.add_query_param("available_on_device", device.pk)
|
|
3269
|
+
self.fields["untagged_vlan"].widget.add_query_param("locations", location.pk)
|
|
3275
3270
|
self.fields["tagged_vlans"].widget.add_query_param("locations", location.pk)
|
|
3276
|
-
else:
|
|
3277
|
-
self.fields["tagged_vlans"].widget.add_query_param("locations", "null")
|
|
3278
3271
|
|
|
3279
3272
|
# Restrict parent/bridge/LAG interface assignment by device (or VC master)
|
|
3280
3273
|
if device_count == 1:
|
|
@@ -4989,6 +4982,10 @@ class ControllerForm(LocatableModelFormMixin, NautobotModelForm, TenancyForm):
|
|
|
4989
4982
|
queryset=Platform.objects.all(),
|
|
4990
4983
|
required=False,
|
|
4991
4984
|
)
|
|
4985
|
+
tenant = DynamicModelChoiceField(
|
|
4986
|
+
queryset=Tenant.objects.all(),
|
|
4987
|
+
required=False,
|
|
4988
|
+
)
|
|
4992
4989
|
external_integration = DynamicModelChoiceField(
|
|
4993
4990
|
queryset=ExternalIntegration.objects.all(),
|
|
4994
4991
|
required=False,
|
|
@@ -5010,7 +5007,6 @@ class ControllerForm(LocatableModelFormMixin, NautobotModelForm, TenancyForm):
|
|
|
5010
5007
|
"role",
|
|
5011
5008
|
"description",
|
|
5012
5009
|
"platform",
|
|
5013
|
-
"tenant_group",
|
|
5014
5010
|
"tenant",
|
|
5015
5011
|
"location",
|
|
5016
5012
|
"capabilities",
|
|
@@ -5063,7 +5059,6 @@ class ControllerFilterForm(
|
|
|
5063
5059
|
"description",
|
|
5064
5060
|
"location",
|
|
5065
5061
|
"platform",
|
|
5066
|
-
"tenant_group",
|
|
5067
5062
|
"tenant",
|
|
5068
5063
|
"external_integration",
|
|
5069
5064
|
"controller_device",
|
|
@@ -5090,7 +5085,7 @@ class ControllerBulkEditForm(
|
|
|
5090
5085
|
required=False,
|
|
5091
5086
|
)
|
|
5092
5087
|
capabilities = JSONArrayFormField(
|
|
5093
|
-
choices=ControllerCapabilitiesChoices,
|
|
5088
|
+
choices=add_blank_choice(ControllerCapabilitiesChoices),
|
|
5094
5089
|
base_field=forms.CharField(),
|
|
5095
5090
|
required=False,
|
|
5096
5091
|
)
|
|
@@ -5119,18 +5114,15 @@ class ControllerBulkEditForm(
|
|
|
5119
5114
|
"description",
|
|
5120
5115
|
"location",
|
|
5121
5116
|
"platform",
|
|
5117
|
+
"tenant",
|
|
5122
5118
|
"external_integration",
|
|
5123
5119
|
"controller_device",
|
|
5124
5120
|
"controller_device_redundancy_group",
|
|
5125
5121
|
"tags",
|
|
5126
5122
|
)
|
|
5127
|
-
nullable_fields = (
|
|
5128
|
-
"tenant",
|
|
5129
|
-
"capabilities",
|
|
5130
|
-
)
|
|
5131
5123
|
|
|
5132
5124
|
|
|
5133
|
-
class ControllerManagedDeviceGroupForm(NautobotModelForm
|
|
5125
|
+
class ControllerManagedDeviceGroupForm(NautobotModelForm):
|
|
5134
5126
|
"""ControllerManagedDeviceGroup create/edit form."""
|
|
5135
5127
|
|
|
5136
5128
|
controller = DynamicModelChoiceField(queryset=Controller.objects.all(), required=True)
|
|
@@ -5147,15 +5139,12 @@ class ControllerManagedDeviceGroupForm(NautobotModelForm, TenancyForm):
|
|
|
5147
5139
|
fields = (
|
|
5148
5140
|
"controller",
|
|
5149
5141
|
"name",
|
|
5150
|
-
"description",
|
|
5151
5142
|
"devices",
|
|
5152
5143
|
"parent",
|
|
5153
5144
|
"capabilities",
|
|
5154
5145
|
"weight",
|
|
5155
5146
|
"radio_profiles",
|
|
5156
5147
|
"tags",
|
|
5157
|
-
"tenant_group",
|
|
5158
|
-
"tenant",
|
|
5159
5148
|
)
|
|
5160
5149
|
|
|
5161
5150
|
def __init__(self, *args, **kwargs):
|
|
@@ -5170,13 +5159,12 @@ class ControllerManagedDeviceGroupForm(NautobotModelForm, TenancyForm):
|
|
|
5170
5159
|
return instance
|
|
5171
5160
|
|
|
5172
5161
|
|
|
5173
|
-
class ControllerManagedDeviceGroupFilterForm(NautobotFilterForm
|
|
5162
|
+
class ControllerManagedDeviceGroupFilterForm(NautobotFilterForm):
|
|
5174
5163
|
"""ControllerManagedDeviceGroup basic filter form."""
|
|
5175
5164
|
|
|
5176
5165
|
model = ControllerManagedDeviceGroup
|
|
5177
5166
|
q = forms.CharField(required=False, label="Search")
|
|
5178
5167
|
name = forms.CharField(required=False, label="Name")
|
|
5179
|
-
description = forms.CharField(required=False, label="Description")
|
|
5180
5168
|
controller = DynamicModelChoiceField(
|
|
5181
5169
|
queryset=Controller.objects.all(),
|
|
5182
5170
|
required=False,
|
|
@@ -5197,14 +5185,11 @@ class ControllerManagedDeviceGroupFilterForm(NautobotFilterForm, TenancyFilterFo
|
|
|
5197
5185
|
field_order = (
|
|
5198
5186
|
"q",
|
|
5199
5187
|
"name",
|
|
5200
|
-
"description",
|
|
5201
5188
|
"controller",
|
|
5202
5189
|
"parent",
|
|
5203
5190
|
"weight",
|
|
5204
5191
|
"subtree",
|
|
5205
5192
|
"tags",
|
|
5206
|
-
"tenant",
|
|
5207
|
-
"tenant_group",
|
|
5208
5193
|
)
|
|
5209
5194
|
|
|
5210
5195
|
|
|
@@ -5229,11 +5214,10 @@ class ControllerManagedDeviceGroupBulkEditForm(TagsBulkEditFormMixin, NautobotBu
|
|
|
5229
5214
|
label="Remove Radio Profiles",
|
|
5230
5215
|
)
|
|
5231
5216
|
capabilities = JSONArrayFormField(
|
|
5232
|
-
choices=ControllerCapabilitiesChoices,
|
|
5217
|
+
choices=add_blank_choice(ControllerCapabilitiesChoices),
|
|
5233
5218
|
base_field=forms.CharField(),
|
|
5234
5219
|
required=False,
|
|
5235
5220
|
)
|
|
5236
|
-
tenant = DynamicModelChoiceField(queryset=Tenant.objects.all(), required=False)
|
|
5237
5221
|
|
|
5238
5222
|
class Meta:
|
|
5239
5223
|
model = ControllerManagedDeviceGroup
|
|
@@ -5241,11 +5225,8 @@ class ControllerManagedDeviceGroupBulkEditForm(TagsBulkEditFormMixin, NautobotBu
|
|
|
5241
5225
|
"controller",
|
|
5242
5226
|
"parent",
|
|
5243
5227
|
"weight",
|
|
5244
|
-
"tags",
|
|
5245
|
-
)
|
|
5246
|
-
nullable_fields = (
|
|
5247
|
-
"tenant",
|
|
5248
5228
|
"capabilities",
|
|
5229
|
+
"tags",
|
|
5249
5230
|
)
|
|
5250
5231
|
|
|
5251
5232
|
|
nautobot/dcim/graphql/types.py
CHANGED
|
@@ -98,13 +98,13 @@ class CableType(OptimizedNautobotObjectType):
|
|
|
98
98
|
|
|
99
99
|
def resolve_termination_a_type(self, args):
|
|
100
100
|
if self.termination_a_type:
|
|
101
|
-
model = self.termination_a_type.model_class()
|
|
101
|
+
model = self.termination_a_type.model_class()
|
|
102
102
|
return f"{model._meta.app_label}.{model._meta.model_name}"
|
|
103
103
|
return None
|
|
104
104
|
|
|
105
105
|
def resolve_termination_b_type(self, args):
|
|
106
106
|
if self.termination_b_type:
|
|
107
|
-
model = self.termination_b_type.model_class()
|
|
107
|
+
model = self.termination_b_type.model_class()
|
|
108
108
|
return f"{model._meta.app_label}.{model._meta.model_name}"
|
|
109
109
|
return None
|
|
110
110
|
|