nautobot 2.4.3__py3-none-any.whl → 2.4.4__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.
Files changed (175) hide show
  1. nautobot/apps/filters.py +2 -0
  2. nautobot/circuits/filters.py +1 -1
  3. nautobot/circuits/tests/test_models.py +5 -3
  4. nautobot/cloud/filters.py +3 -6
  5. nautobot/cloud/tests/test_filters.py +21 -0
  6. nautobot/core/admin.py +2 -0
  7. nautobot/core/jobs/__init__.py +2 -1
  8. nautobot/core/management/commands/generate_performance_test_endpoints.py +9 -6
  9. nautobot/core/models/utils.py +6 -1
  10. nautobot/core/templates/inc/javascript.html +1 -0
  11. nautobot/core/templatetags/ui_framework.py +20 -4
  12. nautobot/core/testing/forms.py +1 -1
  13. nautobot/core/tests/test_api.py +1 -1
  14. nautobot/core/tests/test_graphql.py +3 -3
  15. nautobot/core/tests/test_jobs.py +4 -1
  16. nautobot/core/ui/object_detail.py +1 -1
  17. nautobot/dcim/api/serializers.py +36 -0
  18. nautobot/dcim/api/views.py +1 -1
  19. nautobot/dcim/elevations.py +17 -4
  20. nautobot/dcim/factory.py +9 -1
  21. nautobot/dcim/filters/__init__.py +27 -1
  22. nautobot/dcim/forms.py +13 -1
  23. nautobot/dcim/models/devices.py +11 -5
  24. nautobot/dcim/signals.py +26 -0
  25. nautobot/dcim/templates/dcim/virtualdevicecontext_retrieve.html +0 -62
  26. nautobot/dcim/templates/dcim/virtualdevicecontext_update.html +6 -0
  27. nautobot/dcim/tests/test_api.py +176 -0
  28. nautobot/dcim/tests/test_filters.py +56 -3
  29. nautobot/dcim/tests/test_models.py +40 -0
  30. nautobot/dcim/views.py +24 -14
  31. nautobot/extras/api/mixins.py +1 -1
  32. nautobot/extras/api/views.py +2 -2
  33. nautobot/extras/filters/__init__.py +4 -0
  34. nautobot/extras/models/datasources.py +7 -3
  35. nautobot/extras/plugins/__init__.py +26 -1
  36. nautobot/extras/templates/extras/inc/jobresult.html +12 -13
  37. nautobot/extras/templates/extras/objectchange.html +28 -12
  38. nautobot/extras/tests/test_api.py +16 -15
  39. nautobot/extras/tests/test_filters.py +2 -0
  40. nautobot/extras/tests/test_plugins.py +32 -1
  41. nautobot/extras/tests/test_views.py +12 -2
  42. nautobot/extras/views.py +3 -0
  43. nautobot/ipam/api/serializers.py +7 -8
  44. nautobot/ipam/api/views.py +2 -2
  45. nautobot/ipam/factory.py +27 -8
  46. nautobot/ipam/filters.py +67 -29
  47. nautobot/ipam/formfields.py +51 -0
  48. nautobot/ipam/forms.py +13 -1
  49. nautobot/ipam/migrations/0051_added_optional_vrf_relationship_to_vdc.py +41 -0
  50. nautobot/ipam/models.py +63 -5
  51. nautobot/ipam/tables.py +21 -7
  52. nautobot/ipam/tests/test_api.py +107 -66
  53. nautobot/ipam/tests/test_filters.py +145 -5
  54. nautobot/ipam/tests/test_views.py +15 -2
  55. nautobot/project-static/css/base.css +11 -0
  56. nautobot/project-static/css/dark.css +2 -1
  57. nautobot/project-static/docs/code-reference/nautobot/apps/filters.html +62 -0
  58. nautobot/project-static/docs/development/apps/api/configuration-view.html +0 -3
  59. nautobot/project-static/docs/development/apps/api/models/graphql.html +0 -4
  60. nautobot/project-static/docs/development/apps/api/platform-features/custom-validators.html +94 -1
  61. nautobot/project-static/docs/development/apps/api/platform-features/filter-extensions.html +0 -3
  62. nautobot/project-static/docs/development/apps/api/platform-features/jinja2-filters.html +0 -3
  63. nautobot/project-static/docs/development/apps/api/platform-features/populating-extensibility-features.html +0 -3
  64. nautobot/project-static/docs/development/apps/api/platform-features/secrets-providers.html +0 -3
  65. nautobot/project-static/docs/development/apps/api/prometheus.html +0 -3
  66. nautobot/project-static/docs/development/apps/api/testing.html +0 -6
  67. nautobot/project-static/docs/development/apps/api/ui-extensions/banners.html +0 -3
  68. nautobot/project-static/docs/development/apps/api/ui-extensions/home-page.html +0 -3
  69. nautobot/project-static/docs/development/apps/api/ui-extensions/object-views.html +0 -3
  70. nautobot/project-static/docs/development/apps/api/views/core-view-overrides.html +0 -3
  71. nautobot/project-static/docs/development/apps/api/views/nautobot-generic-views.html +1 -7
  72. nautobot/project-static/docs/development/apps/api/views/nautobotuiviewset.html +0 -7
  73. nautobot/project-static/docs/development/apps/api/views/nautobotuiviewsetrouter.html +0 -4
  74. nautobot/project-static/docs/development/apps/api/views/notes.html +0 -3
  75. nautobot/project-static/docs/development/apps/index.html +2 -35
  76. nautobot/project-static/docs/development/apps/migration/code-updates.html +1 -1
  77. nautobot/project-static/docs/development/core/application-registry.html +0 -6
  78. nautobot/project-static/docs/development/core/best-practices.html +0 -27
  79. nautobot/project-static/docs/development/core/docker-compose-advanced-use-cases.html +58 -4
  80. nautobot/project-static/docs/development/core/getting-started.html +12 -16
  81. nautobot/project-static/docs/development/core/homepage.html +0 -3
  82. nautobot/project-static/docs/development/core/style-guide.html +0 -5
  83. nautobot/project-static/docs/development/core/templates.html +0 -3
  84. nautobot/project-static/docs/development/core/testing.html +0 -9
  85. nautobot/project-static/docs/development/jobs/index.html +3 -29
  86. nautobot/project-static/docs/objects.inv +0 -0
  87. nautobot/project-static/docs/overview/application_stack.html +0 -18
  88. nautobot/project-static/docs/release-notes/version-2.4.html +191 -0
  89. nautobot/project-static/docs/requirements.txt +1 -1
  90. nautobot/project-static/docs/search/search_index.json +1 -1
  91. nautobot/project-static/docs/sitemap.xml +290 -290
  92. nautobot/project-static/docs/sitemap.xml.gz +0 -0
  93. nautobot/project-static/docs/user-guide/administration/configuration/settings.html +0 -10
  94. nautobot/project-static/docs/user-guide/administration/guides/docker.html +0 -15
  95. nautobot/project-static/docs/user-guide/administration/installation/index.html +0 -16
  96. nautobot/project-static/docs/user-guide/administration/installation/nautobot.html +1 -4
  97. nautobot/project-static/docs/user-guide/administration/installation/services.html +0 -11
  98. nautobot/project-static/docs/user-guide/administration/migration/migrating-from-postgresql.html +3 -3
  99. nautobot/project-static/docs/user-guide/administration/tools/nautobot-server.html +5 -35
  100. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/tables/v2-code-location-changes.yaml +1 -1
  101. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +1 -1
  102. nautobot/project-static/docs/user-guide/administration/upgrading/upgrading.html +0 -4
  103. nautobot/project-static/docs/user-guide/core-data-model/circuits/providernetwork.html +0 -3
  104. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleport.html +0 -4
  105. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleporttemplate.html +0 -4
  106. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverport.html +0 -4
  107. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverporttemplate.html +0 -4
  108. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebay.html +0 -4
  109. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebaytemplate.html +0 -4
  110. nautobot/project-static/docs/user-guide/core-data-model/dcim/deviceredundancygroup.html +0 -3
  111. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicetype.html +0 -4
  112. nautobot/project-static/docs/user-guide/core-data-model/dcim/frontport.html +0 -4
  113. nautobot/project-static/docs/user-guide/core-data-model/dcim/frontporttemplate.html +0 -4
  114. nautobot/project-static/docs/user-guide/core-data-model/dcim/interface.html +1 -17
  115. nautobot/project-static/docs/user-guide/core-data-model/dcim/interfaceredundancygroup.html +0 -3
  116. nautobot/project-static/docs/user-guide/core-data-model/dcim/interfacetemplate.html +0 -4
  117. nautobot/project-static/docs/user-guide/core-data-model/dcim/inventoryitem.html +0 -4
  118. nautobot/project-static/docs/user-guide/core-data-model/dcim/location.html +0 -3
  119. nautobot/project-static/docs/user-guide/core-data-model/dcim/locationtype.html +1 -7
  120. nautobot/project-static/docs/user-guide/core-data-model/dcim/platform.html +0 -4
  121. nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlet.html +0 -4
  122. nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlettemplate.html +0 -4
  123. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerport.html +0 -4
  124. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerporttemplate.html +0 -4
  125. nautobot/project-static/docs/user-guide/core-data-model/dcim/rearport.html +0 -4
  126. nautobot/project-static/docs/user-guide/core-data-model/dcim/rearporttemplate.html +0 -4
  127. nautobot/project-static/docs/user-guide/core-data-model/extras/configcontext.html +0 -6
  128. nautobot/project-static/docs/user-guide/core-data-model/extras/configcontextschema.html +0 -3
  129. nautobot/project-static/docs/user-guide/core-data-model/ipam/ipaddress.html +0 -4
  130. nautobot/project-static/docs/user-guide/core-data-model/ipam/vlan.html +0 -4
  131. nautobot/project-static/docs/user-guide/core-data-model/virtualization/vminterface.html +0 -8
  132. nautobot/project-static/docs/user-guide/feature-guides/custom-fields.html +3 -3
  133. nautobot/project-static/docs/user-guide/feature-guides/graphql.html +0 -6
  134. nautobot/project-static/docs/user-guide/platform-functionality/computedfield.html +0 -3
  135. nautobot/project-static/docs/user-guide/platform-functionality/customfield.html +3 -15
  136. nautobot/project-static/docs/user-guide/platform-functionality/dynamicgroup.html +0 -26
  137. nautobot/project-static/docs/user-guide/platform-functionality/gitrepository.html +0 -8
  138. nautobot/project-static/docs/user-guide/platform-functionality/graphql.html +0 -3
  139. nautobot/project-static/docs/user-guide/platform-functionality/jobs/index.html +0 -8
  140. nautobot/project-static/docs/user-guide/platform-functionality/jobs/job-scheduling-and-approvals.html +0 -7
  141. nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobbutton.html +0 -3
  142. nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobhook.html +0 -3
  143. nautobot/project-static/docs/user-guide/platform-functionality/jobs/models.html +0 -14
  144. nautobot/project-static/docs/user-guide/platform-functionality/note.html +0 -3
  145. nautobot/project-static/docs/user-guide/platform-functionality/relationship.html +1 -10
  146. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/authentication.html +0 -3
  147. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/filtering.html +0 -14
  148. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/overview.html +0 -19
  149. nautobot/project-static/docs/user-guide/platform-functionality/secret.html +3 -9
  150. nautobot/project-static/docs/user-guide/platform-functionality/status.html +0 -8
  151. nautobot/project-static/docs/user-guide/platform-functionality/tag.html +0 -4
  152. nautobot/project-static/docs/user-guide/platform-functionality/template-filters.html +1 -13
  153. nautobot/project-static/docs/user-guide/platform-functionality/webhook.html +0 -5
  154. nautobot/project-static/js/editor.js +292 -0
  155. nautobot/project-static/monaco-editor-0.52.2/README.md +81 -0
  156. nautobot/project-static/monaco-editor-0.52.2/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  157. nautobot/project-static/monaco-editor-0.52.2/vs/base/worker/workerMain.js +31 -0
  158. nautobot/project-static/monaco-editor-0.52.2/vs/basic-languages/xml/xml.js +10 -0
  159. nautobot/project-static/monaco-editor-0.52.2/vs/basic-languages/yaml/yaml.js +10 -0
  160. nautobot/project-static/monaco-editor-0.52.2/vs/editor/editor.main.css +8 -0
  161. nautobot/project-static/monaco-editor-0.52.2/vs/editor/editor.main.js +798 -0
  162. nautobot/project-static/monaco-editor-0.52.2/vs/language/json/jsonMode.js +19 -0
  163. nautobot/project-static/monaco-editor-0.52.2/vs/language/json/jsonWorker.js +42 -0
  164. nautobot/project-static/monaco-editor-0.52.2/vs/loader.js +11 -0
  165. nautobot/tenancy/filters/__init__.py +3 -5
  166. nautobot/tenancy/tests/test_filters.py +10 -0
  167. nautobot/virtualization/views.py +0 -1
  168. nautobot/wireless/tables.py +9 -4
  169. nautobot/wireless/tests/test_api.py +0 -9
  170. {nautobot-2.4.3.dist-info → nautobot-2.4.4.dist-info}/METADATA +2 -2
  171. {nautobot-2.4.3.dist-info → nautobot-2.4.4.dist-info}/RECORD +175 -163
  172. {nautobot-2.4.3.dist-info → nautobot-2.4.4.dist-info}/LICENSE.txt +0 -0
  173. {nautobot-2.4.3.dist-info → nautobot-2.4.4.dist-info}/NOTICE +0 -0
  174. {nautobot-2.4.3.dist-info → nautobot-2.4.4.dist-info}/WHEEL +0 -0
  175. {nautobot-2.4.3.dist-info → nautobot-2.4.4.dist-info}/entry_points.txt +0 -0
