nautobot 2.3.12__py3-none-any.whl → 2.3.13__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/core/api/serializers.py +1 -0
- nautobot/core/celery/log.py +4 -4
- nautobot/core/models/tree_queries.py +5 -2
- nautobot/core/settings.py +1 -1
- nautobot/core/tables.py +60 -10
- nautobot/core/templatetags/helpers.py +7 -1
- nautobot/core/testing/api.py +5 -1
- nautobot/core/tests/test_api.py +20 -0
- nautobot/core/tests/test_csv.py +25 -3
- nautobot/core/tests/test_utils.py +8 -0
- nautobot/core/utils/lookup.py +11 -8
- nautobot/dcim/api/views.py +3 -0
- nautobot/dcim/filters/__init__.py +26 -1
- nautobot/dcim/forms.py +4 -0
- nautobot/dcim/tests/test_filters.py +33 -0
- nautobot/dcim/tests/test_views.py +6 -0
- nautobot/extras/api/serializers.py +1 -0
- nautobot/extras/api/views.py +2 -0
- nautobot/extras/forms/forms.py +2 -0
- nautobot/extras/group_sync.py +3 -3
- nautobot/extras/plugins/__init__.py +13 -2
- nautobot/extras/tests/test_views.py +2 -0
- nautobot/ipam/lookups.py +101 -62
- nautobot/ipam/tables.py +18 -4
- nautobot/ipam/tests/test_querysets.py +49 -1
- nautobot/ipam/utils/__init__.py +24 -0
- nautobot/ipam/views.py +61 -68
- nautobot/project-static/docs/404.html +1 -1
- nautobot/project-static/docs/apps/index.html +1 -1
- nautobot/project-static/docs/apps/nautobot-apps.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/__init__.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/admin.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/api.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/change_logging.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/choices.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/config.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/constants.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/datasources.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/exceptions.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/factory.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/filters.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/forms.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/graphql.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/jobs.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/models.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/querysets.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/secrets.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/tables.html +197 -5
- nautobot/project-static/docs/code-reference/nautobot/apps/testing.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/ui.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/urls.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/utils.html +16 -2
- nautobot/project-static/docs/code-reference/nautobot/apps/views.html +1 -1
- nautobot/project-static/docs/development/apps/api/configuration-view.html +1 -1
- nautobot/project-static/docs/development/apps/api/database-backend-config.html +1 -1
- nautobot/project-static/docs/development/apps/api/models/django-admin.html +1 -1
- nautobot/project-static/docs/development/apps/api/models/global-search.html +1 -1
- nautobot/project-static/docs/development/apps/api/models/graphql.html +1 -1
- nautobot/project-static/docs/development/apps/api/models/index.html +1 -1
- nautobot/project-static/docs/development/apps/api/nautobot-app-config.html +1 -1
- nautobot/project-static/docs/development/apps/api/platform-features/custom-validators.html +1 -1
- nautobot/project-static/docs/development/apps/api/platform-features/filter-extensions.html +1 -1
- nautobot/project-static/docs/development/apps/api/platform-features/git-repository-content.html +1 -1
- nautobot/project-static/docs/development/apps/api/platform-features/index.html +1 -1
- nautobot/project-static/docs/development/apps/api/platform-features/jinja2-filters.html +1 -1
- nautobot/project-static/docs/development/apps/api/platform-features/jobs.html +1 -1
- nautobot/project-static/docs/development/apps/api/platform-features/populating-extensibility-features.html +1 -1
- nautobot/project-static/docs/development/apps/api/platform-features/secrets-providers.html +1 -1
- nautobot/project-static/docs/development/apps/api/platform-features/table-extensions.html +23 -4
- nautobot/project-static/docs/development/apps/api/platform-features/uniquely-identify-objects.html +1 -1
- nautobot/project-static/docs/development/apps/api/prometheus.html +1 -1
- nautobot/project-static/docs/development/apps/api/setup.html +1 -1
- nautobot/project-static/docs/development/apps/api/testing.html +1 -1
- nautobot/project-static/docs/development/apps/api/ui-extensions/banners.html +1 -1
- nautobot/project-static/docs/development/apps/api/ui-extensions/home-page.html +1 -1
- nautobot/project-static/docs/development/apps/api/ui-extensions/index.html +1 -1
- nautobot/project-static/docs/development/apps/api/ui-extensions/navigation.html +1 -1
- nautobot/project-static/docs/development/apps/api/ui-extensions/object-views.html +1 -1
- nautobot/project-static/docs/development/apps/api/views/base-template.html +1 -1
- nautobot/project-static/docs/development/apps/api/views/core-view-overrides.html +1 -1
- nautobot/project-static/docs/development/apps/api/views/django-generic-views.html +1 -1
- nautobot/project-static/docs/development/apps/api/views/help-documentation.html +1 -1
- nautobot/project-static/docs/development/apps/api/views/index.html +1 -1
- nautobot/project-static/docs/development/apps/api/views/nautobot-generic-views.html +1 -1
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewset.html +1 -1
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewsetrouter.html +1 -1
- nautobot/project-static/docs/development/apps/api/views/notes.html +1 -1
- nautobot/project-static/docs/development/apps/api/views/rest-api.html +1 -1
- nautobot/project-static/docs/development/apps/api/views/urls.html +1 -1
- nautobot/project-static/docs/development/apps/index.html +1 -1
- nautobot/project-static/docs/development/apps/migration/code-updates.html +1 -1
- nautobot/project-static/docs/development/apps/migration/dependency-updates.html +1 -1
- nautobot/project-static/docs/development/apps/migration/from-v1.html +1 -1
- nautobot/project-static/docs/development/apps/migration/model-updates/dcim.html +1 -1
- nautobot/project-static/docs/development/apps/migration/model-updates/extras.html +1 -1
- nautobot/project-static/docs/development/apps/migration/model-updates/global.html +1 -1
- nautobot/project-static/docs/development/apps/migration/model-updates/ipam.html +1 -1
- nautobot/project-static/docs/development/apps/porting-from-netbox.html +1 -1
- nautobot/project-static/docs/development/core/application-registry.html +1 -1
- nautobot/project-static/docs/development/core/best-practices.html +1 -1
- nautobot/project-static/docs/development/core/bootstrap-ui.html +1 -1
- nautobot/project-static/docs/development/core/caching.html +1 -1
- nautobot/project-static/docs/development/core/controllers.html +1 -1
- nautobot/project-static/docs/development/core/docker-compose-advanced-use-cases.html +1 -1
- nautobot/project-static/docs/development/core/generic-views.html +1 -1
- nautobot/project-static/docs/development/core/getting-started.html +1 -1
- nautobot/project-static/docs/development/core/homepage.html +1 -1
- nautobot/project-static/docs/development/core/index.html +1 -1
- nautobot/project-static/docs/development/core/model-checklist.html +1 -1
- nautobot/project-static/docs/development/core/model-features.html +1 -1
- nautobot/project-static/docs/development/core/natural-keys.html +1 -1
- nautobot/project-static/docs/development/core/navigation-menu.html +1 -1
- nautobot/project-static/docs/development/core/release-checklist.html +1 -1
- nautobot/project-static/docs/development/core/role-internals.html +1 -1
- nautobot/project-static/docs/development/core/settings.html +1 -1
- nautobot/project-static/docs/development/core/style-guide.html +1 -1
- nautobot/project-static/docs/development/core/templates.html +1 -1
- nautobot/project-static/docs/development/core/testing.html +1 -1
- nautobot/project-static/docs/development/core/user-preferences.html +1 -1
- nautobot/project-static/docs/development/index.html +1 -1
- nautobot/project-static/docs/development/jobs/index.html +1 -1
- nautobot/project-static/docs/development/jobs/migration/from-v1.html +1 -1
- nautobot/project-static/docs/index.html +1 -1
- nautobot/project-static/docs/objects.inv +0 -0
- nautobot/project-static/docs/overview/application_stack.html +1 -1
- nautobot/project-static/docs/overview/design_philosophy.html +1 -1
- nautobot/project-static/docs/release-notes/index.html +1 -1
- nautobot/project-static/docs/release-notes/version-1.0.html +1 -1
- nautobot/project-static/docs/release-notes/version-1.1.html +1 -1
- nautobot/project-static/docs/release-notes/version-1.2.html +1 -1
- nautobot/project-static/docs/release-notes/version-1.3.html +1 -1
- nautobot/project-static/docs/release-notes/version-1.4.html +1 -1
- nautobot/project-static/docs/release-notes/version-1.5.html +1 -1
- nautobot/project-static/docs/release-notes/version-1.6.html +614 -179
- nautobot/project-static/docs/release-notes/version-2.0.html +1 -1
- nautobot/project-static/docs/release-notes/version-2.1.html +1 -1
- nautobot/project-static/docs/release-notes/version-2.2.html +1 -1
- nautobot/project-static/docs/release-notes/version-2.3.html +401 -199
- nautobot/project-static/docs/requirements.txt +1 -1
- nautobot/project-static/docs/search/search_index.json +1 -1
- nautobot/project-static/docs/sitemap.xml +270 -270
- nautobot/project-static/docs/sitemap.xml.gz +0 -0
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/ldap.html +1 -1
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/remote.html +1 -1
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/sso.html +3 -3
- nautobot/project-static/docs/user-guide/administration/configuration/index.html +1 -1
- nautobot/project-static/docs/user-guide/administration/configuration/redis.html +1 -1
- nautobot/project-static/docs/user-guide/administration/configuration/settings.html +1 -1
- nautobot/project-static/docs/user-guide/administration/configuration/time-zones.html +1 -1
- nautobot/project-static/docs/user-guide/administration/guides/celery-queues.html +1 -1
- nautobot/project-static/docs/user-guide/administration/guides/docker.html +1 -1
- nautobot/project-static/docs/user-guide/administration/guides/health-checks.html +1 -1
- nautobot/project-static/docs/user-guide/administration/guides/permissions.html +1 -1
- nautobot/project-static/docs/user-guide/administration/guides/prometheus-metrics.html +1 -1
- nautobot/project-static/docs/user-guide/administration/guides/replicating-nautobot.html +1 -1
- nautobot/project-static/docs/user-guide/administration/guides/request-profiling.html +1 -1
- nautobot/project-static/docs/user-guide/administration/guides/s3-django-storage.html +1 -1
- nautobot/project-static/docs/user-guide/administration/guides/selinux-troubleshooting.html +1 -1
- nautobot/project-static/docs/user-guide/administration/installation/app-install.html +1 -1
- nautobot/project-static/docs/user-guide/administration/installation/external-authentication.html +1 -1
- nautobot/project-static/docs/user-guide/administration/installation/http-server.html +1 -1
- nautobot/project-static/docs/user-guide/administration/installation/index.html +1 -1
- nautobot/project-static/docs/user-guide/administration/installation/install_system.html +1 -1
- nautobot/project-static/docs/user-guide/administration/installation/nautobot.html +1 -1
- nautobot/project-static/docs/user-guide/administration/installation/services.html +1 -1
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-netbox.html +1 -1
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-postgresql.html +1 -1
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-server.html +1 -1
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-shell.html +1 -1
- nautobot/project-static/docs/user-guide/administration/upgrading/database-backup.html +1 -1
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/after-you-upgrade.html +1 -1
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/before-you-upgrade.html +1 -1
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/for-developers.html +1 -1
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/index.html +1 -1
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/whats-changed.html +1 -1
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/region-and-site-data-migration-guide.html +1 -1
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +1 -1
- nautobot/project-static/docs/user-guide/administration/upgrading/upgrading.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuit.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittermination.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittype.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/circuits/provider.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/circuits/providernetwork.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloud.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudaccount.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudnetwork.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudnetworkprefixassignment.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudresourcetype.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudservice.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudservicenetworkassignment.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/cable.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleport.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleporttemplate.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverport.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverporttemplate.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/controller.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/controllermanageddevicegroup.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/device.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebay.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebaytemplate.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicefamily.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/deviceredundancygroup.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicetype.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontport.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontporttemplate.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interface.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfaceredundancygroup.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfacetemplate.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/inventoryitem.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/location.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/locationtype.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/manufacturer.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/module.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/modulebay.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/modulebaytemplate.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/moduletype.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/platform.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerfeed.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlet.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlettemplate.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerpanel.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerport.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerporttemplate.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rack.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackgroup.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackreservation.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearport.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearporttemplate.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareimagefile.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareversion.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualchassis.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontext.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontextschema.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/extras/contact.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/extras/team.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/ipam/ipaddress.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/ipam/namespace.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/ipam/prefix.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/ipam/rir.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/ipam/routetarget.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/ipam/service.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlan.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlangroup.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vrf.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/overview/introduction.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenant.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenantgroup.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/cluster.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustergroup.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustertype.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/virtualmachine.html +1 -1
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/vminterface.html +1 -1
- nautobot/project-static/docs/user-guide/feature-guides/contacts-and-teams.html +1 -1
- nautobot/project-static/docs/user-guide/feature-guides/custom-fields.html +1 -1
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-devices.html +1 -1
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-location-types-and-locations.html +1 -1
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/index.html +1 -1
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/interfaces.html +1 -1
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/ipam.html +1 -1
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/platforms.html +1 -1
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/search-bar.html +1 -1
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/tenants.html +1 -1
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/vlans-and-vlan-groups.html +1 -1
- nautobot/project-static/docs/user-guide/feature-guides/git-data-source.html +1 -1
- nautobot/project-static/docs/user-guide/feature-guides/graphql.html +1 -1
- nautobot/project-static/docs/user-guide/feature-guides/ip-address-merge-tool.html +1 -1
- nautobot/project-static/docs/user-guide/feature-guides/relationships.html +1 -1
- nautobot/project-static/docs/user-guide/feature-guides/software-image-files-and-versions.html +1 -1
- nautobot/project-static/docs/user-guide/index.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/change-logging.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/computedfield.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/customfield.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/customlink.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/dynamicgroup.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/exporttemplate.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/externalintegration.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/gitrepository.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/graphql.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/graphqlquery.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/imageattachment.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/index.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/job-scheduling-and-approvals.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobbutton.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobhook.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/models.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/napalm.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/note.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/objectmetadata.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/relationship.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/authentication.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/filtering.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/overview.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/ui-related-endpoints.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/role.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/savedview.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/secret.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/staticgroupassociation.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/status.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/tag.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/template-filters.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/users/objectpermission.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/users/token.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/webhook.html +1 -1
- nautobot/users/api/serializers.py +1 -0
- nautobot/virtualization/filters.py +19 -2
- nautobot/virtualization/tests/test_filters.py +9 -0
- {nautobot-2.3.12.dist-info → nautobot-2.3.13.dist-info}/METADATA +3 -3
- {nautobot-2.3.12.dist-info → nautobot-2.3.13.dist-info}/RECORD +312 -312
- {nautobot-2.3.12.dist-info → nautobot-2.3.13.dist-info}/LICENSE.txt +0 -0
- {nautobot-2.3.12.dist-info → nautobot-2.3.13.dist-info}/NOTICE +0 -0
- {nautobot-2.3.12.dist-info → nautobot-2.3.13.dist-info}/WHEEL +0 -0
- {nautobot-2.3.12.dist-info → nautobot-2.3.13.dist-info}/entry_points.txt +0 -0
nautobot/ipam/views.py
CHANGED
|
@@ -2,7 +2,9 @@ import logging
|
|
|
2
2
|
|
|
3
3
|
from django.conf import settings
|
|
4
4
|
from django.contrib import messages
|
|
5
|
+
from django.contrib.auth.models import AnonymousUser
|
|
5
6
|
from django.core.cache import cache
|
|
7
|
+
from django.core.exceptions import ObjectDoesNotExist
|
|
6
8
|
from django.db import models, transaction
|
|
7
9
|
from django.db.models import Prefetch, ProtectedError, Q
|
|
8
10
|
from django.forms.models import model_to_dict
|
|
@@ -23,7 +25,7 @@ from nautobot.core.views import generic, mixins as view_mixins
|
|
|
23
25
|
from nautobot.core.views.paginator import EnhancedPaginator, get_paginate_count
|
|
24
26
|
from nautobot.core.views.utils import handle_protectederror
|
|
25
27
|
from nautobot.dcim.models import Device, Interface, Location
|
|
26
|
-
from nautobot.extras.models import Role, Status, Tag
|
|
28
|
+
from nautobot.extras.models import Role, SavedView, Status, Tag
|
|
27
29
|
from nautobot.ipam import choices, constants
|
|
28
30
|
from nautobot.ipam.api import serializers
|
|
29
31
|
from nautobot.tenancy.models import Tenant
|
|
@@ -43,9 +45,9 @@ from .models import (
|
|
|
43
45
|
VRF,
|
|
44
46
|
)
|
|
45
47
|
from .utils import (
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
get_add_available_ipaddresses_callback,
|
|
49
|
+
get_add_available_prefixes_callback,
|
|
50
|
+
get_add_available_vlans_callback,
|
|
49
51
|
handle_relationship_changes_when_merging_ips,
|
|
50
52
|
retrieve_interface_or_vminterface_from_request,
|
|
51
53
|
)
|
|
@@ -101,23 +103,12 @@ class NamespaceIPAddressesView(generic.ObjectView):
|
|
|
101
103
|
|
|
102
104
|
def get_extra_context(self, request, instance):
|
|
103
105
|
# Find all IPAddresses belonging to this Namespace
|
|
104
|
-
ip_addresses = (
|
|
105
|
-
instance.ip_addresses.restrict(request.user, "view")
|
|
106
|
-
.select_related("role", "status", "tenant")
|
|
107
|
-
.annotate(
|
|
108
|
-
interface_count=count_related(Interface, "ip_addresses"),
|
|
109
|
-
interface_parent_count=count_related(Device, "interfaces__ip_addresses", distinct=True),
|
|
110
|
-
vm_interface_count=count_related(VMInterface, "ip_addresses"),
|
|
111
|
-
vm_interface_parent_count=count_related(VirtualMachine, "interfaces__ip_addresses", distinct=True),
|
|
112
|
-
)
|
|
113
|
-
)
|
|
106
|
+
ip_addresses = instance.ip_addresses.restrict(request.user, "view").select_related("role", "status", "tenant")
|
|
114
107
|
|
|
115
|
-
ip_address_table = tables.IPAddressTable(ip_addresses)
|
|
108
|
+
ip_address_table = tables.IPAddressTable(ip_addresses, exclude=["namespace"])
|
|
116
109
|
if request.user.has_perm("ipam.change_ipaddress") or request.user.has_perm("ipam.delete_ipaddress"):
|
|
117
110
|
ip_address_table.columns.show("pk")
|
|
118
111
|
|
|
119
|
-
ip_address_table.exclude = ("namespace",)
|
|
120
|
-
|
|
121
112
|
paginate = {
|
|
122
113
|
"paginator_class": EnhancedPaginator,
|
|
123
114
|
"per_page": get_paginate_count(request),
|
|
@@ -154,12 +145,10 @@ class NamespacePrefixesView(generic.ObjectView):
|
|
|
154
145
|
# Find all Prefixes belonging to this Namespace
|
|
155
146
|
prefixes = instance.prefixes.restrict(request.user, "view").select_related("status")
|
|
156
147
|
|
|
157
|
-
prefix_table = tables.PrefixTable(prefixes)
|
|
148
|
+
prefix_table = tables.PrefixTable(prefixes, exclude=["namespace"])
|
|
158
149
|
if request.user.has_perm("ipam.change_prefix") or request.user.has_perm("ipam.delete_prefix"):
|
|
159
150
|
prefix_table.columns.show("pk")
|
|
160
151
|
|
|
161
|
-
prefix_table.exclude = ("namespace",)
|
|
162
|
-
|
|
163
152
|
paginate = {
|
|
164
153
|
"paginator_class": EnhancedPaginator,
|
|
165
154
|
"per_page": get_paginate_count(request),
|
|
@@ -196,12 +185,10 @@ class NamespaceVRFsView(generic.ObjectView):
|
|
|
196
185
|
# Find all VRFs belonging to this Namespace
|
|
197
186
|
vrfs = instance.vrfs.restrict(request.user, "view")
|
|
198
187
|
|
|
199
|
-
vrf_table = tables.VRFTable(vrfs)
|
|
188
|
+
vrf_table = tables.VRFTable(vrfs, exclude=["namespace"])
|
|
200
189
|
if request.user.has_perm("ipam.change_vrf") or request.user.has_perm("ipam.delete_vrf"):
|
|
201
190
|
vrf_table.columns.show("pk")
|
|
202
191
|
|
|
203
|
-
vrf_table.exclude = ("namespace",)
|
|
204
|
-
|
|
205
192
|
paginate = {
|
|
206
193
|
"paginator_class": EnhancedPaginator,
|
|
207
194
|
"per_page": get_paginate_count(request),
|
|
@@ -266,8 +253,7 @@ class VRFView(generic.ObjectView):
|
|
|
266
253
|
# TODO(jathan): This table might need to live on Device and on VRFs
|
|
267
254
|
# (possibly replacing `device_table` above.
|
|
268
255
|
vrfs = instance.device_assignments.restrict(request.user, "view")
|
|
269
|
-
vrf_table = tables.VRFDeviceAssignmentTable(vrfs)
|
|
270
|
-
vrf_table.exclude = ("vrf",)
|
|
256
|
+
vrf_table = tables.VRFDeviceAssignmentTable(vrfs, exclude=["vrf"])
|
|
271
257
|
# context["vrf_table"] = vrf_table
|
|
272
258
|
|
|
273
259
|
paginate = {
|
|
@@ -466,8 +452,7 @@ class PrefixView(generic.ObjectView):
|
|
|
466
452
|
def get_extra_context(self, request, instance):
|
|
467
453
|
# Parent prefixes table
|
|
468
454
|
parent_prefixes = instance.ancestors().restrict(request.user, "view")
|
|
469
|
-
parent_prefix_table = tables.PrefixTable(parent_prefixes)
|
|
470
|
-
parent_prefix_table.exclude = ("namespace",)
|
|
455
|
+
parent_prefix_table = tables.PrefixTable(parent_prefixes, exclude=["namespace"])
|
|
471
456
|
|
|
472
457
|
vrfs = instance.vrf_assignments.restrict(request.user, "view")
|
|
473
458
|
vrf_table = tables.VRFPrefixAssignmentTable(vrfs, orderable=False)
|
|
@@ -498,19 +483,19 @@ class PrefixPrefixesView(generic.ObjectView):
|
|
|
498
483
|
|
|
499
484
|
def get_extra_context(self, request, instance):
|
|
500
485
|
# Child prefixes table
|
|
501
|
-
child_prefixes = (
|
|
502
|
-
instance.descendants()
|
|
503
|
-
.restrict(request.user, "view")
|
|
504
|
-
.select_related("parent", "status", "role", "vlan", "namespace")
|
|
505
|
-
.annotate(location_count=count_related(Location, "prefixes"))
|
|
506
|
-
)
|
|
486
|
+
child_prefixes = instance.descendants().restrict(request.user, "view")
|
|
507
487
|
|
|
508
488
|
# Add available prefixes to the table if requested
|
|
509
|
-
|
|
510
|
-
|
|
489
|
+
data_transform_callback = get_add_available_prefixes_callback(
|
|
490
|
+
show_available=request.GET.get("show_available", "true") == "true", parent=instance
|
|
491
|
+
)
|
|
511
492
|
|
|
512
|
-
prefix_table = tables.PrefixDetailTable(
|
|
513
|
-
|
|
493
|
+
prefix_table = tables.PrefixDetailTable(
|
|
494
|
+
child_prefixes,
|
|
495
|
+
hide_hierarchy_ui=True,
|
|
496
|
+
exclude=["namespace"],
|
|
497
|
+
data_transform_callback=data_transform_callback,
|
|
498
|
+
)
|
|
514
499
|
if request.user.has_perm("ipam.change_prefix") or request.user.has_perm("ipam.delete_prefix"):
|
|
515
500
|
prefix_table.columns.show("pk")
|
|
516
501
|
|
|
@@ -545,26 +530,16 @@ class PrefixIPAddressesView(generic.ObjectView):
|
|
|
545
530
|
|
|
546
531
|
def get_extra_context(self, request, instance):
|
|
547
532
|
# Find all IPAddresses belonging to this Prefix
|
|
548
|
-
ipaddresses = (
|
|
549
|
-
instance.get_all_ips()
|
|
550
|
-
.restrict(request.user, "view")
|
|
551
|
-
.select_related("role", "status", "tenant")
|
|
552
|
-
.prefetch_related("primary_ip4_for", "primary_ip6_for")
|
|
553
|
-
.annotate(
|
|
554
|
-
interface_count=count_related(Interface, "ip_addresses"),
|
|
555
|
-
interface_parent_count=count_related(Device, "interfaces__ip_addresses", distinct=True),
|
|
556
|
-
vm_interface_count=count_related(VMInterface, "ip_addresses"),
|
|
557
|
-
vm_interface_parent_count=count_related(VirtualMachine, "interfaces__ip_addresses", distinct=True),
|
|
558
|
-
)
|
|
559
|
-
)
|
|
533
|
+
ipaddresses = instance.get_all_ips().restrict(request.user, "view")
|
|
560
534
|
|
|
561
535
|
# Add available IP addresses to the table if requested
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
)
|
|
536
|
+
data_transform_callback = get_add_available_ipaddresses_callback(
|
|
537
|
+
show_available=request.GET.get("show_available", "true") == "true", parent=instance
|
|
538
|
+
)
|
|
566
539
|
|
|
567
|
-
ip_table = tables.IPAddressTable(
|
|
540
|
+
ip_table = tables.IPAddressTable(
|
|
541
|
+
ipaddresses, exclude=["parent__namespace"], data_transform_callback=data_transform_callback
|
|
542
|
+
)
|
|
568
543
|
if request.user.has_perm("ipam.change_ipaddress") or request.user.has_perm("ipam.delete_ipaddress"):
|
|
569
544
|
ip_table.columns.show("pk")
|
|
570
545
|
|
|
@@ -761,18 +736,36 @@ class PrefixBulkDeleteView(generic.BulkDeleteView):
|
|
|
761
736
|
|
|
762
737
|
|
|
763
738
|
class IPAddressListView(generic.ObjectListView):
|
|
764
|
-
queryset = IPAddress.objects.
|
|
765
|
-
interface_count=count_related(Interface, "ip_addresses"),
|
|
766
|
-
interface_parent_count=count_related(Device, "interfaces__ip_addresses", distinct=True),
|
|
767
|
-
vm_interface_count=count_related(VMInterface, "ip_addresses"),
|
|
768
|
-
vm_interface_parent_count=count_related(VirtualMachine, "interfaces__ip_addresses", distinct=True),
|
|
769
|
-
assigned_count=count_related(Interface, "ip_addresses") + count_related(VMInterface, "ip_addresses"),
|
|
770
|
-
)
|
|
739
|
+
queryset = IPAddress.objects.all()
|
|
771
740
|
filterset = filters.IPAddressFilterSet
|
|
772
741
|
filterset_form = forms.IPAddressFilterForm
|
|
773
742
|
table = tables.IPAddressDetailTable
|
|
774
743
|
template_name = "ipam/ipaddress_list.html"
|
|
775
|
-
|
|
744
|
+
|
|
745
|
+
def alter_queryset(self, request):
|
|
746
|
+
queryset = super().alter_queryset(request)
|
|
747
|
+
|
|
748
|
+
# All of the below is just to determine whether we are displaying the "assigned_count" column, and if so,
|
|
749
|
+
# perform the relevant queryset annotation. Ref: nautobot/nautobot#6605
|
|
750
|
+
if request.user is None or isinstance(request.user, AnonymousUser):
|
|
751
|
+
table_columns = None
|
|
752
|
+
else:
|
|
753
|
+
table_columns = request.user.get_config("tables.IPAddressDetailTable.columns")
|
|
754
|
+
current_saved_view_pk = request.GET.get("saved_view", None)
|
|
755
|
+
if current_saved_view_pk:
|
|
756
|
+
try:
|
|
757
|
+
current_saved_view = SavedView.objects.get(view="ipam:ipaddress_list", pk=current_saved_view_pk)
|
|
758
|
+
view_table_config = current_saved_view.config.get("table_config", {}).get("IPAddressDetailTable", None)
|
|
759
|
+
if view_table_config is not None:
|
|
760
|
+
table_columns = view_table_config.get("columns", table_columns)
|
|
761
|
+
except ObjectDoesNotExist:
|
|
762
|
+
pass
|
|
763
|
+
|
|
764
|
+
if table_columns and "assigned_count" in table_columns:
|
|
765
|
+
queryset = queryset.annotate(
|
|
766
|
+
assigned_count=count_related(Interface, "ip_addresses") + count_related(VMInterface, "ip_addresses"),
|
|
767
|
+
)
|
|
768
|
+
return queryset
|
|
776
769
|
|
|
777
770
|
|
|
778
771
|
class IPAddressView(generic.ObjectView):
|
|
@@ -1265,17 +1258,18 @@ class VLANGroupView(generic.ObjectView):
|
|
|
1265
1258
|
def get_extra_context(self, request, instance):
|
|
1266
1259
|
vlans = (
|
|
1267
1260
|
VLAN.objects.restrict(request.user, "view")
|
|
1268
|
-
.annotate(location_count=count_related(Location, "vlans"))
|
|
1269
1261
|
.filter(vlan_group=instance)
|
|
1270
1262
|
.prefetch_related(Prefetch("prefixes", queryset=Prefix.objects.restrict(request.user)))
|
|
1271
1263
|
)
|
|
1272
1264
|
vlans_count = vlans.count()
|
|
1273
|
-
vlans = add_available_vlans(vlan_group=instance, vlans=vlans)
|
|
1274
1265
|
|
|
1275
|
-
|
|
1266
|
+
data_transform_callback = get_add_available_vlans_callback(show_available=True, vlan_group=instance)
|
|
1267
|
+
|
|
1268
|
+
vlan_table = tables.VLANDetailTable(
|
|
1269
|
+
vlans, exclude=["vlan_group"], data_transform_callback=data_transform_callback
|
|
1270
|
+
)
|
|
1276
1271
|
if request.user.has_perm("ipam.change_vlan") or request.user.has_perm("ipam.delete_vlan"):
|
|
1277
1272
|
vlan_table.columns.show("pk")
|
|
1278
|
-
vlan_table.columns.hide("vlan_group")
|
|
1279
1273
|
|
|
1280
1274
|
paginate = {
|
|
1281
1275
|
"paginator_class": EnhancedPaginator,
|
|
@@ -1350,8 +1344,7 @@ class VLANView(generic.ObjectView):
|
|
|
1350
1344
|
"namespace",
|
|
1351
1345
|
)
|
|
1352
1346
|
)
|
|
1353
|
-
prefix_table = tables.PrefixTable(list(prefixes), hide_hierarchy_ui=True)
|
|
1354
|
-
prefix_table.exclude = ("vlan",)
|
|
1347
|
+
prefix_table = tables.PrefixTable(list(prefixes), hide_hierarchy_ui=True, exclude=["vlan"])
|
|
1355
1348
|
|
|
1356
1349
|
paginate = {
|
|
1357
1350
|
"paginator_class": EnhancedPaginator,
|