nautobot 2.0.4__py3-none-any.whl → 2.1.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/circuits/navigation.py +0 -25
- nautobot/circuits/templates/circuits/circuit_retrieve.html +0 -9
- nautobot/circuits/templates/circuits/providernetwork_retrieve.html +0 -2
- nautobot/circuits/tests/test_api.py +79 -2
- nautobot/circuits/tests/test_filters.py +1 -0
- nautobot/core/api/serializers.py +15 -5
- nautobot/core/api/views.py +18 -19
- nautobot/core/choices.py +1 -1
- nautobot/core/filters.py +12 -4
- nautobot/core/jobs/__init__.py +125 -3
- nautobot/core/management/commands/generate_test_data.py +6 -1
- nautobot/core/middleware.py +12 -4
- nautobot/core/models/fields.py +12 -2
- nautobot/core/settings.py +9 -8
- nautobot/core/tables.py +26 -31
- nautobot/core/templates/base_django.html +2 -2
- nautobot/core/templates/buttons/export.html +57 -30
- nautobot/core/templates/generic/object_list.html +2 -2
- nautobot/core/templates/generic/object_retrieve.html +8 -1
- nautobot/core/templates/home.html +5 -5
- nautobot/core/templates/inc/created_updated.html +2 -2
- nautobot/core/templates/inc/footer.html +2 -2
- nautobot/core/templates/inc/javascript.html +0 -10
- nautobot/core/templates/inc/media.html +2 -0
- nautobot/core/templates/inc/nav_menu.html +66 -68
- nautobot/core/templates/inc/object_details_advanced_panel.html +19 -0
- nautobot/core/templates/nautobot_config.py.j2 +10 -4
- nautobot/core/templates/panel_table.html +1 -1
- nautobot/core/templates/template.css +89 -0
- nautobot/core/templates/utilities/templatetags/table_config_form.html +1 -0
- nautobot/core/templatetags/buttons.py +7 -2
- nautobot/core/templatetags/helpers.py +9 -9
- nautobot/core/testing/views.py +34 -4
- nautobot/core/tests/integration/test_home.py +1 -43
- nautobot/core/tests/integration/test_navbar.py +10 -64
- nautobot/core/tests/integration/test_plugin_home.py +4 -5
- nautobot/core/tests/integration/test_plugin_navbar.py +20 -16
- nautobot/core/tests/integration/test_theme.py +4 -0
- nautobot/core/tests/test_api.py +14 -66
- nautobot/core/tests/test_filters.py +127 -0
- nautobot/core/tests/test_forms.py +4 -4
- nautobot/core/tests/test_graphql.py +165 -2
- nautobot/core/tests/test_jobs.py +112 -0
- nautobot/core/tests/test_openapi.py +6 -0
- nautobot/core/tests/test_utils.py +23 -20
- nautobot/core/tests/test_views.py +11 -85
- nautobot/core/urls.py +6 -1
- nautobot/core/utils/data.py +5 -1
- nautobot/core/utils/filtering.py +6 -4
- nautobot/core/utils/lookup.py +28 -0
- nautobot/core/utils/requests.py +2 -3
- nautobot/core/views/__init__.py +3 -4
- nautobot/core/views/generic.py +15 -11
- nautobot/core/views/mixins.py +9 -8
- nautobot/core/views/renderers.py +5 -0
- nautobot/core/views/utils.py +23 -24
- nautobot/dcim/api/serializers.py +8 -4
- nautobot/dcim/models/device_components.py +1 -0
- nautobot/dcim/models/devices.py +7 -6
- nautobot/dcim/navigation.py +10 -165
- nautobot/dcim/templates/dcim/location.html +1 -1
- nautobot/dcim/tests/features/locations.feature +143 -0
- nautobot/dcim/tests/test_api.py +8 -1
- nautobot/dcim/tests/test_filters.py +11 -3
- nautobot/dcim/views.py +5 -6
- nautobot/extras/admin.py +1 -1
- nautobot/extras/api/serializers.py +33 -0
- nautobot/extras/api/urls.py +6 -0
- nautobot/extras/api/views.py +45 -6
- nautobot/extras/context_managers.py +34 -8
- nautobot/extras/factory.py +28 -2
- nautobot/extras/filters/__init__.py +52 -0
- nautobot/extras/filters/mixins.py +4 -29
- nautobot/extras/forms/forms.py +43 -0
- nautobot/extras/jobs.py +39 -17
- nautobot/extras/migrations/0100_fileproxy_job_result.py +32 -0
- nautobot/extras/migrations/0101_externalintegration.py +61 -0
- nautobot/extras/migrations/0102_set_null_objectchange_contenttype.py +32 -0
- nautobot/extras/models/__init__.py +2 -0
- nautobot/extras/models/change_logging.py +2 -2
- nautobot/extras/models/customfields.py +2 -2
- nautobot/extras/models/models.py +101 -18
- nautobot/extras/models/relationships.py +13 -8
- nautobot/extras/navigation.py +17 -29
- nautobot/extras/signals.py +80 -59
- nautobot/extras/tables.py +28 -2
- nautobot/extras/templates/extras/externalintegration_retrieve.html +37 -0
- nautobot/extras/templates/extras/inc/jobresult.html +24 -0
- nautobot/extras/templates/extras/jobresult.html +24 -0
- nautobot/extras/templatetags/computed_fields.py +6 -13
- nautobot/extras/templatetags/custom_links.py +19 -12
- nautobot/extras/templatetags/job_buttons.py +34 -19
- nautobot/extras/templatetags/plugins.py +1 -1
- nautobot/extras/test_jobs/file_output.py +16 -0
- nautobot/extras/tests/test_api.py +92 -0
- nautobot/extras/tests/test_context_managers.py +94 -4
- nautobot/extras/tests/test_customfields.py +1 -1
- nautobot/extras/tests/test_filters.py +64 -2
- nautobot/extras/tests/test_jobs.py +75 -22
- nautobot/extras/tests/test_models.py +34 -0
- nautobot/extras/tests/test_relationships.py +2 -2
- nautobot/extras/tests/test_views.py +204 -4
- nautobot/extras/tests/test_webhooks.py +61 -25
- nautobot/extras/urls.py +1 -0
- nautobot/extras/views.py +27 -13
- nautobot/extras/webhooks.py +16 -25
- nautobot/ipam/fields.py +5 -0
- nautobot/ipam/forms.py +16 -0
- nautobot/ipam/models.py +13 -2
- nautobot/ipam/navigation.py +2 -59
- nautobot/ipam/tables.py +1 -1
- nautobot/ipam/templates/ipam/ipaddress.html +0 -9
- nautobot/ipam/templates/ipam/prefix.html +0 -9
- nautobot/ipam/tests/features/prefixes.feature +134 -0
- nautobot/ipam/tests/test_filters.py +5 -10
- nautobot/ipam/tests/test_models.py +7 -0
- nautobot/ipam/tests/test_views.py +8 -1
- nautobot/ipam/views.py +99 -58
- nautobot/project-static/bootstrap-3.4.1-dist/css/bootstrap-theme.css +191 -191
- nautobot/project-static/bootstrap-3.4.1-dist/css/bootstrap-theme.css.map +1 -1
- nautobot/project-static/bootstrap-3.4.1-dist/css/bootstrap-theme.min.css +1 -1
- nautobot/project-static/bootstrap-3.4.1-dist/css/bootstrap-theme.min.css.map +1 -1
- nautobot/project-static/bootstrap-3.4.1-dist/css/bootstrap.css +874 -881
- nautobot/project-static/bootstrap-3.4.1-dist/css/bootstrap.css.map +1 -1
- nautobot/project-static/bootstrap-3.4.1-dist/css/bootstrap.min.css +1 -1
- nautobot/project-static/bootstrap-3.4.1-dist/css/bootstrap.min.css.map +1 -1
- nautobot/project-static/css/base.css +138 -99
- nautobot/project-static/css/dark.css +65 -6
- nautobot/project-static/docs/404.html +45 -17
- nautobot/project-static/docs/apps/index.html +45 -17
- nautobot/project-static/docs/apps/nautobot-apps.html +45 -17
- nautobot/project-static/docs/code-reference/nautobot/apps/__init__.html +45 -17
- nautobot/project-static/docs/code-reference/nautobot/apps/admin.html +45 -17
- nautobot/project-static/docs/code-reference/nautobot/apps/api.html +1598 -1458
- nautobot/project-static/docs/code-reference/nautobot/apps/change_logging.html +229 -152
- nautobot/project-static/docs/code-reference/nautobot/apps/choices.html +46 -18
- nautobot/project-static/docs/code-reference/nautobot/apps/config.html +45 -17
- nautobot/project-static/docs/code-reference/nautobot/apps/datasources.html +45 -17
- nautobot/project-static/docs/code-reference/nautobot/apps/exceptions.html +45 -17
- nautobot/project-static/docs/code-reference/nautobot/apps/factory.html +45 -17
- nautobot/project-static/docs/code-reference/nautobot/apps/filters.html +354 -433
- nautobot/project-static/docs/code-reference/nautobot/apps/forms.html +67 -39
- nautobot/project-static/docs/code-reference/nautobot/apps/graphql.html +45 -17
- nautobot/project-static/docs/code-reference/nautobot/apps/jobs.html +2083 -2234
- nautobot/project-static/docs/code-reference/nautobot/apps/models.html +1389 -1247
- nautobot/project-static/docs/code-reference/nautobot/apps/querysets.html +45 -17
- nautobot/project-static/docs/code-reference/nautobot/apps/secrets.html +45 -17
- nautobot/project-static/docs/code-reference/nautobot/apps/tables.html +129 -111
- nautobot/project-static/docs/code-reference/nautobot/apps/testing.html +3601 -3457
- nautobot/project-static/docs/code-reference/nautobot/apps/ui.html +45 -17
- nautobot/project-static/docs/code-reference/nautobot/apps/urls.html +45 -17
- nautobot/project-static/docs/code-reference/nautobot/apps/utils.html +320 -284
- nautobot/project-static/docs/code-reference/nautobot/apps/views.html +3863 -3801
- nautobot/project-static/docs/development/apps/api/configuration-view.html +45 -17
- nautobot/project-static/docs/development/apps/api/database-backend-config.html +45 -17
- nautobot/project-static/docs/development/apps/api/models/django-admin.html +45 -17
- nautobot/project-static/docs/development/apps/api/models/global-search.html +45 -17
- nautobot/project-static/docs/development/apps/api/models/graphql.html +45 -17
- nautobot/project-static/docs/development/apps/api/models/index.html +45 -17
- nautobot/project-static/docs/development/apps/api/nautobot-app-config.html +45 -17
- nautobot/project-static/docs/development/apps/api/platform-features/custom-validators.html +45 -17
- nautobot/project-static/docs/development/apps/api/platform-features/filter-extensions.html +45 -17
- nautobot/project-static/docs/development/apps/api/platform-features/git-repository-content.html +45 -17
- nautobot/project-static/docs/development/apps/api/platform-features/index.html +45 -17
- nautobot/project-static/docs/development/apps/api/platform-features/jinja2-filters.html +45 -17
- nautobot/project-static/docs/development/apps/api/platform-features/jobs.html +45 -17
- nautobot/project-static/docs/development/apps/api/platform-features/populating-extensibility-features.html +45 -17
- nautobot/project-static/docs/development/apps/api/platform-features/secrets-providers.html +45 -17
- nautobot/project-static/docs/development/apps/api/platform-features/uniquely-identify-objects.html +45 -17
- nautobot/project-static/docs/development/apps/api/prometheus.html +45 -17
- nautobot/project-static/docs/development/apps/api/setup.html +45 -17
- nautobot/project-static/docs/development/apps/api/testing.html +45 -17
- nautobot/project-static/docs/development/apps/api/ui-extensions/banners.html +45 -17
- nautobot/project-static/docs/development/apps/api/ui-extensions/home-page.html +45 -17
- nautobot/project-static/docs/development/apps/api/ui-extensions/index.html +45 -17
- nautobot/project-static/docs/development/apps/api/ui-extensions/navigation.html +45 -17
- nautobot/project-static/docs/development/apps/api/ui-extensions/object-detail-views.html +45 -17
- nautobot/project-static/docs/development/apps/api/ui-extensions/tabs.html +45 -17
- nautobot/project-static/docs/development/apps/api/views/base-template.html +45 -17
- nautobot/project-static/docs/development/apps/api/views/core-view-overrides.html +45 -17
- nautobot/project-static/docs/development/apps/api/views/django-generic-views.html +45 -17
- nautobot/project-static/docs/development/apps/api/views/help-documentation.html +45 -17
- nautobot/project-static/docs/development/apps/api/views/index.html +45 -17
- nautobot/project-static/docs/development/apps/api/views/nautobot-generic-views.html +45 -17
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewset.html +45 -17
- nautobot/project-static/docs/development/apps/api/views/nautobotuiviewsetrouter.html +45 -17
- nautobot/project-static/docs/development/apps/api/views/notes.html +45 -17
- nautobot/project-static/docs/development/apps/api/views/rest-api.html +45 -17
- nautobot/project-static/docs/development/apps/api/views/urls.html +45 -17
- nautobot/project-static/docs/development/apps/api/views/view-overrides.html +45 -17
- nautobot/project-static/docs/development/apps/index.html +45 -17
- nautobot/project-static/docs/development/apps/migration/code-updates.html +45 -17
- nautobot/project-static/docs/development/apps/migration/dependency-updates.html +45 -17
- nautobot/project-static/docs/development/apps/migration/from-v1.html +45 -17
- nautobot/project-static/docs/development/apps/migration/model-updates/dcim.html +45 -17
- nautobot/project-static/docs/development/apps/migration/model-updates/extras.html +45 -17
- nautobot/project-static/docs/development/apps/migration/model-updates/global.html +45 -17
- nautobot/project-static/docs/development/apps/migration/model-updates/ipam.html +45 -17
- nautobot/project-static/docs/development/apps/porting-from-netbox.html +45 -17
- nautobot/project-static/docs/development/core/application-registry.html +45 -17
- nautobot/project-static/docs/development/core/best-practices.html +45 -17
- nautobot/project-static/docs/development/core/docker-compose-advanced-use-cases.html +45 -17
- nautobot/project-static/docs/development/core/extending-models.html +45 -17
- nautobot/project-static/docs/development/core/generic-views.html +45 -17
- nautobot/project-static/docs/development/core/getting-started.html +45 -17
- nautobot/project-static/docs/development/core/homepage.html +45 -17
- nautobot/project-static/docs/development/core/index.html +45 -17
- nautobot/project-static/docs/development/core/model-features.html +45 -17
- nautobot/project-static/docs/development/core/natural-keys.html +45 -17
- nautobot/project-static/docs/development/core/navigation-menu.html +45 -22
- nautobot/project-static/docs/development/core/react-ui.html +45 -17
- nautobot/project-static/docs/development/core/release-checklist.html +46 -18
- nautobot/project-static/docs/development/core/role-internals.html +45 -17
- nautobot/project-static/docs/development/core/style-guide.html +45 -17
- nautobot/project-static/docs/development/core/templates.html +45 -17
- nautobot/project-static/docs/development/core/testing.html +45 -17
- nautobot/project-static/docs/development/core/user-preferences.html +45 -17
- nautobot/project-static/docs/development/index.html +45 -17
- nautobot/project-static/docs/development/jobs/index.html +281 -235
- nautobot/project-static/docs/development/jobs/migration/from-v1.html +45 -17
- nautobot/project-static/docs/index.html +45 -17
- nautobot/project-static/docs/media/nautobot_application_stack_low_level.png +0 -0
- nautobot/project-static/docs/media/nautobot_application_stack_low_level.txt +1 -0
- nautobot/project-static/docs/objects.inv +0 -0
- nautobot/project-static/docs/release-notes/index.html +48 -20
- nautobot/project-static/docs/release-notes/version-1.0.html +45 -17
- nautobot/project-static/docs/release-notes/version-1.1.html +45 -17
- nautobot/project-static/docs/release-notes/version-1.2.html +45 -17
- nautobot/project-static/docs/release-notes/version-1.3.html +45 -17
- nautobot/project-static/docs/release-notes/version-1.4.html +45 -17
- nautobot/project-static/docs/release-notes/version-1.5.html +45 -17
- nautobot/project-static/docs/release-notes/version-1.6.html +46 -18
- nautobot/project-static/docs/release-notes/version-2.0.html +372 -199
- nautobot/project-static/docs/release-notes/version-2.1.html +5724 -0
- nautobot/project-static/docs/requirements.txt +1 -1
- nautobot/project-static/docs/search/search_index.json +1 -1
- nautobot/project-static/docs/sitemap.xml +247 -237
- nautobot/project-static/docs/sitemap.xml.gz +0 -0
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/ldap.html +45 -17
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/remote.html +45 -17
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/sso.html +45 -17
- nautobot/project-static/docs/user-guide/administration/configuration/index.html +45 -17
- nautobot/project-static/docs/user-guide/administration/configuration/node-configuration.html +45 -17
- nautobot/project-static/docs/user-guide/administration/configuration/optional-settings.html +110 -44
- nautobot/project-static/docs/user-guide/administration/configuration/required-settings.html +45 -17
- nautobot/project-static/docs/user-guide/administration/guides/caching.html +48 -20
- nautobot/project-static/docs/user-guide/administration/guides/celery-queues.html +45 -17
- nautobot/project-static/docs/user-guide/administration/guides/healthcheck.html +45 -17
- nautobot/project-static/docs/user-guide/administration/guides/permissions.html +45 -17
- nautobot/project-static/docs/user-guide/administration/guides/prometheus-metrics.html +45 -17
- nautobot/project-static/docs/user-guide/administration/guides/replicating-nautobot.html +45 -17
- nautobot/project-static/docs/user-guide/administration/guides/s3-django-storage.html +49 -20
- nautobot/project-static/docs/user-guide/administration/installation/app-install.html +45 -17
- nautobot/project-static/docs/user-guide/administration/installation/docker.html +45 -17
- nautobot/project-static/docs/user-guide/administration/installation/external-authentication.html +45 -17
- nautobot/project-static/docs/user-guide/administration/installation/http-server.html +45 -17
- nautobot/project-static/docs/user-guide/administration/installation/index.html +45 -17
- nautobot/project-static/docs/user-guide/administration/installation/install_system.html +45 -17
- nautobot/project-static/docs/user-guide/administration/installation/nautobot.html +45 -17
- nautobot/project-static/docs/user-guide/administration/installation/selinux-troubleshooting.html +45 -17
- nautobot/project-static/docs/user-guide/administration/installation/services.html +45 -17
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-netbox.html +45 -17
- nautobot/project-static/docs/user-guide/administration/migration/migrating-from-postgresql.html +45 -17
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-server.html +45 -17
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-shell.html +45 -17
- nautobot/project-static/docs/user-guide/administration/upgrading/database-backup.html +45 -17
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/after-you-upgrade.html +45 -17
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/before-you-upgrade.html +45 -17
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/for-developers.html +45 -17
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/index.html +45 -17
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/whats-changed.html +45 -17
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/region-and-site-data-migration-guide.html +45 -17
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +45 -17
- nautobot/project-static/docs/user-guide/administration/upgrading/upgrading.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuit.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittermination.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittype.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/circuits/provider.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/circuits/providernetwork.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/cable.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleport.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleporttemplate.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverport.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverporttemplate.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/device.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebay.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebaytemplate.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/deviceredundancygroup.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/devicetype.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontport.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/frontporttemplate.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interface.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfaceredundancygroup.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/interfacetemplate.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/inventoryitem.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/location.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/locationtype.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/manufacturer.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/platform.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerfeed.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlet.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlettemplate.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerpanel.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerport.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/powerporttemplate.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rack.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackgroup.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rackreservation.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearport.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/rearporttemplate.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualchassis.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontext.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/extras/configcontextschema.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/ipam/ipaddress.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/ipam/namespace.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/ipam/prefix.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/ipam/rir.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/ipam/routetarget.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/ipam/service.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlan.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vlangroup.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/ipam/vrf.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenant.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenantgroup.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/cluster.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustergroup.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustertype.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/virtualmachine.html +45 -17
- nautobot/project-static/docs/user-guide/core-data-model/virtualization/vminterface.html +45 -17
- nautobot/project-static/docs/user-guide/feature-guides/custom-fields.html +45 -17
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-devices.html +45 -17
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-location-types-and-locations.html +45 -17
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/index.html +45 -17
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/interfaces.html +45 -17
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/ipam.html +45 -17
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/platforms.html +45 -17
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/search-bar.html +45 -17
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/tenants.html +45 -17
- nautobot/project-static/docs/user-guide/feature-guides/getting-started/vlans-and-vlan-groups.html +45 -17
- nautobot/project-static/docs/user-guide/feature-guides/git-data-source.html +45 -17
- nautobot/project-static/docs/user-guide/feature-guides/graphql.html +45 -17
- nautobot/project-static/docs/user-guide/feature-guides/ip-address-merge-tool.html +45 -17
- nautobot/project-static/docs/user-guide/feature-guides/relationships.html +45 -17
- nautobot/project-static/docs/user-guide/index.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/change-logging.html +111 -17
- nautobot/project-static/docs/user-guide/platform-functionality/computedfield.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/customfield.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/customlink.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/dynamicgroup.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/exporttemplate.html +48 -20
- nautobot/project-static/docs/user-guide/platform-functionality/externalintegration.html +5359 -0
- nautobot/project-static/docs/user-guide/platform-functionality/gitrepository.html +48 -20
- nautobot/project-static/docs/user-guide/platform-functionality/graphql.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/graphqlquery.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/imageattachment.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/index.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/job-scheduling-and-approvals.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobbutton.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobhook.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/models.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/napalm.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/note.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/relationship.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/authentication.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/filtering.html +114 -45
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/overview.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/rest-api/ui-related-endpoints.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/role.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/secret.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/status.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/tag.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/template-filters.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/users/objectpermission.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/users/token.html +45 -17
- nautobot/project-static/docs/user-guide/platform-functionality/webhook.html +45 -17
- nautobot/project-static/fonts/UFL.txt +96 -0
- nautobot/project-static/fonts/Ubuntu-Bold.woff2 +0 -0
- nautobot/project-static/fonts/Ubuntu-BoldItalic.woff2 +0 -0
- nautobot/project-static/fonts/Ubuntu-Italic.woff2 +0 -0
- nautobot/project-static/fonts/Ubuntu-Medium.woff2 +0 -0
- nautobot/project-static/fonts/Ubuntu-MediumItalic.woff2 +0 -0
- nautobot/project-static/fonts/Ubuntu-Regular.woff2 +0 -0
- nautobot/project-static/fonts/UbuntuMono-Bold.woff2 +0 -0
- nautobot/project-static/fonts/UbuntuMono-BoldItalic.woff2 +0 -0
- nautobot/project-static/fonts/UbuntuMono-Italic.woff2 +0 -0
- nautobot/project-static/fonts/UbuntuMono-Regular.woff2 +0 -0
- nautobot/project-static/img/dark-theme.png +0 -0
- nautobot/project-static/img/light-theme.png +0 -0
- nautobot/project-static/img/nautobot_chevron.svg +5 -0
- nautobot/project-static/img/nautobot_chevron_header.svg +5 -0
- nautobot/project-static/img/system-theme.png +0 -0
- nautobot/tenancy/navigation.py +0 -13
- nautobot/ui/package-lock.json +2 -2
- nautobot/ui/package.json +1 -1
- nautobot/users/admin.py +44 -0
- nautobot/users/migrations/0007_alter_objectpermission_object_types.py +33 -0
- nautobot/users/models.py +3 -2
- nautobot/virtualization/navigation.py +1 -33
- nautobot/virtualization/tests/test_api.py +1 -1
- nautobot/virtualization/tests/test_filters.py +1 -1
- {nautobot-2.0.4.dist-info → nautobot-2.1.0b1.dist-info}/METADATA +2 -2
- {nautobot-2.0.4.dist-info → nautobot-2.1.0b1.dist-info}/RECORD +405 -786
- CHANGELOG.md +0 -3
- CONTRIBUTING.md +0 -3
- NOTICE +0 -8
- nautobot/docs/apps/index.md +0 -22
- nautobot/docs/apps/nautobot-apps.md +0 -10
- nautobot/docs/assets/app-icons/icon-ChatOps.png +0 -0
- nautobot/docs/assets/app-icons/icon-DataValidationEngine.png +0 -0
- nautobot/docs/assets/app-icons/icon-DeviceLifecycle.png +0 -0
- nautobot/docs/assets/app-icons/icon-DeviceOnboarding.png +0 -0
- nautobot/docs/assets/app-icons/icon-FirewallModels.png +0 -0
- nautobot/docs/assets/app-icons/icon-GoldenConfiguration.png +0 -0
- nautobot/docs/assets/app-icons/icon-NautobotPluginNornir.png +0 -0
- nautobot/docs/assets/app-icons/icon-SSoT.png +0 -0
- nautobot/docs/assets/extra.css +0 -139
- nautobot/docs/assets/favicon.ico +0 -0
- nautobot/docs/assets/nautobot_logo.png +0 -0
- nautobot/docs/assets/nautobot_logo.svg +0 -131
- nautobot/docs/assets/networktocode_bw.png +0 -0
- nautobot/docs/assets/overrides/partials/copyright.html +0 -20
- nautobot/docs/development/apps/api/configuration-view.md +0 -35
- nautobot/docs/development/apps/api/database-backend-config.md +0 -26
- nautobot/docs/development/apps/api/models/django-admin.md +0 -20
- nautobot/docs/development/apps/api/models/global-search.md +0 -11
- nautobot/docs/development/apps/api/models/graphql.md +0 -97
- nautobot/docs/development/apps/api/models/index.md +0 -81
- nautobot/docs/development/apps/api/nautobot-app-config.md +0 -84
- nautobot/docs/development/apps/api/platform-features/custom-validators.md +0 -30
- nautobot/docs/development/apps/api/platform-features/filter-extensions.md +0 -49
- nautobot/docs/development/apps/api/platform-features/git-repository-content.md +0 -62
- nautobot/docs/development/apps/api/platform-features/index.md +0 -1
- nautobot/docs/development/apps/api/platform-features/jinja2-filters.md +0 -28
- nautobot/docs/development/apps/api/platform-features/jobs.md +0 -29
- nautobot/docs/development/apps/api/platform-features/populating-extensibility-features.md +0 -58
- nautobot/docs/development/apps/api/platform-features/secrets-providers.md +0 -64
- nautobot/docs/development/apps/api/platform-features/uniquely-identify-objects.md +0 -63
- nautobot/docs/development/apps/api/prometheus.md +0 -25
- nautobot/docs/development/apps/api/setup.md +0 -132
- nautobot/docs/development/apps/api/testing.md +0 -55
- nautobot/docs/development/apps/api/ui-extensions/banners.md +0 -26
- nautobot/docs/development/apps/api/ui-extensions/home-page.md +0 -9
- nautobot/docs/development/apps/api/ui-extensions/index.md +0 -1
- nautobot/docs/development/apps/api/ui-extensions/navigation.md +0 -15
- nautobot/docs/development/apps/api/ui-extensions/object-detail-views.md +0 -74
- nautobot/docs/development/apps/api/ui-extensions/tabs.md +0 -52
- nautobot/docs/development/apps/api/views/base-template.md +0 -38
- nautobot/docs/development/apps/api/views/core-view-overrides.md +0 -26
- nautobot/docs/development/apps/api/views/django-generic-views.md +0 -23
- nautobot/docs/development/apps/api/views/help-documentation.md +0 -16
- nautobot/docs/development/apps/api/views/index.md +0 -3
- nautobot/docs/development/apps/api/views/nautobot-generic-views.md +0 -35
- nautobot/docs/development/apps/api/views/nautobotuiviewset.md +0 -147
- nautobot/docs/development/apps/api/views/nautobotuiviewsetrouter.md +0 -41
- nautobot/docs/development/apps/api/views/notes.md +0 -25
- nautobot/docs/development/apps/api/views/rest-api.md +0 -64
- nautobot/docs/development/apps/api/views/urls.md +0 -26
- nautobot/docs/development/apps/api/views/view-overrides.md +0 -50
- nautobot/docs/development/apps/index.md +0 -75
- nautobot/docs/development/apps/migration/code-updates.md +0 -160
- nautobot/docs/development/apps/migration/dependency-updates.md +0 -13
- nautobot/docs/development/apps/migration/from-v1.md +0 -56
- nautobot/docs/development/apps/migration/model-updates/dcim.md +0 -285
- nautobot/docs/development/apps/migration/model-updates/extras.md +0 -30
- nautobot/docs/development/apps/migration/model-updates/global.md +0 -5
- nautobot/docs/development/apps/migration/model-updates/ipam.md +0 -22
- nautobot/docs/development/apps/porting-from-netbox.md +0 -23
- nautobot/docs/development/core/application-registry.md +0 -216
- nautobot/docs/development/core/best-practices.md +0 -469
- nautobot/docs/development/core/docker-compose-advanced-use-cases.md +0 -228
- nautobot/docs/development/core/extending-models.md +0 -93
- nautobot/docs/development/core/generic-views.md +0 -65
- nautobot/docs/development/core/getting-started.md +0 -859
- nautobot/docs/development/core/homepage.md +0 -63
- nautobot/docs/development/core/index.md +0 -334
- nautobot/docs/development/core/model-features.md +0 -44
- nautobot/docs/development/core/natural-keys.md +0 -121
- nautobot/docs/development/core/navigation-menu.md +0 -142
- nautobot/docs/development/core/react-ui.md +0 -137
- nautobot/docs/development/core/release-checklist.md +0 -312
- nautobot/docs/development/core/role-internals.md +0 -28
- nautobot/docs/development/core/style-guide.md +0 -200
- nautobot/docs/development/core/templates.md +0 -101
- nautobot/docs/development/core/testing.md +0 -238
- nautobot/docs/development/core/user-preferences.md +0 -11
- nautobot/docs/development/index.md +0 -1
- nautobot/docs/development/jobs/index.md +0 -835
- nautobot/docs/development/jobs/migration/from-v1.md +0 -160
- nautobot/docs/generate_code_reference_pages.py +0 -20
- nautobot/docs/img/edge_dev_circuit_relationship.png +0 -0
- nautobot/docs/img/leaf_dev_no_circuit_relationship.png +0 -0
- nautobot/docs/img/relationship_w_json_filter.png +0 -0
- nautobot/docs/index.md +0 -105
- nautobot/docs/media/admin_ui_run_permission.png +0 -0
- nautobot/docs/media/development/homepage_changelog_panel.png +0 -0
- nautobot/docs/media/development/homepage_dcim_panel.png +0 -0
- nautobot/docs/media/development/index_bug_wf.jpg +0 -0
- nautobot/docs/media/development/index_feature_request_wf.jpg +0 -0
- nautobot/docs/media/development/index_release_cadence.drawio +0 -90
- nautobot/docs/media/development/index_release_cadence.jpg +0 -0
- nautobot/docs/media/installation/nautobot_ui_admin.png +0 -0
- nautobot/docs/media/installation/nautobot_ui_guest.png +0 -0
- nautobot/docs/media/models/dcim_cable_trace.png +0 -0
- nautobot/docs/media/models/dcim_cable_trace_circuit.png +0 -0
- nautobot/docs/media/models/dynamicgroup_filtering_01.png +0 -0
- nautobot/docs/media/models/dynamicgroup_workflow_advanced_1_01.png +0 -0
- nautobot/docs/media/models/dynamicgroup_workflow_advanced_1_02.png +0 -0
- nautobot/docs/media/models/dynamicgroup_workflow_advanced_1_03.png +0 -0
- nautobot/docs/media/models/dynamicgroup_workflow_advanced_1_04.png +0 -0
- nautobot/docs/media/models/dynamicgroup_workflow_advanced_1_05.png +0 -0
- nautobot/docs/media/models/dynamicgroup_workflow_advanced_2_01.png +0 -0
- nautobot/docs/media/models/dynamicgroup_workflow_advanced_2_02.png +0 -0
- nautobot/docs/media/models/dynamicgroup_workflow_advanced_2_03.png +0 -0
- nautobot/docs/media/models/dynamicgroup_workflow_advanced_2_04.png +0 -0
- nautobot/docs/media/models/dynamicgroup_workflow_advanced_2_05.png +0 -0
- nautobot/docs/media/models/dynamicgroup_workflow_advanced_2_06.png +0 -0
- nautobot/docs/media/models/dynamicgroup_workflow_advanced_2_07.png +0 -0
- nautobot/docs/media/models/dynamicgroup_workflow_basic_01.png +0 -0
- nautobot/docs/media/models/dynamicgroup_workflow_basic_02.png +0 -0
- nautobot/docs/media/models/dynamicgroup_workflow_basic_03.png +0 -0
- nautobot/docs/media/models/jobbutton_form.png +0 -0
- nautobot/docs/media/models/site_jobbuttons.png +0 -0
- nautobot/docs/media/nautobot_application_stack_high_level.drawio +0 -1
- nautobot/docs/media/nautobot_application_stack_high_level.png +0 -0
- nautobot/docs/media/nautobot_application_stack_low_level.drawio +0 -1
- nautobot/docs/media/nautobot_application_stack_low_level.png +0 -0
- nautobot/docs/media/nautobot_chatops.gif +0 -0
- nautobot/docs/media/nautobot_config_context.gif +0 -0
- nautobot/docs/media/nautobot_golden_config.gif +0 -0
- nautobot/docs/media/nautobot_graphql.gif +0 -0
- nautobot/docs/media/nautobot_mainpage.gif +0 -0
- nautobot/docs/media/nautobot_prefix_hierarchy.gif +0 -0
- nautobot/docs/media/plugins/plugin_admin_config.png +0 -0
- nautobot/docs/media/plugins/plugin_admin_ui.png +0 -0
- nautobot/docs/media/plugins/plugin_rest_api_endpoint.png +0 -0
- nautobot/docs/media/power_distribution.png +0 -0
- nautobot/docs/media/ss_config_contexts.png +0 -0
- nautobot/docs/media/ss_graphiql.png +0 -0
- nautobot/docs/media/ss_main_page.png +0 -0
- nautobot/docs/media/ss_plugin_chatops.png +0 -0
- nautobot/docs/media/ss_plugin_golden_config.png +0 -0
- nautobot/docs/media/ss_prefix_hierarchy.png +0 -0
- nautobot/docs/media/user-guide/administration/guides/s3-django-storage/user-guide-s3-1.png +0 -0
- nautobot/docs/media/user-guide/administration/guides/s3-django-storage/user-guide-s3-2.png +0 -0
- nautobot/docs/media/user-guide/administration/upgrading/from-v1/ipam/tenant-affinity.png +0 -0
- nautobot/docs/nautobot_logo.png +0 -0
- nautobot/docs/nautobot_logo.svg +0 -131
- nautobot/docs/release-notes/index.md +0 -3
- nautobot/docs/release-notes/version-1.0.md +0 -530
- nautobot/docs/release-notes/version-1.1.md +0 -337
- nautobot/docs/release-notes/version-1.2.md +0 -509
- nautobot/docs/release-notes/version-1.3.md +0 -554
- nautobot/docs/release-notes/version-1.4.md +0 -677
- nautobot/docs/release-notes/version-1.5.md +0 -840
- nautobot/docs/release-notes/version-1.6.md +0 -290
- nautobot/docs/release-notes/version-2.0.md +0 -1359
- nautobot/docs/requirements.txt +0 -12
- nautobot/docs/user-guide/administration/configuration/authentication/ldap.md +0 -286
- nautobot/docs/user-guide/administration/configuration/authentication/remote.md +0 -46
- nautobot/docs/user-guide/administration/configuration/authentication/sso.md +0 -528
- nautobot/docs/user-guide/administration/configuration/index.md +0 -190
- nautobot/docs/user-guide/administration/configuration/node-configuration.md +0 -31
- nautobot/docs/user-guide/administration/configuration/optional-settings.md +0 -1302
- nautobot/docs/user-guide/administration/configuration/required-settings.md +0 -244
- nautobot/docs/user-guide/administration/guides/caching.md +0 -108
- nautobot/docs/user-guide/administration/guides/celery-queues.md +0 -42
- nautobot/docs/user-guide/administration/guides/healthcheck.md +0 -11
- nautobot/docs/user-guide/administration/guides/permissions.md +0 -98
- nautobot/docs/user-guide/administration/guides/prometheus-metrics.md +0 -55
- nautobot/docs/user-guide/administration/guides/replicating-nautobot.md +0 -70
- nautobot/docs/user-guide/administration/guides/s3-django-storage.md +0 -145
- nautobot/docs/user-guide/administration/installation/app-install.md +0 -94
- nautobot/docs/user-guide/administration/installation/docker.md +0 -286
- nautobot/docs/user-guide/administration/installation/external-authentication.md +0 -9
- nautobot/docs/user-guide/administration/installation/http-server.md +0 -279
- nautobot/docs/user-guide/administration/installation/index.md +0 -101
- nautobot/docs/user-guide/administration/installation/install_system.md +0 -493
- nautobot/docs/user-guide/administration/installation/nautobot.md +0 -367
- nautobot/docs/user-guide/administration/installation/selinux-troubleshooting.md +0 -194
- nautobot/docs/user-guide/administration/installation/services.md +0 -340
- nautobot/docs/user-guide/administration/migration/migrating-from-netbox.md +0 -336
- nautobot/docs/user-guide/administration/migration/migrating-from-postgresql.md +0 -122
- nautobot/docs/user-guide/administration/tools/nautobot-server.md +0 -858
- nautobot/docs/user-guide/administration/tools/nautobot-shell.md +0 -263
- nautobot/docs/user-guide/administration/upgrading/database-backup.md +0 -11
- nautobot/docs/user-guide/administration/upgrading/from-v1/ipam/after-you-upgrade.md +0 -55
- nautobot/docs/user-guide/administration/upgrading/from-v1/ipam/before-you-upgrade.md +0 -73
- nautobot/docs/user-guide/administration/upgrading/from-v1/ipam/for-developers.md +0 -211
- nautobot/docs/user-guide/administration/upgrading/from-v1/ipam/index.md +0 -16
- nautobot/docs/user-guide/administration/upgrading/from-v1/ipam/whats-changed.md +0 -157
- nautobot/docs/user-guide/administration/upgrading/from-v1/region-and-site-data-migration-guide.md +0 -153
- nautobot/docs/user-guide/administration/upgrading/from-v1/tables/v2-api-behavior-changes.yaml +0 -82
- nautobot/docs/user-guide/administration/upgrading/from-v1/tables/v2-api-removed-fields.yaml +0 -175
- nautobot/docs/user-guide/administration/upgrading/from-v1/tables/v2-api-renamed-fields.yaml +0 -124
- nautobot/docs/user-guide/administration/upgrading/from-v1/tables/v2-code-location-changes.yaml +0 -241
- nautobot/docs/user-guide/administration/upgrading/from-v1/tables/v2-code-removals.yaml +0 -57
- nautobot/docs/user-guide/administration/upgrading/from-v1/tables/v2-code-renames.yaml +0 -5
- nautobot/docs/user-guide/administration/upgrading/from-v1/tables/v2-database-behavior-changes.yaml +0 -76
- nautobot/docs/user-guide/administration/upgrading/from-v1/tables/v2-database-removed-fields.yaml +0 -202
- nautobot/docs/user-guide/administration/upgrading/from-v1/tables/v2-database-renamed-fields.yaml +0 -343
- nautobot/docs/user-guide/administration/upgrading/from-v1/tables/v2-filters-corrected-fields.yaml +0 -31
- nautobot/docs/user-guide/administration/upgrading/from-v1/tables/v2-filters-enhanced-fields.yaml +0 -244
- nautobot/docs/user-guide/administration/upgrading/from-v1/tables/v2-filters-removed-fields.yaml +0 -595
- nautobot/docs/user-guide/administration/upgrading/from-v1/tables/v2-filters-renamed-fields.yaml +0 -253
- nautobot/docs/user-guide/administration/upgrading/from-v1/tables/v2-logging-renamed-loggers.yaml +0 -23
- nautobot/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.md +0 -574
- nautobot/docs/user-guide/administration/upgrading/upgrading.md +0 -127
- nautobot/docs/user-guide/core-data-model/circuits/circuit.md +0 -19
- nautobot/docs/user-guide/core-data-model/circuits/circuittermination.md +0 -10
- nautobot/docs/user-guide/core-data-model/circuits/circuittype.md +0 -8
- nautobot/docs/user-guide/core-data-model/circuits/provider.md +0 -5
- nautobot/docs/user-guide/core-data-model/circuits/providernetwork.md +0 -7
- nautobot/docs/user-guide/core-data-model/dcim/cable.md +0 -43
- nautobot/docs/user-guide/core-data-model/dcim/consoleport.md +0 -8
- nautobot/docs/user-guide/core-data-model/dcim/consoleporttemplate.md +0 -6
- nautobot/docs/user-guide/core-data-model/dcim/consoleserverport.md +0 -8
- nautobot/docs/user-guide/core-data-model/dcim/consoleserverporttemplate.md +0 -6
- nautobot/docs/user-guide/core-data-model/dcim/device.md +0 -29
- nautobot/docs/user-guide/core-data-model/dcim/devicebay.md +0 -11
- nautobot/docs/user-guide/core-data-model/dcim/devicebaytemplate.md +0 -6
- nautobot/docs/user-guide/core-data-model/dcim/deviceredundancygroup.md +0 -279
- nautobot/docs/user-guide/core-data-model/dcim/devicetype.md +0 -44
- nautobot/docs/user-guide/core-data-model/dcim/frontport.md +0 -6
- nautobot/docs/user-guide/core-data-model/dcim/frontporttemplate.md +0 -6
- nautobot/docs/user-guide/core-data-model/dcim/interface.md +0 -34
- nautobot/docs/user-guide/core-data-model/dcim/interfaceredundancygroup.md +0 -24
- nautobot/docs/user-guide/core-data-model/dcim/interfacetemplate.md +0 -6
- nautobot/docs/user-guide/core-data-model/dcim/inventoryitem.md +0 -10
- nautobot/docs/user-guide/core-data-model/dcim/location.md +0 -15
- nautobot/docs/user-guide/core-data-model/dcim/locationtype.md +0 -43
- nautobot/docs/user-guide/core-data-model/dcim/manufacturer.md +0 -3
- nautobot/docs/user-guide/core-data-model/dcim/platform.md +0 -19
- nautobot/docs/user-guide/core-data-model/dcim/powerfeed.md +0 -25
- nautobot/docs/user-guide/core-data-model/dcim/poweroutlet.md +0 -14
- nautobot/docs/user-guide/core-data-model/dcim/poweroutlettemplate.md +0 -6
- nautobot/docs/user-guide/core-data-model/dcim/powerpanel.md +0 -12
- nautobot/docs/user-guide/core-data-model/dcim/powerport.md +0 -15
- nautobot/docs/user-guide/core-data-model/dcim/powerporttemplate.md +0 -6
- nautobot/docs/user-guide/core-data-model/dcim/rack.md +0 -41
- nautobot/docs/user-guide/core-data-model/dcim/rackgroup.md +0 -7
- nautobot/docs/user-guide/core-data-model/dcim/rackreservation.md +0 -3
- nautobot/docs/user-guide/core-data-model/dcim/rearport.md +0 -9
- nautobot/docs/user-guide/core-data-model/dcim/rearporttemplate.md +0 -6
- nautobot/docs/user-guide/core-data-model/dcim/virtualchassis.md +0 -8
- nautobot/docs/user-guide/core-data-model/extras/configcontext.md +0 -78
- nautobot/docs/user-guide/core-data-model/extras/configcontextschema.md +0 -73
- nautobot/docs/user-guide/core-data-model/ipam/ipaddress.md +0 -69
- nautobot/docs/user-guide/core-data-model/ipam/media/ipam_namespace_documentation.drawio +0 -1
- nautobot/docs/user-guide/core-data-model/ipam/media/ipam_namespace_documentation.drawio.svg +0 -4
- nautobot/docs/user-guide/core-data-model/ipam/namespace.md +0 -18
- nautobot/docs/user-guide/core-data-model/ipam/prefix.md +0 -65
- nautobot/docs/user-guide/core-data-model/ipam/rir.md +0 -10
- nautobot/docs/user-guide/core-data-model/ipam/routetarget.md +0 -5
- nautobot/docs/user-guide/core-data-model/ipam/service.md +0 -8
- nautobot/docs/user-guide/core-data-model/ipam/vlan.md +0 -17
- nautobot/docs/user-guide/core-data-model/ipam/vlangroup.md +0 -5
- nautobot/docs/user-guide/core-data-model/ipam/vrf.md +0 -15
- nautobot/docs/user-guide/core-data-model/tenancy/tenant.md +0 -20
- nautobot/docs/user-guide/core-data-model/tenancy/tenantgroup.md +0 -5
- nautobot/docs/user-guide/core-data-model/virtualization/cluster.md +0 -5
- nautobot/docs/user-guide/core-data-model/virtualization/clustergroup.md +0 -3
- nautobot/docs/user-guide/core-data-model/virtualization/clustertype.md +0 -3
- nautobot/docs/user-guide/core-data-model/virtualization/virtualmachine.md +0 -17
- nautobot/docs/user-guide/core-data-model/virtualization/vminterface.md +0 -19
- nautobot/docs/user-guide/feature-guides/custom-fields.md +0 -350
- nautobot/docs/user-guide/feature-guides/getting-started/creating-devices.md +0 -130
- nautobot/docs/user-guide/feature-guides/getting-started/creating-location-types-and-locations.md +0 -113
- nautobot/docs/user-guide/feature-guides/getting-started/index.md +0 -29
- nautobot/docs/user-guide/feature-guides/getting-started/interfaces.md +0 -100
- nautobot/docs/user-guide/feature-guides/getting-started/ipam.md +0 -104
- nautobot/docs/user-guide/feature-guides/getting-started/platforms.md +0 -78
- nautobot/docs/user-guide/feature-guides/getting-started/search-bar.md +0 -40
- nautobot/docs/user-guide/feature-guides/getting-started/tenants.md +0 -40
- nautobot/docs/user-guide/feature-guides/getting-started/vlans-and-vlan-groups.md +0 -87
- nautobot/docs/user-guide/feature-guides/git-data-source.md +0 -307
- nautobot/docs/user-guide/feature-guides/graphql.md +0 -342
- nautobot/docs/user-guide/feature-guides/images/custom-fields/custom_field_choices.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/custom-fields/custom_field_detail_grouped.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/custom-fields/custom_field_detail_label.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/custom-fields/custom_field_edit.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/custom-fields/custom_field_select.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/1-create-location-type.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/10-add-platform.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/11-platforms-page.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/12-add-tenant.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/13-assign-tenant-to-device.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/14-assign-tenant-to-device-2.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/15-create-device-type.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/16-interface-templates.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/17-templated-interfaces.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/18-assign-device-type.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/19-edit-ints-for-lag.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/2-create-manufacturer.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/20-ints-int-lag.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/21-device-type.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/22-create-vlans.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/23-create-vlans-2.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/24-vlan-main-page.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/25-add-vlan-to-interface.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/26-add-vlan-to-interface-2.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/27-add-rir.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/3-create-role.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/30-add-prefix.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/32-add-ip-addr.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/33-assign-address.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/34-assign-address-2.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/35-assign-address-3.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/36-verify-address.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/37-verify-prefix.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/38-verify-prefix2.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/39-address-search.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/4-create-device-type.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/40-addr-main-page.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/41-device-search-results.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/42-address-search-v2.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/43-get-to-device-main-page.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/44-add-platform.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/5-create-device.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/6-create-location.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/7-location-type-page.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/getting-started-nautobot-ui/8-location-page.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/git-as-data-source/01-git-data-source.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/git-as-data-source/02-git-data-source.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/git-as-data-source/03-git-data-source.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/git-as-data-source/04-git-data-source.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/git-as-data-source/05-git-data-source.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/git-as-data-source/06-git-data-source.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/git-as-data-source/07-git-data-source.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/git-as-data-source/08-git-data-source.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/git-as-data-source/09-git-data-source.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/git-as-data-source/10-git-data-source.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/git-as-data-source/11-git-data-source.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/git-as-data-source/12-git-data-source.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/git-as-data-source/13-git-data-source.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/git-as-data-source/14-git-data-source.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/git-as-data-source/15-git-data-source.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/git-as-data-source/16-git-data-source.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/git-as-data-source/17-git-data-source.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/git-as-data-source/18-git-data-source.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/graphql/00-graphiql.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/graphql/01-graphiql-explorer.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/graphql/02-graphiql-explorer-device-query.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/graphql/03-graphiql-explorer-device-attributes.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/graphql/04-graphql-query-01.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/graphql/05-graphiql-autocomplete.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/graphql/06-graphql-query-02.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/graphql/07-graphql-query-03.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/graphql/08-graphql-query-04.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/graphql/09-graphql-query-05.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/graphql/10-graphql-swagger.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/graphql/11-graphql-query-06.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/ip-address-merge-tool/ip_merge_button.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/ip-address-merge-tool/merge_button.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/ip-address-merge-tool/merge_view.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/ip-address-merge-tool/no_more_dup_ips.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/ip-address-merge-tool/skip_button.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/ip-address-merge-tool/unselect_ips.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/relationships/01-relationships.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/relationships/02-relationships.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/relationships/03-relationships.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/relationships/04-relationships.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/relationships/05-relationships.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/relationships/06-relationships.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/relationships/07-relationships.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/relationships/08-relationships.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/relationships/09-relationships.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/relationships/10-relationships.png +0 -0
- nautobot/docs/user-guide/feature-guides/images/relationships/11-relationships.png +0 -0
- nautobot/docs/user-guide/feature-guides/ip-address-merge-tool.md +0 -63
- nautobot/docs/user-guide/feature-guides/relationships.md +0 -125
- nautobot/docs/user-guide/index.md +0 -1
- nautobot/docs/user-guide/platform-functionality/change-logging.md +0 -21
- nautobot/docs/user-guide/platform-functionality/computedfield.md +0 -89
- nautobot/docs/user-guide/platform-functionality/customfield.md +0 -123
- nautobot/docs/user-guide/platform-functionality/customlink.md +0 -59
- nautobot/docs/user-guide/platform-functionality/dynamicgroup.md +0 -660
- nautobot/docs/user-guide/platform-functionality/exporttemplate.md +0 -55
- nautobot/docs/user-guide/platform-functionality/gitrepository.md +0 -353
- nautobot/docs/user-guide/platform-functionality/graphql.md +0 -259
- nautobot/docs/user-guide/platform-functionality/graphqlquery.md +0 -28
- nautobot/docs/user-guide/platform-functionality/imageattachment.md +0 -10
- nautobot/docs/user-guide/platform-functionality/jobs/index.md +0 -193
- nautobot/docs/user-guide/platform-functionality/jobs/job-scheduling-and-approvals.md +0 -78
- nautobot/docs/user-guide/platform-functionality/jobs/jobbutton.md +0 -79
- nautobot/docs/user-guide/platform-functionality/jobs/jobhook.md +0 -15
- nautobot/docs/user-guide/platform-functionality/jobs/models.md +0 -65
- nautobot/docs/user-guide/platform-functionality/napalm.md +0 -85
- nautobot/docs/user-guide/platform-functionality/note.md +0 -7
- nautobot/docs/user-guide/platform-functionality/relationship.md +0 -158
- nautobot/docs/user-guide/platform-functionality/rest-api/authentication.md +0 -67
- nautobot/docs/user-guide/platform-functionality/rest-api/filtering.md +0 -142
- nautobot/docs/user-guide/platform-functionality/rest-api/overview.md +0 -1045
- nautobot/docs/user-guide/platform-functionality/rest-api/ui-related-endpoints.md +0 -9
- nautobot/docs/user-guide/platform-functionality/role.md +0 -17
- nautobot/docs/user-guide/platform-functionality/secret.md +0 -136
- nautobot/docs/user-guide/platform-functionality/status.md +0 -92
- nautobot/docs/user-guide/platform-functionality/tag.md +0 -62
- nautobot/docs/user-guide/platform-functionality/template-filters.md +0 -306
- nautobot/docs/user-guide/platform-functionality/users/objectpermission.md +0 -56
- nautobot/docs/user-guide/platform-functionality/users/token.md +0 -21
- nautobot/docs/user-guide/platform-functionality/webhook.md +0 -137
- nautobot/project-static/docs/media/nautobot_application_stack_low_level.drawio +0 -1
- nautobot/project-static/docs/media/nautobot_chatops.gif +0 -0
- nautobot/project-static/docs/media/nautobot_config_context.gif +0 -0
- nautobot/project-static/docs/media/nautobot_golden_config.gif +0 -0
- nautobot/project-static/docs/media/nautobot_graphql.gif +0 -0
- nautobot/project-static/docs/media/nautobot_mainpage.gif +0 -0
- nautobot/project-static/docs/media/nautobot_prefix_hierarchy.gif +0 -0
- nautobot-2.0.4.dist-info/LICENSE.txt +0 -177
- /LICENSE.txt → /nautobot-2.1.0b1.dist-info/LICENSE.txt +0 -0
- {nautobot-2.0.4.dist-info → nautobot-2.1.0b1.dist-info}/WHEEL +0 -0
- {nautobot-2.0.4.dist-info → nautobot-2.1.0b1.dist-info}/entry_points.txt +0 -0
|
@@ -1,835 +0,0 @@
|
|
|
1
|
-
# Jobs
|
|
2
|
-
|
|
3
|
-
TODO: Jobs authorship introduction
|
|
4
|
-
|
|
5
|
-
## Migrating Jobs from v1 to v2
|
|
6
|
-
|
|
7
|
-
+/- 2.0.0
|
|
8
|
-
See [Migrating Jobs From Nautobot v1](migration/from-v1.md) for more information on how to migrate your existing jobs to Nautobot v2.
|
|
9
|
-
|
|
10
|
-
## Writing Jobs
|
|
11
|
-
|
|
12
|
-
Jobs may be installed in one of three ways:
|
|
13
|
-
|
|
14
|
-
* Manually installed as files in the [`JOBS_ROOT`](../../user-guide/administration/configuration/optional-settings.md#jobs_root) path (which defaults to `$NAUTOBOT_ROOT/jobs/`).
|
|
15
|
-
* The `JOBS_ROOT` directory *must* contain a file named `__init__.py`. Do not delete this file.
|
|
16
|
-
* Each file created within this path is considered a separate module; there is no support for cross-file dependencies (such as a file acting as a common "library" module of functions shared between jobs) for files installed in this way.
|
|
17
|
-
* Imported from an external [Git repository](../../user-guide/platform-functionality/gitrepository.md#jobs).
|
|
18
|
-
* The repository's `jobs/` directory *must* contain a file named `__init__.py`.
|
|
19
|
-
* Each Job file in the repository is considered a separate module; there is no support for cross-file dependencies (such as a file acting as a common "library" module of functions shared between jobs) for files installed in this way.
|
|
20
|
-
* Packaged as part of a [plugin](../apps/api/platform-features/jobs.md).
|
|
21
|
-
* Jobs installed this way are part of the plugin module and can import code from elsewhere in the plugin or even have dependencies on other packages, if needed, via the standard Python packaging mechanisms.
|
|
22
|
-
|
|
23
|
-
In any case, each module holds one or more Jobs (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.
|
|
24
|
-
|
|
25
|
-
For example, we can create a module named `devices.py` 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 `nautobot.apps.jobs.Job`, which provides the base functionality needed to accept user input and log activity.
|
|
26
|
-
|
|
27
|
-
+/- 2.0.0
|
|
28
|
-
All job classes must now be registered with `nautobot.apps.jobs.register_jobs` on module import. For plugins providing jobs, the `register_jobs` method must called from the plugin's `jobs.py` file/submodule at import time. The `register_jobs` method accepts one or more job classes as arguments.
|
|
29
|
-
|
|
30
|
-
!!! warning
|
|
31
|
-
Make sure you are *not* inheriting `extras.jobs.models.Job` instead, otherwise Django will think you want to define a new database model.
|
|
32
|
-
|
|
33
|
-
```python
|
|
34
|
-
from nautobot.apps.jobs import Job, register_jobs
|
|
35
|
-
|
|
36
|
-
class CreateDevices(Job):
|
|
37
|
-
...
|
|
38
|
-
|
|
39
|
-
class DeviceConnectionsReport(Job):
|
|
40
|
-
...
|
|
41
|
-
|
|
42
|
-
class DeviceIPsReport(Job):
|
|
43
|
-
...
|
|
44
|
-
|
|
45
|
-
register_jobs(CreateDevices, DeviceConnectionsReport, DeviceIPsReport)
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Each job class will implement some or all of the following components:
|
|
49
|
-
|
|
50
|
-
* Module and class attributes, providing for default behavior, documentation and discoverability
|
|
51
|
-
* a set of variables for user input via the Nautobot UI (if your job requires any user inputs)
|
|
52
|
-
* a `run()` method, which is the only required attribute on a Job class and receives the user input values, if any
|
|
53
|
-
|
|
54
|
-
It's important to understand that jobs execute on the server asynchronously as background tasks; they log messages and report their status to the database by updating [`JobResult`](../../user-guide/platform-functionality/jobs/models.md#job-results) records and creating [`JobLogEntry`](../../user-guide/platform-functionality/jobs/models.md#job-log-entry) records.
|
|
55
|
-
|
|
56
|
-
!!! note
|
|
57
|
-
When actively developing a Job utilizing a development environment it's important to understand that the "automatically reload when code changes are detected" debugging functionality provided by `nautobot-server runserver` does **not** automatically restart the Celery `worker` process when code changes are made; therefore, it is required to restart the `worker` after each update to your Job source code or else it will continue to run the version of the Job code that was present when it first started.
|
|
58
|
-
|
|
59
|
-
Additionally, as of Nautobot 1.3, the Job database records corresponding to installed Jobs are *not* 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 `nautobot-server migrate` or `nautobot-server post_upgrade` (recommended) or if you manually edit a Job database record to force it to be refreshed.
|
|
60
|
-
|
|
61
|
-
### Module Metadata Attributes
|
|
62
|
-
|
|
63
|
-
#### `name` (Grouping)
|
|
64
|
-
|
|
65
|
-
You can define a global constant called `name` within a job module (the Python file which contains one or more job classes) to set the default grouping under which jobs in this module will be displayed in the Nautobot UI. If this value is not defined, the module's file name will be used. This "grouping" value may also be defined or overridden when editing Job records in the database.
|
|
66
|
-
|
|
67
|
-
!!! note
|
|
68
|
-
In some UI elements and API endpoints, the module file name is displayed in addition to or in place of this attribute, so even if defining this attribute, you should still choose an appropriately explanatory file name as well.
|
|
69
|
-
|
|
70
|
-
### Class Metadata Attributes
|
|
71
|
-
|
|
72
|
-
Job-specific attributes may be defined under a class named `Meta` within each job class you implement. All of these are optional, but encouraged.
|
|
73
|
-
|
|
74
|
-
#### `name`
|
|
75
|
-
|
|
76
|
-
This is the human-friendly name of your job, as will be displayed in the Nautobot UI. If not set, the class name will be used.
|
|
77
|
-
|
|
78
|
-
!!! note
|
|
79
|
-
In some UI elements and API endpoints, the class name is displayed in addition to or in place of this attribute, so even if defining this attribute, you should still choose an appropriately explanatory class name as well.
|
|
80
|
-
|
|
81
|
-
#### `description`
|
|
82
|
-
|
|
83
|
-
An optional human-friendly description of what this job does.
|
|
84
|
-
This can accept either plain text or Markdown-formatted text. It can also be multiple lines:
|
|
85
|
-
|
|
86
|
-
```python
|
|
87
|
-
class ExampleJob(Job):
|
|
88
|
-
class Meta:
|
|
89
|
-
description = """
|
|
90
|
-
This job does a number of interesting things.
|
|
91
|
-
|
|
92
|
-
1. It hacks the Gibson
|
|
93
|
-
2. It immanentizes the eschaton
|
|
94
|
-
3. It's a floor wax *and* a dessert topping
|
|
95
|
-
"""
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
If you code a multi-line description, the first line only will be used in the description column of the jobs list, while the full description will be rendered in the job detail view, submission, approval, and results pages.
|
|
99
|
-
|
|
100
|
-
#### `approval_required`
|
|
101
|
-
|
|
102
|
-
Default: `False`
|
|
103
|
-
|
|
104
|
-
A boolean that will mark this job as requiring approval from another user to be run. For more details on approvals, [please refer to the section on scheduling and approvals](../../user-guide/platform-functionality/jobs/job-scheduling-and-approvals.md).
|
|
105
|
-
|
|
106
|
-
#### `dryrun_default`
|
|
107
|
-
|
|
108
|
-
+/- 2.0.0
|
|
109
|
-
The `commit_default` field was renamed to `dryrun_default` and the default value was changed from `True` to `False`. The `commit` functionality that provided an automatic rollback of database changes if the job failed was removed. The `dryrun` functionality was added to provide a way to bypass job approval if a job implements a [`DryRunVar`](#dryrunvar).
|
|
110
|
-
|
|
111
|
-
Default: `False`
|
|
112
|
-
|
|
113
|
-
The checkbox to enable dryrun when executing a job is unchecked by default in the Nautobot UI. You can set `dryrun_default` to `True` under the `Meta` class if you want this option to instead be checked by default.
|
|
114
|
-
|
|
115
|
-
```python
|
|
116
|
-
class MyJob(Job):
|
|
117
|
-
class Meta:
|
|
118
|
-
dryrun_default = True
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
#### `field_order`
|
|
122
|
-
|
|
123
|
-
Default: `[]`
|
|
124
|
-
|
|
125
|
-
A list of strings (field names) representing the order your job [variables](#variables) 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.
|
|
126
|
-
|
|
127
|
-
#### `has_sensitive_variables`
|
|
128
|
-
|
|
129
|
-
+++ 1.3.10
|
|
130
|
-
|
|
131
|
-
Default: `True`
|
|
132
|
-
|
|
133
|
-
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 *does* contain sensitive inputs, if possible you should consider whether the job could be re-implemented using Nautobot's [`Secrets`](../../user-guide/platform-functionality/secret.md) feature as a way to ensure that the sensitive data is not directly provided as a job variable at all.
|
|
134
|
-
|
|
135
|
-
Important notes about jobs with sensitive variables:
|
|
136
|
-
|
|
137
|
-
* Such jobs cannot be scheduled to run in the future or on a recurring schedule (as scheduled jobs must by necessity store their variables in the database for future reference).
|
|
138
|
-
* Jobs with sensitive variables cannot be marked as requiring approval (as jobs pending approval must store their variables in the database until approved).
|
|
139
|
-
|
|
140
|
-
#### `hidden`
|
|
141
|
-
|
|
142
|
-
Default: `False`
|
|
143
|
-
|
|
144
|
-
A Boolean that if set to `True` prevents the job from being displayed by default in the list of Jobs in the Nautobot UI.
|
|
145
|
-
|
|
146
|
-
Since the jobs execution framework is designed to be generic, there may be several technical jobs defined by users which interact with or are invoked by external systems. In such cases, these jobs are not meant to be executed by a human and likely do not make sense to expose to end users for execution, and thus having them exposed in the UI at all is extraneous.
|
|
147
|
-
|
|
148
|
-
Important notes about hidden jobs:
|
|
149
|
-
|
|
150
|
-
* This is merely hiding them by default from the web interface. It is NOT a security feature.
|
|
151
|
-
* In the Jobs list view it is possible to filter to "Hidden: (no selection)" or even "Hidden: Yes" to list the hidden jobs.
|
|
152
|
-
* All Job UI and REST API endpoints still exist for hidden jobs and can be accessed by any user who is aware of their existence.
|
|
153
|
-
* Hidden jobs can still be executed through the UI or the REST API given the appropriate URL.
|
|
154
|
-
* Results for hidden jobs will still appear in the Job Results list after they are run.
|
|
155
|
-
|
|
156
|
-
#### `read_only`
|
|
157
|
-
|
|
158
|
-
+++ 1.1.0
|
|
159
|
-
|
|
160
|
-
+/- 2.0.0
|
|
161
|
-
The `read_only` 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.
|
|
162
|
-
|
|
163
|
-
Default: `False`
|
|
164
|
-
|
|
165
|
-
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.
|
|
166
|
-
|
|
167
|
-
#### `soft_time_limit`
|
|
168
|
-
|
|
169
|
-
+++ 1.3.0
|
|
170
|
-
|
|
171
|
-
An int or float value, in seconds, which can be used to override the default [soft time limit](../../user-guide/administration/configuration/optional-settings.md#celery_task_soft_time_limit) for a job task to complete.
|
|
172
|
-
|
|
173
|
-
The `celery.exceptions.SoftTimeLimitExceeded` exception will be raised when this soft time limit is exceeded. The job task can catch this to clean up before the [hard time limit](../../user-guide/administration/configuration/optional-settings.md#celery_task_time_limit) (10 minutes by default) is reached:
|
|
174
|
-
|
|
175
|
-
```python
|
|
176
|
-
from celery.exceptions import SoftTimeLimitExceeded
|
|
177
|
-
from nautobot.apps.jobs import Job
|
|
178
|
-
|
|
179
|
-
class ExampleJobWithSoftTimeLimit(Job):
|
|
180
|
-
class Meta:
|
|
181
|
-
name = "Soft Time Limit"
|
|
182
|
-
description = "Set a soft time limit of 10 seconds`"
|
|
183
|
-
soft_time_limit = 10
|
|
184
|
-
|
|
185
|
-
def run(self):
|
|
186
|
-
try:
|
|
187
|
-
# code which might take longer than 10 seconds to run
|
|
188
|
-
job_code()
|
|
189
|
-
except SoftTimeLimitExceeded:
|
|
190
|
-
# any clean up code
|
|
191
|
-
cleanup_in_a_hurry()
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
#### `task_queues`
|
|
195
|
-
|
|
196
|
-
+++ 1.5.0
|
|
197
|
-
|
|
198
|
-
Default: `[]`
|
|
199
|
-
|
|
200
|
-
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 [default queue](../../user-guide/administration/configuration/optional-settings.md#celery_task_default_queue) (`default` 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.
|
|
201
|
-
|
|
202
|
-
!!! note
|
|
203
|
-
A worker must be listening on the requested queue or the job will not run. See the documentation on [task queues](../../user-guide/administration/guides/celery-queues.md) for more information.
|
|
204
|
-
|
|
205
|
-
#### `template_name`
|
|
206
|
-
|
|
207
|
-
+++ 1.4.0
|
|
208
|
-
|
|
209
|
-
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, `extras/job.html`, otherwise the base form and functionality may not be available.
|
|
210
|
-
|
|
211
|
-
A template can provide additional JavaScript, CSS, or even display HTML. A good starting template would be:
|
|
212
|
-
|
|
213
|
-
```html
|
|
214
|
-
{% extends 'extras/job.html' %}
|
|
215
|
-
|
|
216
|
-
{% block extra_styles %}
|
|
217
|
-
{{ block.super }}
|
|
218
|
-
<!-- Add additional CSS here. -->
|
|
219
|
-
{% endblock %}
|
|
220
|
-
{% block content %}
|
|
221
|
-
{{ block.super }}
|
|
222
|
-
<!-- Add additional HTML here. -->
|
|
223
|
-
{% endblock content %}
|
|
224
|
-
{% block javascript %}
|
|
225
|
-
{{ block.super }}
|
|
226
|
-
<!-- Add additional JavaScript here. -->
|
|
227
|
-
{% endblock javascript %}
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
For another example checkout [the template used in example plugin](https://github.com/nautobot/nautobot/blob/next/examples/example_plugin/example_plugin/templates/example_plugin/example_with_custom_template.html) in the GitHub repo.
|
|
231
|
-
|
|
232
|
-
#### `time_limit`
|
|
233
|
-
|
|
234
|
-
+++ 1.3.0
|
|
235
|
-
|
|
236
|
-
An int or float value, in seconds, which can be used to override the
|
|
237
|
-
default [hard time limit](../../user-guide/administration/configuration/optional-settings.md#celery_task_time_limit) (10 minutes by default) for a job task to complete.
|
|
238
|
-
|
|
239
|
-
Unlike the `soft_time_limit` above, no exceptions are raised when a `time_limit` is exceeded. The task will just terminate silently:
|
|
240
|
-
|
|
241
|
-
```python
|
|
242
|
-
from nautobot.apps.jobs import Job
|
|
243
|
-
|
|
244
|
-
class ExampleJobWithHardTimeLimit(Job):
|
|
245
|
-
class Meta:
|
|
246
|
-
name = "Hard Time Limit"
|
|
247
|
-
description = "Set a hard time limit of 10 seconds`"
|
|
248
|
-
time_limit = 10
|
|
249
|
-
|
|
250
|
-
def run(self):
|
|
251
|
-
# code which might take longer than 10 seconds to run
|
|
252
|
-
# this code will fail silently if the time_limit is exceeded
|
|
253
|
-
job_code()
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
!!! note
|
|
257
|
-
If the `time_limit` is set to a value less than or equal to the `soft_time_limit`, a warning log is generated to inform the user that this job will fail silently after the `time_limit` as the `soft_time_limit` will never be reached.
|
|
258
|
-
|
|
259
|
-
### Variables
|
|
260
|
-
|
|
261
|
-
Variables allow your job to accept user input via the Nautobot UI, but they are optional; if your job does not require any user input, there is no need to define any variables. Conversely, if you are making use of user input in your job, you *must* also implement the `run()` method, as it is the only entry point to your job that has visibility into the variable values provided by the user.
|
|
262
|
-
|
|
263
|
-
```python
|
|
264
|
-
from nautobot.apps.jobs import Job, StringVar, IntegerVar, ObjectVar
|
|
265
|
-
|
|
266
|
-
class CreateDevices(Job):
|
|
267
|
-
var1 = StringVar(...)
|
|
268
|
-
var2 = IntegerVar(...)
|
|
269
|
-
var3 = ObjectVar(...)
|
|
270
|
-
|
|
271
|
-
def run(self, var1, var2, var3):
|
|
272
|
-
...
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
The remainder of this section documents the various supported variable types and how to make use of them.
|
|
276
|
-
|
|
277
|
-
#### Default Variable Options
|
|
278
|
-
|
|
279
|
-
All job variables support the following default options:
|
|
280
|
-
|
|
281
|
-
* `default` - The field's default value
|
|
282
|
-
* `description` - A brief user-friendly description of the field
|
|
283
|
-
* `label` - The field name to be displayed in the rendered form
|
|
284
|
-
* `required` - Indicates whether the field is mandatory (all fields are required by default)
|
|
285
|
-
* `widget` - The class of form widget to use (see the [Django documentation](https://docs.djangoproject.com/en/stable/ref/forms/widgets/))
|
|
286
|
-
|
|
287
|
-
#### `StringVar`
|
|
288
|
-
|
|
289
|
-
Stores a string of characters (i.e. text). Options include:
|
|
290
|
-
|
|
291
|
-
* `min_length` - Minimum number of characters
|
|
292
|
-
* `max_length` - Maximum number of characters
|
|
293
|
-
* `regex` - A regular expression against which the provided value must match
|
|
294
|
-
|
|
295
|
-
Note that `min_length` and `max_length` can be set to the same number to effect a fixed-length field.
|
|
296
|
-
|
|
297
|
-
#### `TextVar`
|
|
298
|
-
|
|
299
|
-
Arbitrary text of any length. Renders as a multi-line text input field.
|
|
300
|
-
|
|
301
|
-
#### `IntegerVar`
|
|
302
|
-
|
|
303
|
-
Stores a numeric integer. Options include:
|
|
304
|
-
|
|
305
|
-
* `min_value` - Minimum value
|
|
306
|
-
* `max_value` - Maximum value
|
|
307
|
-
|
|
308
|
-
#### `BooleanVar`
|
|
309
|
-
|
|
310
|
-
A true/false flag. This field has no options beyond the defaults listed above.
|
|
311
|
-
|
|
312
|
-
#### `DryRunVar`
|
|
313
|
-
|
|
314
|
-
A true/false flag with special handling for jobs that require approval. If `dryrun = DryRunVar()` is declared on a job class, approval may be bypassed if `dryrun` is set to `True` on job execution.
|
|
315
|
-
|
|
316
|
-
#### `ChoiceVar`
|
|
317
|
-
|
|
318
|
-
A set of choices from which the user can select one.
|
|
319
|
-
|
|
320
|
-
* `choices` - A list of `(value, label)` tuples representing the available choices. For example:
|
|
321
|
-
|
|
322
|
-
```python
|
|
323
|
-
CHOICES = (
|
|
324
|
-
('n', 'North'),
|
|
325
|
-
('s', 'South'),
|
|
326
|
-
('e', 'East'),
|
|
327
|
-
('w', 'West')
|
|
328
|
-
)
|
|
329
|
-
|
|
330
|
-
direction = ChoiceVar(choices=CHOICES)
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
In the example above, selecting the choice labeled "North" will submit the value `n`.
|
|
334
|
-
|
|
335
|
-
#### `MultiChoiceVar`
|
|
336
|
-
|
|
337
|
-
Similar to `ChoiceVar`, but allows for the selection of multiple choices.
|
|
338
|
-
|
|
339
|
-
#### `ObjectVar`
|
|
340
|
-
|
|
341
|
-
A particular object within Nautobot. Each ObjectVar must specify a particular model, and allows the user to select one of the available instances. ObjectVar accepts several arguments, listed below.
|
|
342
|
-
|
|
343
|
-
* `model` - The model class
|
|
344
|
-
* `display_field` - The name of the REST API object field to display in the selection list (default: `'display'`)
|
|
345
|
-
* `query_params` - A dictionary of REST API query parameters to use when retrieving available options (optional)
|
|
346
|
-
* `null_option` - A label representing a "null" or empty choice (optional)
|
|
347
|
-
|
|
348
|
-
The `display_field` argument is useful in cases where using the `display` API field is not desired for referencing the object. For example, when displaying a list of IP Addresses, you might want to use the `dns_name` field:
|
|
349
|
-
|
|
350
|
-
```python
|
|
351
|
-
device_type = ObjectVar(
|
|
352
|
-
model=IPAddress,
|
|
353
|
-
display_field="dns_name",
|
|
354
|
-
)
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
To limit the selections available within the list, additional query parameters can be passed as the `query_params` dictionary. For example, to show only devices with an "active" status:
|
|
358
|
-
|
|
359
|
-
```python
|
|
360
|
-
device = ObjectVar(
|
|
361
|
-
model=Device,
|
|
362
|
-
query_params={
|
|
363
|
-
'status': 'active'
|
|
364
|
-
}
|
|
365
|
-
)
|
|
366
|
-
```
|
|
367
|
-
|
|
368
|
-
Multiple values can be specified by assigning a list to the dictionary key. It is also possible to reference the value of other fields in the form by prepending a dollar sign (`$`) to the variable's name. The keys you can use in this dictionary are the same ones that are available in the REST API - as an example it is also possible to filter the `Location` `ObjectVar` for its `location_type` and `tenant_group`.
|
|
369
|
-
|
|
370
|
-
```python
|
|
371
|
-
location_type = ObjectVar(
|
|
372
|
-
model=LocationType
|
|
373
|
-
)
|
|
374
|
-
tenant_group = ObjectVar(
|
|
375
|
-
model=TenantGroup
|
|
376
|
-
)
|
|
377
|
-
location = ObjectVar(
|
|
378
|
-
model=Location,
|
|
379
|
-
query_params={
|
|
380
|
-
"location_type": "$location_type",
|
|
381
|
-
"tenant_group": "$tenant_group"
|
|
382
|
-
}
|
|
383
|
-
)
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
#### `MultiObjectVar`
|
|
387
|
-
|
|
388
|
-
Similar to `ObjectVar`, but allows for the selection of multiple objects.
|
|
389
|
-
|
|
390
|
-
#### `FileVar`
|
|
391
|
-
|
|
392
|
-
An uploaded file. Note that uploaded files are present in memory only for the duration of the job's execution: They will not be automatically saved for future use. The job is responsible for writing file contents to disk where necessary.
|
|
393
|
-
|
|
394
|
-
#### `IPAddressVar`
|
|
395
|
-
|
|
396
|
-
An IPv4 or IPv6 address, without a mask. Returns a `netaddr.IPAddress` object.
|
|
397
|
-
|
|
398
|
-
#### `IPAddressWithMaskVar`
|
|
399
|
-
|
|
400
|
-
An IPv4 or IPv6 address with a mask. Returns a `netaddr.IPNetwork` object which includes the mask.
|
|
401
|
-
|
|
402
|
-
#### `IPNetworkVar`
|
|
403
|
-
|
|
404
|
-
An IPv4 or IPv6 network with a mask. Returns a `netaddr.IPNetwork` object. Two attributes are available to validate the provided mask:
|
|
405
|
-
|
|
406
|
-
* `min_prefix_length` - Minimum length of the mask
|
|
407
|
-
* `max_prefix_length` - Maximum length of the mask
|
|
408
|
-
|
|
409
|
-
### The `run()` Method
|
|
410
|
-
|
|
411
|
-
The `run()` method must be implemented. After the `self` argument, it should accept keyword arguments for any variables defined on the job:
|
|
412
|
-
|
|
413
|
-
```python
|
|
414
|
-
from nautobot.apps.jobs import Job, StringVar, IntegerVar, ObjectVar
|
|
415
|
-
|
|
416
|
-
class CreateDevices(Job):
|
|
417
|
-
var1 = StringVar(...)
|
|
418
|
-
var2 = IntegerVar(...)
|
|
419
|
-
var3 = ObjectVar(...)
|
|
420
|
-
|
|
421
|
-
def run(self, var1, var2, var3):
|
|
422
|
-
...
|
|
423
|
-
```
|
|
424
|
-
|
|
425
|
-
Again, defining user variables is totally optional; you may create a job with a `run()` method with only the `self` argument if no user input is needed.
|
|
426
|
-
|
|
427
|
-
!!! warning
|
|
428
|
-
When writing Jobs that create and manipulate data it is recommended to make use of the `validated_save()` convenience method which exists on all core models. This method saves the instance data but first enforces model validation logic. Simply calling `save()` on the model instance **does not** enforce validation automatically and may lead to bad data. See the development [best practices](../core/best-practices.md).
|
|
429
|
-
|
|
430
|
-
!!! warning
|
|
431
|
-
The Django ORM provides methods to create/edit many objects at once, namely `bulk_create()` and `update()`. These are best avoided in most cases as they bypass a model's built-in validation and can easily lead to database corruption if not used carefully.
|
|
432
|
-
|
|
433
|
-
--- 2.0.0
|
|
434
|
-
The NetBox backwards compatible `test_*()` and `post_run()` methods have been removed.
|
|
435
|
-
|
|
436
|
-
### Logging
|
|
437
|
-
|
|
438
|
-
+/- 2.0.0
|
|
439
|
-
|
|
440
|
-
Messages logged from a job's logger will be stored in [`JobLogEntry`](../../user-guide/platform-functionality/jobs/models.md#job-log-entry) records associated with the current [`JobResult`](../../user-guide/platform-functionality/jobs/models.md#job-results).
|
|
441
|
-
|
|
442
|
-
The logger can be accessed either by using the `logger` property on the job class or `nautobot.extras.jobs.get_task_logger(__name__)`. Both will return the same logger instance. For more information on the standard Python logging module, see the [Python documentation](https://docs.python.org/3/library/logging.html).
|
|
443
|
-
|
|
444
|
-
An optional `grouping` and/or `object` may be provided in log messages by passing them in the log function call's `extra` kwarg. If a `grouping` is not provided it will default to the function name that logged the message. The `object` will default to `None`.
|
|
445
|
-
|
|
446
|
-
!!! example
|
|
447
|
-
```py
|
|
448
|
-
from nautobot.apps.jobs import Job
|
|
449
|
-
|
|
450
|
-
class MyJob(Job):
|
|
451
|
-
def run(self):
|
|
452
|
-
logger.info("This job is running!", extra={"grouping": "myjobisrunning", "object": self.job_result})
|
|
453
|
-
```
|
|
454
|
-
|
|
455
|
-
To skip writing a log entry to the database, set the `skip_db_logging` key in the "extra" kwarg to `True` when calling the log function. The output will still be written to the console.
|
|
456
|
-
|
|
457
|
-
!!! example
|
|
458
|
-
```py
|
|
459
|
-
from nautobot.apps.jobs import Job
|
|
460
|
-
|
|
461
|
-
class MyJob(Job):
|
|
462
|
-
def run(self):
|
|
463
|
-
logger.info("This job is running!", extra={"skip_db_logging": True})
|
|
464
|
-
```
|
|
465
|
-
|
|
466
|
-
Markdown rendering is supported for log messages.
|
|
467
|
-
|
|
468
|
-
+/- 1.3.4
|
|
469
|
-
As a security measure, the `message` passed to any of these methods will be passed through the `nautobot.core.utils.logging.sanitize()` 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 `sanitize()` function can be configured as [settings.SANITIZER_PATTERNS](../../user-guide/administration/configuration/optional-settings.md#sanitizer_patterns).
|
|
470
|
-
|
|
471
|
-
+/- 2.0.0
|
|
472
|
-
The Job class logging functions (example: `self.log(message)`, `self.log_success(obj=None, message=message)`, etc) have been removed. Also, the convenience method to mark a job as failed, `log_failure()`, has been removed. To replace the functionality of this method, you can log an error message with `self.logger.error()` 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.
|
|
473
|
-
|
|
474
|
-
+/- 2.0.0
|
|
475
|
-
The `AbortTransaction` class was moved from the `nautobot.utilities.exceptions` module to `nautobot.core.exceptions`.
|
|
476
|
-
|
|
477
|
-
### Marking a Job as Failed
|
|
478
|
-
|
|
479
|
-
To mark a job as failed, raise an exception from within the `run()` method. The exception message will be logged to the traceback of the job result. The job result status will be set to `failed`. To output a job log message you can use the `self.logger.error()` method.
|
|
480
|
-
|
|
481
|
-
```python
|
|
482
|
-
|
|
483
|
-
As an example, the following job will fail if the user does not put the word "Taco" in `var1`:
|
|
484
|
-
|
|
485
|
-
```python
|
|
486
|
-
from nautobot.apps.jobs import Job, StringVar
|
|
487
|
-
|
|
488
|
-
class MyJob(Job):
|
|
489
|
-
var1 = StringVar(...)
|
|
490
|
-
|
|
491
|
-
def run(self, var1):
|
|
492
|
-
if var1 != "Taco":
|
|
493
|
-
self.logger.error("var1 must be 'Taco'")
|
|
494
|
-
raise Exception("Argument input validation failed.")
|
|
495
|
-
```
|
|
496
|
-
|
|
497
|
-
### Accessing User and Job Result
|
|
498
|
-
|
|
499
|
-
+/- 2.0.0
|
|
500
|
-
The `request` 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 `user` object is now available as `self.user` instead of `self.request.user`.
|
|
501
|
-
|
|
502
|
-
The user that initiated the job and the job result associated to the job can be accessed through properties on the job class:
|
|
503
|
-
|
|
504
|
-
```py
|
|
505
|
-
username = self.user.username
|
|
506
|
-
job_result_id = self.job_result.id
|
|
507
|
-
self.logger.info("Job %s initiated by user %s is running.", job_result_id, username)
|
|
508
|
-
```
|
|
509
|
-
|
|
510
|
-
### Reading Data from Files
|
|
511
|
-
|
|
512
|
-
The `Job` class provides two convenience methods for reading data from files:
|
|
513
|
-
|
|
514
|
-
* `load_yaml`
|
|
515
|
-
* `load_json`
|
|
516
|
-
|
|
517
|
-
These two methods will load data in YAML or JSON format, respectively, from files within the local path (i.e. `JOBS_ROOT/`).
|
|
518
|
-
|
|
519
|
-
## Testing Jobs
|
|
520
|
-
|
|
521
|
-
Jobs are Python code and can be tested as such, usually via [Django unit-test features](https://docs.djangoproject.com/en/stable/topics/testing/). That said, there are a few useful tricks specific to testing Jobs.
|
|
522
|
-
|
|
523
|
-
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.
|
|
524
|
-
|
|
525
|
-
+++ 1.3.3
|
|
526
|
-
Entire Job execution testing was only introduced in 1.3.3 and newer.
|
|
527
|
-
However the import paths used in the examples requires 1.5.2 and newer.
|
|
528
|
-
|
|
529
|
-
The simplest way to test the entire execution of Jobs is via calling the `nautobot.apps.testing.run_job_for_testing()` method, which is a helper wrapper around the `JobResult.enqueue_job` function used to execute a Job via Nautobot's Celery worker process.
|
|
530
|
-
|
|
531
|
-
Because of the way `run_job_for_testing` and more specifically Celery tasks work, which is somewhat complex behind the scenes, you need to inherit from `nautobot.apps.testing.TransactionTestCase` instead of `django.test.TestCase` (Refer to the [Django documentation](https://docs.djangoproject.com/en/stable/topics/testing/tools/#provided-test-case-classes) if you're interested in the differences between these classes - `TransactionTestCase` from Nautobot is a small wrapper around Django's `TransactionTestCase`).
|
|
532
|
-
|
|
533
|
-
When using `TransactionTestCase` (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 `run_job_for_testing` handles for us.
|
|
534
|
-
|
|
535
|
-
A simple example of a Job test case might look like the following:
|
|
536
|
-
|
|
537
|
-
```python
|
|
538
|
-
from nautobot.apps.testing import run_job_for_testing, TransactionTestCase
|
|
539
|
-
from nautobot.extras.models import Job, JobLogEntry
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
class MyJobTestCase(TransactionTestCase):
|
|
543
|
-
def test_my_job(self):
|
|
544
|
-
# Testing of Job "MyJob" in file "my_job_file.py" in $JOBS_ROOT
|
|
545
|
-
job = Job.objects.get(job_class_name="MyJob", module_name="my_job_file", source="local")
|
|
546
|
-
# or, job = Job.objects.get_for_class_path("local/my_job_file/MyJob")
|
|
547
|
-
job_result = run_job_for_testing(job, var1="abc", var2=123)
|
|
548
|
-
|
|
549
|
-
# Inspect the logs created by running the job
|
|
550
|
-
log_entries = JobLogEntry.objects.filter(job_result=job_result)
|
|
551
|
-
for log_entry in log_entries:
|
|
552
|
-
self.assertEqual(log_entry.message, "...")
|
|
553
|
-
```
|
|
554
|
-
|
|
555
|
-
!!! tip
|
|
556
|
-
For more advanced examples refer to the Nautobot source code, specifically `nautobot/extras/tests/test_jobs.py`.
|
|
557
|
-
|
|
558
|
-
## Debugging job performance
|
|
559
|
-
|
|
560
|
-
+++ 1.5.17
|
|
561
|
-
|
|
562
|
-
Debugging the performance of Nautobot jobs can be tricky, because they are executed in the worker context. In order to gain extra visibility, [cProfile](https://docs.python.org/3/library/profile.html) can be used to profile the job execution.
|
|
563
|
-
|
|
564
|
-
The 'profile' form field on jobs is automatically available when the `DEBUG` settings is `True`. 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 `nautobot-server runjob` command with `--local`, 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.
|
|
565
|
-
|
|
566
|
-
!!! note
|
|
567
|
-
If you need to run this in an environment where `DEBUG` is `False`, you have the option of using `nautobot-server runjob` with the `--profile` flag. According to the docs, `cProfile` should have minimal impact on the performance of the job; still, proceed with caution when using this in a production environment.
|
|
568
|
-
|
|
569
|
-
### Reading profiling reports
|
|
570
|
-
|
|
571
|
-
A full description on how to deal with the output of `cProfile` can be found in the [Instant User's Manual](https://docs.python.org/3/library/profile.html#instant-user-s-manual), but here is something to get you started:
|
|
572
|
-
|
|
573
|
-
```python
|
|
574
|
-
import pstats
|
|
575
|
-
job_result_uuid = "66b70231-002f-412b-8cc4-1cc9609c2c9b"
|
|
576
|
-
stats = pstats.Stats(f"/tmp/job-result-{job_result_uuid}.pstats")
|
|
577
|
-
stats.sort_stats(pstats.SortKey.CUMULATIVE).print_stats(10)
|
|
578
|
-
```
|
|
579
|
-
|
|
580
|
-
This will print the 10 functions that the job execution spent the most time in - adapt this to your needs!
|
|
581
|
-
|
|
582
|
-
## Example Jobs
|
|
583
|
-
|
|
584
|
-
### Creating objects for a planned location
|
|
585
|
-
|
|
586
|
-
This job prompts the user for three variables:
|
|
587
|
-
|
|
588
|
-
* The name of the new location
|
|
589
|
-
* The device model (a filtered list of defined device types)
|
|
590
|
-
* The number of access switches to create
|
|
591
|
-
|
|
592
|
-
These variables are presented as a web form to be completed by the user. Once submitted, the job's `run()` method is called to create the appropriate objects, and it returns simple CSV output to the user summarizing the created objects.
|
|
593
|
-
|
|
594
|
-
```python
|
|
595
|
-
from django.contrib.contenttypes.models import ContentType
|
|
596
|
-
|
|
597
|
-
from nautobot.apps.jobs import Job, StringVar, IntegerVar, ObjectVar
|
|
598
|
-
from nautobot.dcim.models import Location, LocationType, Device, Manufacturer, DeviceType
|
|
599
|
-
from nautobot.extras.models import Status, Role
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
class NewBranch(Job):
|
|
603
|
-
class Meta:
|
|
604
|
-
name = "New Branch"
|
|
605
|
-
description = "Provision a new branch location"
|
|
606
|
-
field_order = ["location_name", "switch_count", "switch_model"]
|
|
607
|
-
|
|
608
|
-
location_name = StringVar(description="Name of the new location")
|
|
609
|
-
switch_count = IntegerVar(description="Number of access switches to create")
|
|
610
|
-
manufacturer = ObjectVar(model=Manufacturer, required=False)
|
|
611
|
-
switch_model = ObjectVar(
|
|
612
|
-
description="Access switch model", model=DeviceType, query_params={"manufacturer_id": "$manufacturer"}
|
|
613
|
-
)
|
|
614
|
-
|
|
615
|
-
def run(self, location_name, switch_count, switch_model):
|
|
616
|
-
STATUS_PLANNED = Status.objects.get(name="Planned")
|
|
617
|
-
|
|
618
|
-
# Create the new location
|
|
619
|
-
root_type = LocationType.objects.get_or_create(name="Campus")
|
|
620
|
-
location = Location(
|
|
621
|
-
name=location_name,
|
|
622
|
-
location_type=root_type,
|
|
623
|
-
status=STATUS_PLANNED,
|
|
624
|
-
)
|
|
625
|
-
location.validated_save()
|
|
626
|
-
self.logger.info("Created new location", extra={"object": location})
|
|
627
|
-
|
|
628
|
-
# Create access switches
|
|
629
|
-
device_ct = ContentType.objects.get_for_model(Device)
|
|
630
|
-
switch_role = Role.objects.get(name="Access Switch")
|
|
631
|
-
switch_role.content_types.add(device_ct)
|
|
632
|
-
for i in range(1, switch_count + 1):
|
|
633
|
-
switch = Device(
|
|
634
|
-
device_type=switch_model,
|
|
635
|
-
name=f"{location.name}-switch{i}",
|
|
636
|
-
location=location,
|
|
637
|
-
status=STATUS_PLANNED,
|
|
638
|
-
role=switch_role,
|
|
639
|
-
)
|
|
640
|
-
switch.validated_save()
|
|
641
|
-
self.logger.info("Created new switch", extra={"object": switch})
|
|
642
|
-
|
|
643
|
-
# Generate a CSV table of new devices
|
|
644
|
-
output = ["name,make,model"]
|
|
645
|
-
for switch in Device.objects.filter(location=location):
|
|
646
|
-
attrs = [switch.name, switch.device_type.manufacturer.name, switch.device_type.model]
|
|
647
|
-
output.append(",".join(attrs))
|
|
648
|
-
|
|
649
|
-
return "\n".join(output)
|
|
650
|
-
```
|
|
651
|
-
|
|
652
|
-
### Device validation
|
|
653
|
-
|
|
654
|
-
A job to perform various validation of Device data in Nautobot. As this job does not require any user input, it does not define any variables, nor does it implement a `run()` method.
|
|
655
|
-
|
|
656
|
-
```python
|
|
657
|
-
from nautobot.apps.jobs import Job
|
|
658
|
-
from nautobot.dcim.models import ConsolePort, Device, PowerPort
|
|
659
|
-
from nautobot.extras.models import Status
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
class DeviceConnectionsReport(Job):
|
|
663
|
-
description = "Validate the minimum physical connections for each device"
|
|
664
|
-
|
|
665
|
-
def test_console_connection(self):
|
|
666
|
-
STATUS_ACTIVE = Status.objects.get(name='Active')
|
|
667
|
-
|
|
668
|
-
# Check that every console port for every active device has a connection defined.
|
|
669
|
-
for console_port in ConsolePort.objects.select_related('device').filter(device__status=STATUS_ACTIVE):
|
|
670
|
-
if console_port.connected_endpoint is None:
|
|
671
|
-
self.logger.error(
|
|
672
|
-
"No console connection defined for %s",
|
|
673
|
-
console_port.name,
|
|
674
|
-
extra={"object": console_port.device},
|
|
675
|
-
)
|
|
676
|
-
elif not console_port.connection_status:
|
|
677
|
-
self.logger.warning(
|
|
678
|
-
"Console connection for %s marked as planned",
|
|
679
|
-
console_port.name,
|
|
680
|
-
extra={"object": console_port.device},
|
|
681
|
-
)
|
|
682
|
-
else:
|
|
683
|
-
self.logger.info(
|
|
684
|
-
"Console port %s has a connection defined",
|
|
685
|
-
console_port.name,
|
|
686
|
-
extra={"object": console_port.device},
|
|
687
|
-
)
|
|
688
|
-
|
|
689
|
-
def test_power_connections(self):
|
|
690
|
-
STATUS_ACTIVE = Status.objects.get(name='Active')
|
|
691
|
-
|
|
692
|
-
# Check that every active device has at least two connected power supplies.
|
|
693
|
-
for device in Device.objects.filter(status=STATUS_ACTIVE):
|
|
694
|
-
connected_ports = 0
|
|
695
|
-
for power_port in PowerPort.objects.filter(device=device):
|
|
696
|
-
if power_port.connected_endpoint is not None:
|
|
697
|
-
connected_ports += 1
|
|
698
|
-
if not power_port.connection_status:
|
|
699
|
-
self.logger.warning(
|
|
700
|
-
"Power connection for %s marked as planned",
|
|
701
|
-
power_port.name,
|
|
702
|
-
extra={"object": device},
|
|
703
|
-
)
|
|
704
|
-
if connected_ports < 2:
|
|
705
|
-
self.logger.error(
|
|
706
|
-
"%s connected power supplies found (2 needed)",
|
|
707
|
-
connected_ports,
|
|
708
|
-
extra={"object": device},
|
|
709
|
-
)
|
|
710
|
-
else:
|
|
711
|
-
self.logger.info("At least two connected power supplies found", extra={"object": device})
|
|
712
|
-
```
|
|
713
|
-
|
|
714
|
-
## Job Button Receivers
|
|
715
|
-
|
|
716
|
-
Job Buttons are only able to initiate a specific type of job called a **Job Button Receiver**. These are jobs that subclass the `nautobot.apps.jobs.JobButtonReceiver` class. Job Button Receivers are similar to normal jobs except they are hard coded to accept only `object_pk` and `object_model_name` [variables](#variables). Job Button Receivers are hidden from the jobs listing UI by default but otherwise function similarly to other jobs. The `JobButtonReceiver` class only implements one method called `receive_job_button`.
|
|
717
|
-
|
|
718
|
-
!!! note
|
|
719
|
-
Job Button Receivers still need to be [enabled through the web UI](../../user-guide/platform-functionality/jobs/index.md#enabling-jobs-for-running) before they can be used just like other Jobs.
|
|
720
|
-
|
|
721
|
-
### The `receive_job_button()` Method
|
|
722
|
-
|
|
723
|
-
All `JobButtonReceiver` subclasses must implement a `receive_job_button()` method. This method accepts only one argument:
|
|
724
|
-
|
|
725
|
-
1. `obj` - An instance of the object where the button was pressed
|
|
726
|
-
|
|
727
|
-
### Example Job Button Receiver
|
|
728
|
-
|
|
729
|
-
```py
|
|
730
|
-
from nautobot.apps.jobs import JobButtonReceiver
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
class ExampleSimpleJobButtonReceiver(JobButtonReceiver):
|
|
734
|
-
class Meta:
|
|
735
|
-
name = "Example Simple Job Button Receiver"
|
|
736
|
-
|
|
737
|
-
def receive_job_button(self, obj):
|
|
738
|
-
self.logger.info("Running Job Button Receiver.", extra={"object": obj})
|
|
739
|
-
# Add job logic here
|
|
740
|
-
```
|
|
741
|
-
|
|
742
|
-
### Job Buttons for Multiple Types
|
|
743
|
-
|
|
744
|
-
Since Job Buttons can be associated to multiple object types, it would be trivial to create a Job that can change what it runs based on the object type.
|
|
745
|
-
|
|
746
|
-
```py
|
|
747
|
-
from nautobot.apps.jobs import JobButtonReceiver
|
|
748
|
-
from nautobot.dcim.models import Device, Location
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
class ExampleComplexJobButtonReceiver(JobButtonReceiver):
|
|
752
|
-
class Meta:
|
|
753
|
-
name = "Example Complex Job Button Receiver"
|
|
754
|
-
|
|
755
|
-
def _run_location_job(self, obj):
|
|
756
|
-
self.logger.info("Running Location Job Button Receiver.", extra={"object": obj})
|
|
757
|
-
# Run Location Job function
|
|
758
|
-
|
|
759
|
-
def _run_device_job(self, obj):
|
|
760
|
-
self.logger.info("Running Device Job Button Receiver.", extra={"object": obj})
|
|
761
|
-
# Run Device Job function
|
|
762
|
-
|
|
763
|
-
def receive_job_button(self, obj):
|
|
764
|
-
user = self.user
|
|
765
|
-
if isinstance(obj, Location):
|
|
766
|
-
if not user.has_perm("dcim.add_location"):
|
|
767
|
-
self.logger.error("User '%s' does not have permission to add a Location.", user, extra={"object": obj})
|
|
768
|
-
raise Exception("User does not have permission to add a Location.")
|
|
769
|
-
else:
|
|
770
|
-
self._run_location_job(obj)
|
|
771
|
-
elif isinstance(obj, Device):
|
|
772
|
-
if not user.has_perm("dcim.add_device"):
|
|
773
|
-
self.logger.error("User '%s' does not have permission to add a Device.", user, extra={"object": obj})
|
|
774
|
-
raise Exception("User does not have permission to add a Device.")
|
|
775
|
-
else:
|
|
776
|
-
self._run_device_job(obj)
|
|
777
|
-
else:
|
|
778
|
-
self.logger.error("Unable to run Job Button for type %s.", type(obj).__name__, extra={"object": obj})
|
|
779
|
-
raise Exception("Job button called on unsupported object type.")
|
|
780
|
-
|
|
781
|
-
```
|
|
782
|
-
|
|
783
|
-
## Job Hook Receivers
|
|
784
|
-
|
|
785
|
-
Job Hooks are only able to initiate a specific type of job called a **Job Hook Receiver**. These are jobs that subclass the `nautobot.apps.jobs.JobHookReceiver` class. Job hook receivers are similar to normal jobs except they are hard coded to accept only an `object_change` [variable](#variables). Job Hook Receivers are hidden from the jobs listing UI by default but otherwise function similarly to other jobs. The `JobHookReceiver` class only implements one method called `receive_job_hook`.
|
|
786
|
-
|
|
787
|
-
!!! warning
|
|
788
|
-
Requiring approval for execution of Job Hooks by setting the `Meta.approval_required` attribute to `True` on your `JobHookReceiver` subclass is not supported. The value of this attribute will be ignored. Support for requiring approval of Job Hooks will be added in a future release.
|
|
789
|
-
|
|
790
|
-
!!! important
|
|
791
|
-
To prevent negatively impacting system performance through an infinite loop, a change that was made by a `JobHookReceiver` job will not trigger another `JobHookReceiver` job to run.
|
|
792
|
-
|
|
793
|
-
### Example Job Hook Receiver
|
|
794
|
-
|
|
795
|
-
```py
|
|
796
|
-
from nautobot.apps.jobs import JobHookReceiver
|
|
797
|
-
from nautobot.extras.choices import ObjectChangeActionChoices
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
class ExampleJobHookReceiver(JobHookReceiver):
|
|
801
|
-
def receive_job_hook(self, change, action, changed_object):
|
|
802
|
-
# return on delete action
|
|
803
|
-
if action == ObjectChangeActionChoices.ACTION_DELETE:
|
|
804
|
-
return
|
|
805
|
-
|
|
806
|
-
# log diff output
|
|
807
|
-
snapshots = change.get_snapshots()
|
|
808
|
-
self.logger.info("DIFF: %s", snapshots['differences'])
|
|
809
|
-
|
|
810
|
-
# validate changes to serial field
|
|
811
|
-
if "serial" in snapshots["differences"]["added"]:
|
|
812
|
-
old_serial = snapshots["differences"]["removed"]["serial"]
|
|
813
|
-
new_serial = snapshots["differences"]["added"]["serial"]
|
|
814
|
-
self.logger.info("%s serial has been changed from %s to %s", changed_object, old_serial, new_serial)
|
|
815
|
-
|
|
816
|
-
# Check the new serial is valid and revert if necessary
|
|
817
|
-
if not self.validate_serial(new_serial):
|
|
818
|
-
changed_object.serial = old_serial
|
|
819
|
-
changed_object.save()
|
|
820
|
-
self.logger.info("%s serial %s was not valid. Reverted to %s", changed_object, new_serial, old_serial)
|
|
821
|
-
|
|
822
|
-
self.logger.info("Serial validation completed for %s", changed_object)
|
|
823
|
-
|
|
824
|
-
def validate_serial(self, serial):
|
|
825
|
-
# add business logic to validate serial
|
|
826
|
-
return False
|
|
827
|
-
```
|
|
828
|
-
|
|
829
|
-
### The `receive_job_hook()` Method
|
|
830
|
-
|
|
831
|
-
All `JobHookReceiver` subclasses must implement a `receive_job_hook()` method. This method accepts three arguments:
|
|
832
|
-
|
|
833
|
-
1. `change` - An instance of `nautobot.extras.models.ObjectChange`
|
|
834
|
-
2. `action` - A string with the action performed on the changed object ("create", "update" or "delete")
|
|
835
|
-
3. `changed_object` - An instance of the object that was changed, or `None` if the object has been deleted
|