nautobot 2.2.3__py3-none-any.whl → 2.2.5__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/forms.py +15 -0
- nautobot/circuits/navigation.py +9 -1
- nautobot/circuits/views.py +2 -0
- nautobot/core/filters.py +11 -0
- nautobot/core/settings.py +6 -4
- nautobot/core/settings.yaml +54 -19
- nautobot/core/templates/admin/base.html +2 -2
- nautobot/core/templates/base_django.html +2 -2
- nautobot/core/templates/buttons/export.html +47 -47
- nautobot/core/templates/inc/javascript.html +3 -0
- nautobot/core/templates/inc/media.html +3 -0
- nautobot/core/templates/login.html +2 -2
- nautobot/core/templates/nautobot_config.py.j2 +2 -0
- nautobot/core/testing/filters.py +24 -1
- nautobot/core/testing/views.py +13 -1
- nautobot/core/tests/test_jobs.py +79 -2
- nautobot/core/tests/test_views.py +33 -0
- nautobot/core/views/mixins.py +4 -0
- nautobot/core/views/utils.py +18 -1
- nautobot/dcim/filters/__init__.py +1 -1
- nautobot/dcim/forms.py +23 -4
- nautobot/dcim/tables/devicetypes.py +15 -4
- nautobot/dcim/tests/test_views.py +323 -55
- nautobot/dcim/views.py +26 -20
- nautobot/extras/api/serializers.py +17 -6
- nautobot/extras/api/views.py +2 -2
- nautobot/extras/context_managers.py +3 -0
- nautobot/extras/filters/__init__.py +15 -1
- nautobot/extras/forms/forms.py +33 -0
- nautobot/extras/forms/mixins.py +0 -6
- nautobot/extras/signals.py +6 -1
- nautobot/extras/tests/test_api.py +24 -2
- nautobot/extras/tests/test_context_managers.py +51 -1
- nautobot/extras/tests/test_filters.py +69 -0
- nautobot/extras/tests/test_forms.py +0 -3
- nautobot/extras/tests/test_views.py +48 -4
- nautobot/extras/utils.py +2 -1
- nautobot/extras/views.py +47 -31
- nautobot/ipam/forms.py +18 -0
- nautobot/ipam/tests/test_views.py +9 -2
- nautobot/ipam/views.py +17 -6
- nautobot/project-static/docs/404.html +107 -51
- nautobot/project-static/docs/apps/index.html +107 -51
- nautobot/project-static/docs/apps/nautobot-apps.html +107 -51
- nautobot/project-static/docs/assets/_mkdocstrings.css +6 -1
- nautobot/project-static/docs/assets/extra.css +7 -0
- nautobot/project-static/docs/assets/javascripts/bundle.ebd0bdb7.min.js +29 -0
- nautobot/project-static/docs/assets/javascripts/bundle.ebd0bdb7.min.js.map +7 -0
- nautobot/project-static/docs/assets/stylesheets/main.6543a935.min.css +1 -0
- nautobot/project-static/docs/assets/stylesheets/main.6543a935.min.css.map +1 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/__init__.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/admin.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/api.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/change_logging.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/choices.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/config.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/constants.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/datasources.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/exceptions.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/factory.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/filters.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/forms.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/graphql.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/jobs.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/models.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/querysets.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/secrets.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/tables.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/testing.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/ui.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/urls.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/utils.html +107 -51
- nautobot/project-static/docs/code-reference/nautobot/apps/views.html +107 -51
- nautobot/project-static/docs/development/apps/api/configuration-view.html +110 -54
- nautobot/project-static/docs/development/apps/api/database-backend-config.html +110 -54
- nautobot/project-static/docs/development/apps/api/models/django-admin.html +107 -51
- nautobot/project-static/docs/development/apps/api/models/global-search.html +110 -54
- nautobot/project-static/docs/development/apps/api/models/graphql.html +113 -57
- nautobot/project-static/docs/development/apps/api/models/index.html +107 -51
- nautobot/project-static/docs/development/apps/api/nautobot-app-config.html +113 -57
- nautobot/project-static/docs/development/apps/api/platform-features/custom-validators.html +107 -51
- nautobot/project-static/docs/development/apps/api/platform-features/filter-extensions.html +111 -55
- nautobot/project-static/docs/development/apps/api/platform-features/git-repository-content.html +107 -51
- nautobot/project-static/docs/development/apps/api/platform-features/index.html +107 -51
- nautobot/project-static/docs/development/apps/api/platform-features/jinja2-filters.html +110 -54
- nautobot/project-static/docs/development/apps/api/platform-features/jobs.html +110 -54
- nautobot/project-static/docs/development/apps/api/platform-features/populating-extensibility-features.html +110 -54
- nautobot/project-static/docs/development/apps/api/platform-features/secrets-providers.html +110 -54
- nautobot/project-static/docs/development/apps/api/platform-features/uniquely-identify-objects.html +107 -51
- nautobot/project-static/docs/development/apps/api/prometheus.html +110 -54
- nautobot/project-static/docs/development/apps/api/setup.html +107 -51
- nautobot/project-static/docs/development/apps/api/testing.html +113 -57
- nautobot/project-static/docs/development/apps/api/ui-extensions/banners.html +110 -54
- nautobot/project-static/docs/development/apps/api/ui-extensions/home-page.html +110 -54
- nautobot/project-static/docs/development/apps/api/ui-extensions/index.html +107 -51
- nautobot/project-static/docs/development/apps/api/ui-extensions/navigation.html +107 -51
- nautobot/project-static/docs/development/apps/api/ui-extensions/object-views.html +113 -57
- nautobot/project-static/docs/development/apps/api/views/base-template.html +107 -51
- nautobot/project-static/docs/development/apps/api/views/core-view-overrides.html +110 -54
- nautobot/project-static/docs/development/apps/api/views/django-generic-views.html +107 -51
- nautobot/project-static/docs/development/apps/api/views/help-documentation.html +110 -54
- nautobot/project-static/docs/development/apps/api/views/index.html +107 -51
- nautobot/project-static/docs/development/apps/api/views/nautobot-generic-views.html +113 -57
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewset.html +122 -66
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewsetrouter.html +110 -54
- nautobot/project-static/docs/development/apps/api/views/notes.html +110 -54
- nautobot/project-static/docs/development/apps/api/views/rest-api.html +107 -51
- nautobot/project-static/docs/development/apps/api/views/urls.html +107 -51
- nautobot/project-static/docs/development/apps/index.html +128 -72
- nautobot/project-static/docs/development/apps/migration/code-updates.html +107 -51
- nautobot/project-static/docs/development/apps/migration/dependency-updates.html +107 -51
- nautobot/project-static/docs/development/apps/migration/from-v1.html +109 -53
- nautobot/project-static/docs/development/apps/migration/model-updates/dcim.html +107 -51
- nautobot/project-static/docs/development/apps/migration/model-updates/extras.html +107 -51
- nautobot/project-static/docs/development/apps/migration/model-updates/global.html +107 -51
- nautobot/project-static/docs/development/apps/migration/model-updates/ipam.html +107 -51
- nautobot/project-static/docs/development/apps/porting-from-netbox.html +110 -54
- nautobot/project-static/docs/development/core/application-registry.html +120 -64
- nautobot/project-static/docs/development/core/best-practices.html +122 -66
- nautobot/project-static/docs/development/core/bootstrap-ui.html +107 -51
- nautobot/project-static/docs/development/core/caching.html +107 -51
- nautobot/project-static/docs/development/core/controllers.html +107 -51
- nautobot/project-static/docs/development/core/docker-compose-advanced-use-cases.html +113 -57
- nautobot/project-static/docs/development/core/generic-views.html +110 -54
- nautobot/project-static/docs/development/core/getting-started.html +137 -81
- nautobot/project-static/docs/development/core/homepage.html +110 -54
- nautobot/project-static/docs/development/core/index.html +107 -51
- nautobot/project-static/docs/development/core/model-checklist.html +107 -51
- nautobot/project-static/docs/development/core/model-features.html +107 -51
- nautobot/project-static/docs/development/core/natural-keys.html +110 -54
- nautobot/project-static/docs/development/core/navigation-menu.html +107 -51
- nautobot/project-static/docs/development/core/release-checklist.html +107 -51
- nautobot/project-static/docs/development/core/role-internals.html +107 -51
- nautobot/project-static/docs/development/core/settings.html +107 -51
- nautobot/project-static/docs/development/core/style-guide.html +110 -54
- nautobot/project-static/docs/development/core/templates.html +113 -57
- nautobot/project-static/docs/development/core/testing.html +126 -70
- nautobot/project-static/docs/development/core/user-preferences.html +107 -51
- nautobot/project-static/docs/development/index.html +107 -51
- nautobot/project-static/docs/development/jobs/index.html +173 -117
- nautobot/project-static/docs/development/jobs/migration/from-v1.html +110 -54
- nautobot/project-static/docs/docker/index.html +3 -3
- nautobot/project-static/docs/index.html +125 -69
- nautobot/project-static/docs/installation/selinux-troubleshooting.html +3 -3
- nautobot/project-static/docs/release-notes/index.html +107 -51
- nautobot/project-static/docs/release-notes/version-1.0.html +108 -52
- nautobot/project-static/docs/release-notes/version-1.1.html +107 -51
- nautobot/project-static/docs/release-notes/version-1.2.html +109 -53
- nautobot/project-static/docs/release-notes/version-1.3.html +108 -52
- nautobot/project-static/docs/release-notes/version-1.4.html +109 -53
- nautobot/project-static/docs/release-notes/version-1.5.html +118 -62
- nautobot/project-static/docs/release-notes/version-1.6.html +721 -285
- nautobot/project-static/docs/release-notes/version-2.0.html +113 -57
- nautobot/project-static/docs/release-notes/version-2.1.html +107 -51
- nautobot/project-static/docs/release-notes/version-2.2.html +503 -120
- nautobot/project-static/docs/requirements.txt +4 -4
- nautobot/project-static/docs/search/search_index.json +1 -1
- nautobot/project-static/docs/sitemap.xml +262 -262
- nautobot/project-static/docs/sitemap.xml.gz +0 -0
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/ldap.html +107 -51
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/remote.html +107 -51
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/sso.html +109 -53
- nautobot/project-static/docs/user-guide/administration/configuration/index.html +108 -52
- nautobot/project-static/docs/user-guide/administration/configuration/optional-settings.html +254 -167
- nautobot/project-static/docs/user-guide/administration/configuration/required-settings.html +113 -57
- nautobot/project-static/docs/user-guide/administration/configuration/time-zones.html +107 -51
- nautobot/project-static/docs/user-guide/administration/guides/caching.html +113 -57
- nautobot/project-static/docs/user-guide/administration/guides/celery-queues.html +107 -51
- nautobot/project-static/docs/user-guide/administration/guides/healthcheck.html +107 -51
- nautobot/project-static/docs/user-guide/administration/guides/permissions.html +107 -51
- nautobot/project-static/docs/user-guide/administration/guides/prometheus-metrics.html +113 -57
- nautobot/project-static/docs/user-guide/administration/guides/replicating-nautobot.html +108 -52
- nautobot/project-static/docs/user-guide/administration/guides/request-profiling.html +107 -51
- nautobot/project-static/docs/user-guide/administration/guides/s3-django-storage.html +107 -51
- nautobot/project-static/docs/user-guide/administration/installation/app-install.html +171 -112
- nautobot/project-static/docs/user-guide/administration/installation/docker.html +13 -8626
- nautobot/project-static/docs/user-guide/administration/installation/external-authentication.html +117 -61
- nautobot/project-static/docs/user-guide/administration/installation/health-checks.html +13 -8614
- nautobot/project-static/docs/user-guide/administration/installation/http-server.html +252 -165
- nautobot/project-static/docs/user-guide/administration/installation/index.html +165 -192
- nautobot/project-static/docs/user-guide/administration/installation/install_system.html +411 -691
- nautobot/project-static/docs/user-guide/administration/installation/nautobot.html +249 -230
- nautobot/project-static/docs/user-guide/administration/installation/selinux-troubleshooting.html +13 -8118
- nautobot/project-static/docs/user-guide/administration/installation/services.html +351 -241
- nautobot/project-static/docs/user-guide/administration/installation-extras/docker.html +8684 -0
- nautobot/project-static/docs/user-guide/administration/installation-extras/health-checks.html +8672 -0
- nautobot/project-static/docs/user-guide/administration/installation-extras/selinux-troubleshooting.html +8176 -0
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-netbox.html +110 -54
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-postgresql.html +110 -54
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-server.html +155 -99
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-shell.html +107 -51
- nautobot/project-static/docs/user-guide/administration/upgrading/database-backup.html +109 -53
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/after-you-upgrade.html +107 -51
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/before-you-upgrade.html +107 -51
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/for-developers.html +108 -52
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/index.html +107 -51
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/whats-changed.html +107 -51
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/region-and-site-data-migration-guide.html +107 -70
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +115 -59
- nautobot/project-static/docs/user-guide/administration/upgrading/upgrading.html +113 -57
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuit.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittermination.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittype.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/circuits/provider.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/circuits/providernetwork.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/cable.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleport.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleporttemplate.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverport.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverporttemplate.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/controller.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/dcim/controllermanageddevicegroup.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/dcim/device.html +115 -59
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebay.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebaytemplate.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicefamily.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/deviceredundancygroup.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicetype.html +117 -61
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontport.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontporttemplate.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interface.html +119 -63
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfaceredundancygroup.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfacetemplate.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/inventoryitem.html +113 -57
- nautobot/project-static/docs/user-guide/core-data-model/dcim/location.html +113 -57
- nautobot/project-static/docs/user-guide/core-data-model/dcim/locationtype.html +113 -57
- nautobot/project-static/docs/user-guide/core-data-model/dcim/manufacturer.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/dcim/platform.html +113 -57
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerfeed.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlet.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlettemplate.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerpanel.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerport.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerporttemplate.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rack.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackgroup.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackreservation.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearport.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearporttemplate.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareimagefile.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareversion.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualchassis.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontext.html +113 -57
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontextschema.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/extras/contact.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/extras/team.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/ipam/ipaddress.html +125 -69
- nautobot/project-static/docs/user-guide/core-data-model/ipam/namespace.html +113 -57
- nautobot/project-static/docs/user-guide/core-data-model/ipam/prefix.html +128 -72
- nautobot/project-static/docs/user-guide/core-data-model/ipam/rir.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/ipam/routetarget.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/ipam/service.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlan.html +116 -60
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlangroup.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vrf.html +113 -57
- nautobot/project-static/docs/user-guide/core-data-model/overview/introduction.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenant.html +110 -54
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenantgroup.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/cluster.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustergroup.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustertype.html +107 -51
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/virtualmachine.html +113 -57
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/vminterface.html +113 -57
- nautobot/project-static/docs/user-guide/feature-guides/contacts-and-teams.html +107 -51
- nautobot/project-static/docs/user-guide/feature-guides/custom-fields.html +113 -57
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-devices.html +110 -54
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-location-types-and-locations.html +107 -51
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/index.html +107 -51
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/interfaces.html +108 -52
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/ipam.html +107 -51
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/platforms.html +107 -51
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/search-bar.html +107 -51
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/tenants.html +107 -51
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/vlans-and-vlan-groups.html +108 -52
- nautobot/project-static/docs/user-guide/feature-guides/git-data-source.html +110 -54
- nautobot/project-static/docs/user-guide/feature-guides/graphql.html +113 -57
- nautobot/project-static/docs/user-guide/feature-guides/ip-address-merge-tool.html +107 -51
- nautobot/project-static/docs/user-guide/feature-guides/relationships.html +110 -54
- nautobot/project-static/docs/user-guide/feature-guides/software-image-files-and-versions.html +107 -51
- nautobot/project-static/docs/user-guide/index.html +109 -53
- nautobot/project-static/docs/user-guide/platform-functionality/change-logging.html +107 -51
- nautobot/project-static/docs/user-guide/platform-functionality/computedfield.html +113 -57
- nautobot/project-static/docs/user-guide/platform-functionality/customfield.html +128 -72
- nautobot/project-static/docs/user-guide/platform-functionality/customlink.html +107 -51
- nautobot/project-static/docs/user-guide/platform-functionality/dynamicgroup.html +125 -69
- nautobot/project-static/docs/user-guide/platform-functionality/exporttemplate.html +107 -51
- nautobot/project-static/docs/user-guide/platform-functionality/externalintegration.html +110 -54
- nautobot/project-static/docs/user-guide/platform-functionality/gitrepository.html +125 -69
- nautobot/project-static/docs/user-guide/platform-functionality/graphql.html +110 -54
- nautobot/project-static/docs/user-guide/platform-functionality/graphqlquery.html +107 -51
- nautobot/project-static/docs/user-guide/platform-functionality/imageattachment.html +107 -51
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/index.html +128 -72
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/job-scheduling-and-approvals.html +114 -58
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobbutton.html +113 -57
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobhook.html +110 -54
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/models.html +121 -65
- nautobot/project-static/docs/user-guide/platform-functionality/napalm.html +109 -53
- nautobot/project-static/docs/user-guide/platform-functionality/note.html +110 -54
- nautobot/project-static/docs/user-guide/platform-functionality/relationship.html +116 -60
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/authentication.html +110 -54
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/filtering.html +131 -75
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/overview.html +149 -93
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/ui-related-endpoints.html +110 -54
- nautobot/project-static/docs/user-guide/platform-functionality/role.html +108 -84
- nautobot/project-static/docs/user-guide/platform-functionality/secret.html +116 -60
- nautobot/project-static/docs/user-guide/platform-functionality/status.html +119 -63
- nautobot/project-static/docs/user-guide/platform-functionality/tag.html +110 -54
- nautobot/project-static/docs/user-guide/platform-functionality/template-filters.html +137 -81
- nautobot/project-static/docs/user-guide/platform-functionality/users/objectpermission.html +110 -54
- nautobot/project-static/docs/user-guide/platform-functionality/users/token.html +107 -51
- nautobot/project-static/docs/user-guide/platform-functionality/webhook.html +110 -54
- nautobot/project-static/js/forms.js +2 -1
- nautobot/tenancy/forms.py +9 -0
- nautobot/tenancy/views.py +3 -6
- nautobot/virtualization/forms.py +18 -6
- nautobot/virtualization/templates/virtualization/clustertype.html +2 -2
- nautobot/virtualization/views.py +7 -9
- {nautobot-2.2.3.dist-info → nautobot-2.2.5.dist-info}/METADATA +2 -2
- {nautobot-2.2.3.dist-info → nautobot-2.2.5.dist-info}/RECORD +323 -320
- nautobot/project-static/docs/assets/javascripts/bundle.bd41221c.min.js +0 -29
- nautobot/project-static/docs/assets/javascripts/bundle.bd41221c.min.js.map +0 -7
- nautobot/project-static/docs/assets/stylesheets/main.bcfcd587.min.css +0 -1
- nautobot/project-static/docs/assets/stylesheets/main.bcfcd587.min.css.map +0 -1
- {nautobot-2.2.3.dist-info → nautobot-2.2.5.dist-info}/LICENSE.txt +0 -0
- {nautobot-2.2.3.dist-info → nautobot-2.2.5.dist-info}/NOTICE +0 -0
- {nautobot-2.2.3.dist-info → nautobot-2.2.5.dist-info}/WHEEL +0 -0
- {nautobot-2.2.3.dist-info → nautobot-2.2.5.dist-info}/entry_points.txt +0 -0
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
<link rel="icon" href="../../assets/favicon.ico">
|
|
21
|
-
<meta name="generator" content="mkdocs-1.
|
|
21
|
+
<meta name="generator" content="mkdocs-1.6.0, mkdocs-material-9.5.23">
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -26,12 +26,20 @@
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
<link rel="stylesheet" href="../../assets/stylesheets/main.
|
|
29
|
+
<link rel="stylesheet" href="../../assets/stylesheets/main.6543a935.min.css">
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<link rel="stylesheet" href="../../assets/stylesheets/palette.06af60db.min.css">
|
|
33
33
|
|
|
34
34
|
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
<style>:root{--md-admonition-icon--example:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M288 0H128c-17.7 0-32 14.3-32 32s14.3 32 32 32v132.8c0 11.8-3.3 23.5-9.5 33.5L10.3 406.2C3.6 417.2 0 429.7 0 442.6 0 480.9 31.1 512 69.4 512h309.2c38.3 0 69.4-31.1 69.4-69.4 0-12.8-3.6-25.4-10.3-36.4L329.5 230.4c-6.2-10.1-9.5-21.7-9.5-33.5V64c17.7 0 32-14.3 32-32S337.7 0 320 0h-32zm-96 196.8V64h64v132.8c0 23.7 6.6 46.9 19 67.1l34.5 56.1h-171l34.5-56.1c12.4-20.2 19-43.4 19-67.1z"/></svg>');}</style>
|
|
42
|
+
|
|
35
43
|
|
|
36
44
|
|
|
37
45
|
|
|
@@ -200,7 +208,7 @@
|
|
|
200
208
|
<a href="https://github.com/nautobot/nautobot" title="Go to repository" class="md-source" data-md-component="source">
|
|
201
209
|
<div class="md-source__icon md-icon">
|
|
202
210
|
|
|
203
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.5.
|
|
211
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
|
|
204
212
|
</div>
|
|
205
213
|
<div class="md-source__repository">
|
|
206
214
|
GitHub
|
|
@@ -360,7 +368,7 @@
|
|
|
360
368
|
<a href="https://github.com/nautobot/nautobot" title="Go to repository" class="md-source" data-md-component="source">
|
|
361
369
|
<div class="md-source__icon md-icon">
|
|
362
370
|
|
|
363
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.5.
|
|
371
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
|
|
364
372
|
</div>
|
|
365
373
|
<div class="md-source__repository">
|
|
366
374
|
GitHub
|
|
@@ -523,7 +531,7 @@
|
|
|
523
531
|
|
|
524
532
|
|
|
525
533
|
<span class="md-ellipsis">
|
|
526
|
-
|
|
534
|
+
Getting Started
|
|
527
535
|
</span>
|
|
528
536
|
|
|
529
537
|
|
|
@@ -624,11 +632,11 @@
|
|
|
624
632
|
|
|
625
633
|
|
|
626
634
|
<li class="md-nav__item">
|
|
627
|
-
<a href="../../user-guide/administration/installation/
|
|
635
|
+
<a href="../../user-guide/administration/installation/app-install.html" class="md-nav__link">
|
|
628
636
|
|
|
629
637
|
|
|
630
638
|
<span class="md-ellipsis">
|
|
631
|
-
|
|
639
|
+
Installing and Using Apps
|
|
632
640
|
</span>
|
|
633
641
|
|
|
634
642
|
|
|
@@ -645,11 +653,11 @@
|
|
|
645
653
|
|
|
646
654
|
|
|
647
655
|
<li class="md-nav__item">
|
|
648
|
-
<a href="../../user-guide/administration/installation/
|
|
656
|
+
<a href="../../user-guide/administration/installation/external-authentication.html" class="md-nav__link">
|
|
649
657
|
|
|
650
658
|
|
|
651
659
|
<span class="md-ellipsis">
|
|
652
|
-
|
|
660
|
+
External Authentication (Optional)
|
|
653
661
|
</span>
|
|
654
662
|
|
|
655
663
|
|
|
@@ -659,6 +667,52 @@
|
|
|
659
667
|
|
|
660
668
|
|
|
661
669
|
|
|
670
|
+
</ul>
|
|
671
|
+
</nav>
|
|
672
|
+
|
|
673
|
+
</li>
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
<li class="md-nav__item md-nav__item--nested">
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_1_2" >
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
<label class="md-nav__link" for="__nav_2_1_2" id="__nav_2_1_2_label" tabindex="0">
|
|
699
|
+
|
|
700
|
+
|
|
701
|
+
<span class="md-ellipsis">
|
|
702
|
+
Installation Extras
|
|
703
|
+
</span>
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
<span class="md-nav__icon md-icon"></span>
|
|
707
|
+
</label>
|
|
708
|
+
|
|
709
|
+
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_2_1_2_label" aria-expanded="false">
|
|
710
|
+
<label class="md-nav__title" for="__nav_2_1_2">
|
|
711
|
+
<span class="md-nav__icon md-icon"></span>
|
|
712
|
+
Installation Extras
|
|
713
|
+
</label>
|
|
714
|
+
<ul class="md-nav__list" data-md-scrollfix>
|
|
715
|
+
|
|
662
716
|
|
|
663
717
|
|
|
664
718
|
|
|
@@ -666,7 +720,7 @@
|
|
|
666
720
|
|
|
667
721
|
|
|
668
722
|
<li class="md-nav__item">
|
|
669
|
-
<a href="../../user-guide/administration/installation/docker.html" class="md-nav__link">
|
|
723
|
+
<a href="../../user-guide/administration/installation-extras/docker.html" class="md-nav__link">
|
|
670
724
|
|
|
671
725
|
|
|
672
726
|
<span class="md-ellipsis">
|
|
@@ -687,7 +741,7 @@
|
|
|
687
741
|
|
|
688
742
|
|
|
689
743
|
<li class="md-nav__item">
|
|
690
|
-
<a href="../../user-guide/administration/installation/health-checks.html" class="md-nav__link">
|
|
744
|
+
<a href="../../user-guide/administration/installation-extras/health-checks.html" class="md-nav__link">
|
|
691
745
|
|
|
692
746
|
|
|
693
747
|
<span class="md-ellipsis">
|
|
@@ -708,7 +762,7 @@
|
|
|
708
762
|
|
|
709
763
|
|
|
710
764
|
<li class="md-nav__item">
|
|
711
|
-
<a href="../../user-guide/administration/installation/selinux-troubleshooting.html" class="md-nav__link">
|
|
765
|
+
<a href="../../user-guide/administration/installation-extras/selinux-troubleshooting.html" class="md-nav__link">
|
|
712
766
|
|
|
713
767
|
|
|
714
768
|
<span class="md-ellipsis">
|
|
@@ -747,10 +801,10 @@
|
|
|
747
801
|
|
|
748
802
|
|
|
749
803
|
|
|
750
|
-
<input class="md-nav__toggle md-toggle " type="checkbox" id="
|
|
804
|
+
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_1_3" >
|
|
751
805
|
|
|
752
806
|
|
|
753
|
-
<label class="md-nav__link" for="
|
|
807
|
+
<label class="md-nav__link" for="__nav_2_1_3" id="__nav_2_1_3_label" tabindex="0">
|
|
754
808
|
|
|
755
809
|
|
|
756
810
|
<span class="md-ellipsis">
|
|
@@ -761,8 +815,8 @@
|
|
|
761
815
|
<span class="md-nav__icon md-icon"></span>
|
|
762
816
|
</label>
|
|
763
817
|
|
|
764
|
-
<nav class="md-nav" data-md-level="3" aria-labelledby="
|
|
765
|
-
<label class="md-nav__title" for="
|
|
818
|
+
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_2_1_3_label" aria-expanded="false">
|
|
819
|
+
<label class="md-nav__title" for="__nav_2_1_3">
|
|
766
820
|
<span class="md-nav__icon md-icon"></span>
|
|
767
821
|
Upgrading
|
|
768
822
|
</label>
|
|
@@ -827,7 +881,7 @@
|
|
|
827
881
|
|
|
828
882
|
|
|
829
883
|
|
|
830
|
-
<input class="md-nav__toggle md-toggle " type="checkbox" id="
|
|
884
|
+
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_1_3_3" >
|
|
831
885
|
|
|
832
886
|
|
|
833
887
|
|
|
@@ -843,14 +897,14 @@
|
|
|
843
897
|
</a>
|
|
844
898
|
|
|
845
899
|
|
|
846
|
-
<label class="md-nav__link " for="
|
|
900
|
+
<label class="md-nav__link " for="__nav_2_1_3_3" id="__nav_2_1_3_3_label" tabindex="0">
|
|
847
901
|
<span class="md-nav__icon md-icon"></span>
|
|
848
902
|
</label>
|
|
849
903
|
|
|
850
904
|
</div>
|
|
851
905
|
|
|
852
|
-
<nav class="md-nav" data-md-level="4" aria-labelledby="
|
|
853
|
-
<label class="md-nav__title" for="
|
|
906
|
+
<nav class="md-nav" data-md-level="4" aria-labelledby="__nav_2_1_3_3_label" aria-expanded="false">
|
|
907
|
+
<label class="md-nav__title" for="__nav_2_1_3_3">
|
|
854
908
|
<span class="md-nav__icon md-icon"></span>
|
|
855
909
|
Upgrading Nautobot from v1.X to v2.0
|
|
856
910
|
</label>
|
|
@@ -894,7 +948,7 @@
|
|
|
894
948
|
|
|
895
949
|
|
|
896
950
|
|
|
897
|
-
<input class="md-nav__toggle md-toggle " type="checkbox" id="
|
|
951
|
+
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_1_3_3_2" >
|
|
898
952
|
|
|
899
953
|
|
|
900
954
|
|
|
@@ -910,14 +964,14 @@
|
|
|
910
964
|
</a>
|
|
911
965
|
|
|
912
966
|
|
|
913
|
-
<label class="md-nav__link " for="
|
|
967
|
+
<label class="md-nav__link " for="__nav_2_1_3_3_2" id="__nav_2_1_3_3_2_label" tabindex="0">
|
|
914
968
|
<span class="md-nav__icon md-icon"></span>
|
|
915
969
|
</label>
|
|
916
970
|
|
|
917
971
|
</div>
|
|
918
972
|
|
|
919
|
-
<nav class="md-nav" data-md-level="5" aria-labelledby="
|
|
920
|
-
<label class="md-nav__title" for="
|
|
973
|
+
<nav class="md-nav" data-md-level="5" aria-labelledby="__nav_2_1_3_3_2_label" aria-expanded="false">
|
|
974
|
+
<label class="md-nav__title" for="__nav_2_1_3_3_2">
|
|
921
975
|
<span class="md-nav__icon md-icon"></span>
|
|
922
976
|
IPAM Migration Guide
|
|
923
977
|
</label>
|
|
@@ -1048,10 +1102,10 @@
|
|
|
1048
1102
|
|
|
1049
1103
|
|
|
1050
1104
|
|
|
1051
|
-
<input class="md-nav__toggle md-toggle " type="checkbox" id="
|
|
1105
|
+
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_1_4" >
|
|
1052
1106
|
|
|
1053
1107
|
|
|
1054
|
-
<label class="md-nav__link" for="
|
|
1108
|
+
<label class="md-nav__link" for="__nav_2_1_4" id="__nav_2_1_4_label" tabindex="0">
|
|
1055
1109
|
|
|
1056
1110
|
|
|
1057
1111
|
<span class="md-ellipsis">
|
|
@@ -1062,8 +1116,8 @@
|
|
|
1062
1116
|
<span class="md-nav__icon md-icon"></span>
|
|
1063
1117
|
</label>
|
|
1064
1118
|
|
|
1065
|
-
<nav class="md-nav" data-md-level="3" aria-labelledby="
|
|
1066
|
-
<label class="md-nav__title" for="
|
|
1119
|
+
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_2_1_4_label" aria-expanded="false">
|
|
1120
|
+
<label class="md-nav__title" for="__nav_2_1_4">
|
|
1067
1121
|
<span class="md-nav__icon md-icon"></span>
|
|
1068
1122
|
Migration
|
|
1069
1123
|
</label>
|
|
@@ -1136,7 +1190,7 @@
|
|
|
1136
1190
|
|
|
1137
1191
|
|
|
1138
1192
|
|
|
1139
|
-
<input class="md-nav__toggle md-toggle " type="checkbox" id="
|
|
1193
|
+
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_1_5" >
|
|
1140
1194
|
|
|
1141
1195
|
|
|
1142
1196
|
|
|
@@ -1152,14 +1206,14 @@
|
|
|
1152
1206
|
</a>
|
|
1153
1207
|
|
|
1154
1208
|
|
|
1155
|
-
<label class="md-nav__link " for="
|
|
1209
|
+
<label class="md-nav__link " for="__nav_2_1_5" id="__nav_2_1_5_label" tabindex="0">
|
|
1156
1210
|
<span class="md-nav__icon md-icon"></span>
|
|
1157
1211
|
</label>
|
|
1158
1212
|
|
|
1159
1213
|
</div>
|
|
1160
1214
|
|
|
1161
|
-
<nav class="md-nav" data-md-level="3" aria-labelledby="
|
|
1162
|
-
<label class="md-nav__title" for="
|
|
1215
|
+
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_2_1_5_label" aria-expanded="false">
|
|
1216
|
+
<label class="md-nav__title" for="__nav_2_1_5">
|
|
1163
1217
|
<span class="md-nav__icon md-icon"></span>
|
|
1164
1218
|
Configuration
|
|
1165
1219
|
</label>
|
|
@@ -1245,10 +1299,10 @@
|
|
|
1245
1299
|
|
|
1246
1300
|
|
|
1247
1301
|
|
|
1248
|
-
<input class="md-nav__toggle md-toggle " type="checkbox" id="
|
|
1302
|
+
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_1_5_4" >
|
|
1249
1303
|
|
|
1250
1304
|
|
|
1251
|
-
<label class="md-nav__link" for="
|
|
1305
|
+
<label class="md-nav__link" for="__nav_2_1_5_4" id="__nav_2_1_5_4_label" tabindex="0">
|
|
1252
1306
|
|
|
1253
1307
|
|
|
1254
1308
|
<span class="md-ellipsis">
|
|
@@ -1259,8 +1313,8 @@
|
|
|
1259
1313
|
<span class="md-nav__icon md-icon"></span>
|
|
1260
1314
|
</label>
|
|
1261
1315
|
|
|
1262
|
-
<nav class="md-nav" data-md-level="4" aria-labelledby="
|
|
1263
|
-
<label class="md-nav__title" for="
|
|
1316
|
+
<nav class="md-nav" data-md-level="4" aria-labelledby="__nav_2_1_5_4_label" aria-expanded="false">
|
|
1317
|
+
<label class="md-nav__title" for="__nav_2_1_5_4">
|
|
1264
1318
|
<span class="md-nav__icon md-icon"></span>
|
|
1265
1319
|
External Authentication
|
|
1266
1320
|
</label>
|
|
@@ -1362,10 +1416,10 @@
|
|
|
1362
1416
|
|
|
1363
1417
|
|
|
1364
1418
|
|
|
1365
|
-
<input class="md-nav__toggle md-toggle " type="checkbox" id="
|
|
1419
|
+
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_1_6" >
|
|
1366
1420
|
|
|
1367
1421
|
|
|
1368
|
-
<label class="md-nav__link" for="
|
|
1422
|
+
<label class="md-nav__link" for="__nav_2_1_6" id="__nav_2_1_6_label" tabindex="0">
|
|
1369
1423
|
|
|
1370
1424
|
|
|
1371
1425
|
<span class="md-ellipsis">
|
|
@@ -1376,8 +1430,8 @@
|
|
|
1376
1430
|
<span class="md-nav__icon md-icon"></span>
|
|
1377
1431
|
</label>
|
|
1378
1432
|
|
|
1379
|
-
<nav class="md-nav" data-md-level="3" aria-labelledby="
|
|
1380
|
-
<label class="md-nav__title" for="
|
|
1433
|
+
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_2_1_6_label" aria-expanded="false">
|
|
1434
|
+
<label class="md-nav__title" for="__nav_2_1_6">
|
|
1381
1435
|
<span class="md-nav__icon md-icon"></span>
|
|
1382
1436
|
Tools
|
|
1383
1437
|
</label>
|
|
@@ -1450,10 +1504,10 @@
|
|
|
1450
1504
|
|
|
1451
1505
|
|
|
1452
1506
|
|
|
1453
|
-
<input class="md-nav__toggle md-toggle " type="checkbox" id="
|
|
1507
|
+
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2_1_7" >
|
|
1454
1508
|
|
|
1455
1509
|
|
|
1456
|
-
<label class="md-nav__link" for="
|
|
1510
|
+
<label class="md-nav__link" for="__nav_2_1_7" id="__nav_2_1_7_label" tabindex="0">
|
|
1457
1511
|
|
|
1458
1512
|
|
|
1459
1513
|
<span class="md-ellipsis">
|
|
@@ -1464,8 +1518,8 @@
|
|
|
1464
1518
|
<span class="md-nav__icon md-icon"></span>
|
|
1465
1519
|
</label>
|
|
1466
1520
|
|
|
1467
|
-
<nav class="md-nav" data-md-level="3" aria-labelledby="
|
|
1468
|
-
<label class="md-nav__title" for="
|
|
1521
|
+
<nav class="md-nav" data-md-level="3" aria-labelledby="__nav_2_1_7_label" aria-expanded="false">
|
|
1522
|
+
<label class="md-nav__title" for="__nav_2_1_7">
|
|
1469
1523
|
<span class="md-nav__icon md-icon"></span>
|
|
1470
1524
|
Guides
|
|
1471
1525
|
</label>
|
|
@@ -8352,10 +8406,10 @@
|
|
|
8352
8406
|
<p>As an implementation detail in Nautobot 2.2.3 and later, all known Job <strong>classes</strong> are cached in the <a href="../core/application-registry.html#jobs">application registry</a>, which is refreshed at various times including Nautobot application startup and immediately prior to actually executing any given Job by a worker. This implementation detail should not be relied on directly; instead you should always use the <code>get_job()</code> and/or <code>get_jobs()</code> APIs to obtain a Job class when needed.</p>
|
|
8353
8407
|
</div>
|
|
8354
8408
|
<h2 id="migrating-jobs-from-v1-to-v2">Migrating Jobs from v1 to v2<a class="headerlink" href="#migrating-jobs-from-v1-to-v2" title="Permanent link">¶</a></h2>
|
|
8355
|
-
<
|
|
8356
|
-
<
|
|
8409
|
+
<details class="version-changed">
|
|
8410
|
+
<summary>Changed in version 2.0.0</summary>
|
|
8357
8411
|
<p>See <a href="migration/from-v1.html">Migrating Jobs From Nautobot v1</a> for more information on how to migrate your existing jobs to Nautobot v2.</p>
|
|
8358
|
-
</
|
|
8412
|
+
</details>
|
|
8359
8413
|
<h2 id="installing-jobs">Installing Jobs<a class="headerlink" href="#installing-jobs" title="Permanent link">¶</a></h2>
|
|
8360
8414
|
<p>Jobs may be installed in one of three ways:</p>
|
|
8361
8415
|
<ul>
|
|
@@ -8377,10 +8431,10 @@
|
|
|
8377
8431
|
</ul>
|
|
8378
8432
|
<p>In any case, each module holds one or more Job classes (Python classes), each of which serves a specific purpose. The logic of each job can be split into a number of distinct methods, each of which performs a discrete portion of the overall job logic.</p>
|
|
8379
8433
|
<p>For example, we can create a module named <code>devices.py</code> to hold all of our jobs which pertain to devices in Nautobot. Within that module, we might define several jobs. Each job is defined as a Python class inheriting from <code>nautobot.apps.jobs.Job</code>, which provides the base functionality needed to accept user input and log activity.</p>
|
|
8380
|
-
<
|
|
8381
|
-
<
|
|
8434
|
+
<details class="version-changed">
|
|
8435
|
+
<summary>Changed in version 2.0.0</summary>
|
|
8382
8436
|
<p>All job classes that are intended to be runnable must now be registered by a call to <code>nautobot.apps.jobs.register_jobs()</code> on module import. This allows for a module to, if desired, define "abstract" base Job classes that are defined in code but are not registered (and therefore are not runnable in Nautobot). The <code>register_jobs</code> method accepts one or more job classes as arguments.</p>
|
|
8383
|
-
</
|
|
8437
|
+
</details>
|
|
8384
8438
|
<h2 id="writing-jobs">Writing Jobs<a class="headerlink" href="#writing-jobs" title="Permanent link">¶</a></h2>
|
|
8385
8439
|
<div class="admonition warning">
|
|
8386
8440
|
<p class="admonition-title">Warning</p>
|
|
@@ -8413,9 +8467,9 @@
|
|
|
8413
8467
|
<p>Additionally, as of Nautobot 1.3, the Job database records corresponding to installed Jobs are <em>not</em> automatically refreshed when the development server auto-restarts. If you make changes to any of the class and module metadata attributes described in the following sections, the database will be refreshed to reflect these changes only after running <code>nautobot-server migrate</code> or <code>nautobot-server post_upgrade</code> (recommended) or if you manually edit a Job database record to force it to be refreshed. The exception here is Git-repository-provided Jobs; resyncing the Git repository through Nautobot will also trigger a refresh of the Job records corresponding to this repository's contents.</p>
|
|
8414
8468
|
</div>
|
|
8415
8469
|
<h3 id="job-registration">Job Registration<a class="headerlink" href="#job-registration" title="Permanent link">¶</a></h3>
|
|
8416
|
-
<
|
|
8417
|
-
<
|
|
8418
|
-
</
|
|
8470
|
+
<details class="version-changed">
|
|
8471
|
+
<summary>Changed in version 2.0.0</summary>
|
|
8472
|
+
</details>
|
|
8419
8473
|
<p>All Job classes, including <code>JobHookReceiver</code> and <code>JobButtonReceiver</code> classes must be registered at <strong>import time</strong> using the <code>nautobot.apps.jobs.register_jobs</code> method. This method accepts one or more job classes as arguments. You must account for how your jobs are imported when deciding where to call this method.</p>
|
|
8420
8474
|
<h4 id="registering-jobs-in-jobs_root-or-git-repositories">Registering Jobs in <code>JOBS_ROOT</code> or Git Repositories<a class="headerlink" href="#registering-jobs-in-jobs_root-or-git-repositories" title="Permanent link">¶</a></h4>
|
|
8421
8475
|
<p>Only top level module names within <code>JOBS_ROOT</code> are imported by Nautobot at runtime. This means that if you're using submodules, you need to ensure that your jobs are either registered in your top level <code>__init__.py</code> or that this file imports your submodules where the jobs are registered:</p>
|
|
@@ -8642,10 +8696,10 @@ This can accept either plain text, Markdown-formatted text, or <a href="../../us
|
|
|
8642
8696
|
<p>Default: <code>False</code></p>
|
|
8643
8697
|
<p>A boolean that will mark this job as requiring approval from another user to be run. For more details on approvals, <a href="../../user-guide/platform-functionality/jobs/job-scheduling-and-approvals.html">please refer to the section on scheduling and approvals</a>.</p>
|
|
8644
8698
|
<h4 id="dryrun_default"><code>dryrun_default</code><a class="headerlink" href="#dryrun_default" title="Permanent link">¶</a></h4>
|
|
8645
|
-
<
|
|
8646
|
-
<
|
|
8699
|
+
<details class="version-changed">
|
|
8700
|
+
<summary>Changed in version 2.0.0</summary>
|
|
8647
8701
|
<p>The <code>commit_default</code> field was renamed to <code>dryrun_default</code> and the default value was changed from <code>True</code> to <code>False</code>. The <code>commit</code> functionality that provided an automatic rollback of database changes if the job failed was removed. The <code>dryrun</code> functionality was added to provide a way to bypass job approval if a job implements a <a href="#dryrunvar"><code>DryRunVar</code></a>.</p>
|
|
8648
|
-
</
|
|
8702
|
+
</details>
|
|
8649
8703
|
<p>Default: <code>False</code></p>
|
|
8650
8704
|
<p>The checkbox to enable dryrun when executing a job is unchecked by default in the Nautobot UI. You can set <code>dryrun_default</code> to <code>True</code> under the <code>Meta</code> class if you want this option to instead be checked by default.</p>
|
|
8651
8705
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a><span class="k">class</span> <span class="nc">MyJob</span><span class="p">(</span><span class="n">Job</span><span class="p">):</span>
|
|
@@ -8656,9 +8710,9 @@ This can accept either plain text, Markdown-formatted text, or <a href="../../us
|
|
|
8656
8710
|
<p>Default: <code>[]</code></p>
|
|
8657
8711
|
<p>A list of strings (field names) representing the order your job <a href="#variables">variables</a> should be rendered as form fields in the job submission UI. If not defined, the variables will be listed in order of their definition in the code. If variables are defined on a parent class and no field order is defined, the parent class variables will appear before the subclass variables.</p>
|
|
8658
8712
|
<h4 id="has_sensitive_variables"><code>has_sensitive_variables</code><a class="headerlink" href="#has_sensitive_variables" title="Permanent link">¶</a></h4>
|
|
8659
|
-
<
|
|
8660
|
-
<
|
|
8661
|
-
</
|
|
8713
|
+
<details class="version-added">
|
|
8714
|
+
<summary>Added in version 1.3.10</summary>
|
|
8715
|
+
</details>
|
|
8662
8716
|
<p>Default: <code>True</code></p>
|
|
8663
8717
|
<p>Unless set to False, it prevents the job's input parameters from being saved to the database. This defaults to True so as to protect against inadvertent database exposure of input parameters that may include sensitive data such as passwords or other user credentials. Review whether each job's inputs contain any such variables before setting this to False; if a job <em>does</em> contain sensitive inputs, if possible you should consider whether the job could be re-implemented using Nautobot's <a href="../../user-guide/platform-functionality/secret.html"><code>Secrets</code></a> feature as a way to ensure that the sensitive data is not directly provided as a job variable at all.</p>
|
|
8664
8718
|
<p>Important notes about jobs with sensitive variables:</p>
|
|
@@ -8679,19 +8733,19 @@ This can accept either plain text, Markdown-formatted text, or <a href="../../us
|
|
|
8679
8733
|
<li>Results for hidden jobs will still appear in the Job Results list after they are run.</li>
|
|
8680
8734
|
</ul>
|
|
8681
8735
|
<h4 id="read_only"><code>read_only</code><a class="headerlink" href="#read_only" title="Permanent link">¶</a></h4>
|
|
8682
|
-
<
|
|
8683
|
-
<
|
|
8684
|
-
</
|
|
8685
|
-
<
|
|
8686
|
-
<
|
|
8736
|
+
<details class="version-added">
|
|
8737
|
+
<summary>Added in version 1.1.0</summary>
|
|
8738
|
+
</details>
|
|
8739
|
+
<details class="version-changed">
|
|
8740
|
+
<summary>Changed in version 2.0.0</summary>
|
|
8687
8741
|
<p>The <code>read_only</code> flag no longer changes the behavior of Nautobot core and is up to the job author to decide whether their job should be considered read only.</p>
|
|
8688
|
-
</
|
|
8742
|
+
</details>
|
|
8689
8743
|
<p>Default: <code>False</code></p>
|
|
8690
8744
|
<p>A boolean that can be set by the job author to indicate that the job does not make any changes to the environment. What behavior makes each job "read only" is up to the individual job author to decide. Note that user input may still be optionally collected with read-only jobs via job variables, as described below.</p>
|
|
8691
8745
|
<h4 id="soft_time_limit"><code>soft_time_limit</code><a class="headerlink" href="#soft_time_limit" title="Permanent link">¶</a></h4>
|
|
8692
|
-
<
|
|
8693
|
-
<
|
|
8694
|
-
</
|
|
8746
|
+
<details class="version-added">
|
|
8747
|
+
<summary>Added in version 1.3.0</summary>
|
|
8748
|
+
</details>
|
|
8695
8749
|
<p>An int or float value, in seconds, which can be used to override the default <a href="../../user-guide/administration/configuration/optional-settings.html#celery_task_soft_time_limit">soft time limit</a> for a job task to complete.</p>
|
|
8696
8750
|
<p>The <code>celery.exceptions.SoftTimeLimitExceeded</code> exception will be raised when this soft time limit is exceeded. The job task can catch this to clean up before the <a href="../../user-guide/administration/configuration/optional-settings.html#celery_task_time_limit">hard time limit</a> (10 minutes by default) is reached:</p>
|
|
8697
8751
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-1"></a><span class="kn">from</span> <span class="nn">celery.exceptions</span> <span class="kn">import</span> <span class="n">SoftTimeLimitExceeded</span>
|
|
@@ -8712,9 +8766,9 @@ This can accept either plain text, Markdown-formatted text, or <a href="../../us
|
|
|
8712
8766
|
<a id="__codelineno-5-16" name="__codelineno-5-16" href="#__codelineno-5-16"></a> <span class="n">cleanup_in_a_hurry</span><span class="p">()</span>
|
|
8713
8767
|
</code></pre></div>
|
|
8714
8768
|
<h4 id="task_queues"><code>task_queues</code><a class="headerlink" href="#task_queues" title="Permanent link">¶</a></h4>
|
|
8715
|
-
<
|
|
8716
|
-
<
|
|
8717
|
-
</
|
|
8769
|
+
<details class="version-added">
|
|
8770
|
+
<summary>Added in version 1.5.0</summary>
|
|
8771
|
+
</details>
|
|
8718
8772
|
<p>Default: <code>[]</code></p>
|
|
8719
8773
|
<p>A list of task queue names that the job can be routed to. An empty list will default to only allowing the user to select the <a href="../../user-guide/administration/configuration/optional-settings.html#celery_task_default_queue">default queue</a> (<code>default</code> unless changed by an administrator). The first queue in the list will be used if a queue is not specified in a job run API call.</p>
|
|
8720
8774
|
<div class="admonition note">
|
|
@@ -8722,9 +8776,9 @@ This can accept either plain text, Markdown-formatted text, or <a href="../../us
|
|
|
8722
8776
|
<p>A worker must be listening on the requested queue or the job will not run. See the documentation on <a href="../../user-guide/administration/guides/celery-queues.html">task queues</a> for more information.</p>
|
|
8723
8777
|
</div>
|
|
8724
8778
|
<h4 id="template_name"><code>template_name</code><a class="headerlink" href="#template_name" title="Permanent link">¶</a></h4>
|
|
8725
|
-
<
|
|
8726
|
-
<
|
|
8727
|
-
</
|
|
8779
|
+
<details class="version-added">
|
|
8780
|
+
<summary>Added in version 1.4.0</summary>
|
|
8781
|
+
</details>
|
|
8728
8782
|
<p>A path relative to the job source code containing a Django template which provides additional code to customize the Job's submission form. This template should extend the existing job template, <code>extras/job.html</code>, otherwise the base form and functionality may not be available.</p>
|
|
8729
8783
|
<p>A template can provide additional JavaScript, CSS, or even display HTML. A good starting template would be:</p>
|
|
8730
8784
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-6-1" name="__codelineno-6-1" href="#__codelineno-6-1"></a>{% extends 'extras/job.html' %}
|
|
@@ -8742,15 +8796,15 @@ This can accept either plain text, Markdown-formatted text, or <a href="../../us
|
|
|
8742
8796
|
<a id="__codelineno-6-13" name="__codelineno-6-13" href="#__codelineno-6-13"></a> <span class="cm"><!-- Add additional JavaScript here. --></span>
|
|
8743
8797
|
<a id="__codelineno-6-14" name="__codelineno-6-14" href="#__codelineno-6-14"></a>{% endblock javascript %}
|
|
8744
8798
|
</code></pre></div>
|
|
8745
|
-
<
|
|
8746
|
-
<
|
|
8799
|
+
<details class="version-added">
|
|
8800
|
+
<summary>Added in version 2.2.0</summary>
|
|
8747
8801
|
<p>Added the <code>job_form</code> and <code>schedule_form</code> sub-blocks to <code>extras/job.html</code>, for use by Jobs that just want to override the rendered forms without replacing all of <code>{% block content %}</code>.</p>
|
|
8748
|
-
</
|
|
8802
|
+
</details>
|
|
8749
8803
|
<p>For another example checkout <a href="https://github.com/nautobot/nautobot/blob/main/examples/example_app/example_app/templates/example_app/example_with_custom_template.html">the template used in the Example App</a> in the GitHub repo.</p>
|
|
8750
8804
|
<h4 id="time_limit"><code>time_limit</code><a class="headerlink" href="#time_limit" title="Permanent link">¶</a></h4>
|
|
8751
|
-
<
|
|
8752
|
-
<
|
|
8753
|
-
</
|
|
8805
|
+
<details class="version-added">
|
|
8806
|
+
<summary>Added in version 1.3.0</summary>
|
|
8807
|
+
</details>
|
|
8754
8808
|
<p>An int or float value, in seconds, which can be used to override the
|
|
8755
8809
|
default <a href="../../user-guide/administration/configuration/optional-settings.html#celery_task_time_limit">hard time limit</a> (10 minutes by default) for a job task to complete.</p>
|
|
8756
8810
|
<p>Unlike the <code>soft_time_limit</code> above, no exceptions are raised when a <code>time_limit</code> is exceeded. The task will just terminate silently:</p>
|
|
@@ -8804,9 +8858,9 @@ default <a href="../../user-guide/administration/configuration/optional-settings
|
|
|
8804
8858
|
<h4 id="textvar"><code>TextVar</code><a class="headerlink" href="#textvar" title="Permanent link">¶</a></h4>
|
|
8805
8859
|
<p>Arbitrary text of any length. Renders as a multi-line text input field.</p>
|
|
8806
8860
|
<h4 id="jsonvar"><code>JSONVar</code><a class="headerlink" href="#jsonvar" title="Permanent link">¶</a></h4>
|
|
8807
|
-
<
|
|
8808
|
-
<
|
|
8809
|
-
</
|
|
8861
|
+
<details class="version-added">
|
|
8862
|
+
<summary>Added in version 2.1.0</summary>
|
|
8863
|
+
</details>
|
|
8810
8864
|
<p>Accepts JSON-formatted data of any length. Renders as a multi-line text input field. The variable passed to <code>run()</code> method on the job has been serialized to the appropriate Python objects.</p>
|
|
8811
8865
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-9-1" name="__codelineno-9-1" href="#__codelineno-9-1"></a><span class="k">class</span> <span class="nc">ExampleJSONVarJob</span><span class="p">(</span><span class="n">Job</span><span class="p">):</span>
|
|
8812
8866
|
<a id="__codelineno-9-2" name="__codelineno-9-2" href="#__codelineno-9-2"></a> <span class="n">var1</span> <span class="o">=</span> <span class="n">JSONVar</span><span class="p">()</span>
|
|
@@ -8916,10 +8970,10 @@ Another example of using the nested reference would be to access <a href="../../
|
|
|
8916
8970
|
<h3 id="special-methods">Special Methods<a class="headerlink" href="#special-methods" title="Permanent link">¶</a></h3>
|
|
8917
8971
|
<p>Nautobot Jobs when executed will be instantiated by Nautobot, then Nautobot will call in order the special API methods <code>before_start()</code>, <code>run()</code>, <code>on_success()</code>/<code>on_failure()</code>, and <code>after_return()</code>. You must implement the <code>run()</code> method; the other methods have default implementations that do nothing.</p>
|
|
8918
8972
|
<p>As Jobs are Python classes, you are of course free to define any number of other helper methods or functions that you call yourself from within any of the above special methods, but the above are the only ones that will be automatically called.</p>
|
|
8919
|
-
<
|
|
8920
|
-
<
|
|
8973
|
+
<details class="version-removed">
|
|
8974
|
+
<summary>Removed in version 2.0.0</summary>
|
|
8921
8975
|
<p>The NetBox backwards compatible <code>test_*()</code> and <code>post_run()</code> special methods have been removed.</p>
|
|
8922
|
-
</
|
|
8976
|
+
</details>
|
|
8923
8977
|
<h4 id="the-before_start-method">The <code>before_start()</code> Method<a class="headerlink" href="#the-before_start-method" title="Permanent link">¶</a></h4>
|
|
8924
8978
|
<p>The <code>before_start()</code> method may optionally be implemented to perform any appropriate Job-specific setup before the <code>run()</code> method is called. It has the signature <code>before_start(self, task_id, args, kwargs)</code> for historical reasons; the <code>task_id</code> parameter will always be identical to <code>self.request.id</code>, the <code>args</code> parameter will generally be empty, and any user-specified variables passed into the Job execution will be present in the <code>kwargs</code> parameter.</p>
|
|
8925
8979
|
<p>The return value from <code>before_start()</code> is ignored, but if it raises any exception, the Job execution will be marked as a failure and <code>run()</code> will not be called.</p>
|
|
@@ -8952,9 +9006,9 @@ Another example of using the nested reference would be to access <a href="../../
|
|
|
8952
9006
|
<h4 id="the-after_return-method">The <code>after_return()</code> Method<a class="headerlink" href="#the-after_return-method" title="Permanent link">¶</a></h4>
|
|
8953
9007
|
<p>Regardless of the overall Job execution success or failure, the <code>after_return()</code> method will be called after <code>on_success()</code> or <code>on_failure()</code>. It has the signature <code>after_return(self, status, retval, task_id, args, kwargs, einfo)</code>; the <code>status</code> will indicate success or failure (using the <code>JobResultStatusChoices</code> enum), <code>retval</code> is <em>either</em> the return value from <code>run()</code> (on success) or the exception raised (on failure), and once again <code>kwargs</code> contains the user variables.</p>
|
|
8954
9008
|
<h3 id="logging">Logging<a class="headerlink" href="#logging" title="Permanent link">¶</a></h3>
|
|
8955
|
-
<
|
|
8956
|
-
<
|
|
8957
|
-
</
|
|
9009
|
+
<details class="version-changed">
|
|
9010
|
+
<summary>Changed in version 2.0.0</summary>
|
|
9011
|
+
</details>
|
|
8958
9012
|
<p>Messages logged from a job's logger will be stored in <a href="../../user-guide/platform-functionality/jobs/models.html#job-log-entry"><code>JobLogEntry</code></a> records associated with the current <a href="../../user-guide/platform-functionality/jobs/models.html#job-results"><code>JobResult</code></a>.</p>
|
|
8959
9013
|
<p>The logger can be accessed either by using the <code>logger</code> property on the job class or <code>nautobot.extras.jobs.get_task_logger(__name__)</code>. Both will return the same logger instance. For more information on the standard Python logging module, see the <a href="https://docs.python.org/3/library/logging.html">Python documentation</a>.</p>
|
|
8960
9014
|
<p>The logger accepts an <code>extra</code> kwarg that you can optionally set for the following features:</p>
|
|
@@ -8984,22 +9038,22 @@ Another example of using the nested reference would be to access <a href="../../
|
|
|
8984
9038
|
</code></pre></div>
|
|
8985
9039
|
</div>
|
|
8986
9040
|
<p>Markdown rendering is supported for log messages, as well as <a href="../../user-guide/platform-functionality/template-filters.html#render_markdown">a limited subset of HTML</a>.</p>
|
|
8987
|
-
<
|
|
8988
|
-
<
|
|
9041
|
+
<details class="version-changed">
|
|
9042
|
+
<summary>Changed in version 1.3.4</summary>
|
|
8989
9043
|
<p>As a security measure, the <code>message</code> passed to any of these methods will be passed through the <code>nautobot.core.utils.logging.sanitize()</code> function in an attempt to strip out information such as usernames/passwords that should not be saved to the logs. This is of course best-effort only, and Job authors should take pains to ensure that such information is not passed to the logging APIs in the first place. The set of redaction rules used by the <code>sanitize()</code> function can be configured as <a href="../../user-guide/administration/configuration/optional-settings.html#sanitizer_patterns">settings.SANITIZER_PATTERNS</a>.</p>
|
|
8990
|
-
</
|
|
8991
|
-
<
|
|
8992
|
-
<
|
|
9044
|
+
</details>
|
|
9045
|
+
<details class="version-changed">
|
|
9046
|
+
<summary>Changed in version 2.0.0</summary>
|
|
8993
9047
|
<p>The Job class logging functions (example: <code>self.log(message)</code>, <code>self.log_success(obj=None, message=message)</code>, etc) have been removed. Also, the convenience method to mark a job as failed, <code>log_failure()</code>, has been removed. To replace the functionality of this method, you can log an error message with <code>self.logger.error()</code> and then raise an exception to fail the job. Note that it is no longer possible to manually set the job result status as failed without raising an exception in the job.</p>
|
|
8994
|
-
</
|
|
8995
|
-
<
|
|
8996
|
-
<
|
|
9048
|
+
</details>
|
|
9049
|
+
<details class="version-changed">
|
|
9050
|
+
<summary>Changed in version 2.0.0</summary>
|
|
8997
9051
|
<p>The <code>AbortTransaction</code> class was moved from the <code>nautobot.utilities.exceptions</code> module to <code>nautobot.core.exceptions</code>.</p>
|
|
8998
|
-
</
|
|
9052
|
+
</details>
|
|
8999
9053
|
<h3 id="file-output">File Output<a class="headerlink" href="#file-output" title="Permanent link">¶</a></h3>
|
|
9000
|
-
<
|
|
9001
|
-
<
|
|
9002
|
-
</
|
|
9054
|
+
<details class="version-added">
|
|
9055
|
+
<summary>Added in version 2.1.0</summary>
|
|
9056
|
+
</details>
|
|
9003
9057
|
<p>A Job can create files that will be saved and can later be downloaded by a user. (The specifics of how and where these files are stored will depend on your system's <a href="../../user-guide/administration/configuration/optional-settings.html#job_file_io_storage"><code>JOB_FILE_IO_STORAGE</code></a> configuration.) To do so, use the <code>Job.create_file(filename, content)</code> method:</p>
|
|
9004
9058
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-19-1" name="__codelineno-19-1" href="#__codelineno-19-1"></a><span class="kn">from</span> <span class="nn">nautobot.extras.jobs</span> <span class="kn">import</span> <span class="n">Job</span>
|
|
9005
9059
|
<a id="__codelineno-19-2" name="__codelineno-19-2" href="#__codelineno-19-2"></a>
|
|
@@ -9024,10 +9078,10 @@ Another example of using the nested reference would be to access <a href="../../
|
|
|
9024
9078
|
<a id="__codelineno-20-9" name="__codelineno-20-9" href="#__codelineno-20-9"></a> <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s2">"Argument input validation failed."</span><span class="p">)</span>
|
|
9025
9079
|
</code></pre></div>
|
|
9026
9080
|
<h3 id="accessing-user-and-job-result">Accessing User and Job Result<a class="headerlink" href="#accessing-user-and-job-result" title="Permanent link">¶</a></h3>
|
|
9027
|
-
<
|
|
9028
|
-
<
|
|
9081
|
+
<details class="version-changed">
|
|
9082
|
+
<summary>Changed in version 2.0.0</summary>
|
|
9029
9083
|
<p>The <code>request</code> property has been changed to a Celery request instead of a Django web request and no longer includes the information from the web request that initiated the Job. The <code>user</code> object is now available as <code>self.user</code> instead of <code>self.request.user</code>.</p>
|
|
9030
|
-
</
|
|
9084
|
+
</details>
|
|
9031
9085
|
<p>The user that initiated the job and the job result associated to the job can be accessed through properties on the job class:</p>
|
|
9032
9086
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-21-1" name="__codelineno-21-1" href="#__codelineno-21-1"></a><span class="n">username</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">user</span><span class="o">.</span><span class="n">username</span>
|
|
9033
9087
|
<a id="__codelineno-21-2" name="__codelineno-21-2" href="#__codelineno-21-2"></a><span class="n">job_result_id</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">job_result</span><span class="o">.</span><span class="n">id</span>
|
|
@@ -9043,11 +9097,11 @@ Another example of using the nested reference would be to access <a href="../../
|
|
|
9043
9097
|
<h2 id="testing-jobs">Testing Jobs<a class="headerlink" href="#testing-jobs" title="Permanent link">¶</a></h2>
|
|
9044
9098
|
<p>Jobs are Python code and can be tested as such, usually via <a href="https://docs.djangoproject.com/en/stable/topics/testing/">Django unit-test features</a>. That said, there are a few useful tricks specific to testing Jobs.</p>
|
|
9045
9099
|
<p>While individual methods within your Job can and should be tested in isolation, you'll likely also want to test the entire execution of the Job.</p>
|
|
9046
|
-
<
|
|
9047
|
-
<
|
|
9100
|
+
<details class="version-added">
|
|
9101
|
+
<summary>Added in version 1.3.3</summary>
|
|
9048
9102
|
<p>Entire Job execution testing was only introduced in 1.3.3 and newer.
|
|
9049
9103
|
However the import paths used in the examples requires 1.5.2 and newer.</p>
|
|
9050
|
-
</
|
|
9104
|
+
</details>
|
|
9051
9105
|
<p>The simplest way to test the entire execution of Jobs is via calling the <code>nautobot.apps.testing.run_job_for_testing()</code> method, which is a helper wrapper around the <code>JobResult.enqueue_job</code> function used to execute a Job via Nautobot's Celery worker process.</p>
|
|
9052
9106
|
<p>Because of the way <code>run_job_for_testing</code> and more specifically Celery tasks work, which is somewhat complex behind the scenes, you need to inherit from <code>nautobot.apps.testing.TransactionTestCase</code> instead of <code>django.test.TestCase</code> (Refer to the <a href="https://docs.djangoproject.com/en/stable/topics/testing/tools/#provided-test-case-classes">Django documentation</a> if you're interested in the differences between these classes - <code>TransactionTestCase</code> from Nautobot is a small wrapper around Django's <code>TransactionTestCase</code>).</p>
|
|
9053
9107
|
<p>When using <code>TransactionTestCase</code> (whether from Django or from Nautobot) each tests runs on a completely empty database. Furthermore, Nautobot requires new jobs to be enabled before they can run. Therefore, we need to make sure the job is enabled before each run which <code>run_job_for_testing</code> handles for us.</p>
|
|
@@ -9073,9 +9127,9 @@ However the import paths used in the examples requires 1.5.2 and newer.</p>
|
|
|
9073
9127
|
<p>For more advanced examples refer to the Nautobot source code, specifically <code>nautobot/extras/tests/test_jobs.py</code>.</p>
|
|
9074
9128
|
</div>
|
|
9075
9129
|
<h2 id="debugging-job-performance">Debugging job performance<a class="headerlink" href="#debugging-job-performance" title="Permanent link">¶</a></h2>
|
|
9076
|
-
<
|
|
9077
|
-
<
|
|
9078
|
-
</
|
|
9130
|
+
<details class="version-added">
|
|
9131
|
+
<summary>Added in version 1.5.17</summary>
|
|
9132
|
+
</details>
|
|
9079
9133
|
<p>Debugging the performance of Nautobot jobs can be tricky, because they are executed in the worker context. In order to gain extra visibility, <a href="https://docs.python.org/3/library/profile.html">cProfile</a> can be used to profile the job execution.</p>
|
|
9080
9134
|
<p>The 'profile' form field on jobs is automatically available when the <code>DEBUG</code> settings is <code>True</code>. When you select that checkbox, a profiling report in the pstats format will be written to the file system of the environment where the job runs. Normally, this is on the file system of the worker process, but if you are using the <code>nautobot-server runjob</code> command with <code>--local</code>, it will end up in the file system of the web application itself. The path of the written file will be logged in the job.</p>
|
|
9081
9135
|
<div class="admonition note">
|
|
@@ -9346,6 +9400,8 @@ However the import paths used in the examples requires 1.5.2 and newer.</p>
|
|
|
9346
9400
|
</div>
|
|
9347
9401
|
|
|
9348
9402
|
|
|
9403
|
+
<script>var tabs=__md_get("__tabs");if(Array.isArray(tabs))e:for(var set of document.querySelectorAll(".tabbed-set")){var tab,labels=set.querySelector(".tabbed-labels");for(tab of tabs)for(var label of labels.getElementsByTagName("label"))if(label.innerText.trim()===tab){var input=document.getElementById(label.htmlFor);input.checked=!0;continue e}}</script>
|
|
9404
|
+
|
|
9349
9405
|
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
|
|
9350
9406
|
</div>
|
|
9351
9407
|
|
|
@@ -9423,7 +9479,7 @@ However the import paths used in the examples requires 1.5.2 and newer.</p>
|
|
|
9423
9479
|
|
|
9424
9480
|
|
|
9425
9481
|
<a href="https://blog.networktocode.com/blog/tags/nautobot" target="_blank" rel="noopener" title="Network to Code Blog" class="md-social__link">
|
|
9426
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.5.
|
|
9482
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M0 64c0-17.7 14.3-32 32-32 229.8 0 416 186.2 416 416 0 17.7-14.3 32-32 32s-32-14.3-32-32C384 253.6 226.4 96 32 96 14.3 96 0 81.7 0 64zm0 352a64 64 0 1 1 128 0 64 64 0 1 1-128 0zm32-256c159.1 0 288 128.9 288 288 0 17.7-14.3 32-32 32s-32-14.3-32-32c0-123.7-100.3-224-224-224-17.7 0-32-14.3-32-32s14.3-32 32-32z"/></svg>
|
|
9427
9483
|
</a>
|
|
9428
9484
|
|
|
9429
9485
|
|
|
@@ -9431,7 +9487,7 @@ However the import paths used in the examples requires 1.5.2 and newer.</p>
|
|
|
9431
9487
|
|
|
9432
9488
|
|
|
9433
9489
|
<a href="https://www.youtube.com/playlist?list=PLjA0bhxgryJ2Ts4GJMDA-tPzVWEncv4pb" target="_blank" rel="noopener" title="Nautobot Videos" class="md-social__link">
|
|
9434
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Free 6.5.
|
|
9490
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z"/></svg>
|
|
9435
9491
|
</a>
|
|
9436
9492
|
|
|
9437
9493
|
|
|
@@ -9439,7 +9495,7 @@ However the import paths used in the examples requires 1.5.2 and newer.</p>
|
|
|
9439
9495
|
|
|
9440
9496
|
|
|
9441
9497
|
<a href="https://www.networktocode.com/community/" target="_blank" rel="noopener" title="Network to Code Community" class="md-social__link">
|
|
9442
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.5.
|
|
9498
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M94.12 315.1c0 25.9-21.16 47.06-47.06 47.06S0 341 0 315.1c0-25.9 21.16-47.06 47.06-47.06h47.06v47.06zm23.72 0c0-25.9 21.16-47.06 47.06-47.06s47.06 21.16 47.06 47.06v117.84c0 25.9-21.16 47.06-47.06 47.06s-47.06-21.16-47.06-47.06V315.1zm47.06-188.98c-25.9 0-47.06-21.16-47.06-47.06S139 32 164.9 32s47.06 21.16 47.06 47.06v47.06H164.9zm0 23.72c25.9 0 47.06 21.16 47.06 47.06s-21.16 47.06-47.06 47.06H47.06C21.16 243.96 0 222.8 0 196.9s21.16-47.06 47.06-47.06H164.9zm188.98 47.06c0-25.9 21.16-47.06 47.06-47.06 25.9 0 47.06 21.16 47.06 47.06s-21.16 47.06-47.06 47.06h-47.06V196.9zm-23.72 0c0 25.9-21.16 47.06-47.06 47.06-25.9 0-47.06-21.16-47.06-47.06V79.06c0-25.9 21.16-47.06 47.06-47.06 25.9 0 47.06 21.16 47.06 47.06V196.9zM283.1 385.88c25.9 0 47.06 21.16 47.06 47.06 0 25.9-21.16 47.06-47.06 47.06-25.9 0-47.06-21.16-47.06-47.06v-47.06h47.06zm0-23.72c-25.9 0-47.06-21.16-47.06-47.06 0-25.9 21.16-47.06 47.06-47.06h117.84c25.9 0 47.06 21.16 47.06 47.06 0 25.9-21.16 47.06-47.06 47.06H283.1z"/></svg>
|
|
9443
9499
|
</a>
|
|
9444
9500
|
|
|
9445
9501
|
|
|
@@ -9447,7 +9503,7 @@ However the import paths used in the examples requires 1.5.2 and newer.</p>
|
|
|
9447
9503
|
|
|
9448
9504
|
|
|
9449
9505
|
<a href="https://github.com/nautobot/nautobot" target="_blank" rel="noopener" title="GitHub Repo" class="md-social__link">
|
|
9450
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.5.
|
|
9506
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>
|
|
9451
9507
|
</a>
|
|
9452
9508
|
|
|
9453
9509
|
|
|
@@ -9455,7 +9511,7 @@ However the import paths used in the examples requires 1.5.2 and newer.</p>
|
|
|
9455
9511
|
|
|
9456
9512
|
|
|
9457
9513
|
<a href="https://twitter.com/networktocode" target="_blank" rel="noopener" title="Network to Code Twitter" class="md-social__link">
|
|
9458
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.5.
|
|
9514
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"/></svg>
|
|
9459
9515
|
</a>
|
|
9460
9516
|
|
|
9461
9517
|
</div>
|
|
@@ -9470,10 +9526,10 @@ However the import paths used in the examples requires 1.5.2 and newer.</p>
|
|
|
9470
9526
|
</div>
|
|
9471
9527
|
|
|
9472
9528
|
|
|
9473
|
-
<script id="__config" type="application/json">{"base": "../..", "features": ["content.code.copy", "navigation.footer", "navigation.tabs", "navigation.tabs.sticky", "navigation.tracking", "search.highlight", "search.share", "search.suggest"], "search": "../../assets/javascripts/workers/search.b8dbb3d2.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
|
|
9529
|
+
<script id="__config" type="application/json">{"base": "../..", "features": ["content.code.copy", "content.tabs.link", "navigation.footer", "navigation.tabs", "navigation.tabs.sticky", "navigation.tracking", "search.highlight", "search.share", "search.suggest"], "search": "../../assets/javascripts/workers/search.b8dbb3d2.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
|
|
9474
9530
|
|
|
9475
9531
|
|
|
9476
|
-
<script src="../../assets/javascripts/bundle.
|
|
9532
|
+
<script src="../../assets/javascripts/bundle.ebd0bdb7.min.js"></script>
|
|
9477
9533
|
|
|
9478
9534
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
|
9479
9535
|
|