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
|
@@ -2364,7 +2364,7 @@
|
|
|
2364
2364
|
<li class="md-nav__item">
|
|
2365
2365
|
<a href="#retrieve-custom-field-data-in-the-rest-api" class="md-nav__link">
|
|
2366
2366
|
<span class="md-ellipsis">
|
|
2367
|
-
Retrieve Custom Field Data in the
|
|
2367
|
+
Retrieve Custom Field Data in the REST API
|
|
2368
2368
|
</span>
|
|
2369
2369
|
</a>
|
|
2370
2370
|
|
|
@@ -2439,7 +2439,7 @@
|
|
|
2439
2439
|
<li class="md-nav__item">
|
|
2440
2440
|
<a href="#modify-custom-field-data-in-the-rest-api" class="md-nav__link">
|
|
2441
2441
|
<span class="md-ellipsis">
|
|
2442
|
-
Modify Custom Field Data in the
|
|
2442
|
+
Modify Custom Field Data in the REST API
|
|
2443
2443
|
</span>
|
|
2444
2444
|
</a>
|
|
2445
2445
|
|
|
@@ -9713,7 +9713,7 @@
|
|
|
9713
9713
|
<li class="md-nav__item">
|
|
9714
9714
|
<a href="#retrieve-custom-field-data-in-the-rest-api" class="md-nav__link">
|
|
9715
9715
|
<span class="md-ellipsis">
|
|
9716
|
-
Retrieve Custom Field Data in the
|
|
9716
|
+
Retrieve Custom Field Data in the REST API
|
|
9717
9717
|
</span>
|
|
9718
9718
|
</a>
|
|
9719
9719
|
|
|
@@ -9788,7 +9788,7 @@
|
|
|
9788
9788
|
<li class="md-nav__item">
|
|
9789
9789
|
<a href="#modify-custom-field-data-in-the-rest-api" class="md-nav__link">
|
|
9790
9790
|
<span class="md-ellipsis">
|
|
9791
|
-
Modify Custom Field Data in the
|
|
9791
|
+
Modify Custom Field Data in the REST API
|
|
9792
9792
|
</span>
|
|
9793
9793
|
</a>
|
|
9794
9794
|
|
|
@@ -9879,7 +9879,7 @@
|
|
|
9879
9879
|
<h4 id="maximum-value">Maximum value<a class="headerlink" href="#maximum-value" title="Permanent link">¶</a></h4>
|
|
9880
9880
|
<p>Maximum allowed value for <code>Integer</code> fields. Maximum allowed length for <code>Text</code>, <code>URL</code>, <code>JSON</code>, and <code>Markdown</code> fields. Maximum allowed length of each defined choice for a <code>Select</code> or <code>Multiple Selection</code> field.</p>
|
|
9881
9881
|
<h4 id="validation-regex">Validation Regex<a class="headerlink" href="#validation-regex" title="Permanent link">¶</a></h4>
|
|
9882
|
-
<p>Regular expression to enforce on <code>Text</code>, <code>URL</code>, <code>JSON</code>, <code>Markdown</code>, <code>Selection</code> and <code>Multiple selection</code> field values. Regex validation is handled by the <a href="https://docs.python.org/3/library/re.html">
|
|
9882
|
+
<p>Regular expression to enforce on <code>Text</code>, <code>URL</code>, <code>JSON</code>, <code>Markdown</code>, <code>Selection</code> and <code>Multiple selection</code> field values. Regex validation is handled by the <a href="https://docs.python.org/3/library/re.html">Python <code>re</code> engine</a> which uses a PCRE or perl-like regular expression syntax. Examples of common regex validations:</p>
|
|
9883
9883
|
<p>Must start with companyname</p>
|
|
9884
9884
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>^companyname
|
|
9885
9885
|
</code></pre></div>
|
|
@@ -9923,7 +9923,7 @@
|
|
|
9923
9923
|
<a id="__codelineno-6-10" name="__codelineno-6-10" href="#__codelineno-6-10"></a><span class="s1">'1970-01-01'</span>
|
|
9924
9924
|
</code></pre></div>
|
|
9925
9925
|
<p>The <code>key</code> of the custom field is used as the key for the associated object's data dictionary.</p>
|
|
9926
|
-
<h3 id="retrieve-custom-field-data-in-the-rest-api">Retrieve Custom Field Data in the
|
|
9926
|
+
<h3 id="retrieve-custom-field-data-in-the-rest-api">Retrieve Custom Field Data in the REST API<a class="headerlink" href="#retrieve-custom-field-data-in-the-rest-api" title="Permanent link">¶</a></h3>
|
|
9927
9927
|
<p>Custom fields are returned in the API for all supported models in the <code>custom_fields</code> key:</p>
|
|
9928
9928
|
<details class="info">
|
|
9929
9929
|
<summary><code>GET http://localhost:8080/api/dcim/devices/ffd8df99-6d1a-41c3-b19f-b8357eefc481/</code></summary>
|
|
@@ -10006,7 +10006,7 @@
|
|
|
10006
10006
|
</code></pre></div>
|
|
10007
10007
|
</details>
|
|
10008
10008
|
<h4 id="filter-queries-on-custom-field-data-in-graphql">Filter Queries on Custom Field Data in GraphQL<a class="headerlink" href="#filter-queries-on-custom-field-data-in-graphql" title="Permanent link">¶</a></h4>
|
|
10009
|
-
<p>Queries can also be filtered by custom field values using any of the filters available in the UI and
|
|
10009
|
+
<p>Queries can also be filtered by custom field values using any of the filters available in the UI and REST API:</p>
|
|
10010
10010
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-12-1" name="__codelineno-12-1" href="#__codelineno-12-1"></a># Retrieve devices where custom field support_group
|
|
10011
10011
|
<a id="__codelineno-12-2" name="__codelineno-12-2" href="#__codelineno-12-2"></a># does not contain "Network Operations" (case insensitive)
|
|
10012
10012
|
<a id="__codelineno-12-3" name="__codelineno-12-3" href="#__codelineno-12-3"></a>{
|
|
@@ -10034,7 +10034,7 @@
|
|
|
10034
10034
|
</details>
|
|
10035
10035
|
<h2 id="modifying-custom-field-data">Modifying Custom Field Data<a class="headerlink" href="#modifying-custom-field-data" title="Permanent link">¶</a></h2>
|
|
10036
10036
|
<h3 id="modify-custom-field-data-in-nautobot-shell">Modify Custom Field Data in Nautobot Shell<a class="headerlink" href="#modify-custom-field-data-in-nautobot-shell" title="Permanent link">¶</a></h3>
|
|
10037
|
-
<p>Custom field data behaves like a
|
|
10037
|
+
<p>Custom field data behaves like a Python dictionary in the Nautobot Shell. When modifying custom fields through the Nautobot Shell, make sure to use the <code>.validated_save()</code> method to save the object to ensure that custom field validation is performed. Example:</p>
|
|
10038
10038
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-14-1" name="__codelineno-14-1" href="#__codelineno-14-1"></a><span class="o">>>></span> <span class="n">device</span><span class="o">.</span><span class="n">cf</span><span class="p">[</span><span class="s2">"support_group"</span><span class="p">]</span>
|
|
10039
10039
|
<a id="__codelineno-14-2" name="__codelineno-14-2" href="#__codelineno-14-2"></a><span class="s1">'Network Operations (555-4357)'</span>
|
|
10040
10040
|
<a id="__codelineno-14-3" name="__codelineno-14-3" href="#__codelineno-14-3"></a><span class="o">>>></span> <span class="n">device</span><span class="o">.</span><span class="n">cf</span><span class="p">[</span><span class="s2">"support_group"</span><span class="p">]</span> <span class="o">=</span> <span class="s2">"Network Testing (555-8080)"</span>
|
|
@@ -10043,12 +10043,12 @@
|
|
|
10043
10043
|
<a id="__codelineno-14-6" name="__codelineno-14-6" href="#__codelineno-14-6"></a><span class="s1">'Network Testing (555-8080)'</span>
|
|
10044
10044
|
</code></pre></div>
|
|
10045
10045
|
<p>If you do not use <code>.validated_save()</code> when creating or updating objects, the custom field dictionary will not be populated with default values or even empty values and this can lead to unintuitive behaviour.</p>
|
|
10046
|
-
<h3 id="modify-custom-field-data-in-the-rest-api">Modify Custom Field Data in the
|
|
10047
|
-
<p>Individual custom field data can be modified by sending a PATCH to the
|
|
10046
|
+
<h3 id="modify-custom-field-data-in-the-rest-api">Modify Custom Field Data in the REST API<a class="headerlink" href="#modify-custom-field-data-in-the-rest-api" title="Permanent link">¶</a></h3>
|
|
10047
|
+
<p>Individual custom field data can be modified by sending a PATCH to the REST API and setting the new value in the <code>custom_fields</code> key:</p>
|
|
10048
10048
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-15-1" name="__codelineno-15-1" href="#__codelineno-15-1"></a>PATCH http://localhost:8080/api/dcim/devices/ffd8df99-6d1a-41c3-b19f-b8357eefc481/
|
|
10049
10049
|
<a id="__codelineno-15-2" name="__codelineno-15-2" href="#__codelineno-15-2"></a>{
|
|
10050
10050
|
<a id="__codelineno-15-3" name="__codelineno-15-3" href="#__codelineno-15-3"></a> "custom_fields": {
|
|
10051
|
-
<a id="__codelineno-15-4" name="__codelineno-15-4" href="#__codelineno-15-4"></a> "support_group": "
|
|
10051
|
+
<a id="__codelineno-15-4" name="__codelineno-15-4" href="#__codelineno-15-4"></a> "support_group": "REST API test"
|
|
10052
10052
|
<a id="__codelineno-15-5" name="__codelineno-15-5" href="#__codelineno-15-5"></a> }
|
|
10053
10053
|
<a id="__codelineno-15-6" name="__codelineno-15-6" href="#__codelineno-15-6"></a>}
|
|
10054
10054
|
</code></pre></div>
|
|
@@ -10061,7 +10061,7 @@
|
|
|
10061
10061
|
<a id="__codelineno-16-5" name="__codelineno-16-5" href="#__codelineno-16-5"></a><span class="w"> </span><span class="nt">"dmz_device"</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span>
|
|
10062
10062
|
<a id="__codelineno-16-6" name="__codelineno-16-6" href="#__codelineno-16-6"></a><span class="w"> </span><span class="nt">"eol_date"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1970-01-01"</span><span class="p">,</span>
|
|
10063
10063
|
<a id="__codelineno-16-7" name="__codelineno-16-7" href="#__codelineno-16-7"></a><span class="w"> </span><span class="nt">"cmdb_id"</span><span class="p">:</span><span class="w"> </span><span class="mi">12345</span><span class="p">,</span>
|
|
10064
|
-
<a id="__codelineno-16-8" name="__codelineno-16-8" href="#__codelineno-16-8"></a><span class="w"> </span><span class="nt">"support_group"</span><span class="p">:</span><span class="w"> </span><span class="s2">"
|
|
10064
|
+
<a id="__codelineno-16-8" name="__codelineno-16-8" href="#__codelineno-16-8"></a><span class="w"> </span><span class="nt">"support_group"</span><span class="p">:</span><span class="w"> </span><span class="s2">"REST API test"</span>
|
|
10065
10065
|
<a id="__codelineno-16-9" name="__codelineno-16-9" href="#__codelineno-16-9"></a><span class="w"> </span><span class="p">}</span>
|
|
10066
10066
|
<a id="__codelineno-16-10" name="__codelineno-16-10" href="#__codelineno-16-10"></a><span class="p">}</span>
|
|
10067
10067
|
</code></pre></div>
|
|
@@ -9766,7 +9766,7 @@ Navigate to <strong>Git Repositories</strong> and select the repository in quest
|
|
|
9766
9766
|
<a id="__codelineno-6-4" name="__codelineno-6-4" href="#__codelineno-6-4"></a>├── query2.gql
|
|
9767
9767
|
</code></pre></div>
|
|
9768
9768
|
<h2 id="additional-git-data-sources">Additional Git Data Sources<a class="headerlink" href="#additional-git-data-sources" title="Permanent link">¶</a></h2>
|
|
9769
|
-
<p>As seen in <a href="#fill-out-repository-details">Fill out Repository Details</a>, the standard installation of Nautobot will come natively with export templates, jobs, and config contexts. Additional data sources can be incorporated using the Nautobot App system. For example, the <a href="https://github.com/nautobot/nautobot-app-golden-config">
|
|
9769
|
+
<p>As seen in <a href="#fill-out-repository-details">Fill out Repository Details</a>, the standard installation of Nautobot will come natively with export templates, jobs, and config contexts. Additional data sources can be incorporated using the Nautobot App system. For example, the <a href="https://github.com/nautobot/nautobot-app-golden-config">Golden Configuration</a> App implements four additional data sources.</p>
|
|
9770
9770
|
<ul>
|
|
9771
9771
|
<li>Config Contexts</li>
|
|
9772
9772
|
<li>Backup Configs</li>
|
|
@@ -9515,7 +9515,7 @@
|
|
|
9515
9515
|
</div>
|
|
9516
9516
|
<h2 id="dynamic-group-types">Dynamic Group Types<a class="headerlink" href="#dynamic-group-types" title="Permanent link">¶</a></h2>
|
|
9517
9517
|
<h3 id="filter-based-dynamic-groups">Filter-Based Dynamic Groups<a class="headerlink" href="#filter-based-dynamic-groups" title="Permanent link">¶</a></h3>
|
|
9518
|
-
<p>Assignment of objects to a filter-based Dynamic Group is powered by Nautobot <strong>FilterSet</strong> classes underneath the hood. The <a href="https://django-filter.readthedocs.io/en/stable/">django-filter</a> documentation may be a useful reference for users wanting to develop an in-depth understanding of FilterSets, but is by no means required to understand Dynamic Groups.</p>
|
|
9518
|
+
<p>Assignment of objects to a filter-based Dynamic Group is powered by Nautobot <strong>FilterSet</strong> classes underneath the hood. The <a href="https://django-filter.readthedocs.io/en/stable/"><code>django-filter</code></a> documentation may be a useful reference for users wanting to develop an in-depth understanding of FilterSets, but is by no means required to understand Dynamic Groups.</p>
|
|
9519
9519
|
<p>A filter-based Dynamic Group defines a <code>filter</code> field, which is stored in the database as a JSON dict. An object is considered to be a member of such a Dynamic Group if it has the correct Content Type and it is not excluded by the filter criteria defined by the group. By default, a freshly created Dynamic Group has an empty filter (<code>{}</code>), which means that all objects of the matching Content Type are members of this group, just as a default list view of these objects would display all such objects prior to any filter fields being selected in the web UI.</p>
|
|
9520
9520
|
<p>For example, for a Dynamic Group with Content Type of <code>dcim.device</code> and an empty filter, the list of members would be equivalent to the default Device list view, which in turn is equivalent to the queryset for <code>Device.objects.all()</code> from the database ORM.</p>
|
|
9521
9521
|
<details class="version-changed">
|
|
@@ -9113,7 +9113,7 @@
|
|
|
9113
9113
|
<li class="md-nav__item">
|
|
9114
9114
|
<a href="#querying-the-graphql-interface-over-the-rest-api" class="md-nav__link">
|
|
9115
9115
|
<span class="md-ellipsis">
|
|
9116
|
-
Querying the GraphQL interface over the
|
|
9116
|
+
Querying the GraphQL interface over the REST API
|
|
9117
9117
|
</span>
|
|
9118
9118
|
</a>
|
|
9119
9119
|
|
|
@@ -9216,8 +9216,8 @@
|
|
|
9216
9216
|
<a id="__codelineno-1-23" name="__codelineno-1-23" href="#__codelineno-1-23"></a><span class="p">}</span>
|
|
9217
9217
|
</code></pre></div>
|
|
9218
9218
|
<p>It is possible to explore the Graph and create some queries in a human friendly UI at the endpoint <code>graphql/</code>. This interface (called <code>graphqli</code>) provides a great playground to build new queries as it provides full autocompletion and type validation.</p>
|
|
9219
|
-
<h2 id="querying-the-graphql-interface-over-the-rest-api">Querying the GraphQL interface over the
|
|
9220
|
-
<p>It is possible to query the GraphQL interface via the
|
|
9219
|
+
<h2 id="querying-the-graphql-interface-over-the-rest-api">Querying the GraphQL interface over the REST API<a class="headerlink" href="#querying-the-graphql-interface-over-the-rest-api" title="Permanent link">¶</a></h2>
|
|
9220
|
+
<p>It is possible to query the GraphQL interface via the REST API as well, the endpoint is available at <code>api/graphql/</code> and supports the same Token based authentication as all other Nautobot APIs.</p>
|
|
9221
9221
|
<p>A GraphQL Query must be encapsulated in a JSON payload with the <code>query</code> key and sent with a POST request. Optionally it is possible to provide a list of <code>variables</code> in the same payload as presented below.</p>
|
|
9222
9222
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-2-1" name="__codelineno-2-1" href="#__codelineno-2-1"></a><span class="p">{</span>
|
|
9223
9223
|
<a id="__codelineno-2-2" name="__codelineno-2-2" href="#__codelineno-2-2"></a><span class="w"> </span><span class="nt">"query"</span><span class="p">:</span><span class="w"> </span><span class="s2">"query ($id: Int!) { device(id: $id) { name }}"</span><span class="p">,</span>
|
|
@@ -9125,8 +9125,8 @@
|
|
|
9125
9125
|
<details class="version-added">
|
|
9126
9126
|
<summary>Added in version 2.4.0</summary>
|
|
9127
9127
|
</details>
|
|
9128
|
-
<p>JobQueue instances represent the queues that
|
|
9129
|
-
<p>The JobQueue model has <code>name</code> and <code>queue_type</code> as required attributes. The <code>name</code> attribute has to be unique on each Job Queue and there are currently two supported queue types: "celery" and "kubernetes"
|
|
9128
|
+
<p>JobQueue instances represent the queues that Nautobot <a href="index.html">jobs</a> can be run on. It is introduced as an alternative to <code>task_queues</code> attribute on the Job model to define the eligible queues for this job.</p>
|
|
9129
|
+
<p>The JobQueue model has <code>name</code> and <code>queue_type</code> as required attributes. The <code>name</code> attribute has to be unique on each Job Queue and there are currently two supported queue types: <code>"celery"</code> and <code>"kubernetes"</code>. The user can optionally assign a <a href="../../core-data-model/tenancy/tenant.html">tenant</a> instance to a Job Queue.</p>
|
|
9130
9130
|
<p>You can access the Job instances that the Job Queue is assigned to through the <code>jobs</code> attribute from the Job Queue side.</p>
|
|
9131
9131
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="o">>>></span> <span class="n">JobQueue</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">first</span><span class="p">()</span>
|
|
9132
9132
|
<a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a><span class="o"><</span><span class="n">JobQueue</span><span class="p">:</span> <span class="n">celery</span><span class="p">:</span> <span class="n">celery</span> <span class="n">Job</span> <span class="n">Queue</span> <span class="o">-</span> <span class="mi">2</span><span class="o">></span>
|
nautobot/project-static/docs/user-guide/platform-functionality/jobs/kubernetes-job-support.html
CHANGED
|
@@ -9412,8 +9412,8 @@
|
|
|
9412
9412
|
</ol>
|
|
9413
9413
|
<p>So if you have any concerns with running Celery workers in your Kubernetes deployment, executing jobs with Kubernetes might be for you.</p>
|
|
9414
9414
|
<h2 id="how-to-configure-environment-variables">How to Configure Environment Variables<a class="headerlink" href="#how-to-configure-environment-variables" title="Permanent link">¶</a></h2>
|
|
9415
|
-
<h3 id="nautobot_kubernetes_job_manifest">NAUTOBOT_KUBERNETES_JOB_MANIFEST
|
|
9416
|
-
<p>This environment variable should store a <a href="https://kubernetes.io/docs/concepts/workloads/controllers/job/">Kubernetes Job</a> template as a
|
|
9415
|
+
<h3 id="nautobot_kubernetes_job_manifest"><code>NAUTOBOT_KUBERNETES_JOB_MANIFEST</code><a class="headerlink" href="#nautobot_kubernetes_job_manifest" title="Permanent link">¶</a></h3>
|
|
9416
|
+
<p>This environment variable should store a <a href="https://kubernetes.io/docs/concepts/workloads/controllers/job/">Kubernetes Job</a> template as a Python dictionary. Below is a sample kubernetes job manifest.</p>
|
|
9417
9417
|
<div class="admonition important">
|
|
9418
9418
|
<p class="admonition-title">Important</p>
|
|
9419
9419
|
<p>Ensure this job template uses the same Docker image as your Nautobot Kubernetes deployment. You can specify the image name in spec.template.spec.containers.image. Additionally, configure and map the required environment variables to corresponding <a href="https://kubernetes.io/docs/concepts/configuration/configmap/">Kubernetes ConfigMap</a> instances. These variables can be defined in the spec.template.spec.containers.env list. For consistency, it is recommended to use the same environment configuration for this Job manifest as that of your Nautobot Kubernetes deployment.</p>
|
|
@@ -9482,9 +9482,9 @@
|
|
|
9482
9482
|
<a id="__codelineno-0-62" name="__codelineno-0-62" href="#__codelineno-0-62"></a> <span class="p">},</span>
|
|
9483
9483
|
<a id="__codelineno-0-63" name="__codelineno-0-63" href="#__codelineno-0-63"></a><span class="p">}</span>
|
|
9484
9484
|
</code></pre></div>
|
|
9485
|
-
<h3 id="nautobot_kubernetes_job_pod_name">NAUTOBOT_KUBERNETES_JOB_POD_NAME
|
|
9486
|
-
<p>The default value for this environment variable is "nautobot-job"
|
|
9487
|
-
<h3 id="nautobot_kubernetes_job_pod_namespace">NAUTOBOT_KUBERNETES_JOB_POD_NAMESPACE
|
|
9485
|
+
<h3 id="nautobot_kubernetes_job_pod_name"><code>NAUTOBOT_KUBERNETES_JOB_POD_NAME</code><a class="headerlink" href="#nautobot_kubernetes_job_pod_name" title="Permanent link">¶</a></h3>
|
|
9486
|
+
<p>The default value for this environment variable is <code>"nautobot-job"</code>. You can modify this value as needed; however, ensure that <code>metadata.name</code> field in <code>NAUTOBOT_KUBERNETES_JOB_MANIFEST</code> is updated accordingly to maintain consistencty</p>
|
|
9487
|
+
<h3 id="nautobot_kubernetes_job_pod_namespace"><code>NAUTOBOT_KUBERNETES_JOB_POD_NAMESPACE</code><a class="headerlink" href="#nautobot_kubernetes_job_pod_namespace" title="Permanent link">¶</a></h3>
|
|
9488
9488
|
<p>The default value for this environment variable is "default". However, this value could be inaccurate depending on the setup of your Nautobot deployment. To ensure you have the right value for this variable. You can run the command <code>kubectl describe pod <nautobot-pod-name></code> and you should see an output similar to what is below:</p>
|
|
9489
9489
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>Name:<span class="w"> </span>nautobot-679bdc765-hl72m
|
|
9490
9490
|
<a id="__codelineno-1-2" name="__codelineno-1-2" href="#__codelineno-1-2"></a>Namespace:<span class="w"> </span>default
|
|
@@ -9501,7 +9501,7 @@
|
|
|
9501
9501
|
<a id="__codelineno-1-13" name="__codelineno-1-13" href="#__codelineno-1-13"></a>...
|
|
9502
9502
|
</code></pre></div>
|
|
9503
9503
|
<p>Note that the field with label <code>Namespace</code> tells you exactly what namespace your Nautobot deployment is in and what value you should assign to the environment variable <code>NAUTOBOT_KUBERNETES_JOB_POD_NAMESPACE</code>. To ensure you have the right value for this variable. You can run the command <code>kubectl describe pod <nautobot-pod-name></code> and you should see an output similar to what is below:</p>
|
|
9504
|
-
<h3 id="nautobot_kubernetes_default_service_address">NAUTOBOT_KUBERNETES_DEFAULT_SERVICE_ADDRESS
|
|
9504
|
+
<h3 id="nautobot_kubernetes_default_service_address"><code>NAUTOBOT_KUBERNETES_DEFAULT_SERVICE_ADDRESS</code><a class="headerlink" href="#nautobot_kubernetes_default_service_address" title="Permanent link">¶</a></h3>
|
|
9505
9505
|
<p>The default value for this environment variable is <a href="https://kubernetes.default.svc">https://kubernetes.default.svc</a>. However, this value may vary depending on your Nautobot deployment setup. The format for the base URL is <code>https://<kubernetes-service-name>.<kubernetes-service-namespace>.svc.</code></p>
|
|
9506
9506
|
<p>If you know the namespace where your Kubernetes service is running, you can run the command <code>kubectl get services -n <kubernetes-service-namespace></code> to retrieve the service details. The output will resemble the example shown below.</p>
|
|
9507
9507
|
<div class="highlight"><pre><span></span><code><a id="__codelineno-2-1" name="__codelineno-2-1" href="#__codelineno-2-1"></a>NAME<span class="w"> </span>TYPE<span class="w"> </span>CLUSTER-IP<span class="w"> </span>EXTERNAL-IP<span class="w"> </span>PORT<span class="o">(</span>S<span class="o">)</span><span class="w"> </span>AGE
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
$(document).on('show.bs.dropdown', '.table-responsive .dropdown', function() {
|
|
2
|
+
const $dropdown = $(this);
|
|
3
|
+
const $toggle = $dropdown.find('.dropdown-toggle');
|
|
4
|
+
const $menu = $dropdown.find('.dropdown-menu');
|
|
5
|
+
|
|
6
|
+
const toggleOffset = $toggle.offset();
|
|
7
|
+
const topOffset = toggleOffset.top + $toggle.outerHeight()
|
|
8
|
+
// calculate left offset to match right side edges of dropdown and toggle button
|
|
9
|
+
const leftOffset = toggleOffset.left + $toggle.outerWidth() - $menu.outerWidth()
|
|
10
|
+
|
|
11
|
+
$menu.appendTo('body').css({
|
|
12
|
+
position: 'absolute',
|
|
13
|
+
top: topOffset,
|
|
14
|
+
left: leftOffset,
|
|
15
|
+
display: 'table', // required, because we're outside any container
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
// move dropdown back and hide
|
|
19
|
+
$dropdown.one('hidden.bs.dropdown', function () {
|
|
20
|
+
$menu.appendTo($dropdown);
|
|
21
|
+
$menu.removeAttr('style');
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// hide dropdown when scrolling vertically to avoid recalculating position
|
|
25
|
+
$('.table-responsive').one('scroll', function() {
|
|
26
|
+
$toggle.trigger("click");
|
|
27
|
+
});
|
|
28
|
+
});
|
nautobot/tenancy/forms.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from django import forms
|
|
2
2
|
|
|
3
|
+
from nautobot.core.constants import CHARFIELD_MAX_LENGTH
|
|
3
4
|
from nautobot.core.forms import (
|
|
4
5
|
CommentField,
|
|
5
6
|
DynamicModelChoiceField,
|
|
@@ -22,6 +23,14 @@ from .models import Tenant, TenantGroup
|
|
|
22
23
|
#
|
|
23
24
|
|
|
24
25
|
|
|
26
|
+
class TenantGroupBulkEditForm(NautobotBulkEditForm):
|
|
27
|
+
pk = forms.ModelMultipleChoiceField(queryset=TenantGroup.objects.all(), widget=forms.MultipleHiddenInput())
|
|
28
|
+
description = forms.CharField(max_length=CHARFIELD_MAX_LENGTH, required=False)
|
|
29
|
+
|
|
30
|
+
class Meta:
|
|
31
|
+
nullable_fields = []
|
|
32
|
+
|
|
33
|
+
|
|
25
34
|
class TenantGroupForm(NautobotModelForm):
|
|
26
35
|
parent = DynamicModelChoiceField(queryset=TenantGroup.objects.all(), required=False)
|
|
27
36
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{% extends 'generic/object_create.html' %}
|
|
2
|
+
{% load static %}
|
|
3
|
+
{% load form_helpers %}
|
|
4
|
+
|
|
5
|
+
{% block form %}
|
|
6
|
+
<div class="panel panel-default">
|
|
7
|
+
<div class="panel-heading"><strong>Tenant</strong></div>
|
|
8
|
+
<div class="panel-body">
|
|
9
|
+
{% render_field form.name %}
|
|
10
|
+
{% render_field form.tenant_group %}
|
|
11
|
+
{% render_field form.description %}
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
{% include 'inc/extras_features_edit_form_fields.html' %}
|
|
15
|
+
<div class="panel panel-default">
|
|
16
|
+
<div class="panel-heading"><strong>Comments</strong></div>
|
|
17
|
+
<div class="panel-body">
|
|
18
|
+
{% render_field form.comments %}
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
{% endblock %}
|
|
@@ -1,21 +1,2 @@
|
|
|
1
|
-
{% extends '
|
|
2
|
-
{%
|
|
3
|
-
{% load form_helpers %}
|
|
4
|
-
|
|
5
|
-
{% block form %}
|
|
6
|
-
<div class="panel panel-default">
|
|
7
|
-
<div class="panel-heading"><strong>Tenant</strong></div>
|
|
8
|
-
<div class="panel-body">
|
|
9
|
-
{% render_field form.name %}
|
|
10
|
-
{% render_field form.tenant_group %}
|
|
11
|
-
{% render_field form.description %}
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
{% include 'inc/extras_features_edit_form_fields.html' %}
|
|
15
|
-
<div class="panel panel-default">
|
|
16
|
-
<div class="panel-heading"><strong>Comments</strong></div>
|
|
17
|
-
<div class="panel-body">
|
|
18
|
-
{% render_field form.comments %}
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
{% endblock %}
|
|
1
|
+
{% extends 'tenancy/tenant_create.html' %}
|
|
2
|
+
{% comment %}3.0 TODO: remove this template, which only exists for backward compatibility with 2.4 and earlier{% endcomment %}
|
|
@@ -1,44 +1,2 @@
|
|
|
1
|
-
{% extends '
|
|
2
|
-
{%
|
|
3
|
-
|
|
4
|
-
{% block content_left_page %}
|
|
5
|
-
<div class="panel panel-default">
|
|
6
|
-
<div class="panel-heading">
|
|
7
|
-
<strong>Tenant Group</strong>
|
|
8
|
-
</div>
|
|
9
|
-
<table class="table table-hover panel-body attr-table">
|
|
10
|
-
<tr>
|
|
11
|
-
<td>Description</td>
|
|
12
|
-
<td>{{ object.description|placeholder }}</td>
|
|
13
|
-
</tr>
|
|
14
|
-
<tr>
|
|
15
|
-
<td>Parent</td>
|
|
16
|
-
<td>{{ object.parent|hyperlinked_object }}</td>
|
|
17
|
-
</tr>
|
|
18
|
-
<tr>
|
|
19
|
-
<td>Tenants</td>
|
|
20
|
-
<td>
|
|
21
|
-
<a href="{% url 'tenancy:tenant_list' %}?tenant_group={{ object.name }}">{{ tenant_table.rows|length }}</a>
|
|
22
|
-
</td>
|
|
23
|
-
</tr>
|
|
24
|
-
</table>
|
|
25
|
-
</div>
|
|
26
|
-
{% endblock content_left_page %}
|
|
27
|
-
|
|
28
|
-
{% block content_right_page %}
|
|
29
|
-
<div class="panel panel-default">
|
|
30
|
-
<div class="panel-heading">
|
|
31
|
-
<strong>Tenants</strong>
|
|
32
|
-
</div>
|
|
33
|
-
{% include 'inc/table.html' with table=tenant_table %}
|
|
34
|
-
{% if perms.teanancy.add_tenant %}
|
|
35
|
-
<div class="panel-footer text-right noprint">
|
|
36
|
-
<a href="{% url 'tenancy:tenant_add' %}?tenant_group={{ object.pk }}" class="btn btn-xs btn-primary">
|
|
37
|
-
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add tenant
|
|
38
|
-
</a>
|
|
39
|
-
</div>
|
|
40
|
-
{% endif %}
|
|
41
|
-
</div>
|
|
42
|
-
{% include 'inc/paginator.html' with paginator=tenant_table.paginator page=tenant_table.page %}
|
|
43
|
-
<div class="row"></div>
|
|
44
|
-
{% endblock content_right_page %}
|
|
1
|
+
{% extends 'tenancy/tenantgroup_retrieve.html' %}
|
|
2
|
+
{% comment %}3.0 TODO: remove this template, which only exists for backward compatibility with 2.4 and earlier{% endcomment %}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{% extends 'generic/object_retrieve.html' %}
|
|
@@ -3,7 +3,7 @@ from nautobot.extras.models import Tag
|
|
|
3
3
|
from nautobot.tenancy.models import Tenant, TenantGroup
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class TenantGroupTestCase(ViewTestCases.OrganizationalObjectViewTestCase):
|
|
6
|
+
class TenantGroupTestCase(ViewTestCases.OrganizationalObjectViewTestCase, ViewTestCases.BulkEditObjectsViewTestCase):
|
|
7
7
|
model = TenantGroup
|
|
8
8
|
sort_on_field = "name"
|
|
9
9
|
|
|
@@ -14,6 +14,10 @@ class TenantGroupTestCase(ViewTestCases.OrganizationalObjectViewTestCase):
|
|
|
14
14
|
"description": "A new tenant group",
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
cls.bulk_edit_data = {
|
|
18
|
+
"description": "New description",
|
|
19
|
+
}
|
|
20
|
+
|
|
17
21
|
|
|
18
22
|
class TenantTestCase(ViewTestCases.PrimaryObjectViewTestCase):
|
|
19
23
|
model = Tenant
|
nautobot/tenancy/urls.py
CHANGED
|
@@ -1,83 +1,11 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
3
|
-
from nautobot.extras.views import ObjectChangeLogView, ObjectNotesView
|
|
1
|
+
from nautobot.core.views.routers import NautobotUIViewSetRouter
|
|
4
2
|
|
|
5
3
|
from . import views
|
|
6
|
-
from .models import Tenant, TenantGroup
|
|
7
4
|
|
|
8
5
|
app_name = "tenancy"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
name="tenantgroup_add",
|
|
16
|
-
),
|
|
17
|
-
path(
|
|
18
|
-
"tenant-groups/import/",
|
|
19
|
-
views.TenantGroupBulkImportView.as_view(), # 3.0 TODO: remove, unused
|
|
20
|
-
name="tenantgroup_import",
|
|
21
|
-
),
|
|
22
|
-
path(
|
|
23
|
-
"tenant-groups/delete/",
|
|
24
|
-
views.TenantGroupBulkDeleteView.as_view(),
|
|
25
|
-
name="tenantgroup_bulk_delete",
|
|
26
|
-
),
|
|
27
|
-
path(
|
|
28
|
-
"tenant-groups/<uuid:pk>/",
|
|
29
|
-
views.TenantGroupView.as_view(),
|
|
30
|
-
name="tenantgroup",
|
|
31
|
-
),
|
|
32
|
-
path(
|
|
33
|
-
"tenant-groups/<uuid:pk>/edit/",
|
|
34
|
-
views.TenantGroupEditView.as_view(),
|
|
35
|
-
name="tenantgroup_edit",
|
|
36
|
-
),
|
|
37
|
-
path(
|
|
38
|
-
"tenant-groups/<uuid:pk>/delete/",
|
|
39
|
-
views.TenantGroupDeleteView.as_view(),
|
|
40
|
-
name="tenantgroup_delete",
|
|
41
|
-
),
|
|
42
|
-
path(
|
|
43
|
-
"tenant-groups/<uuid:pk>/changelog/",
|
|
44
|
-
ObjectChangeLogView.as_view(),
|
|
45
|
-
name="tenantgroup_changelog",
|
|
46
|
-
kwargs={"model": TenantGroup},
|
|
47
|
-
),
|
|
48
|
-
path(
|
|
49
|
-
"tenant-groups/<uuid:pk>/notes/",
|
|
50
|
-
ObjectNotesView.as_view(),
|
|
51
|
-
name="tenantgroup_notes",
|
|
52
|
-
kwargs={"model": TenantGroup},
|
|
53
|
-
),
|
|
54
|
-
# Tenants
|
|
55
|
-
path("tenants/", views.TenantListView.as_view(), name="tenant_list"),
|
|
56
|
-
path("tenants/add/", views.TenantEditView.as_view(), name="tenant_add"),
|
|
57
|
-
path("tenants/import/", views.TenantBulkImportView.as_view(), name="tenant_import"), # 3.0 TODO: remove, unused
|
|
58
|
-
path("tenants/edit/", views.TenantBulkEditView.as_view(), name="tenant_bulk_edit"),
|
|
59
|
-
path(
|
|
60
|
-
"tenants/delete/",
|
|
61
|
-
views.TenantBulkDeleteView.as_view(),
|
|
62
|
-
name="tenant_bulk_delete",
|
|
63
|
-
),
|
|
64
|
-
path("tenants/<uuid:pk>/", views.TenantView.as_view(), name="tenant"),
|
|
65
|
-
path("tenants/<uuid:pk>/edit/", views.TenantEditView.as_view(), name="tenant_edit"),
|
|
66
|
-
path(
|
|
67
|
-
"tenants/<uuid:pk>/delete/",
|
|
68
|
-
views.TenantDeleteView.as_view(),
|
|
69
|
-
name="tenant_delete",
|
|
70
|
-
),
|
|
71
|
-
path(
|
|
72
|
-
"tenants/<uuid:pk>/changelog/",
|
|
73
|
-
ObjectChangeLogView.as_view(),
|
|
74
|
-
name="tenant_changelog",
|
|
75
|
-
kwargs={"model": Tenant},
|
|
76
|
-
),
|
|
77
|
-
path(
|
|
78
|
-
"tenants/<uuid:pk>/notes/",
|
|
79
|
-
ObjectNotesView.as_view(),
|
|
80
|
-
name="tenant_notes",
|
|
81
|
-
kwargs={"model": Tenant},
|
|
82
|
-
),
|
|
83
|
-
]
|
|
6
|
+
router = NautobotUIViewSetRouter()
|
|
7
|
+
router.register("tenant-groups", views.TenantGroupUIViewSet)
|
|
8
|
+
router.register("tenants", views.TenantUIViewSet)
|
|
9
|
+
|
|
10
|
+
urlpatterns = []
|
|
11
|
+
urlpatterns += router.urls
|