nautobot 2.4.16__py3-none-any.whl → 2.4.17__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/utils.py +2 -0
- nautobot/cloud/templates/cloud/cloudresourcetype_retrieve.html +3 -3
- nautobot/cloud/views.py +7 -0
- nautobot/core/apps/__init__.py +1 -0
- nautobot/core/celery/__init__.py +2 -1
- nautobot/core/templates/components/panel/panel.html +1 -1
- nautobot/core/templates/inc/paginator.html +3 -3
- nautobot/core/templates/inc/table.html +2 -2
- nautobot/core/templatetags/helpers.py +80 -6
- nautobot/core/testing/mixins.py +1 -1
- nautobot/core/testing/views.py +2 -4
- nautobot/core/ui/bulk_buttons.py +53 -53
- nautobot/core/ui/object_detail.py +9 -4
- nautobot/core/utils/data.py +13 -0
- nautobot/core/utils/deprecation.py +2 -0
- nautobot/dcim/migrations/0073_alter_powerport_power_factor_and_more.py +41 -0
- nautobot/dcim/models/device_component_templates.py +4 -2
- nautobot/dcim/models/device_components.py +3 -2
- nautobot/dcim/templates/dcim/rack_elevation_list.html +4 -4
- nautobot/dcim/views.py +9 -0
- nautobot/extras/models/customfields.py +45 -9
- nautobot/extras/templates/extras/configcontext_retrieve.html +1 -1
- nautobot/extras/templates/extras/configcontext_update.html +49 -49
- nautobot/extras/templates/extras/configcontextschema_retrieve.html +47 -47
- nautobot/extras/templates/extras/configcontextschema_update.html +18 -18
- nautobot/extras/templates/extras/inc/job_table.html +1 -1
- nautobot/extras/templates/extras/inc/object_contact_header.html +2 -2
- nautobot/extras/templates/extras/note_retrieve.html +53 -53
- nautobot/extras/templates/extras/tag_retrieve.html +1 -1
- nautobot/extras/templates/extras/tag_update.html +14 -14
- nautobot/extras/templates/extras/team_retrieve.html +1 -1
- nautobot/extras/tests/test_models.py +216 -0
- nautobot/extras/tests/test_views.py +2 -2
- nautobot/extras/views.py +1 -0
- nautobot/ipam/apps.py +1 -0
- nautobot/ipam/jobs/__init__.py +10 -0
- nautobot/ipam/jobs/cleanup.py +296 -0
- nautobot/ipam/models.py +301 -178
- nautobot/ipam/templates/ipam/inc/ipadress_edit_header.html +3 -3
- nautobot/ipam/templates/ipam/inc/toggle_available.html +2 -2
- nautobot/ipam/templates/ipam/ipaddress_assign.html +1 -1
- nautobot/ipam/templates/ipam/prefix_list.html +1 -1
- nautobot/ipam/templates/ipam/vlan_retrieve.html +1 -77
- nautobot/ipam/tests/test_jobs.py +454 -0
- nautobot/ipam/tests/test_models.py +290 -122
- nautobot/ipam/tests/test_views.py +40 -164
- nautobot/ipam/urls.py +0 -11
- nautobot/ipam/utils/testing.py +9 -4
- nautobot/ipam/views.py +166 -235
- nautobot/project-static/docs/404.html +9 -6
- nautobot/project-static/docs/apps/index.html +9 -6
- nautobot/project-static/docs/apps/nautobot-apps.html +9 -6
- nautobot/project-static/docs/assets/javascripts/bundle.92b07e13.min.js +16 -0
- nautobot/project-static/docs/assets/javascripts/{bundle.50899def.min.js.map → bundle.92b07e13.min.js.map} +2 -2
- nautobot/project-static/docs/assets/javascripts/workers/{search.d50fe291.min.js → search.973d3a69.min.js} +4 -4
- nautobot/project-static/docs/assets/javascripts/workers/{search.d50fe291.min.js.map → search.973d3a69.min.js.map} +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/__init__.html +9 -6
- nautobot/project-static/docs/code-reference/nautobot/apps/admin.html +9 -6
- nautobot/project-static/docs/code-reference/nautobot/apps/api.html +9 -6
- nautobot/project-static/docs/code-reference/nautobot/apps/change_logging.html +9 -6
- nautobot/project-static/docs/code-reference/nautobot/apps/choices.html +10 -7
- nautobot/project-static/docs/code-reference/nautobot/apps/config.html +9 -6
- nautobot/project-static/docs/code-reference/nautobot/apps/constants.html +9 -6
- nautobot/project-static/docs/code-reference/nautobot/apps/datasources.html +9 -6
- nautobot/project-static/docs/code-reference/nautobot/apps/events.html +9 -6
- nautobot/project-static/docs/code-reference/nautobot/apps/exceptions.html +9 -6
- nautobot/project-static/docs/code-reference/nautobot/apps/factory.html +9 -6
- nautobot/project-static/docs/code-reference/nautobot/apps/filters.html +9 -6
- nautobot/project-static/docs/code-reference/nautobot/apps/forms.html +9 -6
- nautobot/project-static/docs/code-reference/nautobot/apps/graphql.html +9 -6
- nautobot/project-static/docs/code-reference/nautobot/apps/jobs.html +9 -6
- nautobot/project-static/docs/code-reference/nautobot/apps/models.html +11 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/querysets.html +9 -6
- nautobot/project-static/docs/code-reference/nautobot/apps/secrets.html +9 -6
- nautobot/project-static/docs/code-reference/nautobot/apps/tables.html +11 -8
- nautobot/project-static/docs/code-reference/nautobot/apps/testing.html +9 -6
- nautobot/project-static/docs/code-reference/nautobot/apps/ui.html +28 -9
- nautobot/project-static/docs/code-reference/nautobot/apps/urls.html +9 -6
- nautobot/project-static/docs/code-reference/nautobot/apps/utils.html +69 -7
- nautobot/project-static/docs/code-reference/nautobot/apps/views.html +9 -6
- nautobot/project-static/docs/development/apps/api/configuration-view.html +13 -10
- nautobot/project-static/docs/development/apps/api/database-backend-config.html +11 -8
- nautobot/project-static/docs/development/apps/api/models/django-admin.html +13 -10
- nautobot/project-static/docs/development/apps/api/models/global-search.html +10 -7
- nautobot/project-static/docs/development/apps/api/models/graphql.html +18 -15
- nautobot/project-static/docs/development/apps/api/models/index.html +14 -11
- nautobot/project-static/docs/development/apps/api/nautobot-app-config.html +11 -8
- nautobot/project-static/docs/development/apps/api/platform-features/custom-validators.html +15 -12
- nautobot/project-static/docs/development/apps/api/platform-features/filter-extensions.html +9 -6
- nautobot/project-static/docs/development/apps/api/platform-features/git-repository-content.html +15 -12
- nautobot/project-static/docs/development/apps/api/platform-features/index.html +9 -6
- nautobot/project-static/docs/development/apps/api/platform-features/jinja2-filters.html +11 -8
- nautobot/project-static/docs/development/apps/api/platform-features/jobs.html +16 -13
- nautobot/project-static/docs/development/apps/api/platform-features/populating-extensibility-features.html +12 -10305
- nautobot/project-static/docs/development/apps/api/platform-features/prepopulating-data.html +10722 -0
- nautobot/project-static/docs/development/apps/api/platform-features/secrets-providers.html +15 -12
- nautobot/project-static/docs/development/apps/api/platform-features/table-extensions.html +14 -11
- nautobot/project-static/docs/development/apps/api/platform-features/uniquely-identify-objects.html +9 -6
- nautobot/project-static/docs/development/apps/api/prometheus.html +15 -12
- nautobot/project-static/docs/development/apps/api/setup.html +9 -6
- nautobot/project-static/docs/development/apps/api/testing.html +9 -6
- nautobot/project-static/docs/development/apps/api/ui-extensions/banners.html +12 -9
- nautobot/project-static/docs/development/apps/api/ui-extensions/home-page.html +9 -6
- nautobot/project-static/docs/development/apps/api/ui-extensions/index.html +9 -6
- nautobot/project-static/docs/development/apps/api/ui-extensions/navigation.html +9 -6
- nautobot/project-static/docs/development/apps/api/ui-extensions/object-views.html +20 -17
- nautobot/project-static/docs/development/apps/api/views/base-template.html +9 -6
- nautobot/project-static/docs/development/apps/api/views/core-view-overrides.html +15 -12
- nautobot/project-static/docs/development/apps/api/views/django-generic-views.html +14 -11
- nautobot/project-static/docs/development/apps/api/views/help-documentation.html +9 -6
- nautobot/project-static/docs/development/apps/api/views/index.html +9 -6
- nautobot/project-static/docs/development/apps/api/views/nautobot-generic-views.html +10 -7
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewset.html +24 -21
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewsetrouter.html +12 -9
- nautobot/project-static/docs/development/apps/api/views/notes.html +10 -7
- nautobot/project-static/docs/development/apps/api/views/rest-api.html +19 -16
- nautobot/project-static/docs/development/apps/api/views/urls.html +11 -8
- nautobot/project-static/docs/development/apps/index.html +9 -6
- nautobot/project-static/docs/development/apps/migration/code-updates.html +19 -16
- nautobot/project-static/docs/development/apps/migration/dependency-updates.html +9 -6
- nautobot/project-static/docs/development/apps/migration/from-v1.html +9 -6
- nautobot/project-static/docs/development/apps/migration/model-updates/dcim.html +22 -19
- nautobot/project-static/docs/development/apps/migration/model-updates/extras.html +9 -6
- nautobot/project-static/docs/development/apps/migration/model-updates/global.html +9 -6
- nautobot/project-static/docs/development/apps/migration/model-updates/ipam.html +9 -6
- nautobot/project-static/docs/development/apps/migration/ui-component-framework/best-practices.html +9 -6
- nautobot/project-static/docs/development/apps/migration/ui-component-framework/breadcrumbs-titles.html +14 -11
- nautobot/project-static/docs/development/apps/migration/ui-component-framework/custom-content.html +27 -24
- nautobot/project-static/docs/development/apps/migration/ui-component-framework/index.html +20 -17
- nautobot/project-static/docs/development/apps/migration/ui-component-framework/migration-steps.html +20 -17
- nautobot/project-static/docs/development/apps/porting-from-netbox.html +9 -6
- nautobot/project-static/docs/development/core/application-registry.html +23 -20
- nautobot/project-static/docs/development/core/best-practices.html +23 -20
- nautobot/project-static/docs/development/core/bootstrap-ui.html +9 -6
- nautobot/project-static/docs/development/core/caching.html +9 -6
- nautobot/project-static/docs/development/core/controllers.html +9 -6
- nautobot/project-static/docs/development/core/docker-compose-advanced-use-cases.html +10 -7
- nautobot/project-static/docs/development/core/generic-views.html +9 -6
- nautobot/project-static/docs/development/core/getting-started.html +9 -6
- nautobot/project-static/docs/development/core/homepage.html +12 -9
- nautobot/project-static/docs/development/core/index.html +9 -6
- nautobot/project-static/docs/development/core/minikube-dev-environment-for-k8s-jobs.html +9 -6
- nautobot/project-static/docs/development/core/model-checklist.html +9 -6
- nautobot/project-static/docs/development/core/model-features.html +11 -8
- nautobot/project-static/docs/development/core/natural-keys.html +21 -18
- nautobot/project-static/docs/development/core/navigation-menu.html +10 -7
- nautobot/project-static/docs/development/core/release-checklist.html +9 -6
- nautobot/project-static/docs/development/core/role-internals.html +9 -6
- nautobot/project-static/docs/development/core/settings.html +9 -6
- nautobot/project-static/docs/development/core/style-guide.html +32 -29
- nautobot/project-static/docs/development/core/templates.html +9 -6
- nautobot/project-static/docs/development/core/testing.html +10 -7
- nautobot/project-static/docs/development/core/ui-component-framework.html +36 -33
- nautobot/project-static/docs/development/core/user-preferences.html +9 -6
- nautobot/project-static/docs/development/index.html +9 -6
- nautobot/project-static/docs/development/jobs/getting-started.html +13 -10
- nautobot/project-static/docs/development/jobs/index.html +9 -6
- nautobot/project-static/docs/development/jobs/installation.html +23 -20
- nautobot/project-static/docs/development/jobs/job-extensions.html +25 -22
- nautobot/project-static/docs/development/jobs/job-logging.html +12 -9
- nautobot/project-static/docs/development/jobs/job-patterns.html +45 -42
- nautobot/project-static/docs/development/jobs/job-structure.html +53 -50
- nautobot/project-static/docs/development/jobs/migration/from-v1.html +23 -20
- nautobot/project-static/docs/development/jobs/testing.html +14 -11
- nautobot/project-static/docs/index.html +9 -6
- nautobot/project-static/docs/objects.inv +0 -0
- nautobot/project-static/docs/overview/application_stack.html +9 -6
- nautobot/project-static/docs/overview/design_philosophy.html +9 -6
- nautobot/project-static/docs/release-notes/index.html +9 -6
- nautobot/project-static/docs/release-notes/version-1.0.html +9 -6
- nautobot/project-static/docs/release-notes/version-1.1.html +9 -6
- nautobot/project-static/docs/release-notes/version-1.2.html +10 -7
- nautobot/project-static/docs/release-notes/version-1.3.html +9 -6
- nautobot/project-static/docs/release-notes/version-1.4.html +9 -6
- nautobot/project-static/docs/release-notes/version-1.5.html +13 -10
- nautobot/project-static/docs/release-notes/version-1.6.html +9 -6
- nautobot/project-static/docs/release-notes/version-2.0.html +9 -6
- nautobot/project-static/docs/release-notes/version-2.1.html +9 -6
- nautobot/project-static/docs/release-notes/version-2.2.html +9 -6
- nautobot/project-static/docs/release-notes/version-2.3.html +9 -6
- nautobot/project-static/docs/release-notes/version-2.4.html +267 -6
- nautobot/project-static/docs/requirements.txt +2 -2
- nautobot/project-static/docs/search/search_index.json +1 -1
- nautobot/project-static/docs/sitemap.xml +301 -301
- nautobot/project-static/docs/sitemap.xml.gz +0 -0
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/ldap.html +15 -12
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/remote.html +9 -6
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/sso.html +16 -13
- nautobot/project-static/docs/user-guide/administration/configuration/index.html +9 -6
- nautobot/project-static/docs/user-guide/administration/configuration/redis.html +9 -6
- nautobot/project-static/docs/user-guide/administration/configuration/settings.html +11 -8
- nautobot/project-static/docs/user-guide/administration/configuration/time-zones.html +9 -6
- nautobot/project-static/docs/user-guide/administration/guides/celery-queues.html +9 -6
- nautobot/project-static/docs/user-guide/administration/guides/docker.html +9 -6
- nautobot/project-static/docs/user-guide/administration/guides/health-checks.html +9 -6
- nautobot/project-static/docs/user-guide/administration/guides/permissions.html +9 -6
- nautobot/project-static/docs/user-guide/administration/guides/prometheus-metrics.html +9 -6
- nautobot/project-static/docs/user-guide/administration/guides/replicating-nautobot.html +9 -6
- nautobot/project-static/docs/user-guide/administration/guides/request-profiling.html +9 -6
- nautobot/project-static/docs/user-guide/administration/guides/s3-django-storage.html +16 -13
- nautobot/project-static/docs/user-guide/administration/guides/selinux-troubleshooting.html +9 -6
- nautobot/project-static/docs/user-guide/administration/installation/app-install.html +9 -6
- nautobot/project-static/docs/user-guide/administration/installation/external-authentication.html +9 -6
- nautobot/project-static/docs/user-guide/administration/installation/http-server.html +9 -6
- nautobot/project-static/docs/user-guide/administration/installation/index.html +9 -6
- nautobot/project-static/docs/user-guide/administration/installation/install_system.html +9 -6
- nautobot/project-static/docs/user-guide/administration/installation/nautobot.html +9 -6
- nautobot/project-static/docs/user-guide/administration/installation/services.html +12 -9
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-netbox.html +13 -10
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-postgresql.html +10 -7
- nautobot/project-static/docs/user-guide/administration/security/index.html +9 -6
- nautobot/project-static/docs/user-guide/administration/security/notices.html +9 -6
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-server.html +9 -6
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-shell.html +10 -7
- nautobot/project-static/docs/user-guide/administration/upgrading/database-backup.html +9 -6
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/after-you-upgrade.html +9 -6
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/before-you-upgrade.html +9 -6
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/for-developers.html +9 -6
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/index.html +9 -6
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/whats-changed.html +9 -6
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/region-and-site-data-migration-guide.html +9 -6
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +15 -12
- nautobot/project-static/docs/user-guide/administration/upgrading/upgrading.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuit.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittermination.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittype.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/circuits/provider.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/circuits/providernetwork.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloud.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudaccount.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudnetwork.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudnetworkprefixassignment.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudresourcetype.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudservice.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudservicenetworkassignment.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/cable.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleport.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleporttemplate.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverport.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverporttemplate.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/controller.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/controllermanageddevicegroup.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/device.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebay.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebaytemplate.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicefamily.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/deviceredundancygroup.html +13 -10
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicetype.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontport.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontporttemplate.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interface.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfaceredundancygroup.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfacetemplate.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/inventoryitem.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/location.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/locationtype.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/manufacturer.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/module.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/modulebay.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/modulebaytemplate.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/modulefamily.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/moduletype.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/platform.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerfeed.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlet.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlettemplate.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerpanel.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerport.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerporttemplate.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rack.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackgroup.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackreservation.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearport.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearporttemplate.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareimagefile.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareversion.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualchassis.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualdevicecontext.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontext.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontextschema.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/extras/contact.html +11 -8
- nautobot/project-static/docs/user-guide/core-data-model/extras/team.html +11 -8
- nautobot/project-static/docs/user-guide/core-data-model/ipam/ipaddress.html +41 -41
- nautobot/project-static/docs/user-guide/core-data-model/ipam/namespace.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/ipam/prefix.html +197 -54
- nautobot/project-static/docs/user-guide/core-data-model/ipam/rir.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/ipam/routetarget.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/ipam/service.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlan.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlangroup.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vrf.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/overview/introduction.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenant.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenantgroup.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/cluster.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustergroup.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustertype.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/virtualmachine.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/vminterface.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/wireless/index.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/wireless/radioprofile.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/wireless/supporteddatarate.html +9 -6
- nautobot/project-static/docs/user-guide/core-data-model/wireless/wirelessnetwork.html +9 -6
- nautobot/project-static/docs/user-guide/feature-guides/contacts-and-teams.html +9 -6
- nautobot/project-static/docs/user-guide/feature-guides/custom-fields.html +9 -6
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-devices.html +9 -6
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-location-types-and-locations.html +9 -6
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/index.html +9 -6
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/interfaces.html +9 -6
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/ipam.html +9 -6
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/platforms.html +9 -6
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/search-bar.html +9 -6
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/tenants.html +9 -6
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/vlans-and-vlan-groups.html +9 -6
- nautobot/project-static/docs/user-guide/feature-guides/git-data-source.html +9 -6
- nautobot/project-static/docs/user-guide/feature-guides/graphql.html +13 -10
- nautobot/project-static/docs/user-guide/feature-guides/ip-address-merge-tool.html +9 -6
- nautobot/project-static/docs/user-guide/feature-guides/relationships.html +9 -6
- nautobot/project-static/docs/user-guide/feature-guides/software-image-files-and-versions.html +9 -6
- nautobot/project-static/docs/user-guide/feature-guides/wireless-networks-and-controllers.html +9 -6
- nautobot/project-static/docs/user-guide/index.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/change-logging.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/computedfield.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/customfield.html +10 -7
- nautobot/project-static/docs/user-guide/platform-functionality/customlink.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/dynamicgroup.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/events.html +11 -8
- nautobot/project-static/docs/user-guide/platform-functionality/exporttemplate.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/externalintegration.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/gitrepository.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/graphql.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/graphqlquery.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/imageattachment.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/index.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/job-scheduling-and-approvals.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobbutton.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobhook.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobqueue.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/kubernetes-job-support.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/managing-jobs.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/models.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/napalm.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/note.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/objectmetadata.html +12 -9
- nautobot/project-static/docs/user-guide/platform-functionality/relationship.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/rendering-jinja-templates.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/authentication.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/filtering.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/overview.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/ui-related-endpoints.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/role.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/savedview.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/secret.html +11 -8
- nautobot/project-static/docs/user-guide/platform-functionality/staticgroupassociation.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/status.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/tag.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/template-filters.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/users/objectpermission.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/users/token.html +9 -6
- nautobot/project-static/docs/user-guide/platform-functionality/webhook.html +9 -6
- nautobot/project-static/fonts/UFL.txt +96 -96
- nautobot/project-static/js/forms.js +35 -2
- nautobot/virtualization/filters.py +7 -0
- {nautobot-2.4.16.dist-info → nautobot-2.4.17.dist-info}/METADATA +6 -6
- {nautobot-2.4.16.dist-info → nautobot-2.4.17.dist-info}/RECORD +369 -364
- nautobot/project-static/docs/assets/javascripts/bundle.50899def.min.js +0 -16
- {nautobot-2.4.16.dist-info → nautobot-2.4.17.dist-info}/LICENSE.txt +0 -0
- {nautobot-2.4.16.dist-info → nautobot-2.4.17.dist-info}/NOTICE +0 -0
- {nautobot-2.4.16.dist-info → nautobot-2.4.17.dist-info}/WHEEL +0 -0
- {nautobot-2.4.16.dist-info → nautobot-2.4.17.dist-info}/entry_points.txt +0 -0
nautobot/ipam/views.py
CHANGED
|
@@ -4,12 +4,11 @@ from django.conf import settings
|
|
|
4
4
|
from django.contrib import messages
|
|
5
5
|
from django.contrib.auth.models import AnonymousUser
|
|
6
6
|
from django.core.cache import cache
|
|
7
|
-
from django.core.exceptions import ObjectDoesNotExist
|
|
7
|
+
from django.core.exceptions import ObjectDoesNotExist, ValidationError
|
|
8
8
|
from django.db import models, transaction
|
|
9
|
-
from django.db.models import Prefetch, ProtectedError
|
|
9
|
+
from django.db.models import Prefetch, ProtectedError
|
|
10
10
|
from django.forms.models import model_to_dict
|
|
11
11
|
from django.shortcuts import get_object_or_404, redirect, render
|
|
12
|
-
from django.templatetags.static import static
|
|
13
12
|
from django.urls import reverse
|
|
14
13
|
from django.utils.html import format_html
|
|
15
14
|
from django.utils.http import urlencode
|
|
@@ -23,17 +22,17 @@ from nautobot.cloud.tables import CloudNetworkTable
|
|
|
23
22
|
from nautobot.core.choices import ButtonActionColorChoices
|
|
24
23
|
from nautobot.core.constants import MAX_PAGE_SIZE_DEFAULT
|
|
25
24
|
from nautobot.core.models.querysets import count_related
|
|
25
|
+
from nautobot.core.templatetags import helpers
|
|
26
26
|
from nautobot.core.ui import object_detail
|
|
27
27
|
from nautobot.core.ui.choices import SectionChoices
|
|
28
28
|
from nautobot.core.utils.config import get_settings_or_config
|
|
29
29
|
from nautobot.core.utils.permissions import get_permission_for_model
|
|
30
30
|
from nautobot.core.views import generic, mixins as view_mixins
|
|
31
31
|
from nautobot.core.views.paginator import EnhancedPaginator, get_paginate_count
|
|
32
|
-
from nautobot.core.views.utils import handle_protectederror
|
|
32
|
+
from nautobot.core.views.utils import get_obj_from_context, handle_protectederror
|
|
33
33
|
from nautobot.core.views.viewsets import NautobotUIViewSet
|
|
34
34
|
from nautobot.dcim.models import Device, Interface
|
|
35
35
|
from nautobot.extras.models import Role, SavedView, Status, Tag
|
|
36
|
-
from nautobot.ipam import choices, constants
|
|
37
36
|
from nautobot.ipam.api import serializers
|
|
38
37
|
from nautobot.tenancy.models import Tenant
|
|
39
38
|
from nautobot.virtualization.models import VirtualMachine, VMInterface
|
|
@@ -357,6 +356,20 @@ class PrefixView(generic.ObjectView):
|
|
|
357
356
|
RequestConfig(request, paginate).configure(vrf_table)
|
|
358
357
|
RequestConfig(request, paginate).configure(cloud_network_table)
|
|
359
358
|
|
|
359
|
+
if instance.parent != instance.get_parent():
|
|
360
|
+
messages.warning(
|
|
361
|
+
request,
|
|
362
|
+
format_html(
|
|
363
|
+
"The <code>parent</code> field on this record appears to be set incorrectly. "
|
|
364
|
+
'You may wish to <a href="{}">run the {} system Job</a> to repair this and other records.',
|
|
365
|
+
reverse(
|
|
366
|
+
"extras:job_run_by_class_path",
|
|
367
|
+
kwargs={"class_path": "nautobot.ipam.jobs.cleanup.FixIPAMParents"},
|
|
368
|
+
),
|
|
369
|
+
"Check/Fix IPAM Parents",
|
|
370
|
+
),
|
|
371
|
+
)
|
|
372
|
+
|
|
360
373
|
return {
|
|
361
374
|
"vrf_table": vrf_table,
|
|
362
375
|
"parent_prefix_table": parent_prefix_table,
|
|
@@ -461,129 +474,6 @@ class PrefixEditView(generic.ObjectEditView):
|
|
|
461
474
|
model_form = forms.PrefixForm
|
|
462
475
|
template_name = "ipam/prefix_edit.html"
|
|
463
476
|
|
|
464
|
-
def successful_post(self, request, obj, created, _logger):
|
|
465
|
-
"""Check for data that will be invalid in a future Nautobot release and warn the user if found."""
|
|
466
|
-
# 3.0 TODO: remove these checks after enabling strict enforcement of the equivalent logic in Prefix.save()
|
|
467
|
-
edit_url = reverse("ipam:prefix_edit", kwargs={"pk": obj.pk})
|
|
468
|
-
warning_msg = format_html(
|
|
469
|
-
'<p>This <a href="{}#prefix-hierarchy">will be considered invalid data</a> in a future release.</p>',
|
|
470
|
-
static("docs/models/ipam/prefix.html"),
|
|
471
|
-
)
|
|
472
|
-
if obj.parent and obj.parent.type != constants.PREFIX_ALLOWED_PARENT_TYPES[obj.type]:
|
|
473
|
-
parent_edit_url = reverse("ipam:prefix_edit", kwargs={"pk": obj.parent.pk})
|
|
474
|
-
messages.warning(
|
|
475
|
-
request,
|
|
476
|
-
format_html(
|
|
477
|
-
'{} is a {} prefix but its parent <a href="{}">{}</a> is a {}. {} Consider '
|
|
478
|
-
'<a href="{}">changing the type of {}</a> and/or <a href="{}">{}</a> to resolve this issue.',
|
|
479
|
-
obj,
|
|
480
|
-
obj.type.title(),
|
|
481
|
-
obj.parent.get_absolute_url(),
|
|
482
|
-
obj.parent,
|
|
483
|
-
obj.parent.type.title(),
|
|
484
|
-
warning_msg,
|
|
485
|
-
edit_url,
|
|
486
|
-
obj,
|
|
487
|
-
parent_edit_url,
|
|
488
|
-
obj.parent,
|
|
489
|
-
),
|
|
490
|
-
)
|
|
491
|
-
|
|
492
|
-
invalid_children = obj.children.filter(
|
|
493
|
-
~Q(type__in=constants.PREFIX_ALLOWED_CHILD_TYPES[obj.type]), # exclude valid children
|
|
494
|
-
)
|
|
495
|
-
|
|
496
|
-
if invalid_children.exists():
|
|
497
|
-
children_link = format_html('<a href="{}?parent={}">its children</a>', reverse("ipam:prefix_list"), obj.pk)
|
|
498
|
-
if obj.type == choices.PrefixTypeChoices.TYPE_CONTAINER:
|
|
499
|
-
messages.warning(
|
|
500
|
-
request,
|
|
501
|
-
format_html(
|
|
502
|
-
"{} is a Container prefix and should not contain child prefixes of type Pool. {} "
|
|
503
|
-
"Consider creating an intermediary Network prefix, or changing the type of {} to Network, "
|
|
504
|
-
"to resolve this issue.",
|
|
505
|
-
obj,
|
|
506
|
-
warning_msg,
|
|
507
|
-
children_link,
|
|
508
|
-
),
|
|
509
|
-
)
|
|
510
|
-
elif obj.type == choices.PrefixTypeChoices.TYPE_NETWORK:
|
|
511
|
-
messages.warning(
|
|
512
|
-
request,
|
|
513
|
-
format_html(
|
|
514
|
-
"{} is a Network prefix and should not contain child prefixes of types Container or Network. "
|
|
515
|
-
'{} Consider <a href="{}">changing the type of {}</a> to Container, '
|
|
516
|
-
"or changing the type of {} to Pool, to resolve this issue.",
|
|
517
|
-
obj,
|
|
518
|
-
warning_msg,
|
|
519
|
-
edit_url,
|
|
520
|
-
obj,
|
|
521
|
-
children_link,
|
|
522
|
-
),
|
|
523
|
-
)
|
|
524
|
-
else: # TYPE_POOL
|
|
525
|
-
messages.warning(
|
|
526
|
-
request,
|
|
527
|
-
format_html(
|
|
528
|
-
"{} is a Pool prefix and should not contain other prefixes. {} "
|
|
529
|
-
'Consider either <a href="{}">changing the type of {}</a> to Container or Network, '
|
|
530
|
-
"or deleting {}, to resolve this issue.",
|
|
531
|
-
obj,
|
|
532
|
-
warning_msg,
|
|
533
|
-
edit_url,
|
|
534
|
-
obj,
|
|
535
|
-
children_link,
|
|
536
|
-
),
|
|
537
|
-
)
|
|
538
|
-
|
|
539
|
-
if obj.ip_addresses.exists() and obj.type == choices.PrefixTypeChoices.TYPE_CONTAINER:
|
|
540
|
-
ip_warning_msg = format_html(
|
|
541
|
-
'<p>This <a href="{}#ipaddress-parenting-concrete-relationship">will be considered invalid data</a> '
|
|
542
|
-
"in a future release.</p>",
|
|
543
|
-
static("docs/models/ipam/ipaddress.html"),
|
|
544
|
-
)
|
|
545
|
-
shortest_child_mask_length = min([ip.mask_length for ip in obj.ip_addresses.all()])
|
|
546
|
-
if shortest_child_mask_length > obj.prefix_length:
|
|
547
|
-
ip_link = format_html(
|
|
548
|
-
'<a href="{}?parent={}">these IP addresses</a>', reverse("ipam:ipaddress_list"), obj.pk
|
|
549
|
-
)
|
|
550
|
-
create_url = reverse("ipam:prefix_add") + urlencode(
|
|
551
|
-
{
|
|
552
|
-
"namespace": obj.namespace.pk,
|
|
553
|
-
"type": choices.PrefixTypeChoices.TYPE_NETWORK,
|
|
554
|
-
"prefix": obj.prefix,
|
|
555
|
-
}
|
|
556
|
-
)
|
|
557
|
-
messages.warning(
|
|
558
|
-
request,
|
|
559
|
-
format_html(
|
|
560
|
-
"{} is a Container prefix and should not directly contain IP addresses. {} "
|
|
561
|
-
'Consider either <a href="{}">changing the type of {}</a> to Network, '
|
|
562
|
-
'or <a href="{}">creating one or more child prefix(es) of type Network</a> to contain {}, '
|
|
563
|
-
"to resolve this issue.",
|
|
564
|
-
obj,
|
|
565
|
-
ip_warning_msg,
|
|
566
|
-
edit_url,
|
|
567
|
-
obj,
|
|
568
|
-
create_url,
|
|
569
|
-
ip_link,
|
|
570
|
-
),
|
|
571
|
-
)
|
|
572
|
-
else:
|
|
573
|
-
messages.warning(
|
|
574
|
-
request,
|
|
575
|
-
format_html(
|
|
576
|
-
"{} is a Container prefix and should not directly contain IP addresses. {} "
|
|
577
|
-
'Consider <a href="{}">changing the type of {}</a> to Network to resolve this issue.',
|
|
578
|
-
obj,
|
|
579
|
-
ip_warning_msg,
|
|
580
|
-
edit_url,
|
|
581
|
-
obj,
|
|
582
|
-
),
|
|
583
|
-
)
|
|
584
|
-
|
|
585
|
-
super().successful_post(request, obj, created, _logger)
|
|
586
|
-
|
|
587
477
|
|
|
588
478
|
class PrefixDeleteView(generic.ObjectDeleteView):
|
|
589
479
|
queryset = Prefix.objects.all()
|
|
@@ -676,6 +566,49 @@ class IPAddressView(generic.ObjectView):
|
|
|
676
566
|
RequestConfig(request, paginate).configure(parent_prefixes_table)
|
|
677
567
|
RequestConfig(request, paginate).configure(related_ips_table)
|
|
678
568
|
|
|
569
|
+
try:
|
|
570
|
+
parent = instance._get_closest_parent()
|
|
571
|
+
if instance.parent != parent:
|
|
572
|
+
messages.warning(
|
|
573
|
+
request,
|
|
574
|
+
format_html(
|
|
575
|
+
"The <code>parent</code> field on this record appears to be set incorrectly. "
|
|
576
|
+
'You may wish to <a href="{}">run the {} system Job</a> to repair this and other records.',
|
|
577
|
+
reverse(
|
|
578
|
+
"extras:job_run_by_class_path",
|
|
579
|
+
kwargs={"class_path": "nautobot.ipam.jobs.cleanup.FixIPAMParents"},
|
|
580
|
+
),
|
|
581
|
+
"Check/Fix IPAM Parents",
|
|
582
|
+
),
|
|
583
|
+
)
|
|
584
|
+
except ValidationError: # No valid parent found
|
|
585
|
+
if instance.parent is None:
|
|
586
|
+
add_url = (
|
|
587
|
+
reverse("ipam:prefix_add")
|
|
588
|
+
+ "?"
|
|
589
|
+
+ urlencode({"prefix": str(netaddr.IPNetwork(f"{instance.host}/{instance.mask_length}"))})
|
|
590
|
+
)
|
|
591
|
+
else:
|
|
592
|
+
add_url = (
|
|
593
|
+
reverse("ipam:prefix_add")
|
|
594
|
+
+ "?"
|
|
595
|
+
+ urlencode(
|
|
596
|
+
{
|
|
597
|
+
"prefix": str(netaddr.IPNetwork(f"{instance.host}/{instance.mask_length}")),
|
|
598
|
+
"namespace": instance.parent.namespace.pk,
|
|
599
|
+
}
|
|
600
|
+
)
|
|
601
|
+
)
|
|
602
|
+
messages.warning(
|
|
603
|
+
request,
|
|
604
|
+
format_html(
|
|
605
|
+
"The <code>parent</code> field on this record appears to be set incorrectly, and furthermore "
|
|
606
|
+
"there appears to be no valid Prefix to contain this record at present. "
|
|
607
|
+
'Consider <a href="{}">creating an appropriate Prefix</a> to resolve this issue.',
|
|
608
|
+
add_url,
|
|
609
|
+
),
|
|
610
|
+
)
|
|
611
|
+
|
|
679
612
|
return {
|
|
680
613
|
"parent_prefixes_table": parent_prefixes_table,
|
|
681
614
|
"related_ips_table": related_ips_table,
|
|
@@ -699,53 +632,7 @@ class IPAddressEditView(generic.ObjectEditView):
|
|
|
699
632
|
|
|
700
633
|
def successful_post(self, request, obj, created, _logger):
|
|
701
634
|
"""Check for data that will be invalid in a future Nautobot release and warn the user if found."""
|
|
702
|
-
#
|
|
703
|
-
if obj.parent.type == choices.PrefixTypeChoices.TYPE_CONTAINER:
|
|
704
|
-
warning_msg = format_html(
|
|
705
|
-
'<p>This <a href="{}#ipaddress-parenting-concrete-relationship">will be considered invalid data</a> '
|
|
706
|
-
"in a future release.</p>",
|
|
707
|
-
static("docs/models/ipam/ipaddress.html"),
|
|
708
|
-
)
|
|
709
|
-
parent_link = format_html('<a href="{}">{}</a>', obj.parent.get_absolute_url(), obj.parent)
|
|
710
|
-
if obj.parent.prefix_length < obj.mask_length:
|
|
711
|
-
create_url = (
|
|
712
|
-
reverse("ipam:prefix_add")
|
|
713
|
-
+ "?"
|
|
714
|
-
+ urlencode(
|
|
715
|
-
{
|
|
716
|
-
"namespace": obj.parent.namespace.pk,
|
|
717
|
-
"prefix": str(netaddr.IPNetwork(f"{obj.host}/{obj.mask_length}")),
|
|
718
|
-
"type": choices.PrefixTypeChoices.TYPE_NETWORK,
|
|
719
|
-
}
|
|
720
|
-
)
|
|
721
|
-
)
|
|
722
|
-
messages.warning(
|
|
723
|
-
request,
|
|
724
|
-
format_html(
|
|
725
|
-
"IP address {} currently has prefix {} as its parent, which is a Container. {} "
|
|
726
|
-
'Consider <a href="{}">creating an intermediate /{} prefix of type Network</a> '
|
|
727
|
-
"to resolve this issue.",
|
|
728
|
-
obj,
|
|
729
|
-
parent_link,
|
|
730
|
-
warning_msg,
|
|
731
|
-
create_url,
|
|
732
|
-
obj.mask_length,
|
|
733
|
-
),
|
|
734
|
-
)
|
|
735
|
-
else:
|
|
736
|
-
messages.warning(
|
|
737
|
-
request,
|
|
738
|
-
format_html(
|
|
739
|
-
"IP address {} currently has prefix {} as its parent, which is a Container. {} "
|
|
740
|
-
'Consider <a href="{}">changing the prefix</a> to type Network or Pool to resolve this issue.',
|
|
741
|
-
obj,
|
|
742
|
-
parent_link,
|
|
743
|
-
warning_msg,
|
|
744
|
-
reverse("ipam:prefix_edit", kwargs={"pk": obj.parent.pk}),
|
|
745
|
-
),
|
|
746
|
-
)
|
|
747
|
-
|
|
748
|
-
# Add IpAddress to interface if interface is in query_params
|
|
635
|
+
# Add IPAddress to interface if interface is in query_params
|
|
749
636
|
if "interface" in request.GET or "vminterface" in request.GET:
|
|
750
637
|
interface, _ = retrieve_interface_or_vminterface_from_request(request)
|
|
751
638
|
interface.ip_addresses.add(obj)
|
|
@@ -1211,71 +1098,115 @@ class VLANUIViewSet(NautobotUIViewSet): # 3.0 TODO: remove, unused BulkImportVi
|
|
|
1211
1098
|
filterset_form_class = forms.VLANFilterForm
|
|
1212
1099
|
form_class = forms.VLANForm
|
|
1213
1100
|
serializer_class = serializers.VLANSerializer
|
|
1214
|
-
table_class = tables.
|
|
1101
|
+
table_class = tables.VLANDetailTable
|
|
1215
1102
|
queryset = VLAN.objects.all()
|
|
1216
1103
|
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
)
|
|
1228
|
-
)
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1104
|
+
class VLANObjectFieldsPanel(object_detail.ObjectFieldsPanel):
|
|
1105
|
+
def get_data(self, context):
|
|
1106
|
+
instance = get_obj_from_context(context, self.context_object_key)
|
|
1107
|
+
data = super().get_data(context)
|
|
1108
|
+
data["locations"] = instance.locations.all()
|
|
1109
|
+
return data
|
|
1110
|
+
|
|
1111
|
+
def render_value(self, key, value, context):
|
|
1112
|
+
instance = get_obj_from_context(context)
|
|
1113
|
+
if key == "locations":
|
|
1114
|
+
return helpers.render_m2m(value, f"/dcim/locations/?vlans={instance.pk}", key)
|
|
1115
|
+
return super().render_value(key, value, context)
|
|
1116
|
+
|
|
1117
|
+
class PrefixObjectsTablePanel(object_detail.ObjectsTablePanel):
|
|
1118
|
+
def _get_table_add_url(self, context):
|
|
1119
|
+
obj = get_obj_from_context(context)
|
|
1120
|
+
request = context["request"]
|
|
1121
|
+
return_url = context.get("return_url", obj.get_absolute_url())
|
|
1122
|
+
|
|
1123
|
+
if request.user.has_perms(self.add_permissions or []):
|
|
1124
|
+
params = []
|
|
1125
|
+
if obj.tenant:
|
|
1126
|
+
params.append(("tenant", obj.tenant.pk))
|
|
1127
|
+
if obj.pk:
|
|
1128
|
+
params.append(("vlan", obj.pk))
|
|
1129
|
+
if hasattr(obj, "locations"):
|
|
1130
|
+
params += [("locations", loc.pk) for loc in obj.locations.all()]
|
|
1131
|
+
params.append(("return_url", return_url))
|
|
1132
|
+
return reverse("ipam:prefix_add") + "?" + urlencode(params)
|
|
1133
|
+
return None
|
|
1236
1134
|
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1135
|
+
object_detail_content = object_detail.ObjectDetailContent(
|
|
1136
|
+
panels=(
|
|
1137
|
+
VLANObjectFieldsPanel(
|
|
1138
|
+
weight=100,
|
|
1139
|
+
section=SectionChoices.LEFT_HALF,
|
|
1140
|
+
fields="__all__",
|
|
1141
|
+
),
|
|
1142
|
+
PrefixObjectsTablePanel(
|
|
1143
|
+
weight=100,
|
|
1144
|
+
section=SectionChoices.FULL_WIDTH,
|
|
1145
|
+
table_class=tables.PrefixTable,
|
|
1146
|
+
table_filter="vlan_id",
|
|
1147
|
+
exclude_columns=["vlan"],
|
|
1148
|
+
hide_hierarchy_ui=True,
|
|
1149
|
+
),
|
|
1150
|
+
),
|
|
1151
|
+
extra_tabs=(
|
|
1152
|
+
object_detail.DistinctViewTab(
|
|
1153
|
+
weight=100,
|
|
1154
|
+
label="Device Interfaces",
|
|
1155
|
+
url_name="ipam:vlan_device_interfaces",
|
|
1156
|
+
tab_id="device_interfaces",
|
|
1157
|
+
related_object_attribute="interfaces",
|
|
1158
|
+
panels=(
|
|
1159
|
+
object_detail.ObjectsTablePanel(
|
|
1160
|
+
weight=100,
|
|
1161
|
+
section=SectionChoices.FULL_WIDTH,
|
|
1162
|
+
table_title="Device Interfaces",
|
|
1163
|
+
table_class=tables.VLANDevicesTable,
|
|
1164
|
+
table_filter=["untagged_vlan", "tagged_vlans"],
|
|
1165
|
+
related_field_name="vlan_id",
|
|
1166
|
+
add_button_route=None,
|
|
1167
|
+
),
|
|
1168
|
+
),
|
|
1169
|
+
),
|
|
1170
|
+
object_detail.DistinctViewTab(
|
|
1171
|
+
weight=200,
|
|
1172
|
+
label="VM Interfaces",
|
|
1173
|
+
url_name="ipam:vlan_vm_interfaces",
|
|
1174
|
+
tab_id="vm_interfaces",
|
|
1175
|
+
related_object_attribute="vminterfaces",
|
|
1176
|
+
panels=(
|
|
1177
|
+
object_detail.ObjectsTablePanel(
|
|
1178
|
+
weight=100,
|
|
1179
|
+
section=SectionChoices.FULL_WIDTH,
|
|
1180
|
+
table_title="Virtual Machine Interfaces",
|
|
1181
|
+
table_class=tables.VLANVirtualMachinesTable,
|
|
1182
|
+
table_filter=["untagged_vlan", "tagged_vlans"],
|
|
1183
|
+
related_field_name="vlan_id",
|
|
1184
|
+
add_button_route=None,
|
|
1185
|
+
),
|
|
1186
|
+
),
|
|
1187
|
+
),
|
|
1188
|
+
),
|
|
1189
|
+
)
|
|
1268
1190
|
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1191
|
+
@action(
|
|
1192
|
+
detail=True,
|
|
1193
|
+
url_path="device-interfaces",
|
|
1194
|
+
url_name="device_interfaces",
|
|
1195
|
+
custom_view_base_action="view",
|
|
1196
|
+
custom_view_additional_permissions=["dcim.view_interface"],
|
|
1197
|
+
)
|
|
1198
|
+
def device_interfaces(self, request, *args, **kwargs):
|
|
1199
|
+
return Response({})
|
|
1274
1200
|
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1201
|
+
@action(
|
|
1202
|
+
detail=True,
|
|
1203
|
+
url_path="vm-interfaces",
|
|
1204
|
+
url_name="vm_interfaces",
|
|
1205
|
+
custom_view_base_action="view",
|
|
1206
|
+
custom_view_additional_permissions=["virtualization.view_vminterface"],
|
|
1207
|
+
)
|
|
1208
|
+
def vm_interfaces(self, request, *args, **kwargs):
|
|
1209
|
+
return Response({})
|
|
1279
1210
|
|
|
1280
1211
|
|
|
1281
1212
|
#
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
<link rel="icon" href="/projects/core/en/stable/assets/favicon.ico">
|
|
15
|
-
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.
|
|
15
|
+
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.18">
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
+
|
|
33
|
+
|
|
32
34
|
|
|
33
35
|
|
|
34
36
|
|
|
@@ -7367,12 +7369,12 @@
|
|
|
7367
7369
|
|
|
7368
7370
|
|
|
7369
7371
|
<li class="md-nav__item">
|
|
7370
|
-
<a href="/projects/core/en/stable/development/apps/api/platform-features/
|
|
7372
|
+
<a href="/projects/core/en/stable/development/apps/api/platform-features/prepopulating-data.html" class="md-nav__link">
|
|
7371
7373
|
|
|
7372
7374
|
|
|
7373
7375
|
|
|
7374
7376
|
<span class="md-ellipsis">
|
|
7375
|
-
|
|
7377
|
+
Prepopulating Data
|
|
7376
7378
|
|
|
7377
7379
|
</span>
|
|
7378
7380
|
|
|
@@ -10089,7 +10091,8 @@
|
|
|
10089
10091
|
<!-- RTD version flyout injected on live site -->
|
|
10090
10092
|
<div id="readthedocs-embed-flyout"></div>
|
|
10091
10093
|
|
|
10092
|
-
|
|
10094
|
+
|
|
10095
|
+
<div class="md-social">
|
|
10093
10096
|
|
|
10094
10097
|
|
|
10095
10098
|
|
|
@@ -10145,10 +10148,10 @@
|
|
|
10145
10148
|
|
|
10146
10149
|
|
|
10147
10150
|
|
|
10148
|
-
<script id="__config" type="application/json">{"base": "/projects/core/en/stable/", "features": ["content.code.annotate", "content.code.copy", "content.tabs.link", "navigation.footer", "navigation.tabs", "navigation.tabs.sticky", "navigation.tracking", "search.highlight", "search.share", "search.suggest"], "search": "/projects/core/en/stable/assets/javascripts/workers/search.
|
|
10151
|
+
<script id="__config" type="application/json">{"base": "/projects/core/en/stable/", "features": ["content.code.annotate", "content.code.copy", "content.tabs.link", "navigation.footer", "navigation.tabs", "navigation.tabs.sticky", "navigation.tracking", "search.highlight", "search.share", "search.suggest"], "search": "/projects/core/en/stable/assets/javascripts/workers/search.973d3a69.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
|
|
10149
10152
|
|
|
10150
10153
|
|
|
10151
|
-
<script src="/projects/core/en/stable/assets/javascripts/bundle.
|
|
10154
|
+
<script src="/projects/core/en/stable/assets/javascripts/bundle.92b07e13.min.js"></script>
|
|
10152
10155
|
|
|
10153
10156
|
|
|
10154
10157
|
</body>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
<link rel="icon" href="../assets/favicon.ico">
|
|
21
|
-
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.
|
|
21
|
+
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.18">
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
+
|
|
39
|
+
|
|
38
40
|
|
|
39
41
|
|
|
40
42
|
|
|
@@ -7389,12 +7391,12 @@
|
|
|
7389
7391
|
|
|
7390
7392
|
|
|
7391
7393
|
<li class="md-nav__item">
|
|
7392
|
-
<a href="../development/apps/api/platform-features/
|
|
7394
|
+
<a href="../development/apps/api/platform-features/prepopulating-data.html" class="md-nav__link">
|
|
7393
7395
|
|
|
7394
7396
|
|
|
7395
7397
|
|
|
7396
7398
|
<span class="md-ellipsis">
|
|
7397
|
-
|
|
7399
|
+
Prepopulating Data
|
|
7398
7400
|
|
|
7399
7401
|
</span>
|
|
7400
7402
|
|
|
@@ -10257,7 +10259,8 @@
|
|
|
10257
10259
|
<!-- RTD version flyout injected on live site -->
|
|
10258
10260
|
<div id="readthedocs-embed-flyout"></div>
|
|
10259
10261
|
|
|
10260
|
-
|
|
10262
|
+
|
|
10263
|
+
<div class="md-social">
|
|
10261
10264
|
|
|
10262
10265
|
|
|
10263
10266
|
|
|
@@ -10313,10 +10316,10 @@
|
|
|
10313
10316
|
|
|
10314
10317
|
|
|
10315
10318
|
|
|
10316
|
-
<script id="__config" type="application/json">{"base": "..", "features": ["content.code.annotate", "content.code.copy", "content.tabs.link", "navigation.footer", "navigation.tabs", "navigation.tabs.sticky", "navigation.tracking", "search.highlight", "search.share", "search.suggest"], "search": "../assets/javascripts/workers/search.
|
|
10319
|
+
<script id="__config" type="application/json">{"base": "..", "features": ["content.code.annotate", "content.code.copy", "content.tabs.link", "navigation.footer", "navigation.tabs", "navigation.tabs.sticky", "navigation.tracking", "search.highlight", "search.share", "search.suggest"], "search": "../assets/javascripts/workers/search.973d3a69.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
|
|
10317
10320
|
|
|
10318
10321
|
|
|
10319
|
-
<script src="../assets/javascripts/bundle.
|
|
10322
|
+
<script src="../assets/javascripts/bundle.92b07e13.min.js"></script>
|
|
10320
10323
|
|
|
10321
10324
|
|
|
10322
10325
|
<script id="init-glightbox">const lightbox = GLightbox({"touchNavigation": true, "loop": false, "zoomable": true, "draggable": true, "openEffect": "zoom", "closeEffect": "zoom", "slideEffect": "slide"});
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
<link rel="icon" href="../assets/favicon.ico">
|
|
19
|
-
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.
|
|
19
|
+
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.18">
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
+
|
|
37
|
+
|
|
36
38
|
|
|
37
39
|
|
|
38
40
|
|
|
@@ -7387,12 +7389,12 @@
|
|
|
7387
7389
|
|
|
7388
7390
|
|
|
7389
7391
|
<li class="md-nav__item">
|
|
7390
|
-
<a href="../development/apps/api/platform-features/
|
|
7392
|
+
<a href="../development/apps/api/platform-features/prepopulating-data.html" class="md-nav__link">
|
|
7391
7393
|
|
|
7392
7394
|
|
|
7393
7395
|
|
|
7394
7396
|
<span class="md-ellipsis">
|
|
7395
|
-
|
|
7397
|
+
Prepopulating Data
|
|
7396
7398
|
|
|
7397
7399
|
</span>
|
|
7398
7400
|
|
|
@@ -10190,7 +10192,8 @@
|
|
|
10190
10192
|
<!-- RTD version flyout injected on live site -->
|
|
10191
10193
|
<div id="readthedocs-embed-flyout"></div>
|
|
10192
10194
|
|
|
10193
|
-
|
|
10195
|
+
|
|
10196
|
+
<div class="md-social">
|
|
10194
10197
|
|
|
10195
10198
|
|
|
10196
10199
|
|
|
@@ -10246,10 +10249,10 @@
|
|
|
10246
10249
|
|
|
10247
10250
|
|
|
10248
10251
|
|
|
10249
|
-
<script id="__config" type="application/json">{"base": "..", "features": ["content.code.annotate", "content.code.copy", "content.tabs.link", "navigation.footer", "navigation.tabs", "navigation.tabs.sticky", "navigation.tracking", "search.highlight", "search.share", "search.suggest"], "search": "../assets/javascripts/workers/search.
|
|
10252
|
+
<script id="__config" type="application/json">{"base": "..", "features": ["content.code.annotate", "content.code.copy", "content.tabs.link", "navigation.footer", "navigation.tabs", "navigation.tabs.sticky", "navigation.tracking", "search.highlight", "search.share", "search.suggest"], "search": "../assets/javascripts/workers/search.973d3a69.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
|
|
10250
10253
|
|
|
10251
10254
|
|
|
10252
|
-
<script src="../assets/javascripts/bundle.
|
|
10255
|
+
<script src="../assets/javascripts/bundle.92b07e13.min.js"></script>
|
|
10253
10256
|
|
|
10254
10257
|
|
|
10255
10258
|
<script id="init-glightbox">const lightbox = GLightbox({"touchNavigation": true, "loop": false, "zoomable": true, "draggable": true, "openEffect": "zoom", "closeEffect": "zoom", "slideEffect": "slide"});
|