nautobot 2.2.0__py3-none-any.whl → 2.2.0b1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of nautobot might be problematic. Click here for more details.
- nautobot/apps/api.py +2 -1
- nautobot/apps/utils.py +0 -4
- nautobot/apps/views.py +0 -2
- nautobot/circuits/api/urls.py +2 -1
- nautobot/circuits/api/views.py +12 -0
- nautobot/circuits/tests/test_filters.py +1 -1
- nautobot/core/api/routers.py +3 -25
- nautobot/core/api/utils.py +0 -4
- nautobot/core/api/views.py +15 -21
- nautobot/core/filters.py +1 -7
- nautobot/core/management/commands/generate_test_data.py +4 -4
- nautobot/core/settings.py +0 -1
- nautobot/core/tables.py +1 -2
- nautobot/core/templates/admin/base.html +94 -23
- nautobot/core/templates/graphene/graphiql.html +47 -18
- nautobot/core/templates/inc/footer.html +5 -5
- nautobot/core/templates/inc/nav_menu.html +7 -0
- nautobot/core/templates/rest_framework/api.html +5 -12
- nautobot/core/templatetags/helpers.py +2 -2
- nautobot/core/testing/views.py +0 -30
- nautobot/core/tests/test_api.py +6 -13
- nautobot/core/tests/test_csv.py +4 -5
- nautobot/core/tests/test_filters.py +1 -2
- nautobot/core/tests/test_graphql.py +14 -4
- nautobot/core/tests/test_navigations.py +0 -3
- nautobot/core/tests/test_views.py +16 -22
- nautobot/core/utils/lookup.py +0 -124
- nautobot/core/views/__init__.py +7 -3
- nautobot/core/views/generic.py +3 -19
- nautobot/core/views/mixins.py +0 -7
- nautobot/core/views/renderers.py +1 -4
- nautobot/dcim/api/serializers.py +4 -4
- nautobot/dcim/api/urls.py +3 -2
- nautobot/dcim/api/views.py +18 -7
- nautobot/dcim/factory.py +7 -7
- nautobot/dcim/filters/__init__.py +17 -16
- nautobot/dcim/forms.py +45 -61
- nautobot/dcim/homepage.py +3 -11
- nautobot/dcim/migrations/0057_controller_models.py +70 -11
- nautobot/dcim/models/__init__.py +2 -2
- nautobot/dcim/models/devices.py +16 -14
- nautobot/dcim/models/racks.py +3 -1
- nautobot/dcim/navigation.py +31 -23
- nautobot/dcim/signals.py +6 -6
- nautobot/dcim/tables/__init__.py +2 -2
- nautobot/dcim/tables/devices.py +15 -12
- nautobot/dcim/tables/template_code.py +1 -1
- nautobot/dcim/templates/dcim/controller_retrieve.html +18 -35
- nautobot/dcim/templates/dcim/controllerdevicegroup_create.html +43 -0
- nautobot/dcim/templates/dcim/device/lldp_neighbors.html +43 -67
- nautobot/dcim/templates/dcim/device.html +2 -10
- nautobot/dcim/templates/dcim/device_edit.html +1 -1
- nautobot/dcim/tests/test_api.py +6 -11
- nautobot/dcim/tests/test_filters.py +81 -92
- nautobot/dcim/tests/test_graphql.py +1 -11
- nautobot/dcim/tests/test_models.py +15 -15
- nautobot/dcim/tests/test_signals.py +0 -2
- nautobot/dcim/tests/test_views.py +12 -24
- nautobot/dcim/urls.py +1 -1
- nautobot/dcim/views.py +15 -19
- nautobot/extras/api/urls.py +2 -1
- nautobot/extras/api/views.py +10 -0
- nautobot/extras/filters/__init__.py +2 -53
- nautobot/extras/forms/contacts.py +0 -7
- nautobot/extras/managers.py +0 -14
- nautobot/extras/navigation.py +65 -71
- nautobot/extras/plugins/views.py +11 -7
- nautobot/extras/tests/test_api.py +0 -2
- nautobot/extras/tests/test_dynamicgroups.py +0 -2
- nautobot/extras/tests/test_filters.py +4 -89
- nautobot/extras/tests/test_models.py +0 -9
- nautobot/extras/tests/test_relationships.py +1 -10
- nautobot/extras/tests/test_views.py +1 -112
- nautobot/extras/views.py +10 -10
- nautobot/ipam/api/urls.py +2 -1
- nautobot/ipam/api/views.py +11 -0
- nautobot/ipam/tables.py +22 -2
- nautobot/ipam/tests/test_graphql.py +3 -2
- nautobot/ipam/tests/test_views.py +0 -1
- nautobot/ipam/views.py +9 -9
- nautobot/project-static/css/base.css +0 -1
- nautobot/project-static/docs/404.html +3 -24
- nautobot/project-static/docs/apps/index.html +3 -24
- nautobot/project-static/docs/apps/nautobot-apps.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/__init__.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/admin.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/api.html +5 -26
- nautobot/project-static/docs/code-reference/nautobot/apps/change_logging.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/choices.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/config.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/constants.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/datasources.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/exceptions.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/factory.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/filters.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/forms.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/graphql.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/jobs.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/models.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/querysets.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/secrets.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/tables.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/testing.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/ui.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/urls.html +3 -24
- nautobot/project-static/docs/code-reference/nautobot/apps/utils.html +3 -242
- nautobot/project-static/docs/code-reference/nautobot/apps/views.html +5 -69
- nautobot/project-static/docs/development/apps/api/configuration-view.html +3 -24
- nautobot/project-static/docs/development/apps/api/database-backend-config.html +3 -24
- nautobot/project-static/docs/development/apps/api/models/django-admin.html +3 -24
- nautobot/project-static/docs/development/apps/api/models/global-search.html +3 -24
- nautobot/project-static/docs/development/apps/api/models/graphql.html +3 -24
- nautobot/project-static/docs/development/apps/api/models/index.html +3 -24
- nautobot/project-static/docs/development/apps/api/nautobot-app-config.html +3 -24
- nautobot/project-static/docs/development/apps/api/platform-features/custom-validators.html +3 -24
- nautobot/project-static/docs/development/apps/api/platform-features/filter-extensions.html +3 -24
- nautobot/project-static/docs/development/apps/api/platform-features/git-repository-content.html +3 -24
- nautobot/project-static/docs/development/apps/api/platform-features/index.html +3 -24
- nautobot/project-static/docs/development/apps/api/platform-features/jinja2-filters.html +3 -24
- nautobot/project-static/docs/development/apps/api/platform-features/jobs.html +3 -24
- nautobot/project-static/docs/development/apps/api/platform-features/populating-extensibility-features.html +3 -24
- nautobot/project-static/docs/development/apps/api/platform-features/secrets-providers.html +3 -24
- nautobot/project-static/docs/development/apps/api/platform-features/uniquely-identify-objects.html +3 -24
- nautobot/project-static/docs/development/apps/api/prometheus.html +3 -24
- nautobot/project-static/docs/development/apps/api/setup.html +3 -24
- nautobot/project-static/docs/development/apps/api/testing.html +3 -24
- nautobot/project-static/docs/development/apps/api/ui-extensions/banners.html +3 -24
- nautobot/project-static/docs/development/apps/api/ui-extensions/home-page.html +3 -24
- nautobot/project-static/docs/development/apps/api/ui-extensions/index.html +3 -24
- nautobot/project-static/docs/development/apps/api/ui-extensions/navigation.html +3 -24
- nautobot/project-static/docs/development/apps/api/ui-extensions/object-views.html +3 -24
- nautobot/project-static/docs/development/apps/api/views/base-template.html +3 -24
- nautobot/project-static/docs/development/apps/api/views/core-view-overrides.html +12 -38
- nautobot/project-static/docs/development/apps/api/views/django-generic-views.html +15 -41
- nautobot/project-static/docs/development/apps/api/views/help-documentation.html +3 -24
- nautobot/project-static/docs/development/apps/api/views/index.html +3 -24
- nautobot/project-static/docs/development/apps/api/views/nautobot-generic-views.html +3 -24
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewset.html +3 -24
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewsetrouter.html +3 -24
- nautobot/project-static/docs/development/apps/api/views/notes.html +3 -24
- nautobot/project-static/docs/development/apps/api/views/rest-api.html +3 -24
- nautobot/project-static/docs/development/apps/api/views/urls.html +3 -24
- nautobot/project-static/docs/development/apps/index.html +3 -24
- nautobot/project-static/docs/development/apps/migration/code-updates.html +3 -24
- nautobot/project-static/docs/development/apps/migration/dependency-updates.html +3 -24
- nautobot/project-static/docs/development/apps/migration/from-v1.html +3 -24
- nautobot/project-static/docs/development/apps/migration/model-updates/dcim.html +3 -24
- nautobot/project-static/docs/development/apps/migration/model-updates/extras.html +3 -24
- nautobot/project-static/docs/development/apps/migration/model-updates/global.html +3 -24
- nautobot/project-static/docs/development/apps/migration/model-updates/ipam.html +3 -24
- nautobot/project-static/docs/development/apps/porting-from-netbox.html +3 -24
- nautobot/project-static/docs/development/core/application-registry.html +3 -24
- nautobot/project-static/docs/development/core/best-practices.html +3 -24
- nautobot/project-static/docs/development/core/bootstrap-ui.html +3 -24
- nautobot/project-static/docs/development/core/caching.html +3 -24
- nautobot/project-static/docs/development/core/controllers.html +204 -35
- nautobot/project-static/docs/development/core/docker-compose-advanced-use-cases.html +3 -24
- nautobot/project-static/docs/development/core/extending-models.html +3 -24
- nautobot/project-static/docs/development/core/generic-views.html +3 -24
- nautobot/project-static/docs/development/core/getting-started.html +13 -43
- nautobot/project-static/docs/development/core/homepage.html +3 -24
- nautobot/project-static/docs/development/core/index.html +3 -24
- nautobot/project-static/docs/development/core/model-features.html +3 -24
- nautobot/project-static/docs/development/core/natural-keys.html +3 -24
- nautobot/project-static/docs/development/core/navigation-menu.html +3 -24
- nautobot/project-static/docs/development/core/release-checklist.html +3 -24
- nautobot/project-static/docs/development/core/role-internals.html +3 -24
- nautobot/project-static/docs/development/core/settings.html +3 -24
- nautobot/project-static/docs/development/core/style-guide.html +3 -24
- nautobot/project-static/docs/development/core/templates.html +3 -24
- nautobot/project-static/docs/development/core/testing.html +3 -24
- nautobot/project-static/docs/development/core/user-preferences.html +3 -24
- nautobot/project-static/docs/development/index.html +3 -24
- nautobot/project-static/docs/development/jobs/index.html +3 -24
- nautobot/project-static/docs/development/jobs/migration/from-v1.html +3 -24
- nautobot/project-static/docs/index.html +3 -24
- nautobot/project-static/docs/models/dcim/{controllermanageddevicegroup.html → controllerdevicegroup.html} +3 -3
- nautobot/project-static/docs/objects.inv +0 -0
- nautobot/project-static/docs/release-notes/index.html +3 -24
- nautobot/project-static/docs/release-notes/version-1.0.html +3 -24
- nautobot/project-static/docs/release-notes/version-1.1.html +3 -24
- nautobot/project-static/docs/release-notes/version-1.2.html +3 -24
- nautobot/project-static/docs/release-notes/version-1.3.html +3 -24
- nautobot/project-static/docs/release-notes/version-1.4.html +3 -24
- nautobot/project-static/docs/release-notes/version-1.5.html +3 -24
- nautobot/project-static/docs/release-notes/version-1.6.html +3 -24
- nautobot/project-static/docs/release-notes/version-2.0.html +3 -24
- nautobot/project-static/docs/release-notes/version-2.1.html +162 -411
- nautobot/project-static/docs/release-notes/version-2.2.html +30 -212
- nautobot/project-static/docs/search/search_index.json +1 -1
- nautobot/project-static/docs/sitemap.xml +255 -260
- nautobot/project-static/docs/sitemap.xml.gz +0 -0
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/ldap.html +3 -24
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/remote.html +3 -24
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/sso.html +3 -24
- nautobot/project-static/docs/user-guide/administration/configuration/index.html +3 -24
- nautobot/project-static/docs/user-guide/administration/configuration/optional-settings.html +3 -24
- nautobot/project-static/docs/user-guide/administration/configuration/required-settings.html +3 -24
- nautobot/project-static/docs/user-guide/administration/configuration/time-zones.html +3 -24
- nautobot/project-static/docs/user-guide/administration/guides/caching.html +3 -24
- nautobot/project-static/docs/user-guide/administration/guides/celery-queues.html +3 -24
- nautobot/project-static/docs/user-guide/administration/guides/healthcheck.html +3 -24
- nautobot/project-static/docs/user-guide/administration/guides/permissions.html +3 -24
- nautobot/project-static/docs/user-guide/administration/guides/prometheus-metrics.html +3 -24
- nautobot/project-static/docs/user-guide/administration/guides/replicating-nautobot.html +3 -24
- nautobot/project-static/docs/user-guide/administration/guides/request-profiling.html +3 -24
- nautobot/project-static/docs/user-guide/administration/guides/s3-django-storage.html +3 -24
- nautobot/project-static/docs/user-guide/administration/installation/app-install.html +3 -24
- nautobot/project-static/docs/user-guide/administration/installation/docker.html +6 -31
- nautobot/project-static/docs/user-guide/administration/installation/external-authentication.html +3 -24
- nautobot/project-static/docs/user-guide/administration/installation/http-server.html +3 -24
- nautobot/project-static/docs/user-guide/administration/installation/index.html +3 -24
- nautobot/project-static/docs/user-guide/administration/installation/install_system.html +3 -24
- nautobot/project-static/docs/user-guide/administration/installation/nautobot.html +3 -24
- nautobot/project-static/docs/user-guide/administration/installation/selinux-troubleshooting.html +6 -27
- nautobot/project-static/docs/user-guide/administration/installation/services.html +3 -24
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-netbox.html +3 -24
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-postgresql.html +3 -24
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-server.html +3 -24
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-shell.html +3 -24
- nautobot/project-static/docs/user-guide/administration/upgrading/database-backup.html +3 -24
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/after-you-upgrade.html +3 -24
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/before-you-upgrade.html +3 -24
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/for-developers.html +3 -24
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/index.html +3 -24
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/whats-changed.html +3 -24
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/region-and-site-data-migration-guide.html +3 -24
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +3 -24
- nautobot/project-static/docs/user-guide/administration/upgrading/upgrading.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuit.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittermination.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittype.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/circuits/provider.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/circuits/providernetwork.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/cable.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleport.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleporttemplate.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverport.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverporttemplate.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/controller.html +11 -259
- nautobot/project-static/docs/user-guide/core-data-model/dcim/{controllermanageddevicegroup.html → controllerdevicegroup.html} +17 -107
- nautobot/project-static/docs/user-guide/core-data-model/dcim/device.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebay.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebaytemplate.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicefamily.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/deviceredundancygroup.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicetype.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontport.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontporttemplate.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interface.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfaceredundancygroup.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfacetemplate.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/inventoryitem.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/location.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/locationtype.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/manufacturer.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/platform.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerfeed.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlet.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlettemplate.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerpanel.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerport.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerporttemplate.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rack.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackgroup.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackreservation.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearport.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearporttemplate.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareimagefile.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareversion.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualchassis.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontext.html +6 -27
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontextschema.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/extras/contact.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/extras/team.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/ipam/ipaddress.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/ipam/namespace.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/ipam/prefix.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/ipam/rir.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/ipam/routetarget.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/ipam/service.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlan.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlangroup.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vrf.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/overview/introduction.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenant.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenantgroup.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/cluster.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustergroup.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustertype.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/virtualmachine.html +3 -24
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/vminterface.html +3 -24
- nautobot/project-static/docs/user-guide/feature-guides/{contacts-and-teams.html → contact-and-team.html} +4 -25
- nautobot/project-static/docs/user-guide/feature-guides/custom-fields.html +5 -26
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-devices.html +3 -24
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-location-types-and-locations.html +3 -24
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/index.html +3 -24
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/interfaces.html +3 -24
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/ipam.html +3 -24
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/platforms.html +3 -24
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/search-bar.html +5 -26
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/tenants.html +3 -24
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/vlans-and-vlan-groups.html +3 -24
- nautobot/project-static/docs/user-guide/feature-guides/git-data-source.html +3 -24
- nautobot/project-static/docs/user-guide/feature-guides/graphql.html +3 -24
- nautobot/project-static/docs/user-guide/feature-guides/ip-address-merge-tool.html +3 -24
- nautobot/project-static/docs/user-guide/feature-guides/relationships.html +3 -24
- nautobot/project-static/docs/user-guide/feature-guides/software-image-files-and-versions.html +3 -24
- nautobot/project-static/docs/user-guide/index.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/change-logging.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/computedfield.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/customfield.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/customlink.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/dynamicgroup.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/exporttemplate.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/externalintegration.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/gitrepository.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/graphql.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/graphqlquery.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/imageattachment.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/index.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/job-scheduling-and-approvals.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobbutton.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobhook.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/models.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/napalm.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/note.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/relationship.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/authentication.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/filtering.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/overview.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/ui-related-endpoints.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/role.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/secret.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/status.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/tag.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/template-filters.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/users/objectpermission.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/users/token.html +3 -24
- nautobot/project-static/docs/user-guide/platform-functionality/webhook.html +3 -24
- nautobot/tenancy/api/urls.py +2 -1
- nautobot/tenancy/api/views.py +12 -0
- nautobot/tenancy/tables.py +1 -1
- nautobot/tenancy/tests/test_views.py +0 -1
- nautobot/users/api/urls.py +2 -1
- nautobot/users/api/views.py +65 -2
- nautobot/users/views.py +8 -8
- nautobot/virtualization/api/urls.py +2 -1
- nautobot/virtualization/api/views.py +12 -0
- {nautobot-2.2.0.dist-info → nautobot-2.2.0b1.dist-info}/METADATA +3 -3
- {nautobot-2.2.0.dist-info → nautobot-2.2.0b1.dist-info}/RECORD +356 -361
- nautobot/core/tests/integration/test_view_authentication.py +0 -67
- nautobot/dcim/management/commands/migrate_location_contacts.py +0 -218
- nautobot/dcim/templates/dcim/controller_create.html +0 -70
- nautobot/dcim/templates/dcim/controllermanageddevicegroup_create.html +0 -88
- nautobot/ipam/tests/test_tables.py +0 -42
- nautobot/project-static/docs/user-guide/administration/installation/health-checks.html +0 -8581
- /nautobot/dcim/templates/dcim/{controllermanageddevicegroup_retrieve.html → controllerdevicegroup_retrieve.html} +0 -0
- {nautobot-2.2.0.dist-info → nautobot-2.2.0b1.dist-info}/LICENSE.txt +0 -0
- {nautobot-2.2.0.dist-info → nautobot-2.2.0b1.dist-info}/NOTICE +0 -0
- {nautobot-2.2.0.dist-info → nautobot-2.2.0b1.dist-info}/WHEEL +0 -0
- {nautobot-2.2.0.dist-info → nautobot-2.2.0b1.dist-info}/entry_points.txt +0 -0
|
@@ -688,27 +688,6 @@
|
|
|
688
688
|
|
|
689
689
|
|
|
690
690
|
|
|
691
|
-
<li class="md-nav__item">
|
|
692
|
-
<a href="../administration/installation/health-checks.html" class="md-nav__link">
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
<span class="md-ellipsis">
|
|
696
|
-
Health Checks
|
|
697
|
-
</span>
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
</a>
|
|
701
|
-
</li>
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
691
|
<li class="md-nav__item">
|
|
713
692
|
<a href="../administration/installation/selinux-troubleshooting.html" class="md-nav__link">
|
|
714
693
|
|
|
@@ -1914,7 +1893,7 @@
|
|
|
1914
1893
|
|
|
1915
1894
|
|
|
1916
1895
|
<li class="md-nav__item">
|
|
1917
|
-
<a href="../feature-guides/
|
|
1896
|
+
<a href="../feature-guides/contact-and-team.html" class="md-nav__link">
|
|
1918
1897
|
|
|
1919
1898
|
|
|
1920
1899
|
<span class="md-ellipsis">
|
|
@@ -3179,11 +3158,11 @@
|
|
|
3179
3158
|
|
|
3180
3159
|
|
|
3181
3160
|
<li class="md-nav__item">
|
|
3182
|
-
<a href="../core-data-model/dcim/
|
|
3161
|
+
<a href="../core-data-model/dcim/controllerdevicegroup.html" class="md-nav__link">
|
|
3183
3162
|
|
|
3184
3163
|
|
|
3185
3164
|
<span class="md-ellipsis">
|
|
3186
|
-
Controller
|
|
3165
|
+
Controller Device Group
|
|
3187
3166
|
</span>
|
|
3188
3167
|
|
|
3189
3168
|
|
|
@@ -688,27 +688,6 @@
|
|
|
688
688
|
|
|
689
689
|
|
|
690
690
|
|
|
691
|
-
<li class="md-nav__item">
|
|
692
|
-
<a href="../administration/installation/health-checks.html" class="md-nav__link">
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
<span class="md-ellipsis">
|
|
696
|
-
Health Checks
|
|
697
|
-
</span>
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
</a>
|
|
701
|
-
</li>
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
691
|
<li class="md-nav__item">
|
|
713
692
|
<a href="../administration/installation/selinux-troubleshooting.html" class="md-nav__link">
|
|
714
693
|
|
|
@@ -1914,7 +1893,7 @@
|
|
|
1914
1893
|
|
|
1915
1894
|
|
|
1916
1895
|
<li class="md-nav__item">
|
|
1917
|
-
<a href="../feature-guides/
|
|
1896
|
+
<a href="../feature-guides/contact-and-team.html" class="md-nav__link">
|
|
1918
1897
|
|
|
1919
1898
|
|
|
1920
1899
|
<span class="md-ellipsis">
|
|
@@ -3179,11 +3158,11 @@
|
|
|
3179
3158
|
|
|
3180
3159
|
|
|
3181
3160
|
<li class="md-nav__item">
|
|
3182
|
-
<a href="../core-data-model/dcim/
|
|
3161
|
+
<a href="../core-data-model/dcim/controllerdevicegroup.html" class="md-nav__link">
|
|
3183
3162
|
|
|
3184
3163
|
|
|
3185
3164
|
<span class="md-ellipsis">
|
|
3186
|
-
Controller
|
|
3165
|
+
Controller Device Group
|
|
3187
3166
|
</span>
|
|
3188
3167
|
|
|
3189
3168
|
|
|
@@ -688,27 +688,6 @@
|
|
|
688
688
|
|
|
689
689
|
|
|
690
690
|
|
|
691
|
-
<li class="md-nav__item">
|
|
692
|
-
<a href="../administration/installation/health-checks.html" class="md-nav__link">
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
<span class="md-ellipsis">
|
|
696
|
-
Health Checks
|
|
697
|
-
</span>
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
</a>
|
|
701
|
-
</li>
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
691
|
<li class="md-nav__item">
|
|
713
692
|
<a href="../administration/installation/selinux-troubleshooting.html" class="md-nav__link">
|
|
714
693
|
|
|
@@ -1914,7 +1893,7 @@
|
|
|
1914
1893
|
|
|
1915
1894
|
|
|
1916
1895
|
<li class="md-nav__item">
|
|
1917
|
-
<a href="../feature-guides/
|
|
1896
|
+
<a href="../feature-guides/contact-and-team.html" class="md-nav__link">
|
|
1918
1897
|
|
|
1919
1898
|
|
|
1920
1899
|
<span class="md-ellipsis">
|
|
@@ -3179,11 +3158,11 @@
|
|
|
3179
3158
|
|
|
3180
3159
|
|
|
3181
3160
|
<li class="md-nav__item">
|
|
3182
|
-
<a href="../core-data-model/dcim/
|
|
3161
|
+
<a href="../core-data-model/dcim/controllerdevicegroup.html" class="md-nav__link">
|
|
3183
3162
|
|
|
3184
3163
|
|
|
3185
3164
|
<span class="md-ellipsis">
|
|
3186
|
-
Controller
|
|
3165
|
+
Controller Device Group
|
|
3187
3166
|
</span>
|
|
3188
3167
|
|
|
3189
3168
|
|
|
@@ -688,27 +688,6 @@
|
|
|
688
688
|
|
|
689
689
|
|
|
690
690
|
|
|
691
|
-
<li class="md-nav__item">
|
|
692
|
-
<a href="../../administration/installation/health-checks.html" class="md-nav__link">
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
<span class="md-ellipsis">
|
|
696
|
-
Health Checks
|
|
697
|
-
</span>
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
</a>
|
|
701
|
-
</li>
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
691
|
<li class="md-nav__item">
|
|
713
692
|
<a href="../../administration/installation/selinux-troubleshooting.html" class="md-nav__link">
|
|
714
693
|
|
|
@@ -1914,7 +1893,7 @@
|
|
|
1914
1893
|
|
|
1915
1894
|
|
|
1916
1895
|
<li class="md-nav__item">
|
|
1917
|
-
<a href="../../feature-guides/
|
|
1896
|
+
<a href="../../feature-guides/contact-and-team.html" class="md-nav__link">
|
|
1918
1897
|
|
|
1919
1898
|
|
|
1920
1899
|
<span class="md-ellipsis">
|
|
@@ -3179,11 +3158,11 @@
|
|
|
3179
3158
|
|
|
3180
3159
|
|
|
3181
3160
|
<li class="md-nav__item">
|
|
3182
|
-
<a href="../../core-data-model/dcim/
|
|
3161
|
+
<a href="../../core-data-model/dcim/controllerdevicegroup.html" class="md-nav__link">
|
|
3183
3162
|
|
|
3184
3163
|
|
|
3185
3164
|
<span class="md-ellipsis">
|
|
3186
|
-
Controller
|
|
3165
|
+
Controller Device Group
|
|
3187
3166
|
</span>
|
|
3188
3167
|
|
|
3189
3168
|
|
|
@@ -688,27 +688,6 @@
|
|
|
688
688
|
|
|
689
689
|
|
|
690
690
|
|
|
691
|
-
<li class="md-nav__item">
|
|
692
|
-
<a href="../../administration/installation/health-checks.html" class="md-nav__link">
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
<span class="md-ellipsis">
|
|
696
|
-
Health Checks
|
|
697
|
-
</span>
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
</a>
|
|
701
|
-
</li>
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
691
|
<li class="md-nav__item">
|
|
713
692
|
<a href="../../administration/installation/selinux-troubleshooting.html" class="md-nav__link">
|
|
714
693
|
|
|
@@ -1914,7 +1893,7 @@
|
|
|
1914
1893
|
|
|
1915
1894
|
|
|
1916
1895
|
<li class="md-nav__item">
|
|
1917
|
-
<a href="../../feature-guides/
|
|
1896
|
+
<a href="../../feature-guides/contact-and-team.html" class="md-nav__link">
|
|
1918
1897
|
|
|
1919
1898
|
|
|
1920
1899
|
<span class="md-ellipsis">
|
|
@@ -3179,11 +3158,11 @@
|
|
|
3179
3158
|
|
|
3180
3159
|
|
|
3181
3160
|
<li class="md-nav__item">
|
|
3182
|
-
<a href="../../core-data-model/dcim/
|
|
3161
|
+
<a href="../../core-data-model/dcim/controllerdevicegroup.html" class="md-nav__link">
|
|
3183
3162
|
|
|
3184
3163
|
|
|
3185
3164
|
<span class="md-ellipsis">
|
|
3186
|
-
Controller
|
|
3165
|
+
Controller Device Group
|
|
3187
3166
|
</span>
|
|
3188
3167
|
|
|
3189
3168
|
|
|
@@ -688,27 +688,6 @@
|
|
|
688
688
|
|
|
689
689
|
|
|
690
690
|
|
|
691
|
-
<li class="md-nav__item">
|
|
692
|
-
<a href="../administration/installation/health-checks.html" class="md-nav__link">
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
<span class="md-ellipsis">
|
|
696
|
-
Health Checks
|
|
697
|
-
</span>
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
</a>
|
|
701
|
-
</li>
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
691
|
<li class="md-nav__item">
|
|
713
692
|
<a href="../administration/installation/selinux-troubleshooting.html" class="md-nav__link">
|
|
714
693
|
|
|
@@ -1914,7 +1893,7 @@
|
|
|
1914
1893
|
|
|
1915
1894
|
|
|
1916
1895
|
<li class="md-nav__item">
|
|
1917
|
-
<a href="../feature-guides/
|
|
1896
|
+
<a href="../feature-guides/contact-and-team.html" class="md-nav__link">
|
|
1918
1897
|
|
|
1919
1898
|
|
|
1920
1899
|
<span class="md-ellipsis">
|
|
@@ -3179,11 +3158,11 @@
|
|
|
3179
3158
|
|
|
3180
3159
|
|
|
3181
3160
|
<li class="md-nav__item">
|
|
3182
|
-
<a href="../core-data-model/dcim/
|
|
3161
|
+
<a href="../core-data-model/dcim/controllerdevicegroup.html" class="md-nav__link">
|
|
3183
3162
|
|
|
3184
3163
|
|
|
3185
3164
|
<span class="md-ellipsis">
|
|
3186
|
-
Controller
|
|
3165
|
+
Controller Device Group
|
|
3187
3166
|
</span>
|
|
3188
3167
|
|
|
3189
3168
|
|
nautobot/tenancy/api/urls.py
CHANGED
|
@@ -2,7 +2,8 @@ from nautobot.core.api.routers import OrderedDefaultRouter
|
|
|
2
2
|
|
|
3
3
|
from . import views
|
|
4
4
|
|
|
5
|
-
router = OrderedDefaultRouter(
|
|
5
|
+
router = OrderedDefaultRouter()
|
|
6
|
+
router.APIRootView = views.TenancyRootView
|
|
6
7
|
|
|
7
8
|
# Tenants
|
|
8
9
|
router.register("tenant-groups", views.TenantGroupViewSet)
|
nautobot/tenancy/api/views.py
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from rest_framework.routers import APIRootView
|
|
2
|
+
|
|
1
3
|
from nautobot.circuits.models import Circuit
|
|
2
4
|
from nautobot.core.models.querysets import count_related
|
|
3
5
|
from nautobot.dcim.models import Device, Rack
|
|
@@ -9,6 +11,16 @@ from nautobot.virtualization.models import VirtualMachine
|
|
|
9
11
|
|
|
10
12
|
from . import serializers
|
|
11
13
|
|
|
14
|
+
|
|
15
|
+
class TenancyRootView(APIRootView):
|
|
16
|
+
"""
|
|
17
|
+
Tenancy API root view
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
def get_view_name(self):
|
|
21
|
+
return "Tenancy"
|
|
22
|
+
|
|
23
|
+
|
|
12
24
|
#
|
|
13
25
|
# Tenant Groups
|
|
14
26
|
#
|
nautobot/tenancy/tables.py
CHANGED
|
@@ -12,7 +12,7 @@ from .models import Tenant, TenantGroup
|
|
|
12
12
|
|
|
13
13
|
TREE_LINK = """
|
|
14
14
|
{% load helpers %}
|
|
15
|
-
{% tree_hierarchy_ui_representation record.tree_depth|as_range table.
|
|
15
|
+
{% tree_hierarchy_ui_representation record.tree_depth|as_range table.order_by %}
|
|
16
16
|
<a href="{{ record.get_absolute_url }}">{{ record.name }}</a>
|
|
17
17
|
"""
|
|
18
18
|
|
nautobot/users/api/urls.py
CHANGED
|
@@ -2,7 +2,8 @@ from nautobot.core.api.routers import OrderedDefaultRouter
|
|
|
2
2
|
|
|
3
3
|
from . import views
|
|
4
4
|
|
|
5
|
-
router = OrderedDefaultRouter(
|
|
5
|
+
router = OrderedDefaultRouter()
|
|
6
|
+
router.APIRootView = views.UsersRootView
|
|
6
7
|
|
|
7
8
|
# Users and groups
|
|
8
9
|
router.register("users", views.UserViewSet)
|
nautobot/users/api/views.py
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
from django.contrib.auth import get_user_model
|
|
1
|
+
from django.contrib.auth import get_user_model, login, logout
|
|
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
|
|
4
6
|
from drf_spectacular.utils import extend_schema, extend_schema_view, OpenApiTypes
|
|
5
7
|
from rest_framework.authentication import BasicAuthentication
|
|
6
|
-
from rest_framework.
|
|
8
|
+
from rest_framework.decorators import action
|
|
9
|
+
from rest_framework.permissions import AllowAny, IsAuthenticated
|
|
7
10
|
from rest_framework.response import Response
|
|
11
|
+
from rest_framework.routers import APIRootView
|
|
8
12
|
from rest_framework.viewsets import ViewSet
|
|
9
13
|
|
|
10
14
|
from nautobot.core.api.serializers import BulkOperationIntegerIDSerializer
|
|
@@ -16,6 +20,16 @@ from nautobot.users.models import ObjectPermission, Token
|
|
|
16
20
|
|
|
17
21
|
from . import serializers
|
|
18
22
|
|
|
23
|
+
|
|
24
|
+
class UsersRootView(APIRootView):
|
|
25
|
+
"""
|
|
26
|
+
Users API root view
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
def get_view_name(self):
|
|
30
|
+
return "Users"
|
|
31
|
+
|
|
32
|
+
|
|
19
33
|
#
|
|
20
34
|
# Users and groups
|
|
21
35
|
#
|
|
@@ -26,6 +40,40 @@ class UserViewSet(ModelViewSet):
|
|
|
26
40
|
serializer_class = serializers.UserSerializer
|
|
27
41
|
filterset_class = filters.UserFilterSet
|
|
28
42
|
|
|
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
|
+
|
|
29
77
|
|
|
30
78
|
@extend_schema_view(
|
|
31
79
|
bulk_destroy=extend_schema(request=BulkOperationIntegerIDSerializer(many=True)),
|
|
@@ -53,6 +101,21 @@ class TokenViewSet(ModelViewSet):
|
|
|
53
101
|
classes = super().authentication_classes
|
|
54
102
|
return [*classes, BasicAuthentication]
|
|
55
103
|
|
|
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
|
+
|
|
56
119
|
def get_queryset(self):
|
|
57
120
|
"""
|
|
58
121
|
Limit users to their own Tokens.
|
nautobot/users/views.py
CHANGED
|
@@ -7,6 +7,7 @@ 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
|
|
10
11
|
from django.http import HttpResponseForbidden, HttpResponseRedirect
|
|
11
12
|
from django.shortcuts import get_object_or_404, redirect, render
|
|
12
13
|
from django.urls import reverse
|
|
@@ -17,7 +18,6 @@ from django.views.decorators.debug import sensitive_post_parameters
|
|
|
17
18
|
from django.views.generic import View
|
|
18
19
|
|
|
19
20
|
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(LoginRequiredMixin, View):
|
|
122
122
|
template_name = "users/profile.html"
|
|
123
123
|
|
|
124
124
|
def get(self, request):
|
|
@@ -132,7 +132,7 @@ class ProfileView(GenericView):
|
|
|
132
132
|
)
|
|
133
133
|
|
|
134
134
|
|
|
135
|
-
class UserConfigView(
|
|
135
|
+
class UserConfigView(LoginRequiredMixin, View):
|
|
136
136
|
template_name = "users/preferences.html"
|
|
137
137
|
|
|
138
138
|
def get(self, request):
|
|
@@ -160,7 +160,7 @@ class UserConfigView(GenericView):
|
|
|
160
160
|
return redirect("user:preferences")
|
|
161
161
|
|
|
162
162
|
|
|
163
|
-
class ChangePasswordView(
|
|
163
|
+
class ChangePasswordView(LoginRequiredMixin, View):
|
|
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(GenericView):
|
|
|
218
218
|
#
|
|
219
219
|
|
|
220
220
|
|
|
221
|
-
class TokenListView(
|
|
221
|
+
class TokenListView(LoginRequiredMixin, View):
|
|
222
222
|
def get(self, request):
|
|
223
223
|
tokens = Token.objects.filter(user=request.user)
|
|
224
224
|
|
|
@@ -233,7 +233,7 @@ class TokenListView(GenericView):
|
|
|
233
233
|
)
|
|
234
234
|
|
|
235
235
|
|
|
236
|
-
class TokenEditView(
|
|
236
|
+
class TokenEditView(LoginRequiredMixin, View):
|
|
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(GenericView):
|
|
|
292
292
|
)
|
|
293
293
|
|
|
294
294
|
|
|
295
|
-
class TokenDeleteView(
|
|
295
|
+
class TokenDeleteView(LoginRequiredMixin, View):
|
|
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(GenericView):
|
|
|
336
336
|
#
|
|
337
337
|
|
|
338
338
|
|
|
339
|
-
class AdvancedProfileSettingsEditView(
|
|
339
|
+
class AdvancedProfileSettingsEditView(LoginRequiredMixin, View):
|
|
340
340
|
template_name = "users/advanced_settings_edit.html"
|
|
341
341
|
|
|
342
342
|
def get(self, request):
|
|
@@ -2,7 +2,8 @@ from nautobot.core.api.routers import OrderedDefaultRouter
|
|
|
2
2
|
|
|
3
3
|
from . import views
|
|
4
4
|
|
|
5
|
-
router = OrderedDefaultRouter(
|
|
5
|
+
router = OrderedDefaultRouter()
|
|
6
|
+
router.APIRootView = views.VirtualizationRootView
|
|
6
7
|
|
|
7
8
|
# Clusters
|
|
8
9
|
router.register("cluster-types", views.ClusterTypeViewSet)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from rest_framework.routers import APIRootView
|
|
2
|
+
|
|
1
3
|
from nautobot.core.models.querysets import count_related
|
|
2
4
|
from nautobot.dcim.models import Device
|
|
3
5
|
from nautobot.extras.api.views import (
|
|
@@ -17,6 +19,16 @@ from nautobot.virtualization.models import (
|
|
|
17
19
|
|
|
18
20
|
from . import serializers
|
|
19
21
|
|
|
22
|
+
|
|
23
|
+
class VirtualizationRootView(APIRootView):
|
|
24
|
+
"""
|
|
25
|
+
Virtualization API root view
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
def get_view_name(self):
|
|
29
|
+
return "Virtualization"
|
|
30
|
+
|
|
31
|
+
|
|
20
32
|
#
|
|
21
33
|
# Clusters
|
|
22
34
|
#
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: nautobot
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.0b1
|
|
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.24,<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.6.0)
|
|
@@ -68,7 +68,7 @@ Requires-Dist: psycopg2-binary (>=2.9.9,<2.10.0)
|
|
|
68
68
|
Requires-Dist: python-slugify (>=8.0.3,<8.1.0)
|
|
69
69
|
Requires-Dist: pyuwsgi (>=2.0.23,<2.1.0)
|
|
70
70
|
Requires-Dist: social-auth-app-django (>=5.2.0,<5.3.0)
|
|
71
|
-
Requires-Dist: social-auth-core[openidconnect,saml] (>=4.
|
|
71
|
+
Requires-Dist: social-auth-core[openidconnect,saml] (>=4.4.2,<4.5.0) ; extra == "all" or extra == "sso"
|
|
72
72
|
Requires-Dist: svgwrite (>=1.4.2,<1.5.0)
|
|
73
73
|
Project-URL: Documentation, https://docs.nautobot.com
|
|
74
74
|
Project-URL: Repository, https://github.com/nautobot/nautobot
|