nautobot 2.3.12__py3-none-any.whl → 2.3.14__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/circuits/tables.py +2 -1
- nautobot/core/api/serializers.py +1 -0
- nautobot/core/celery/log.py +4 -4
- nautobot/core/filters.py +2 -0
- nautobot/core/jobs/cleanup.py +47 -11
- nautobot/core/models/tree_queries.py +5 -2
- nautobot/core/settings.py +1 -1
- nautobot/core/tables.py +60 -10
- nautobot/core/templates/search.html +7 -0
- nautobot/core/templatetags/helpers.py +7 -1
- nautobot/core/testing/api.py +5 -1
- nautobot/core/testing/filters.py +20 -5
- 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 +10 -5
- nautobot/dcim/models/devices.py +1 -0
- nautobot/dcim/tests/test_filters.py +33 -0
- nautobot/dcim/tests/test_forms.py +51 -2
- 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/forms/mixins.py +10 -2
- nautobot/extras/group_sync.py +3 -3
- nautobot/extras/jobs.py +6 -4
- nautobot/extras/plugins/__init__.py +13 -2
- nautobot/extras/tests/test_views.py +2 -0
- nautobot/ipam/lookups.py +101 -62
- nautobot/ipam/models.py +62 -11
- nautobot/ipam/tables.py +20 -6
- nautobot/ipam/tests/test_api.py +68 -1
- nautobot/ipam/tests/test_models.py +41 -0
- 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 +7 -5
- 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 +2 -2
- 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 +154 -140
- 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 +142 -118
- 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 +553 -200
- 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.14.dist-info}/METADATA +3 -3
- {nautobot-2.3.12.dist-info → nautobot-2.3.14.dist-info}/RECORD +324 -324
- {nautobot-2.3.12.dist-info → nautobot-2.3.14.dist-info}/LICENSE.txt +0 -0
- {nautobot-2.3.12.dist-info → nautobot-2.3.14.dist-info}/NOTICE +0 -0
- {nautobot-2.3.12.dist-info → nautobot-2.3.14.dist-info}/WHEEL +0 -0
- {nautobot-2.3.12.dist-info → nautobot-2.3.14.dist-info}/entry_points.txt +0 -0
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import re
|
|
2
2
|
from unittest import skipIf
|
|
3
3
|
|
|
4
|
-
from django.
|
|
4
|
+
from django.contrib.contenttypes.models import ContentType
|
|
5
|
+
from django.db import connection, transaction
|
|
5
6
|
import netaddr
|
|
6
7
|
|
|
7
8
|
from nautobot.core.testing import TestCase
|
|
8
9
|
from nautobot.extras.models import Status
|
|
9
10
|
from nautobot.ipam import choices
|
|
10
11
|
from nautobot.ipam.models import IPAddress, Namespace, Prefix
|
|
12
|
+
from nautobot.users.models import ObjectPermission
|
|
11
13
|
|
|
12
14
|
|
|
13
15
|
class IPAddressQuerySet(TestCase):
|
|
@@ -266,6 +268,28 @@ class IPAddressQuerySet(TestCase):
|
|
|
266
268
|
[instance for ip, instance in self.ips.items() if "10.0.0" in ip],
|
|
267
269
|
)
|
|
268
270
|
|
|
271
|
+
def test_lookup_not_ambiguous(self):
|
|
272
|
+
"""Check for issues like https://github.com/nautobot/nautobot/issues/5166."""
|
|
273
|
+
obj_perm = ObjectPermission.objects.create(name="Test Permission", constraints={}, actions=["view"])
|
|
274
|
+
obj_perm.object_types.add(ContentType.objects.get_for_model(IPAddress))
|
|
275
|
+
obj_perm.users.add(self.user)
|
|
276
|
+
queryset = IPAddress.objects.select_related("parent", "nat_inside", "status")
|
|
277
|
+
|
|
278
|
+
for permission_constraint in (
|
|
279
|
+
{"host__family": 4},
|
|
280
|
+
{"host__net_host": "10.0.0.1"},
|
|
281
|
+
{"host__net_host_contained": "10.0.0.0/24"},
|
|
282
|
+
{"host__net_in": ["10.0.0.0/24"]},
|
|
283
|
+
):
|
|
284
|
+
with self.subTest(permission_type=next(iter(permission_constraint.keys()))):
|
|
285
|
+
try:
|
|
286
|
+
with transaction.atomic():
|
|
287
|
+
obj_perm.constraints = permission_constraint
|
|
288
|
+
obj_perm.save()
|
|
289
|
+
list(queryset.restrict(self.user, "view"))
|
|
290
|
+
finally:
|
|
291
|
+
delattr(self.user, "_object_perm_cache")
|
|
292
|
+
|
|
269
293
|
@skipIf(
|
|
270
294
|
connection.vendor == "postgresql",
|
|
271
295
|
"Not currently supported on postgresql",
|
|
@@ -648,6 +672,30 @@ class PrefixQuerysetTestCase(TestCase):
|
|
|
648
672
|
prefix = Prefix.objects.filter(network__net_equals="192.168.0.0/16")[0]
|
|
649
673
|
self.assertEqual(Prefix.objects.filter(prefix="192.168.0.0/16")[0], prefix)
|
|
650
674
|
|
|
675
|
+
def test_lookup_not_ambiguous(self):
|
|
676
|
+
"""Check for issues like https://github.com/nautobot/nautobot/issues/5166."""
|
|
677
|
+
obj_perm = ObjectPermission.objects.create(name="Test Permission", constraints={}, actions=["view"])
|
|
678
|
+
obj_perm.object_types.add(ContentType.objects.get_for_model(Prefix))
|
|
679
|
+
obj_perm.users.add(self.user)
|
|
680
|
+
queryset = Prefix.objects.select_related("parent", "rir", "role", "status", "namespace")
|
|
681
|
+
|
|
682
|
+
for permission_constraint in (
|
|
683
|
+
{"network__family": 4},
|
|
684
|
+
{"network__net_equals": "192.168.0.0/16"},
|
|
685
|
+
{"network__net_contained": "192.0.0.0/8"},
|
|
686
|
+
{"network__net_contained_or_equal": "192.0.0.0/8"},
|
|
687
|
+
{"network__net_contains": "192.168.3.192/32"},
|
|
688
|
+
{"network__net_contains_or_equals": "192.168.3.192/32"},
|
|
689
|
+
):
|
|
690
|
+
with self.subTest(permission_type=next(iter(permission_constraint.keys()))):
|
|
691
|
+
try:
|
|
692
|
+
with transaction.atomic():
|
|
693
|
+
obj_perm.constraints = permission_constraint
|
|
694
|
+
obj_perm.save()
|
|
695
|
+
list(queryset.restrict(self.user, "view"))
|
|
696
|
+
finally:
|
|
697
|
+
delattr(self.user, "_object_perm_cache")
|
|
698
|
+
|
|
651
699
|
@skipIf(
|
|
652
700
|
connection.vendor == "postgresql",
|
|
653
701
|
"Not currently supported on postgresql",
|
nautobot/ipam/utils/__init__.py
CHANGED
|
@@ -4,6 +4,7 @@ import netaddr
|
|
|
4
4
|
from nautobot.core.forms.utils import compress_range
|
|
5
5
|
from nautobot.dcim.models import Interface
|
|
6
6
|
from nautobot.extras.models import RelationshipAssociation
|
|
7
|
+
from nautobot.ipam.choices import PrefixTypeChoices
|
|
7
8
|
from nautobot.ipam.models import Prefix, VLAN
|
|
8
9
|
from nautobot.ipam.querysets import IPAddressQuerySet
|
|
9
10
|
from nautobot.virtualization.models import VMInterface
|
|
@@ -25,6 +26,13 @@ def add_available_prefixes(parent, prefix_list):
|
|
|
25
26
|
return prefix_list
|
|
26
27
|
|
|
27
28
|
|
|
29
|
+
def get_add_available_prefixes_callback(show_available, parent):
|
|
30
|
+
"""Conditionally provide a callback for add_available_prefixes()."""
|
|
31
|
+
if show_available:
|
|
32
|
+
return lambda prefixes: add_available_prefixes(parent.prefix, prefixes)
|
|
33
|
+
return lambda prefixes: prefixes
|
|
34
|
+
|
|
35
|
+
|
|
28
36
|
def add_available_ipaddresses(prefix, ipaddress_list, is_pool=False):
|
|
29
37
|
"""
|
|
30
38
|
Annotate ranges of available IP addresses within a given prefix. If is_pool is True, the first and last IP will be
|
|
@@ -81,6 +89,15 @@ def add_available_ipaddresses(prefix, ipaddress_list, is_pool=False):
|
|
|
81
89
|
return output
|
|
82
90
|
|
|
83
91
|
|
|
92
|
+
def get_add_available_ipaddresses_callback(show_available, parent):
|
|
93
|
+
"""Conditionally provide a callback for add_available_ipaddresses()."""
|
|
94
|
+
if show_available:
|
|
95
|
+
return lambda ip_addresses: add_available_ipaddresses(
|
|
96
|
+
parent.prefix, ip_addresses, is_pool=(parent.type == PrefixTypeChoices.TYPE_POOL)
|
|
97
|
+
)
|
|
98
|
+
return lambda ip_addresses: ip_addresses
|
|
99
|
+
|
|
100
|
+
|
|
84
101
|
def add_available_vlans(vlan_group, vlans):
|
|
85
102
|
"""
|
|
86
103
|
Create fake records for all gaps between used VLANs
|
|
@@ -99,6 +116,13 @@ def add_available_vlans(vlan_group, vlans):
|
|
|
99
116
|
return vlans
|
|
100
117
|
|
|
101
118
|
|
|
119
|
+
def get_add_available_vlans_callback(show_available, vlan_group):
|
|
120
|
+
"""Conditionally provide a callback for add_available_vlans()."""
|
|
121
|
+
if show_available:
|
|
122
|
+
return lambda vlans: add_available_vlans(vlan_group=vlan_group, vlans=vlans)
|
|
123
|
+
return lambda vlans: vlans
|
|
124
|
+
|
|
125
|
+
|
|
102
126
|
def handle_relationship_changes_when_merging_ips(merged_ip, merged_attributes, collapsed_ips):
|
|
103
127
|
"""
|
|
104
128
|
Update/Delete RelationshipAssociation instances after we collapsed the IPs.
|
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,
|
|
@@ -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.5.
|
|
21
|
+
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.48">
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -9770,13 +9770,15 @@ with shared functionality; if no such sharing is required, use Job class instead
|
|
|
9770
9770
|
<ul>
|
|
9771
9771
|
<li>name (str)</li>
|
|
9772
9772
|
<li>description (str)</li>
|
|
9773
|
-
<li>hidden (bool)</li>
|
|
9774
|
-
<li>field_order (list)</li>
|
|
9775
9773
|
<li>approval_required (bool)</li>
|
|
9776
|
-
<li>
|
|
9777
|
-
<li>
|
|
9774
|
+
<li>dryrun_default (bool)</li>
|
|
9775
|
+
<li>field_order (list)</li>
|
|
9778
9776
|
<li>has_sensitive_variables (bool)</li>
|
|
9777
|
+
<li>hidden (bool)</li>
|
|
9778
|
+
<li>soft_time_limit (int)</li>
|
|
9779
9779
|
<li>task_queues (list)</li>
|
|
9780
|
+
<li>template_name (str)</li>
|
|
9781
|
+
<li>time_limit (int)</li>
|
|
9780
9782
|
</ul>
|
|
9781
9783
|
|
|
9782
9784
|
|