@@ -11,7 +11,8 @@ from nautobot.core.filters import (
11
11
  from nautobot.core.utils.deprecation import class_deprecated_in_favor_of
12
12
  from nautobot.dcim.models import Device, Location, Rack, RackReservation
13
13
  from nautobot.extras.filters import NautobotFilterSet
14
- from nautobot.ipam.models import IPAddress, Prefix, RouteTarget, VLAN, VRF
14
+ from nautobot.ipam.filters import PrefixFilter
15
+ from nautobot.ipam.models import IPAddress, RouteTarget, VLAN, VRF
15
16
  from nautobot.tenancy.filters.mixins import TenancyModelFilterSetMixin
16
17
  from nautobot.tenancy.models import Tenant, TenantGroup
17
18
  from nautobot.virtualization.models import Cluster, VirtualMachine
@@ -112,10 +113,7 @@ class TenantFilterSet(NautobotFilterSet):
112
113
  field_name="locations",
113
114
  label="Has locations",
114
115
  )
115
- prefixes = django_filters.ModelMultipleChoiceFilter(
116
- queryset=Prefix.objects.all(),
117
- label="Prefixes (ID)",
118
- )
116
+ prefixes = PrefixFilter()
119
117
  has_prefixes = RelatedMembershipBooleanFilter(
120
118
  field_name="prefixes",
121
119
  label="Has prefixes",
@@ -145,3 +145,13 @@ class TenantTestCase(FilterTestCases.FilterTestCase):
145
145
  self.filterset(params, self.queryset).qs,
146
146
  self.queryset.filter(locations__in=[self.locations[0], self.locations[1]]).distinct(),
147
147
  )
