nautobot 2.1.8__py3-none-any.whl → 2.1.9__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/api.py +1 -2
- nautobot/apps/utils.py +4 -0
- nautobot/apps/views.py +2 -0
- nautobot/circuits/api/urls.py +1 -2
- nautobot/circuits/api/views.py +0 -12
- nautobot/core/api/routers.py +25 -3
- nautobot/core/api/utils.py +4 -0
- nautobot/core/api/views.py +21 -15
- nautobot/core/settings.py +1 -0
- nautobot/core/templates/admin/base.html +23 -94
- nautobot/core/templates/graphene/graphiql.html +18 -47
- nautobot/core/templates/inc/footer.html +5 -5
- nautobot/core/templates/inc/nav_menu.html +0 -7
- nautobot/core/templates/rest_framework/api.html +12 -5
- nautobot/core/tests/integration/test_view_authentication.py +67 -0
- nautobot/core/tests/test_graphql.py +2 -14
- nautobot/core/tests/test_views.py +22 -16
- nautobot/core/utils/lookup.py +124 -0
- nautobot/core/views/__init__.py +3 -7
- nautobot/core/views/generic.py +9 -0
- nautobot/dcim/api/urls.py +1 -2
- nautobot/dcim/api/views.py +1 -12
- nautobot/dcim/models/racks.py +1 -3
- nautobot/dcim/templates/dcim/device/lldp_neighbors.html +67 -43
- nautobot/dcim/tests/test_api.py +3 -0
- nautobot/dcim/views.py +5 -2
- nautobot/extras/api/urls.py +1 -2
- nautobot/extras/api/views.py +0 -10
- nautobot/extras/plugins/views.py +6 -9
- nautobot/extras/tests/test_views.py +101 -0
- nautobot/extras/views.py +10 -10
- nautobot/ipam/api/urls.py +1 -2
- nautobot/ipam/api/views.py +0 -11
- nautobot/ipam/tables.py +0 -1
- nautobot/ipam/tests/test_graphql.py +2 -3
- nautobot/ipam/views.py +9 -9
- nautobot/project-static/css/base.css +1 -0
- nautobot/project-static/docs/404.html +14 -0
- nautobot/project-static/docs/apps/index.html +14 -0
- nautobot/project-static/docs/apps/nautobot-apps.html +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/__init__.html +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/admin.html +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/api.html +394 -408
- nautobot/project-static/docs/code-reference/nautobot/apps/change_logging.html +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/choices.html +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/config.html +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/datasources.html +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/exceptions.html +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/factory.html +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/filters.html +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/forms.html +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/graphql.html +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/jobs.html +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/models.html +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/querysets.html +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/secrets.html +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/tables.html +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/testing.html +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/ui.html +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/urls.html +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/utils.html +649 -183
- nautobot/project-static/docs/code-reference/nautobot/apps/views.html +1811 -1744
- nautobot/project-static/docs/development/apps/api/configuration-view.html +14 -0
- nautobot/project-static/docs/development/apps/api/database-backend-config.html +14 -0
- nautobot/project-static/docs/development/apps/api/models/django-admin.html +14 -0
- nautobot/project-static/docs/development/apps/api/models/global-search.html +14 -0
- nautobot/project-static/docs/development/apps/api/models/graphql.html +14 -0
- nautobot/project-static/docs/development/apps/api/models/index.html +14 -0
- nautobot/project-static/docs/development/apps/api/nautobot-app-config.html +14 -0
- nautobot/project-static/docs/development/apps/api/platform-features/custom-validators.html +14 -0
- nautobot/project-static/docs/development/apps/api/platform-features/filter-extensions.html +14 -0
- nautobot/project-static/docs/development/apps/api/platform-features/git-repository-content.html +14 -0
- nautobot/project-static/docs/development/apps/api/platform-features/index.html +14 -0
- nautobot/project-static/docs/development/apps/api/platform-features/jinja2-filters.html +14 -0
- nautobot/project-static/docs/development/apps/api/platform-features/jobs.html +14 -0
- nautobot/project-static/docs/development/apps/api/platform-features/populating-extensibility-features.html +14 -0
- nautobot/project-static/docs/development/apps/api/platform-features/secrets-providers.html +14 -0
- nautobot/project-static/docs/development/apps/api/platform-features/uniquely-identify-objects.html +14 -0
- nautobot/project-static/docs/development/apps/api/prometheus.html +14 -0
- nautobot/project-static/docs/development/apps/api/setup.html +14 -0
- nautobot/project-static/docs/development/apps/api/testing.html +14 -0
- nautobot/project-static/docs/development/apps/api/ui-extensions/banners.html +14 -0
- nautobot/project-static/docs/development/apps/api/ui-extensions/home-page.html +14 -0
- nautobot/project-static/docs/development/apps/api/ui-extensions/index.html +14 -0
- nautobot/project-static/docs/development/apps/api/ui-extensions/navigation.html +14 -0
- nautobot/project-static/docs/development/apps/api/ui-extensions/object-views.html +14 -0
- nautobot/project-static/docs/development/apps/api/views/base-template.html +14 -0
- nautobot/project-static/docs/development/apps/api/views/core-view-overrides.html +28 -9
- nautobot/project-static/docs/development/apps/api/views/django-generic-views.html +31 -12
- nautobot/project-static/docs/development/apps/api/views/help-documentation.html +14 -0
- nautobot/project-static/docs/development/apps/api/views/index.html +14 -0
- nautobot/project-static/docs/development/apps/api/views/nautobot-generic-views.html +14 -0
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewset.html +14 -0
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewsetrouter.html +14 -0
- nautobot/project-static/docs/development/apps/api/views/notes.html +14 -0
- nautobot/project-static/docs/development/apps/api/views/rest-api.html +14 -0
- nautobot/project-static/docs/development/apps/api/views/urls.html +14 -0
- nautobot/project-static/docs/development/apps/index.html +14 -0
- nautobot/project-static/docs/development/apps/migration/code-updates.html +14 -0
- nautobot/project-static/docs/development/apps/migration/dependency-updates.html +14 -0
- nautobot/project-static/docs/development/apps/migration/from-v1.html +14 -0
- nautobot/project-static/docs/development/apps/migration/model-updates/dcim.html +14 -0
- nautobot/project-static/docs/development/apps/migration/model-updates/extras.html +14 -0
- nautobot/project-static/docs/development/apps/migration/model-updates/global.html +14 -0
- nautobot/project-static/docs/development/apps/migration/model-updates/ipam.html +14 -0
- nautobot/project-static/docs/development/apps/porting-from-netbox.html +14 -0
- nautobot/project-static/docs/development/core/application-registry.html +14 -0
- nautobot/project-static/docs/development/core/best-practices.html +14 -0
- nautobot/project-static/docs/development/core/bootstrap-ui.html +14 -0
- nautobot/project-static/docs/development/core/caching.html +14 -0
- nautobot/project-static/docs/development/core/docker-compose-advanced-use-cases.html +14 -0
- nautobot/project-static/docs/development/core/extending-models.html +14 -0
- nautobot/project-static/docs/development/core/generic-views.html +14 -0
- nautobot/project-static/docs/development/core/getting-started.html +33 -10
- nautobot/project-static/docs/development/core/homepage.html +14 -0
- nautobot/project-static/docs/development/core/index.html +14 -0
- nautobot/project-static/docs/development/core/model-features.html +14 -0
- nautobot/project-static/docs/development/core/natural-keys.html +14 -0
- nautobot/project-static/docs/development/core/navigation-menu.html +14 -0
- nautobot/project-static/docs/development/core/release-checklist.html +14 -0
- nautobot/project-static/docs/development/core/role-internals.html +14 -0
- nautobot/project-static/docs/development/core/style-guide.html +14 -0
- nautobot/project-static/docs/development/core/templates.html +14 -0
- nautobot/project-static/docs/development/core/testing.html +14 -0
- nautobot/project-static/docs/development/core/user-preferences.html +14 -0
- nautobot/project-static/docs/development/index.html +14 -0
- nautobot/project-static/docs/development/jobs/index.html +14 -0
- nautobot/project-static/docs/development/jobs/migration/from-v1.html +14 -0
- nautobot/project-static/docs/index.html +14 -0
- nautobot/project-static/docs/objects.inv +0 -0
- nautobot/project-static/docs/release-notes/index.html +14 -0
- nautobot/project-static/docs/release-notes/version-1.0.html +14 -0
- nautobot/project-static/docs/release-notes/version-1.1.html +14 -0
- nautobot/project-static/docs/release-notes/version-1.2.html +14 -0
- nautobot/project-static/docs/release-notes/version-1.3.html +14 -0
- nautobot/project-static/docs/release-notes/version-1.4.html +14 -0
- nautobot/project-static/docs/release-notes/version-1.5.html +14 -0
- nautobot/project-static/docs/release-notes/version-1.6.html +14 -0
- nautobot/project-static/docs/release-notes/version-2.0.html +14 -0
- nautobot/project-static/docs/release-notes/version-2.1.html +365 -159
- nautobot/project-static/docs/search/search_index.json +1 -1
- nautobot/project-static/docs/sitemap.xml +245 -240
- nautobot/project-static/docs/sitemap.xml.gz +0 -0
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/ldap.html +14 -0
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/remote.html +14 -0
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/sso.html +14 -0
- nautobot/project-static/docs/user-guide/administration/configuration/index.html +14 -0
- nautobot/project-static/docs/user-guide/administration/configuration/optional-settings.html +14 -0
- nautobot/project-static/docs/user-guide/administration/configuration/required-settings.html +14 -0
- nautobot/project-static/docs/user-guide/administration/configuration/time-zones.html +14 -0
- nautobot/project-static/docs/user-guide/administration/guides/caching.html +14 -0
- nautobot/project-static/docs/user-guide/administration/guides/celery-queues.html +14 -0
- nautobot/project-static/docs/user-guide/administration/guides/healthcheck.html +14 -0
- nautobot/project-static/docs/user-guide/administration/guides/permissions.html +14 -0
- nautobot/project-static/docs/user-guide/administration/guides/prometheus-metrics.html +14 -0
- nautobot/project-static/docs/user-guide/administration/guides/replicating-nautobot.html +14 -0
- nautobot/project-static/docs/user-guide/administration/guides/request-profiling.html +14 -0
- nautobot/project-static/docs/user-guide/administration/guides/s3-django-storage.html +14 -0
- nautobot/project-static/docs/user-guide/administration/installation/app-install.html +14 -0
- nautobot/project-static/docs/user-guide/administration/installation/docker.html +21 -3
- nautobot/project-static/docs/user-guide/administration/installation/external-authentication.html +14 -0
- nautobot/project-static/docs/user-guide/administration/installation/health-checks.html +6019 -0
- nautobot/project-static/docs/user-guide/administration/installation/http-server.html +14 -0
- nautobot/project-static/docs/user-guide/administration/installation/index.html +14 -0
- nautobot/project-static/docs/user-guide/administration/installation/install_system.html +14 -0
- nautobot/project-static/docs/user-guide/administration/installation/nautobot.html +14 -0
- nautobot/project-static/docs/user-guide/administration/installation/selinux-troubleshooting.html +17 -3
- nautobot/project-static/docs/user-guide/administration/installation/services.html +14 -0
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-netbox.html +14 -0
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-postgresql.html +14 -0
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-server.html +14 -0
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-shell.html +14 -0
- nautobot/project-static/docs/user-guide/administration/upgrading/database-backup.html +14 -0
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/after-you-upgrade.html +14 -0
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/before-you-upgrade.html +14 -0
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/for-developers.html +14 -0
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/index.html +14 -0
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/whats-changed.html +14 -0
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/region-and-site-data-migration-guide.html +14 -0
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +14 -0
- nautobot/project-static/docs/user-guide/administration/upgrading/upgrading.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuit.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittermination.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittype.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/circuits/provider.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/circuits/providernetwork.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/cable.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleport.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleporttemplate.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverport.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverporttemplate.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/device.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebay.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebaytemplate.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/deviceredundancygroup.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicetype.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontport.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontporttemplate.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interface.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfaceredundancygroup.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfacetemplate.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/inventoryitem.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/location.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/locationtype.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/manufacturer.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/platform.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerfeed.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlet.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlettemplate.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerpanel.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerport.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerporttemplate.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rack.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackgroup.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackreservation.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearport.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearporttemplate.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualchassis.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontext.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontextschema.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/ipam/ipaddress.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/ipam/namespace.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/ipam/prefix.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/ipam/rir.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/ipam/routetarget.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/ipam/service.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlan.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlangroup.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vrf.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/overview/introduction.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenant.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenantgroup.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/cluster.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustergroup.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustertype.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/virtualmachine.html +14 -0
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/vminterface.html +14 -0
- nautobot/project-static/docs/user-guide/feature-guides/custom-fields.html +14 -0
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-devices.html +14 -0
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-location-types-and-locations.html +14 -0
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/index.html +14 -0
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/interfaces.html +14 -0
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/ipam.html +14 -0
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/platforms.html +14 -0
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/search-bar.html +14 -0
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/tenants.html +14 -0
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/vlans-and-vlan-groups.html +14 -0
- nautobot/project-static/docs/user-guide/feature-guides/git-data-source.html +14 -0
- nautobot/project-static/docs/user-guide/feature-guides/graphql.html +14 -0
- nautobot/project-static/docs/user-guide/feature-guides/ip-address-merge-tool.html +14 -0
- nautobot/project-static/docs/user-guide/feature-guides/relationships.html +14 -0
- nautobot/project-static/docs/user-guide/index.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/change-logging.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/computedfield.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/customfield.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/customlink.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/dynamicgroup.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/exporttemplate.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/externalintegration.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/gitrepository.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/graphql.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/graphqlquery.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/imageattachment.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/index.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/job-scheduling-and-approvals.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobbutton.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobhook.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/models.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/napalm.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/note.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/relationship.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/authentication.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/filtering.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/overview.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/ui-related-endpoints.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/role.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/secret.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/status.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/tag.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/template-filters.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/users/objectpermission.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/users/token.html +14 -0
- nautobot/project-static/docs/user-guide/platform-functionality/webhook.html +14 -0
- nautobot/tenancy/api/urls.py +1 -2
- nautobot/tenancy/api/views.py +0 -12
- nautobot/users/api/urls.py +1 -2
- nautobot/users/api/views.py +2 -65
- nautobot/users/views.py +8 -8
- nautobot/virtualization/api/urls.py +1 -2
- nautobot/virtualization/api/views.py +0 -12
- {nautobot-2.1.8.dist-info → nautobot-2.1.9.dist-info}/METADATA +2 -2
- {nautobot-2.1.8.dist-info → nautobot-2.1.9.dist-info}/RECORD +296 -294
- {nautobot-2.1.8.dist-info → nautobot-2.1.9.dist-info}/LICENSE.txt +0 -0
- {nautobot-2.1.8.dist-info → nautobot-2.1.9.dist-info}/NOTICE +0 -0
- {nautobot-2.1.8.dist-info → nautobot-2.1.9.dist-info}/WHEEL +0 -0
- {nautobot-2.1.8.dist-info → nautobot-2.1.9.dist-info}/entry_points.txt +0 -0
nautobot/users/api/views.py
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
from django.contrib.auth import get_user_model
|
|
1
|
+
from django.contrib.auth import get_user_model
|
|
2
2
|
from django.contrib.auth.models import Group
|
|
3
3
|
from django.db.models import Count
|
|
4
|
-
from django.utils.decorators import method_decorator
|
|
5
|
-
from django.views.decorators.csrf import ensure_csrf_cookie
|
|
6
4
|
from drf_spectacular.utils import extend_schema, extend_schema_view, OpenApiTypes
|
|
7
5
|
from rest_framework.authentication import BasicAuthentication
|
|
8
|
-
from rest_framework.
|
|
9
|
-
from rest_framework.permissions import AllowAny, IsAuthenticated
|
|
6
|
+
from rest_framework.permissions import IsAuthenticated
|
|
10
7
|
from rest_framework.response import Response
|
|
11
|
-
from rest_framework.routers import APIRootView
|
|
12
8
|
from rest_framework.viewsets import ViewSet
|
|
13
9
|
|
|
14
10
|
from nautobot.core.api.serializers import BulkOperationIntegerIDSerializer
|
|
@@ -20,16 +16,6 @@ from nautobot.users.models import ObjectPermission, Token
|
|
|
20
16
|
|
|
21
17
|
from . import serializers
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
class UsersRootView(APIRootView):
|
|
25
|
-
"""
|
|
26
|
-
Users API root view
|
|
27
|
-
"""
|
|
28
|
-
|
|
29
|
-
def get_view_name(self):
|
|
30
|
-
return "Users"
|
|
31
|
-
|
|
32
|
-
|
|
33
19
|
#
|
|
34
20
|
# Users and groups
|
|
35
21
|
#
|
|
@@ -40,40 +26,6 @@ class UserViewSet(ModelViewSet):
|
|
|
40
26
|
serializer_class = serializers.UserSerializer
|
|
41
27
|
filterset_class = filters.UserFilterSet
|
|
42
28
|
|
|
43
|
-
@action(methods=["GET"], detail=False, url_path="my-profile")
|
|
44
|
-
def my_profile(self, request):
|
|
45
|
-
serializer = self.serializer_class(instance=request.user, context={"request": request})
|
|
46
|
-
return Response(serializer.data)
|
|
47
|
-
|
|
48
|
-
@method_decorator(ensure_csrf_cookie)
|
|
49
|
-
@action(methods=["GET"], detail=False, permission_classes=[AllowAny])
|
|
50
|
-
def session(self, request):
|
|
51
|
-
from django.conf import settings as django_settings
|
|
52
|
-
from django.urls import reverse
|
|
53
|
-
from social_django.context_processors import backends
|
|
54
|
-
|
|
55
|
-
from nautobot.core.settings_funcs import sso_auth_enabled
|
|
56
|
-
|
|
57
|
-
serializer = self.serializer_class(instance=request.user, context={"request": request})
|
|
58
|
-
|
|
59
|
-
_backends = []
|
|
60
|
-
sso_enabled = sso_auth_enabled(django_settings.AUTHENTICATION_BACKENDS)
|
|
61
|
-
|
|
62
|
-
social_auth_backends = backends(request)["backends"]
|
|
63
|
-
if sso_enabled:
|
|
64
|
-
for backend in social_auth_backends["backends"]:
|
|
65
|
-
_backends.append(reverse("social:begin", kwargs={"backend": backend}))
|
|
66
|
-
|
|
67
|
-
resp = {
|
|
68
|
-
"user": serializer.data,
|
|
69
|
-
"logged_in": request.user.is_authenticated,
|
|
70
|
-
"sso_enabled": sso_enabled,
|
|
71
|
-
"sso_user": (len(social_auth_backends["associated"]) > 0),
|
|
72
|
-
"backends": _backends,
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return Response(resp)
|
|
76
|
-
|
|
77
29
|
|
|
78
30
|
@extend_schema_view(
|
|
79
31
|
bulk_destroy=extend_schema(request=BulkOperationIntegerIDSerializer(many=True)),
|
|
@@ -101,21 +53,6 @@ class TokenViewSet(ModelViewSet):
|
|
|
101
53
|
classes = super().authentication_classes
|
|
102
54
|
return [*classes, BasicAuthentication]
|
|
103
55
|
|
|
104
|
-
# TODO(timizuo): Move authenticate and logout to its own view;
|
|
105
|
-
# as it is not proper to be on this.
|
|
106
|
-
@action(methods=["POST"], detail=False, permission_classes=[AllowAny])
|
|
107
|
-
def authenticate(self, request):
|
|
108
|
-
serializer = serializers.UserLoginSerializer(data=request.data, context=self.get_serializer_context())
|
|
109
|
-
serializer.is_valid(raise_exception=True)
|
|
110
|
-
user = serializer.validated_data["user"]
|
|
111
|
-
login(request, user=user)
|
|
112
|
-
return Response(status=200)
|
|
113
|
-
|
|
114
|
-
@action(methods=["GET"], detail=False)
|
|
115
|
-
def logout(self, request):
|
|
116
|
-
logout(request)
|
|
117
|
-
return Response(status=200)
|
|
118
|
-
|
|
119
56
|
def get_queryset(self):
|
|
120
57
|
"""
|
|
121
58
|
Limit users to their own Tokens.
|
nautobot/users/views.py
CHANGED
|
@@ -7,7 +7,6 @@ from django.contrib.auth import (
|
|
|
7
7
|
logout as auth_logout,
|
|
8
8
|
update_session_auth_hash,
|
|
9
9
|
)
|
|
10
|
-
from django.contrib.auth.mixins import LoginRequiredMixin
|
|
11
10
|
from django.http import HttpResponseForbidden, HttpResponseRedirect
|
|
12
11
|
from django.shortcuts import get_object_or_404, redirect, render
|
|
13
12
|
from django.urls import reverse
|
|
@@ -18,6 +17,7 @@ from django.views.decorators.debug import sensitive_post_parameters
|
|
|
18
17
|
from django.views.generic import View
|
|
19
18
|
|
|
20
19
|
from nautobot.core.forms import ConfirmationForm
|
|
20
|
+
from nautobot.core.views.generic import GenericView
|
|
21
21
|
|
|
22
22
|
from .forms import AdvancedProfileSettingsForm, LoginForm, PasswordChangeForm, TokenForm
|
|
23
23
|
from .models import Token
|
|
@@ -118,7 +118,7 @@ def is_django_auth_user(request):
|
|
|
118
118
|
return request.session.get(BACKEND_SESSION_KEY, None) == "nautobot.core.authentication.ObjectPermissionBackend"
|
|
119
119
|
|
|
120
120
|
|
|
121
|
-
class ProfileView(
|
|
121
|
+
class ProfileView(GenericView):
|
|
122
122
|
template_name = "users/profile.html"
|
|
123
123
|
|
|
124
124
|
def get(self, request):
|
|
@@ -132,7 +132,7 @@ class ProfileView(LoginRequiredMixin, View):
|
|
|
132
132
|
)
|
|
133
133
|
|
|
134
134
|
|
|
135
|
-
class UserConfigView(
|
|
135
|
+
class UserConfigView(GenericView):
|
|
136
136
|
template_name = "users/preferences.html"
|
|
137
137
|
|
|
138
138
|
def get(self, request):
|
|
@@ -160,7 +160,7 @@ class UserConfigView(LoginRequiredMixin, View):
|
|
|
160
160
|
return redirect("user:preferences")
|
|
161
161
|
|
|
162
162
|
|
|
163
|
-
class ChangePasswordView(
|
|
163
|
+
class ChangePasswordView(GenericView):
|
|
164
164
|
template_name = "users/change_password.html"
|
|
165
165
|
|
|
166
166
|
RESTRICTED_NOTICE = "Remotely authenticated user credentials cannot be changed within Nautobot."
|
|
@@ -218,7 +218,7 @@ class ChangePasswordView(LoginRequiredMixin, View):
|
|
|
218
218
|
#
|
|
219
219
|
|
|
220
220
|
|
|
221
|
-
class TokenListView(
|
|
221
|
+
class TokenListView(GenericView):
|
|
222
222
|
def get(self, request):
|
|
223
223
|
tokens = Token.objects.filter(user=request.user)
|
|
224
224
|
|
|
@@ -233,7 +233,7 @@ class TokenListView(LoginRequiredMixin, View):
|
|
|
233
233
|
)
|
|
234
234
|
|
|
235
235
|
|
|
236
|
-
class TokenEditView(
|
|
236
|
+
class TokenEditView(GenericView):
|
|
237
237
|
def get(self, request, pk=None):
|
|
238
238
|
if pk is not None:
|
|
239
239
|
if not request.user.has_perm("users.change_token"):
|
|
@@ -292,7 +292,7 @@ class TokenEditView(LoginRequiredMixin, View):
|
|
|
292
292
|
)
|
|
293
293
|
|
|
294
294
|
|
|
295
|
-
class TokenDeleteView(
|
|
295
|
+
class TokenDeleteView(GenericView):
|
|
296
296
|
def get(self, request, pk):
|
|
297
297
|
token = get_object_or_404(Token.objects.filter(user=request.user), pk=pk)
|
|
298
298
|
initial_data = {
|
|
@@ -336,7 +336,7 @@ class TokenDeleteView(LoginRequiredMixin, View):
|
|
|
336
336
|
#
|
|
337
337
|
|
|
338
338
|
|
|
339
|
-
class AdvancedProfileSettingsEditView(
|
|
339
|
+
class AdvancedProfileSettingsEditView(GenericView):
|
|
340
340
|
template_name = "users/advanced_settings_edit.html"
|
|
341
341
|
|
|
342
342
|
def get(self, request):
|
|
@@ -2,8 +2,7 @@ from nautobot.core.api.routers import OrderedDefaultRouter
|
|
|
2
2
|
|
|
3
3
|
from . import views
|
|
4
4
|
|
|
5
|
-
router = OrderedDefaultRouter()
|
|
6
|
-
router.APIRootView = views.VirtualizationRootView
|
|
5
|
+
router = OrderedDefaultRouter(view_name="Virtualization")
|
|
7
6
|
|
|
8
7
|
# Clusters
|
|
9
8
|
router.register("cluster-types", views.ClusterTypeViewSet)
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from rest_framework.routers import APIRootView
|
|
2
|
-
|
|
3
1
|
from nautobot.core.models.querysets import count_related
|
|
4
2
|
from nautobot.dcim.models import Device
|
|
5
3
|
from nautobot.extras.api.views import (
|
|
@@ -19,16 +17,6 @@ from nautobot.virtualization.models import (
|
|
|
19
17
|
|
|
20
18
|
from . import serializers
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
class VirtualizationRootView(APIRootView):
|
|
24
|
-
"""
|
|
25
|
-
Virtualization API root view
|
|
26
|
-
"""
|
|
27
|
-
|
|
28
|
-
def get_view_name(self):
|
|
29
|
-
return "Virtualization"
|
|
30
|
-
|
|
31
|
-
|
|
32
20
|
#
|
|
33
21
|
# Clusters
|
|
34
22
|
#
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: nautobot
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.9
|
|
4
4
|
Summary: Source of truth and network automation platform.
|
|
5
5
|
Home-page: https://nautobot.com
|
|
6
6
|
License: Apache-2.0
|
|
@@ -22,7 +22,7 @@ Provides-Extra: mysql
|
|
|
22
22
|
Provides-Extra: napalm
|
|
23
23
|
Provides-Extra: remote-storage
|
|
24
24
|
Provides-Extra: sso
|
|
25
|
-
Requires-Dist: Django (>=3.2.
|
|
25
|
+
Requires-Dist: Django (>=3.2.25,<3.3.0)
|
|
26
26
|
Requires-Dist: GitPython (>=3.1.41,<3.2.0)
|
|
27
27
|
Requires-Dist: Jinja2 (>=3.1.3,<3.2.0)
|
|
28
28
|
Requires-Dist: Markdown (>=3.3.7,<3.4.0)
|