nautobot 2.4.2__py3-none-any.whl → 2.4.3__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/templates/circuits/inc/circuit_termination.html +1 -1
- nautobot/circuits/tests/integration/test_circuit.py +135 -0
- nautobot/circuits/views.py +4 -1
- nautobot/cloud/api/views.py +3 -3
- nautobot/core/constants.py +0 -1
- nautobot/core/forms/__init__.py +2 -0
- nautobot/core/forms/forms.py +2 -1
- nautobot/core/forms/widgets.py +8 -0
- nautobot/core/management/commands/generate_performance_test_endpoints.py +268 -0
- nautobot/core/templates/generic/object_bulk_delete.html +1 -1
- nautobot/core/templates/generic/object_bulk_edit.html +1 -1
- nautobot/core/templates/generic/object_bulk_import.html +1 -1
- nautobot/core/templates/generic/object_create.html +5 -0
- nautobot/core/templates/generic/object_delete.html +1 -1
- nautobot/core/templates/generic/object_detail.html +1 -1
- nautobot/core/templates/generic/object_edit.html +1 -1
- nautobot/core/templates/inc/javascript.html +2 -0
- nautobot/core/templates/widgets/clearable_file.html +5 -0
- nautobot/core/templatetags/helpers.py +3 -3
- nautobot/core/testing/integration.py +37 -7
- nautobot/core/tests/test_commands.py +31 -0
- nautobot/core/tests/test_utils.py +17 -2
- nautobot/core/utils/lookup.py +12 -1
- nautobot/core/views/generic.py +9 -1
- nautobot/core/views/mixins.py +9 -1
- nautobot/dcim/api/views.py +11 -10
- nautobot/dcim/forms.py +3 -6
- nautobot/dcim/models/devices.py +1 -2
- nautobot/dcim/templates/dcim/cable_trace.html +4 -4
- nautobot/dcim/templates/dcim/consoleport.html +14 -4
- nautobot/dcim/templates/dcim/consoleserverport.html +14 -4
- nautobot/dcim/templates/dcim/device/lldp_neighbors.html +3 -3
- nautobot/dcim/templates/dcim/frontport.html +7 -2
- nautobot/dcim/templates/dcim/interface.html +9 -4
- nautobot/dcim/templates/dcim/powerfeed.html +8 -3
- nautobot/dcim/templates/dcim/poweroutlet.html +14 -4
- nautobot/dcim/templates/dcim/powerport.html +14 -4
- nautobot/dcim/templates/dcim/rearport.html +7 -2
- nautobot/dcim/tests/integration/test_fileinputpicker.py +87 -0
- nautobot/dcim/tests/test_models.py +1 -1
- nautobot/extras/api/views.py +2 -2
- nautobot/extras/forms/forms.py +4 -0
- nautobot/extras/jobs.py +8 -1
- nautobot/extras/templates/extras/job.html +1 -0
- nautobot/extras/tests/test_dynamicgroups.py +14 -0
- nautobot/extras/tests/test_views.py +197 -9
- nautobot/extras/utils.py +30 -0
- nautobot/extras/views.py +29 -14
- nautobot/ipam/api/views.py +3 -3
- nautobot/ipam/forms.py +2 -6
- nautobot/project-static/bootstrap-filestyle-1.2.3/bootstrap-filestyle.min.js +11 -0
- nautobot/project-static/docs/apps/index.html +1 -1
- nautobot/project-static/docs/apps/nautobot-apps.html +1 -1
- nautobot/project-static/docs/development/apps/api/models/graphql.html +9 -9
- nautobot/project-static/docs/development/apps/api/platform-features/filter-extensions.html +2 -2
- nautobot/project-static/docs/development/apps/api/setup.html +1 -1
- nautobot/project-static/docs/development/apps/migration/code-updates.html +6 -5
- nautobot/project-static/docs/development/apps/migration/dependency-updates.html +2 -2
- nautobot/project-static/docs/development/apps/migration/from-v1.html +3 -3
- nautobot/project-static/docs/development/core/best-practices.html +1 -1
- nautobot/project-static/docs/development/core/bootstrap-ui.html +1 -1
- nautobot/project-static/docs/development/core/docker-compose-advanced-use-cases.html +7 -7
- nautobot/project-static/docs/development/core/getting-started.html +2 -2
- nautobot/project-static/docs/development/core/index.html +1 -1
- nautobot/project-static/docs/development/core/minikube-dev-environment-for-k8s-jobs.html +3 -3
- nautobot/project-static/docs/development/core/model-checklist.html +1 -1
- nautobot/project-static/docs/development/core/navigation-menu.html +1 -1
- nautobot/project-static/docs/development/core/release-checklist.html +1 -1
- nautobot/project-static/docs/development/core/settings.html +1 -1
- nautobot/project-static/docs/development/core/style-guide.html +4 -4
- nautobot/project-static/docs/development/jobs/index.html +8 -1
- nautobot/project-static/docs/development/jobs/migration/from-v1.html +3 -2
- nautobot/project-static/docs/index.html +3 -2
- nautobot/project-static/docs/objects.inv +0 -0
- nautobot/project-static/docs/overview/application_stack.html +2 -2
- nautobot/project-static/docs/release-notes/version-1.0.html +2 -2
- nautobot/project-static/docs/release-notes/version-1.1.html +2 -2
- nautobot/project-static/docs/release-notes/version-1.2.html +3 -3
- nautobot/project-static/docs/release-notes/version-1.3.html +1 -1
- nautobot/project-static/docs/release-notes/version-1.4.html +17 -17
- nautobot/project-static/docs/release-notes/version-1.5.html +8 -8
- nautobot/project-static/docs/release-notes/version-1.6.html +4 -4
- nautobot/project-static/docs/release-notes/version-2.0.html +10 -10
- nautobot/project-static/docs/release-notes/version-2.1.html +7 -7
- nautobot/project-static/docs/release-notes/version-2.2.html +1 -1
- nautobot/project-static/docs/release-notes/version-2.3.html +4 -4
- nautobot/project-static/docs/release-notes/version-2.4.html +188 -0
- nautobot/project-static/docs/search/search_index.json +1 -1
- nautobot/project-static/docs/sitemap.xml +290 -290
- nautobot/project-static/docs/sitemap.xml.gz +0 -0
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/ldap.html +3 -3
- nautobot/project-static/docs/user-guide/administration/configuration/authentication/sso.html +4 -4
- nautobot/project-static/docs/user-guide/administration/configuration/redis.html +1 -1
- nautobot/project-static/docs/user-guide/administration/configuration/settings.html +3 -3
- nautobot/project-static/docs/user-guide/administration/guides/celery-queues.html +5 -5
- nautobot/project-static/docs/user-guide/administration/guides/docker.html +3 -3
- nautobot/project-static/docs/user-guide/administration/guides/health-checks.html +1 -1
- nautobot/project-static/docs/user-guide/administration/guides/prometheus-metrics.html +4 -4
- nautobot/project-static/docs/user-guide/administration/guides/request-profiling.html +15 -15
- nautobot/project-static/docs/user-guide/administration/guides/s3-django-storage.html +2 -2
- nautobot/project-static/docs/user-guide/administration/installation/app-install.html +1 -1
- nautobot/project-static/docs/user-guide/administration/installation/install_system.html +1 -1
- nautobot/project-static/docs/user-guide/administration/installation/nautobot.html +6 -6
- nautobot/project-static/docs/user-guide/administration/installation/services.html +1 -1
- nautobot/project-static/docs/user-guide/administration/security/index.html +1 -1
- nautobot/project-static/docs/user-guide/administration/security/notices.html +1 -0
- nautobot/project-static/docs/user-guide/administration/tools/nautobot-shell.html +1 -1
- nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +11 -8
- nautobot/project-static/docs/user-guide/feature-guides/custom-fields.html +12 -12
- nautobot/project-static/docs/user-guide/feature-guides/git-data-source.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/dynamicgroup.html +1 -1
- nautobot/project-static/docs/user-guide/platform-functionality/graphql.html +3 -3
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobqueue.html +2 -2
- nautobot/project-static/docs/user-guide/platform-functionality/jobs/kubernetes-job-support.html +6 -6
- nautobot/project-static/js/dropdown.js +28 -0
- nautobot/tenancy/forms.py +9 -0
- nautobot/tenancy/templates/tenancy/tenant_create.html +21 -0
- nautobot/tenancy/templates/tenancy/tenant_edit.html +2 -21
- nautobot/tenancy/templates/tenancy/tenantgroup.html +2 -44
- nautobot/tenancy/templates/tenancy/tenantgroup_retrieve.html +1 -0
- nautobot/tenancy/tests/test_views.py +5 -1
- nautobot/tenancy/urls.py +7 -79
- nautobot/tenancy/views.py +51 -80
- nautobot/wireless/api/serializers.py +6 -1
- nautobot/wireless/api/views.py +3 -3
- nautobot/wireless/tests/test_api.py +5 -0
- {nautobot-2.4.2.dist-info → nautobot-2.4.3.dist-info}/METADATA +8 -8
- {nautobot-2.4.2.dist-info → nautobot-2.4.3.dist-info}/RECORD +132 -123
- {nautobot-2.4.2.dist-info → nautobot-2.4.3.dist-info}/LICENSE.txt +0 -0
- {nautobot-2.4.2.dist-info → nautobot-2.4.3.dist-info}/NOTICE +0 -0
- {nautobot-2.4.2.dist-info → nautobot-2.4.3.dist-info}/WHEEL +0 -0
- {nautobot-2.4.2.dist-info → nautobot-2.4.3.dist-info}/entry_points.txt +0 -0
|
Binary file
|
nautobot/project-static/docs/user-guide/administration/configuration/authentication/ldap.html
CHANGED
|
@@ -9471,7 +9471,7 @@
|
|
|
9471
9471
|
<p>On CentOS:</p>
|
|
9472
9472
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>sudo dnf install -y openldap-devel
|
|
9473
9473
|
</code></pre></div>
|
|
9474
|
-
<h3 id="install-django-auth-ldap">Install django-auth-ldap
|
|
9474
|
+
<h3 id="install-django-auth-ldap">Install <code>django-auth-ldap</code><a class="headerlink" href="#install-django-auth-ldap" title="Permanent link">¶</a></h3>
|
|
9475
9475
|
<div class="admonition warning">
|
|
9476
9476
|
<p class="admonition-title">Warning</p>
|
|
9477
9477
|
<p>This and all remaining steps in this document should all be performed as the <code>nautobot</code> user!</p>
|
|
@@ -9540,7 +9540,7 @@
|
|
|
9540
9540
|
<a id="__codelineno-9-3" name="__codelineno-9-3" href="#__codelineno-9-3"></a> <span class="n">ldap</span><span class="o">.</span><span class="n">OPT_X_TLS_REQUIRE_CERT</span><span class="p">:</span> <span class="n">ldap</span><span class="o">.</span><span class="n">OPT_X_TLS_NEVER</span><span class="p">,</span>
|
|
9541
9541
|
<a id="__codelineno-9-4" name="__codelineno-9-4" href="#__codelineno-9-4"></a><span class="p">}</span>
|
|
9542
9542
|
</code></pre></div>
|
|
9543
|
-
<p>Additional
|
|
9543
|
+
<p>Additional LDAP connection options can be found in the <a href="https://www.python-ldap.org/en/python-ldap-3.3.0/reference/ldap.html?highlight=cacert#options"><code>python-ldap</code> documentation</a>.</p>
|
|
9544
9544
|
<h3 id="user-authentication">User Authentication<a class="headerlink" href="#user-authentication" title="Permanent link">¶</a></h3>
|
|
9545
9545
|
<div class="admonition info">
|
|
9546
9546
|
<p class="admonition-title">Info</p>
|
|
@@ -9676,7 +9676,7 @@
|
|
|
9676
9676
|
<a id="__codelineno-17-18" name="__codelineno-17-18" href="#__codelineno-17-18"></a> <span class="p">},</span>
|
|
9677
9677
|
<a id="__codelineno-17-19" name="__codelineno-17-19" href="#__codelineno-17-19"></a><span class="p">}</span>
|
|
9678
9678
|
</code></pre></div>
|
|
9679
|
-
<p>Ensure the file and path specified in logfile exist and are writable and executable by the application service account. Restart the nautobot service and attempt to log into the site to trigger log entries to this file.</p>
|
|
9679
|
+
<p>Ensure the file and path specified in logfile exist and are writable and executable by the application service account. Restart the <code>nautobot</code> service and attempt to log into the site to trigger log entries to this file.</p>
|
|
9680
9680
|
<hr />
|
|
9681
9681
|
<p>Be sure to configure <a href="../settings.html#external_auth_default_groups"><code>EXTERNAL_AUTH_DEFAULT_GROUPS</code></a> and <a href="../settings.html#external_auth_default_permissions"><code>EXTERNAL_AUTH_DEFAULT_PERMISSIONS</code></a> next.</p>
|
|
9682
9682
|
|
nautobot/project-static/docs/user-guide/administration/configuration/authentication/sso.html
CHANGED
|
@@ -9703,7 +9703,7 @@
|
|
|
9703
9703
|
|
|
9704
9704
|
<h1 id="single-sign-on">Single Sign On<a class="headerlink" href="#single-sign-on" title="Permanent link">¶</a></h1>
|
|
9705
9705
|
<p>Nautobot supports several different authentication mechanisms including OAuth (1 and 2), OpenID, SAML, and others.
|
|
9706
|
-
To accomplish this, Nautobot comes preinstalled with the <a href="https://python-social-auth.readthedocs.io/en/latest/configuration/django.html">social-auth-app-django</a> Python module.</p>
|
|
9706
|
+
To accomplish this, Nautobot comes preinstalled with the <a href="https://python-social-auth.readthedocs.io/en/latest/configuration/django.html"><code>social-auth-app-django</code></a> Python module.</p>
|
|
9707
9707
|
<p>This module supports several <a href="https://python-social-auth.readthedocs.io/en/latest/backends/index.html">authentication backends</a> by default including:</p>
|
|
9708
9708
|
<ul>
|
|
9709
9709
|
<li>Google</li>
|
|
@@ -9754,7 +9754,7 @@ To accomplish this, Nautobot comes preinstalled with the <a href="https://python
|
|
|
9754
9754
|
<p>You should only enable one social authentication authentication backend. It is technically possible to use multiple backends but we cannot officially support more than one at this time.</p>
|
|
9755
9755
|
</div>
|
|
9756
9756
|
<h3 id="custom-authentication-backends">Custom Authentication Backends<a class="headerlink" href="#custom-authentication-backends" title="Permanent link">¶</a></h3>
|
|
9757
|
-
<p>The default external authentication supported is <a href="https://python-social-auth.readthedocs.io/en/latest/configuration/django.html">social-auth-app-django</a> as stated above. If you have developed your own external authentication backend, you will need to configure <code>SOCIAL_AUTH_BACKEND_PREFIX</code> to use your backend instead and correctly enable the SSO redirect when the login button is clicked. For example, if your custom authentication backend is available at <code>custom_auth.backends.custom.Oauth2</code>, you would set things as follows:</p>
|
|
9757
|
+
<p>The default external authentication supported is <a href="https://python-social-auth.readthedocs.io/en/latest/configuration/django.html"><code>social-auth-app-django</code></a> as stated above. If you have developed your own external authentication backend, you will need to configure <code>SOCIAL_AUTH_BACKEND_PREFIX</code> to use your backend instead and correctly enable the SSO redirect when the login button is clicked. For example, if your custom authentication backend is available at <code>custom_auth.backends.custom.Oauth2</code>, you would set things as follows:</p>
|
|
9758
9758
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a><span class="n">SOCIAL_AUTH_BACKEND_PREFIX</span> <span class="o">=</span> <span class="s2">"custom_auth.backends"</span>
|
|
9759
9759
|
<a id="__codelineno-3-2" name="__codelineno-3-2" href="#__codelineno-3-2"></a>
|
|
9760
9760
|
<a id="__codelineno-3-3" name="__codelineno-3-3" href="#__codelineno-3-3"></a><span class="n">AUTHENTICATION_BACKENDS</span> <span class="o">=</span> <span class="p">[</span>
|
|
@@ -9984,7 +9984,7 @@ a default set of permissions there are some additional variables to configure th
|
|
|
9984
9984
|
<p>The following instructions guide you through the process of configuring Google for OAuth2 authentication.</p>
|
|
9985
9985
|
<div class="admonition important">
|
|
9986
9986
|
<p class="admonition-title">Important</p>
|
|
9987
|
-
<p>Please note there is further guidance provided by <a href="https://python-social-auth.readthedocs.io/en/latest/backends/google.html#google-oauth2">python-social-auth</a> as well as <a href="https://developers.google.com/identity/protocols/oauth2?csw=1">Google</a>. For more</p>
|
|
9987
|
+
<p>Please note there is further guidance provided by <a href="https://python-social-auth.readthedocs.io/en/latest/backends/google.html#google-oauth2"><code>python-social-auth</code></a> as well as <a href="https://developers.google.com/identity/protocols/oauth2?csw=1">Google</a>. For more</p>
|
|
9988
9988
|
</div>
|
|
9989
9989
|
<p>information please utilize these additional resources.</p>
|
|
9990
9990
|
<ol>
|
|
@@ -10031,7 +10031,7 @@ a default set of permissions there are some additional variables to configure th
|
|
|
10031
10031
|
<p>This guide will walk you through configuring Nautobot to authenticate using SAML with Google as the identity provider.</p>
|
|
10032
10032
|
<div class="admonition important">
|
|
10033
10033
|
<p class="admonition-title">Important</p>
|
|
10034
|
-
<p>Please note that there is further guidance provided by <a href="https://python-social-auth.readthedocs.io/en/latest/backends/saml.html">python-social-auth</a> and <a href="https://support.google.com/a/answer/6087519?hl=en">Google</a>. For more information please utilize these additional resources.</p>
|
|
10034
|
+
<p>Please note that there is further guidance provided by <a href="https://python-social-auth.readthedocs.io/en/latest/backends/saml.html"><code>python-social-auth</code></a> and <a href="https://support.google.com/a/answer/6087519?hl=en">Google</a>. For more information please utilize these additional resources.</p>
|
|
10035
10035
|
</div>
|
|
10036
10036
|
<h4 id="prerequisites">Prerequisites<a class="headerlink" href="#prerequisites" title="Permanent link">¶</a></h4>
|
|
10037
10037
|
<div class="admonition warning">
|
|
@@ -9323,7 +9323,7 @@ of the Redis server and port for each sentinel instance to connect to</li>
|
|
|
9323
9323
|
<a id="__codelineno-0-19" name="__codelineno-0-19" href="#__codelineno-0-19"></a> <span class="p">},</span>
|
|
9324
9324
|
<a id="__codelineno-0-20" name="__codelineno-0-20" href="#__codelineno-0-20"></a><span class="p">}</span>
|
|
9325
9325
|
</code></pre></div>
|
|
9326
|
-
<p>For more details on configuring django-redis with Redis Sentinel, please see the documentation for <a href="https://github.com/jazzband/django-redis#use-the-sentinel-connection-factory">Django Redis</a>.</p>
|
|
9326
|
+
<p>For more details on configuring <code>django-redis</code> with Redis Sentinel, please see the documentation for <a href="https://github.com/jazzband/django-redis#use-the-sentinel-connection-factory">Django Redis</a>.</p>
|
|
9327
9327
|
<h3 id="celery-sentinel-configuration"><code>celery</code> Sentinel Configuration<a class="headerlink" href="#celery-sentinel-configuration" title="Permanent link">¶</a></h3>
|
|
9328
9328
|
<details class="version-changed">
|
|
9329
9329
|
<summary>Changed in version 2.0.0 — Do not change <code>CELERY_RESULT_BACKEND</code> or <code>CELERY_RESULT_BACKEND_TRANSPORT_OPTIONS</code></summary>
|
|
@@ -13472,7 +13472,7 @@ The function must return only one argument: a string of the truncated device dis
|
|
|
13472
13472
|
<p>The following settings are <strong>only</strong> configurable as environment variables, and not via <code>nautobot_config.py</code> or similar.</p>
|
|
13473
13473
|
</div>
|
|
13474
13474
|
<hr />
|
|
13475
|
-
<h3 id="git_ssl_no_verify">GIT_SSL_NO_VERIFY
|
|
13475
|
+
<h3 id="git_ssl_no_verify"><code>GIT_SSL_NO_VERIFY</code><a class="headerlink" href="#git_ssl_no_verify" title="Permanent link">¶</a></h3>
|
|
13476
13476
|
<p>Default: Unset</p>
|
|
13477
13477
|
<p>If you are using a self-signed git repository, you will need to set the environment variable <code>GIT_SSL_NO_VERIFY="1"</code>
|
|
13478
13478
|
in order for the repository to sync.</p>
|
|
@@ -13481,7 +13481,7 @@ in order for the repository to sync.</p>
|
|
|
13481
13481
|
<p>This <em>must</em> be specified as an environment variable. Setting it in <code>nautobot_config.py</code> will not have the desired effect.</p>
|
|
13482
13482
|
</div>
|
|
13483
13483
|
<hr />
|
|
13484
|
-
<h3 id="nautobot_log_deprecation_warnings">NAUTOBOT_LOG_DEPRECATION_WARNINGS
|
|
13484
|
+
<h3 id="nautobot_log_deprecation_warnings"><code>NAUTOBOT_LOG_DEPRECATION_WARNINGS</code><a class="headerlink" href="#nautobot_log_deprecation_warnings" title="Permanent link">¶</a></h3>
|
|
13485
13485
|
<details class="version-added">
|
|
13486
13486
|
<summary>Added in version 1.5.2</summary>
|
|
13487
13487
|
</details>
|
|
@@ -13492,7 +13492,7 @@ in order for the repository to sync.</p>
|
|
|
13492
13492
|
<p>Default: <code>False</code></p>
|
|
13493
13493
|
<p>This can be set to <code>True</code> to allow deprecation warnings raised by Nautobot to (additionally) be logged as <code>WARNING</code> level log messages. (Deprecation warnings are normally silent in Python, but can be enabled globally by <a href="https://docs.python.org/3/library/warnings.html">various means</a> such as setting the <code>PYTHONWARNINGS</code> environment variable. However, doing so can be rather noisy, as it will also include warnings from within Django about various code in various package dependencies of Nautobot's, etc. This configuration setting allows a more targeted enablement of only warnings from within Nautobot itself, which can be useful when vetting various Nautobot Apps for future-proofness against upcoming changes to Nautobot.)</p>
|
|
13494
13494
|
<hr />
|
|
13495
|
-
<h3 id="nautobot_root_1">NAUTOBOT_ROOT
|
|
13495
|
+
<h3 id="nautobot_root_1"><code>NAUTOBOT_ROOT</code><a class="headerlink" href="#nautobot_root_1" title="Permanent link">¶</a></h3>
|
|
13496
13496
|
<p>Default: <code>~/.nautobot/</code></p>
|
|
13497
13497
|
<p>The filesystem path to use to store Nautobot files (Jobs, uploaded images, Git repositories, etc.).</p>
|
|
13498
13498
|
<p>This setting is used internally in the core settings to provide default locations for <a href="index.html#file-storage">features that require file storage</a>, and the <a href="index.html#specifying-your-configuration">default location of the <code>nautobot_config.py</code></a>.</p>
|
|
@@ -9214,9 +9214,9 @@
|
|
|
9214
9214
|
|
|
9215
9215
|
|
|
9216
9216
|
<h1 id="celery-task-queues">Celery Task Queues<a class="headerlink" href="#celery-task-queues" title="Permanent link">¶</a></h1>
|
|
9217
|
-
<p>If you're planning to run multiple jobs, leverage job hooks or are finding that your jobs are taking too long to complete you may want to consider deploying multiple
|
|
9217
|
+
<p>If you're planning to run multiple jobs, leverage job hooks or are finding that your jobs are taking too long to complete you may want to consider deploying multiple Celery workers with different queues for different types of tasks.</p>
|
|
9218
9218
|
<h2 id="how-celery-task-queues-work">How Celery Task Queues Work<a class="headerlink" href="#how-celery-task-queues-work" title="Permanent link">¶</a></h2>
|
|
9219
|
-
<p>The default
|
|
9219
|
+
<p>The default Celery behavior is:</p>
|
|
9220
9220
|
<ul>
|
|
9221
9221
|
<li><a href="https://docs.celeryq.dev/en/stable/reference/cli.html#cmdoption-celery-worker-Q"><code>--queue celery</code></a></li>
|
|
9222
9222
|
<li><a href="https://docs.celeryq.dev/en/stable/reference/cli.html#cmdoption-celery-worker-c"><code>--concurrency</code></a> set to the number of CPUs detected on the system</li>
|
|
@@ -9227,10 +9227,10 @@
|
|
|
9227
9227
|
<p>Each environment is unique but it's generally a good idea to add at least one extra worker on a separate queue for running jobs. Nautobot uses the default <code>celery</code> queue to perform some background tasks and if the queue is full of long running jobs these system tasks could take a long time to execute. This could cause performance problems or unexpected behavior in Nautobot. A new worker can be deployed on a separate queue by using the <a href="../installation/services.html#celery-worker"><code>nautobot-worker.service</code> systemd service</a> and modifying the <code>ExecStart</code> line to include a <a href="https://docs.celeryq.dev/en/stable/reference/cli.html#cmdoption-celery-worker-Q"><code>--queues</code> option</a>. Example:</p>
|
|
9228
9228
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="na">ExecStart</span><span class="o">=</span><span class="s">/opt/nautobot/bin/nautobot-server celery worker --loglevel INFO --pidfile /var/tmp/nautobot-worker-jobqueue.pid --queues job_queue</span>
|
|
9229
9229
|
</code></pre></div>
|
|
9230
|
-
<p>This will create a worker that will only process tasks sent to the <code>job_queue</code>
|
|
9230
|
+
<p>This will create a worker that will only process tasks sent to the <code>job_queue</code> Celery queue. You can use this worker to run jobs while the rest of Nautobot's background tasks will be processed by the default Celery worker listening to the <code>celery</code> queue.</p>
|
|
9231
9231
|
<div class="admonition info">
|
|
9232
9232
|
<p class="admonition-title">Info</p>
|
|
9233
|
-
<p>Workers can be configured to listen to multiple queues by supplying a comma separated list of queues to the <code>--queues</code> argument. See the <a href="https://docs.celeryq.dev/en/stable/userguide/workers.html#queues">
|
|
9233
|
+
<p>Workers can be configured to listen to multiple queues by supplying a comma separated list of queues to the <code>--queues</code> argument. See the <a href="https://docs.celeryq.dev/en/stable/userguide/workers.html#queues">Celery workers guide</a> for more information.</p>
|
|
9234
9234
|
</div>
|
|
9235
9235
|
<div class="admonition warning">
|
|
9236
9236
|
<p class="admonition-title">Warning</p>
|
|
@@ -9247,7 +9247,7 @@
|
|
|
9247
9247
|
<p>You may have to change this setting multiple times to find what works best in your environment.</p>
|
|
9248
9248
|
<div class="admonition warning">
|
|
9249
9249
|
<p class="admonition-title">Warning</p>
|
|
9250
|
-
<p>Modifying your concurrency setting may increase the CPU and will increase the memory load on your
|
|
9250
|
+
<p>Modifying your concurrency setting may increase the CPU and will increase the memory load on your Celery worker by at least 175MB per concurrent thread. Only change this setting if you have monitoring systems in place to monitor the system resources on your worker.</p>
|
|
9251
9251
|
</div>
|
|
9252
9252
|
<div class="admonition tip">
|
|
9253
9253
|
<p class="admonition-title">Tip</p>
|
|
@@ -9604,14 +9604,14 @@
|
|
|
9604
9604
|
|
|
9605
9605
|
|
|
9606
9606
|
<h1 id="nautobot-docker-images">Nautobot Docker Images<a class="headerlink" href="#nautobot-docker-images" title="Permanent link">¶</a></h1>
|
|
9607
|
-
<p>Nautobot is packaged as a Docker image for use in a production environment; developer images are also provided for those working on App development and testing. The Docker image and deployment strategies are being actively developed, check back here or join the <
|
|
9607
|
+
<p>Nautobot is packaged as a Docker image for use in a production environment; developer images are also provided for those working on App development and testing. The Docker image and deployment strategies are being actively developed, check back here or join the <code>#nautobot</code> channel on <a href="https://slack.networktocode.com/">Network to Code's Slack community</a> for the most up to date information.</p>
|
|
9608
9608
|
<h2 id="python-versions">Python Versions<a class="headerlink" href="#python-versions" title="Permanent link">¶</a></h2>
|
|
9609
9609
|
<p>Docker images are published for multiple supported Python versions. The default image, recommended for most users, is based on the <code>python:3.12-slim</code> image.</p>
|
|
9610
9610
|
<details class="version-changed">
|
|
9611
9611
|
<summary>Changed in version 1.6.1</summary>
|
|
9612
9612
|
<p>The Python version for the image tags that do not explicitly state a Python version changed to 3.11 for Nautobot 1.6.1. From now on, these tagged images will always contain the <strong>latest</strong> supported Python version (e.g., when Python 3.12 support is added, these tags will change to contain Python 3.12). This is a change from Nautobot 1.6.0 and earlier, where tags that did not state a Python version would contain the <strong>earliest</strong> supported Python version.</p>
|
|
9613
9613
|
</details>
|
|
9614
|
-
<p>Currently images are pushed for the following
|
|
9614
|
+
<p>Currently images are pushed for the following Python versions:</p>
|
|
9615
9615
|
<ul>
|
|
9616
9616
|
<li>3.9</li>
|
|
9617
9617
|
<li>3.10</li>
|
|
@@ -9876,7 +9876,7 @@
|
|
|
9876
9876
|
</code></pre></div>
|
|
9877
9877
|
<p>Similarly, you can use <code>docker-compose.final-dev.yml</code> if you wish to build and test the <code>final-dev</code> image.</p>
|
|
9878
9878
|
<h2 id="docker-compose">Docker Compose<a class="headerlink" href="#docker-compose" title="Permanent link">¶</a></h2>
|
|
9879
|
-
<p>An <a href="https://github.com/nautobot/nautobot-docker-compose/">example library for using Docker Compose</a> to build out all of the components for Nautobot can be found within the Nautobot community. Please
|
|
9879
|
+
<p>An <a href="https://github.com/nautobot/nautobot-docker-compose/">example library for using Docker Compose</a> to build out all of the components for Nautobot can be found within the Nautobot community. Please refer to that library for examples on the base application, LDAP integration, and using Apps.</p>
|
|
9880
9880
|
|
|
9881
9881
|
|
|
9882
9882
|
|
|
@@ -9646,7 +9646,7 @@
|
|
|
9646
9646
|
<p>Note the differences between these two. In some situations you'll want to use both for different types of checks. More on this later in this document.</p>
|
|
9647
9647
|
<details class="info">
|
|
9648
9648
|
<summary>Background information</summary>
|
|
9649
|
-
<p>Nautobot uses the <a href="https://github.com/KristianOellegaard/django-health-check">django-health-check</a> project and some custom health checks (database connection and cache availability). Additional health checks are available as part of that
|
|
9649
|
+
<p>Nautobot uses the <a href="https://github.com/KristianOellegaard/django-health-check"><code>django-health-check</code></a> project and some custom health checks (database connection and cache availability). Additional health checks are available as part of that project and can be added to the <a href="../configuration/settings.html#extra-applications"><code>EXTRA_INSTALLED_APPS</code></a> configuration variable as desired.</p>
|
|
9650
9650
|
</details>
|
|
9651
9651
|
<h3 id="nautobot-celery-worker">Nautobot Celery Worker<a class="headerlink" href="#nautobot-celery-worker" title="Permanent link">¶</a></h3>
|
|
9652
9652
|
<p>In addition to monitoring the existence of a given Celery worker process ID, you can use the fact that Celery provides a <a href="https://docs.celeryq.dev/en/stable/reference/cli.html#celery-inspect"><code>celery inspect ping</code> CLI command</a> that sends a short message to a given Celery worker(s) and reports back on whether it receives a response(s). Nautobot wraps this with the <code>nautobot-server</code> CLI command, so in general you can run <code>nautobot-server celery inspect ping --destination <worker name></code> to confirm whether a given worker is able to receive and respond to Celery control messages.</p>
|
|
@@ -9285,12 +9285,12 @@
|
|
|
9285
9285
|
<summary>Added in version 2.2.1</summary>
|
|
9286
9286
|
<p>In case the <code>/metrics</code> endpoint is not performant or not required, you can disable specific apps with the <a href="../configuration/settings.html#metrics_disabled_apps"><code>METRICS_DISABLED_APPS</code></a> configuration setting.</p>
|
|
9287
9287
|
</details>
|
|
9288
|
-
<p>For more information see the <a href="https://github.com/korfuri/django-prometheus">django-prometheus</a> docs.</p>
|
|
9288
|
+
<p>For more information see the <a href="https://github.com/korfuri/django-prometheus"><code>django-prometheus</code></a> docs.</p>
|
|
9289
9289
|
<h2 id="authentication">Authentication<a class="headerlink" href="#authentication" title="Permanent link">¶</a></h2>
|
|
9290
9290
|
<details class="version-added">
|
|
9291
9291
|
<summary>Added in version 2.1.5</summary>
|
|
9292
9292
|
</details>
|
|
9293
|
-
<p>Metrics by default do not require authentication to view. Authentication can be toggled with the <code>METRICS_AUTHENTICATION</code> configuration setting. If set to <code>True</code>, this will require the user to be logged in or to use an API token. See <a href="../../platform-functionality/rest-api/authentication.html">
|
|
9293
|
+
<p>Metrics by default do not require authentication to view. Authentication can be toggled with the <code>METRICS_AUTHENTICATION</code> configuration setting. If set to <code>True</code>, this will require the user to be logged in or to use an API token. See <a href="../../platform-functionality/rest-api/authentication.html">REST API Authentication</a> for more details on API authentication.</p>
|
|
9294
9294
|
<h3 id="sample-telegraf-configuration">Sample Telegraf configuration<a class="headerlink" href="#sample-telegraf-configuration" title="Permanent link">¶</a></h3>
|
|
9295
9295
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a><span class="k">[[inputs.prometheus]]</span>
|
|
9296
9296
|
<a id="__codelineno-1-2" name="__codelineno-1-2" href="#__codelineno-1-2"></a><span class="n">urls</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">"http://localhost/metrics"</span><span class="p">]</span>
|
|
@@ -9298,7 +9298,7 @@
|
|
|
9298
9298
|
<a id="__codelineno-1-4" name="__codelineno-1-4" href="#__codelineno-1-4"></a><span class="n">http_headers</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="s2">"Authorization"</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="s2">"Token 0123456789abcdef0123456789abcdef01234567"</span><span class="p">}</span>
|
|
9299
9299
|
</code></pre></div>
|
|
9300
9300
|
<h2 id="metric-types">Metric Types<a class="headerlink" href="#metric-types" title="Permanent link">¶</a></h2>
|
|
9301
|
-
<p>Nautobot makes use of the <a href="https://github.com/korfuri/django-prometheus">django-prometheus</a> library to export a number of different types of metrics, including:</p>
|
|
9301
|
+
<p>Nautobot makes use of the <a href="https://github.com/korfuri/django-prometheus"><code>django-prometheus</code></a> library to export a number of different types of metrics, including:</p>
|
|
9302
9302
|
<ul>
|
|
9303
9303
|
<li>Per model insert, update, and delete counters</li>
|
|
9304
9304
|
<li>Per view request counters</li>
|
|
@@ -9320,7 +9320,7 @@
|
|
|
9320
9320
|
</div>
|
|
9321
9321
|
<div class="admonition note">
|
|
9322
9322
|
<p class="admonition-title">Note</p>
|
|
9323
|
-
<p>Metrics from the
|
|
9323
|
+
<p>Metrics from the Celery worker are not available from Nautobot at this time. However, additional tools such as <a href="https://flower.readthedocs.io/en/latest/">flower</a> can be used to monitor the Celery workers until these metrics are exposed through Nautobot.</p>
|
|
9324
9324
|
</div>
|
|
9325
9325
|
|
|
9326
9326
|
|
|
@@ -9400,11 +9400,11 @@
|
|
|
9400
9400
|
|
|
9401
9401
|
|
|
9402
9402
|
<h1 id="request-profiling">Request Profiling<a class="headerlink" href="#request-profiling" title="Permanent link">¶</a></h1>
|
|
9403
|
-
<p>Nautobot offers advanced request profiling through <a href="https://github.com/jazzband/django-silk">django-silk</a>. This allows administrators to collect debug information about user activities, which can be used to troubleshoot issues with the system.</p>
|
|
9403
|
+
<p>Nautobot offers advanced request profiling through <a href="https://github.com/jazzband/django-silk"><code>django-silk</code></a>. This allows administrators to collect debug information about user activities, which can be used to troubleshoot issues with the system.</p>
|
|
9404
9404
|
<h2 id="user-setting">User Setting<a class="headerlink" href="#user-setting" title="Permanent link">¶</a></h2>
|
|
9405
9405
|
<p>Request profiling may be enabled by individual users in their profile within the web interface. This can be found under the "Advanced Settings" section.</p>
|
|
9406
9406
|
<p><img alt="user advanced settings" src="../../../media/user-guide/administration/guides/request-profiling/advanced-settings.png" /></p>
|
|
9407
|
-
<p>Once a user enables request profiling, all subsequent HTTP requests made by that specific user to the system will be logged by django-silk
|
|
9407
|
+
<p>Once a user enables request profiling, all subsequent HTTP requests made by that specific user to the system will be logged by <code>django-silk</code>. This setting will persist until the user either logs out or disables the setting in their profile.</p>
|
|
9408
9408
|
<h3 id="user-setting-notes">User Setting Notes<a class="headerlink" href="#user-setting-notes" title="Permanent link">¶</a></h3>
|
|
9409
9409
|
<ul>
|
|
9410
9410
|
<li>
|
|
@@ -9415,42 +9415,42 @@
|
|
|
9415
9415
|
</li>
|
|
9416
9416
|
</ul>
|
|
9417
9417
|
<h2 id="silk-ui">Silk UI<a class="headerlink" href="#silk-ui" title="Permanent link">¶</a></h2>
|
|
9418
|
-
<p>Nautobot administrators with super-user permissions can access the django-silk UI at the <code>/silk/</code> URL.</p>
|
|
9418
|
+
<p>Nautobot administrators with super-user permissions can access the <code>django-silk</code> UI at the <code>/silk/</code> URL.</p>
|
|
9419
9419
|
<p><img alt="silk ui" src="../../../media/user-guide/administration/guides/request-profiling/silk-ui.png" /></p>
|
|
9420
9420
|
<p>From there, administrators can view details of individual requests, including timing, SQL queries, and cProfile artifacts.</p>
|
|
9421
9421
|
<h2 id="configuration">Configuration<a class="headerlink" href="#configuration" title="Permanent link">¶</a></h2>
|
|
9422
|
-
<p>The Nautobot configuration comes out of the box with django-silk set up to support the above functionality. Those settings are described below, but it is not the intention of the Nautobot docs to describe all django-silk settings. Django-silk provides several other parameters that knowledgeable users may also be able to use, depending on the use case.</p>
|
|
9423
|
-
<h3 id="allow_request_profiling">ALLOW_REQUEST_PROFILING
|
|
9422
|
+
<p>The Nautobot configuration comes out of the box with <code>django-silk</code> set up to support the above functionality. Those settings are described below, but it is not the intention of the Nautobot docs to describe all <code>django-silk</code> settings. Django-silk provides several other parameters that knowledgeable users may also be able to use, depending on the use case.</p>
|
|
9423
|
+
<h3 id="allow_request_profiling"><code>ALLOW_REQUEST_PROFILING</code><a class="headerlink" href="#allow_request_profiling" title="Permanent link">¶</a></h3>
|
|
9424
9424
|
<p>Default: <code>False</code></p>
|
|
9425
9425
|
<p>Global setting to allow or deny users from enabling request profiling on their login session.</p>
|
|
9426
9426
|
<hr />
|
|
9427
|
-
<h3 id="silky_python_profiler">SILKY_PYTHON_PROFILER
|
|
9427
|
+
<h3 id="silky_python_profiler"><code>SILKY_PYTHON_PROFILER</code><a class="headerlink" href="#silky_python_profiler" title="Permanent link">¶</a></h3>
|
|
9428
9428
|
<p>Default: <code>True</code></p>
|
|
9429
9429
|
<p>Enables use of the built-in Python cProfile profiler.</p>
|
|
9430
9430
|
<hr />
|
|
9431
|
-
<h3 id="silky_python_profiler_binary">SILKY_PYTHON_PROFILER_BINARY
|
|
9431
|
+
<h3 id="silky_python_profiler_binary"><code>SILKY_PYTHON_PROFILER_BINARY</code><a class="headerlink" href="#silky_python_profiler_binary" title="Permanent link">¶</a></h3>
|
|
9432
9432
|
<p>Default: <code>True</code></p>
|
|
9433
9433
|
<p>Generates a binary <code>.prof</code> file for each profiled request, which can be downloaded.</p>
|
|
9434
9434
|
<hr />
|
|
9435
|
-
<h3 id="silky_python_profiler_extended_file_name">SILKY_PYTHON_PROFILER_EXTENDED_FILE_NAME
|
|
9435
|
+
<h3 id="silky_python_profiler_extended_file_name"><code>SILKY_PYTHON_PROFILER_EXTENDED_FILE_NAME</code><a class="headerlink" href="#silky_python_profiler_extended_file_name" title="Permanent link">¶</a></h3>
|
|
9436
9436
|
<p>Default: <code>True</code></p>
|
|
9437
9437
|
<p>Adds part of the request URL path to the profile file name to make it easier to identify specific requests.</p>
|
|
9438
9438
|
<hr />
|
|
9439
|
-
<h3 id="silky_intercept_func">SILKY_INTERCEPT_FUNC
|
|
9439
|
+
<h3 id="silky_intercept_func"><code>SILKY_INTERCEPT_FUNC</code><a class="headerlink" href="#silky_intercept_func" title="Permanent link">¶</a></h3>
|
|
9440
9440
|
<p>Default: <code>nautobot.core.settings.silk_request_logging_intercept_logic</code></p>
|
|
9441
9441
|
<p>This defines a custom function that filters requests to be profiled. Notably, the default looks for the user session flag described above.</p>
|
|
9442
9442
|
<hr />
|
|
9443
|
-
<h3 id="silky_authentication">SILKY_AUTHENTICATION
|
|
9443
|
+
<h3 id="silky_authentication"><code>SILKY_AUTHENTICATION</code><a class="headerlink" href="#silky_authentication" title="Permanent link">¶</a></h3>
|
|
9444
9444
|
<p>Default: <code>True</code></p>
|
|
9445
|
-
<p>Users must be authenticated to access the django-silk UI.</p>
|
|
9445
|
+
<p>Users must be authenticated to access the <code>django-silk</code> UI.</p>
|
|
9446
9446
|
<hr />
|
|
9447
|
-
<h3 id="silky_authorisation">SILKY_AUTHORISATION
|
|
9447
|
+
<h3 id="silky_authorisation"><code>SILKY_AUTHORISATION</code><a class="headerlink" href="#silky_authorisation" title="Permanent link">¶</a></h3>
|
|
9448
9448
|
<p>Default: <code>True</code></p>
|
|
9449
|
-
<p>Users must have permissions to access the django-silk UI. Used in combination with <code>SILKY_AUTHENTICATION</code>.</p>
|
|
9449
|
+
<p>Users must have permissions to access the <code>django-silk</code> UI. Used in combination with <code>SILKY_AUTHENTICATION</code>.</p>
|
|
9450
9450
|
<hr />
|
|
9451
|
-
<h3 id="silky_permissions">SILKY_PERMISSIONS
|
|
9451
|
+
<h3 id="silky_permissions"><code>SILKY_PERMISSIONS</code><a class="headerlink" href="#silky_permissions" title="Permanent link">¶</a></h3>
|
|
9452
9452
|
<p>Default: <code>nautobot.core.settings.silk_user_permissions</code></p>
|
|
9453
|
-
<p>This ensures the users must be a superuser of the system to access the django-silk UI. Used in combination with <code>SILKY_AUTHENTICATION</code> and <code>SILKY_AUTHORISATION</code>.</p>
|
|
9453
|
+
<p>This ensures the users must be a superuser of the system to access the <code>django-silk</code> UI. Used in combination with <code>SILKY_AUTHENTICATION</code> and <code>SILKY_AUTHORISATION</code>.</p>
|
|
9454
9454
|
|
|
9455
9455
|
|
|
9456
9456
|
|
|
@@ -9289,7 +9289,7 @@
|
|
|
9289
9289
|
</ul>
|
|
9290
9290
|
<div class="admonition info">
|
|
9291
9291
|
<p class="admonition-title">Info</p>
|
|
9292
|
-
<p>The remaining options are not required, but django-storages documentation should be reviewed to understand the security requirements.</p>
|
|
9292
|
+
<p>The remaining options are not required, but the <code>django-storages</code> documentation should be reviewed to understand the security requirements.</p>
|
|
9293
9293
|
</div>
|
|
9294
9294
|
<p>By using the the settings listed above, the static files will be stored in the S3 bucket instead of on the Nautobot server's filesystem. Once the <code>nautobot-server collectstatic</code> is executed you will see the files.</p>
|
|
9295
9295
|
<p>Here's a snippet from the S3 bucket in use.
|
|
@@ -9315,7 +9315,7 @@
|
|
|
9315
9315
|
</code></pre></div>
|
|
9316
9316
|
<p>The <code>models.FileField</code> alongside the <code>upload_to</code> argument can be used to store user uploaded files into the already established S3 bucket. With the configuration settings provided earlier in this article and the <code>upload_to=uploads/</code> attribute the software attachments will be stored at <code>f"{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com/{AWS_LOCATION}/uploads/"</code>.</p>
|
|
9317
9317
|
<p>The nice thing about using <code>django-storages</code> is the ease of use and the ability to easily extend storage backends. One use case for extending storage backends that has been used is to store certain App data attachments in its own S3 bucket with different permissions. If we take this concept to the example of <code>SoftwareFileAttachment</code> we can put the software images in their own S3 bucket by creating a custom storage backend that we can pass to our <code>models.FileField</code> model field.</p>
|
|
9318
|
-
<p>For this example I created a simple
|
|
9318
|
+
<p>For this example I created a simple Python file called <code>customer_storage.py</code> in the root of my App.</p>
|
|
9319
9319
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-1"></a><span class="sd">"""Example of a custom extension to support flexible s3 storage."""</span>
|
|
9320
9320
|
<a id="__codelineno-5-2" name="__codelineno-5-2" href="#__codelineno-5-2"></a><span class="kn">from</span> <span class="nn">storages.backends.s3</span> <span class="kn">import</span> <span class="n">S3Storage</span>
|
|
9321
9321
|
<a id="__codelineno-5-3" name="__codelineno-5-3" href="#__codelineno-5-3"></a>
|
|
@@ -9272,7 +9272,7 @@
|
|
|
9272
9272
|
<p>You must be <strong>absolutely</strong> sure to install the app within Nautobot's virtual environment.</p>
|
|
9273
9273
|
<div class="admonition note">
|
|
9274
9274
|
<p class="admonition-title">Note</p>
|
|
9275
|
-
<p>If you installed Nautobot in a production environment, you'll want to sudo to the nautobot user first using <code>sudo -iu nautobot</code>.</p>
|
|
9275
|
+
<p>If you installed Nautobot in a production environment, you'll want to sudo to the <code>nautobot</code> user first using <code>sudo -iu nautobot</code>.</p>
|
|
9276
9276
|
</div>
|
|
9277
9277
|
<h2 id="install-the-package">Install the Package<a class="headerlink" href="#install-the-package" title="Permanent link">¶</a></h2>
|
|
9278
9278
|
<p>Download and install the app package per its installation instructions. Apps published via PyPI are typically installed using <code>pip3</code>.</p>
|
|
@@ -9686,7 +9686,7 @@ is done with the following commands.</p>
|
|
|
9686
9686
|
</div>
|
|
9687
9687
|
</div>
|
|
9688
9688
|
<h3 id="troubleshooting">Troubleshooting<a class="headerlink" href="#troubleshooting" title="Permanent link">¶</a></h3>
|
|
9689
|
-
<!-- pyml disable-next-line no-inline-html -->
|
|
9689
|
+
<!-- pyml disable-next-line no-inline-html,proper-names -->
|
|
9690
9690
|
<h4>django.db.utils.NotSupportedError: conversion between UTF8 and SQL_ASCII is not supported</h4>
|
|
9691
9691
|
|
|
9692
9692
|
<p>Django requires the database encoding for PostgreSQL databases to be set to UTF-8. If you receive the error <code>django.db.utils.NotSupportedError: conversion between UTF8 and SQL_ASCII is not supported</code>, you will need to drop and re-create the <code>nautobot</code> database with the correct encoding.</p>
|
|
@@ -750,9 +750,9 @@
|
|
|
750
750
|
</li>
|
|
751
751
|
|
|
752
752
|
<li class="md-nav__item">
|
|
753
|
-
<a href="#sudo-to-nautobot" class="md-nav__link">
|
|
753
|
+
<a href="#sudo-to-nautobot-user" class="md-nav__link">
|
|
754
754
|
<span class="md-ellipsis">
|
|
755
|
-
Sudo to nautobot
|
|
755
|
+
Sudo to nautobot user
|
|
756
756
|
</span>
|
|
757
757
|
</a>
|
|
758
758
|
|
|
@@ -9358,9 +9358,9 @@
|
|
|
9358
9358
|
</li>
|
|
9359
9359
|
|
|
9360
9360
|
<li class="md-nav__item">
|
|
9361
|
-
<a href="#sudo-to-nautobot" class="md-nav__link">
|
|
9361
|
+
<a href="#sudo-to-nautobot-user" class="md-nav__link">
|
|
9362
9362
|
<span class="md-ellipsis">
|
|
9363
|
-
Sudo to nautobot
|
|
9363
|
+
Sudo to nautobot user
|
|
9364
9364
|
</span>
|
|
9365
9365
|
</a>
|
|
9366
9366
|
|
|
@@ -9563,7 +9563,7 @@
|
|
|
9563
9563
|
<div class="highlight"><span class="filename">Example output of updating bashrc</span><pre><span></span><code><a id="__codelineno-3-1" name="__codelineno-3-1" href="#__codelineno-3-1"></a>export NAUTOBOT_ROOT=/opt/nautobot
|
|
9564
9564
|
</code></pre></div>
|
|
9565
9565
|
</details>
|
|
9566
|
-
<h2 id="sudo-to-nautobot">Sudo to nautobot<a class="headerlink" href="#sudo-to-nautobot" title="Permanent link">¶</a></h2>
|
|
9566
|
+
<h2 id="sudo-to-nautobot-user">Sudo to <code>nautobot</code> user<a class="headerlink" href="#sudo-to-nautobot-user" title="Permanent link">¶</a></h2>
|
|
9567
9567
|
<p>It is critical to install Nautobot as the <code>nautobot</code> user so that we don't have to worry about fixing permissions later.</p>
|
|
9568
9568
|
<div class="highlight"><span class="filename">Log into the nautobot user</span><pre><span></span><code><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a>sudo -iu nautobot
|
|
9569
9569
|
</code></pre></div>
|
|
@@ -9790,7 +9790,7 @@
|
|
|
9790
9790
|
<div class="highlight"><span class="filename">Run a nautobot-server check</span><pre><span></span><code><a id="__codelineno-29-1" name="__codelineno-29-1" href="#__codelineno-29-1"></a>nautobot-server check
|
|
9791
9791
|
</code></pre></div>
|
|
9792
9792
|
<details class="example">
|
|
9793
|
-
<summary>nautobot-server check output</summary>
|
|
9793
|
+
<summary><code>nautobot-server check</code> output</summary>
|
|
9794
9794
|
<div class="highlight"><span class="filename">Example nautobot-server check output</span><pre><span></span><code><a id="__codelineno-30-1" name="__codelineno-30-1" href="#__codelineno-30-1"></a>System check identified no issues (0 silenced).
|
|
9795
9795
|
</code></pre></div>
|
|
9796
9796
|
</details>
|
|
@@ -9840,7 +9840,7 @@ Fields</a>, and <a href="../../platform-functionality/gitrepository.html">Git Re
|
|
|
9840
9840
|
<p>Please see the <a href="../configuration/settings.html#databases">configuration guide on MySQL Unicode settings</a> for instructions on how to address this.</p>
|
|
9841
9841
|
<p>Please see <a href="https://github.com/nautobot/nautobot/issues/645">Computed fields with fallback value that is unicode results in OperationalError (#645)</a> for more details.</p>
|
|
9842
9842
|
<h3 id="svg-images-not-rendered">SVG images not rendered<a class="headerlink" href="#svg-images-not-rendered" title="Permanent link">¶</a></h3>
|
|
9843
|
-
<p>When serving Nautobot directly from uWSGI on RedHat or CentOS there may be a problem rendering .svg images to include the Nautobot logo. On the RedHat based operating systems there is no file <code>/etc/mime.types</code> by default, unfortunately, uWSGI looks for this file to serve static files (see <a href="https://uwsgi-docs.readthedocs.io/en/latest/StaticFiles.html#mime-types">Serving static files with uWSGI</a>). To work around this copy the file <code>/etc/mime.types</code> from a known good system for example an Ubuntu/Debian system or even the Nautobot container to
|
|
9843
|
+
<p>When serving Nautobot directly from uWSGI on RedHat or CentOS there may be a problem rendering .svg images to include the Nautobot logo. On the RedHat based operating systems there is no file <code>/etc/mime.types</code> by default, unfortunately, uWSGI looks for this file to serve static files (see <a href="https://uwsgi-docs.readthedocs.io/en/latest/StaticFiles.html#mime-types">Serving static files with uWSGI</a>). To work around this copy the file <code>/etc/mime.types</code> from a known good system for example an Ubuntu/Debian system or even the Nautobot container to <code>/opt/nautobot/mime.types</code>. Then add the following line to your <code>uwsgi.ini</code> file and restart the Nautobot services:</p>
|
|
9844
9844
|
<div class="highlight"><span class="filename">Add MIME file settings to uwsgi.ini</span><pre><span></span><code><a id="__codelineno-18-1" name="__codelineno-18-1" href="#__codelineno-18-1"></a>mime-file = /opt/nautobot/mime.types
|
|
9845
9845
|
</code></pre></div>
|
|
9846
9846
|
<p>Alternatively, host Nautobot behind Nginx as instructed in <a href="http-server.html">HTTP server setup</a>.</p>
|
|
@@ -9230,7 +9230,7 @@
|
|
|
9230
9230
|
<h2 id="security-vulnerability-reporting">Security Vulnerability Reporting<a class="headerlink" href="#security-vulnerability-reporting" title="Permanent link">¶</a></h2>
|
|
9231
9231
|
<p>We appreciate the time security researchers and users contribute to reporting vulnerabilities to the Nautobot Community.</p>
|
|
9232
9232
|
<p>If you feel your report is safe for public disclosure (a CVE related to a dependency, or a low-risk bug) please feel free to open a bug <a href="https://github.com/nautobot/nautobot/issues/new/choose">issue on GitHub</a>.</p>
|
|
9233
|
-
<p>If you are unsure of the severity of your report or you feel it should not be publicly disclosed until a fix has been released, you can also email <a href="mailto:security@nautobot.com">security@nautobot.com</a> with the security details.</p>
|
|
9233
|
+
<p>If you are unsure of the severity of your report or you feel it should not be publicly disclosed until a fix has been released, you can also email <a href="mailto:security@nautobot.com"><code>security@nautobot.com</code></a> with the security details.</p>
|
|
9234
9234
|
<p>You may encrypt your email with the GPG keys of the security response members below. While accepted, encryption using GPG is NOT mandatory to make a disclosure.</p>
|
|
9235
9235
|
<div class="admonition tip">
|
|
9236
9236
|
<p class="admonition-title">When Should I Report a Vulnerability?</p>
|
|
@@ -9342,6 +9342,7 @@
|
|
|
9342
9342
|
<h1 id="nautobot-security-notices">Nautobot Security Notices<a class="headerlink" href="#nautobot-security-notices" title="Permanent link">¶</a></h1>
|
|
9343
9343
|
<p>As a part of the Nautobot development team's commitment to security, we maintain the below historical list of security issues which have been fixed and disclosed. Note that this list <strong>only</strong> includes issues in Nautobot itself; while we frequently update our library dependencies to keep them up-to-date and free of known security issues therein, any reported issues in such libraries, and the corresponding updates to Nautobot's specified dependencies, are out of scope for this document.</p>
|
|
9344
9344
|
<h2 id="cve-2024-36112">CVE-2024-36112<a class="headerlink" href="#cve-2024-36112" title="Permanent link">¶</a></h2>
|
|
9345
|
+
<!-- pyml disable-num-lines 500 proper-names -->
|
|
9345
9346
|
<!-- pyml disable-next-line no-inline-html -->
|
|
9346
9347
|
<table>
|
|
9347
9348
|
<tr>
|
|
@@ -9265,7 +9265,7 @@
|
|
|
9265
9265
|
<p>Nautobot includes a Python management shell within which objects can be directly queried, created, modified, and deleted. To enter the shell, run the following command:</p>
|
|
9266
9266
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>nautobot-server nbshell
|
|
9267
9267
|
</code></pre></div>
|
|
9268
|
-
<p>This will launch a lightly customized version of <a href="https://django-extensions.readthedocs.io/en/latest/shell_plus.html">the django-extensions <code>shell_plus</code> shell</a>, which is an extension of <a href="https://docs.djangoproject.com/en/stable/ref/django-admin/#shell">the built-in Django shell</a> with all relevant Nautobot models pre-loaded.</p>
|
|
9268
|
+
<p>This will launch a lightly customized version of <a href="https://django-extensions.readthedocs.io/en/latest/shell_plus.html">the <code>django-extensions</code> <code>shell_plus</code> shell</a>, which is an extension of <a href="https://docs.djangoproject.com/en/stable/ref/django-admin/#shell">the built-in Django shell</a> with all relevant Nautobot models pre-loaded.</p>
|
|
9269
9269
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>nautobot-server nbshell
|
|
9270
9270
|
</code></pre></div>
|
|
9271
9271
|
<p>Example output:</p>
|
|
@@ -14418,15 +14418,18 @@ Most removed database fields in Nautobot 2.0 fall into the following general cat
|
|
|
14418
14418
|
<p>With the removal of the atomic transaction, the <code>commit</code> flag has been removed. The ability to bypass job approval on dryrun can be achieved by using an optional <code>dryrun</code> argument. Job authors who wish to allow users to bypass approval when the <code>dryrun</code> flag is set should set a <code>dryrun</code> attribute with a value of <code>DryRunVar()</code> on their job class. <code>DryRunVar</code> can be imported from <code>nautobot.extras.jobs</code>.</p>
|
|
14419
14419
|
<div class="admonition example">
|
|
14420
14420
|
<p class="admonition-title">Example</p>
|
|
14421
|
-
<div class="highlight"><pre><span></span><code><a id="__codelineno-13-1" name="__codelineno-13-1" href="#__codelineno-13-1"></a><span class="kn">from</span> <span class="nn">nautobot.extras.jobs</span> <span class="kn">import</span> <span class="n">DryRunVar</span><span class="p">,</span> <span class="n">Job</span>
|
|
14422
|
-
<a id="__codelineno-13-2" name="__codelineno-13-2" href="#__codelineno-13-2"></a>
|
|
14423
|
-
<a id="__codelineno-13-3" name="__codelineno-13-3" href="#__codelineno-13-3"></a><span class="k">class</span> <span class="nc">ExampleJob</span><span class="p">(</span><span class="n">Job</span><span class="p">):</span>
|
|
14424
|
-
<a id="__codelineno-13-4" name="__codelineno-13-4" href="#__codelineno-13-4"></a> <span class="n">dryrun</span> <span class="o">=</span> <span class="n">DryRunVar</span><span class="p">()</span>
|
|
14425
|
-
<a id="__codelineno-13-5" name="__codelineno-13-5" href="#__codelineno-13-5"></a>
|
|
14426
|
-
<a id="__codelineno-13-6" name="__codelineno-13-6" href="#__codelineno-13-6"></a> <span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dryrun</span><span class="p">):</span>
|
|
14427
|
-
<a id="__codelineno-13-7" name="__codelineno-13-7" href="#__codelineno-13-7"></a> <span class="o">...</span>
|
|
14428
|
-
</code></pre></div>
|
|
14429
14421
|
</div>
|
|
14422
|
+
<!-- pyml disable-num-lines 2 proper-names -->
|
|
14423
|
+
<div class="highlight"><pre><span></span><code>```py
|
|
14424
|
+
from nautobot.extras.jobs import DryRunVar, Job
|
|
14425
|
+
|
|
14426
|
+
class ExampleJob(Job):
|
|
14427
|
+
dryrun = DryRunVar()
|
|
14428
|
+
|
|
14429
|
+
def run(self, dryrun):
|
|
14430
|
+
...
|
|
14431
|
+
```
|
|
14432
|
+
</code></pre></div>
|
|
14430
14433
|
<p>A new <code>supports_dryrun</code> field has been added to the <code>Job</code> model and <code>Job</code> class that returns true if the <code>Job</code> class implements the <code>dryrun = DryRunVar()</code> attribute. This is used to determine if jobs that require approval can be dry run without prior approval.</p>
|
|
14431
14434
|
<p>The <code>commit_default</code> job field has been renamed to <code>dryrun_default</code> and the default value has been changed from <code>True</code> to <code>False</code>.</p>
|
|
14432
14435
|
<div class="admonition important">
|