148
+
149
+ def test_prefixes_by_string(self):
150
+ """Test filtering by prefix strings as an alternative to pk."""
151
+ prefix = self.queryset.filter(prefixes__isnull=False).first().prefixes.first()
152
+ params = {"prefixes": [prefix.prefix]}
153
+ self.assertQuerysetEqualAndNotEmpty(
154
+ self.filterset(params, self.queryset).qs,
155
+ self.queryset.filter(prefixes__network=prefix.network, prefixes__prefix_length=prefix.prefix_length),
156
+ ordered=False,
157
+ )
@@ -306,7 +306,6 @@ class VirtualMachineView(generic.ObjectView):
306
306
  # VRF assignments
307
307
  vrf_assignments = instance.vrf_assignments.restrict(request.user, "view")
308
308
  vrf_table = VRFDeviceAssignmentTable(vrf_assignments)
309
- vrf_table.exclude = ("device", "virtual_machine")
310
309
 
311
310
  # Software images
312
311
  if instance.software_version is not None:
@@ -8,9 +8,14 @@ from nautobot.core.tables import (
8
8
  TagColumn,
9
9
  ToggleColumn,
10
10
  )
11
- from nautobot.dcim.models import ControllerManagedDeviceGroup
12
11
 
13
- from .models import RadioProfile, SupportedDataRate, WirelessNetwork
12
+ from .models import (
13
+ ControllerManagedDeviceGroupRadioProfileAssignment,
14
+ ControllerManagedDeviceGroupWirelessNetworkAssignment,
15
+ RadioProfile,
16
+ SupportedDataRate,
17
+ WirelessNetwork,
18
+ )
14
19
 
15
20
 
16
21
  class RadioProfileTable(BaseTable):
@@ -151,7 +156,7 @@ class ControllerManagedDeviceGroupWirelessNetworkAssignmentTable(BaseTable):
151
156
  )
152
157
 
153
158
  class Meta(BaseTable.Meta):
154
- model = ControllerManagedDeviceGroup
159
+ model = ControllerManagedDeviceGroupWirelessNetworkAssignment
155
160
  fields = (
156
161
  "wireless_network",
157
162
  "controller_managed_device_group",
@@ -204,7 +209,7 @@ class ControllerManagedDeviceGroupRadioProfileAssignmentTable(BaseTable):
204
209
  regulatory_domain = tables.Column(accessor="radio_profile.regulatory_domain", verbose_name="Regulatory Domain")
205
210
 
206
211
  class Meta(BaseTable.Meta):
207
- model = ControllerManagedDeviceGroup
212
+ model = ControllerManagedDeviceGroupRadioProfileAssignment
208
213
  fields = (
209
214
  "radio_profile",
210
215
  "controller_managed_device_group",
@@ -12,15 +12,6 @@ class SupportedDataRateTest(APIViewTestCases.APIViewTestCase):
12
12
 
13
13
  @classmethod
14
14
  def setUpTestData(cls):
15
- models.SupportedDataRate.objects.create(
16
- rate=1000, standard=choices.SupportedDataRateStandardChoices.B, mcs_index=1
17
- )
18
- models.SupportedDataRate.objects.create(
19
- rate=6000, standard=choices.SupportedDataRateStandardChoices.G, mcs_index=2
20
- )
21
- models.SupportedDataRate.objects.create(
22
- rate=54000, standard=choices.SupportedDataRateStandardChoices.N, mcs_index=3
23
- )
24
15
  cls.create_data = [
25
16
  {
26
17
  "rate": 200000,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nautobot
3
- Version: 2.4.3
3
+ Version: 2.4.4
4
4
  Summary: Source of truth and network automation platform.
5
5
  Home-page: https://nautobot.com
6
6
  License: Apache-2.0
@@ -37,7 +37,7 @@ Requires-Dist: django-constance (>=4.3.0,<4.4.0)
37
37
  Requires-Dist: django-cors-headers (>=4.4.0,<4.5.0)
38
38
  Requires-Dist: django-db-file-storage (>=0.5.6.1,<0.6.0.0)
39
39
  Requires-Dist: django-extensions (>=3.2.3,<3.3.0)
40
- Requires-Dist: django-filter (>=24.2,<24.3)
40
+ Requires-Dist: django-filter (>=25.1,<25.2)
41
41
  Requires-Dist: django-health-check (>=3.18.3,<3.19.0)
42
42
  Requires-Dist: django-jinja (>=2.11.0,<2.12.0)
43
43
  Requires-Dist: django-prometheus (>=2.3.1,<2.4.0)