nautobot 2.3.13__py3-none-any.whl → 2.3.15__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.

Files changed (315) hide show
  1. nautobot/circuits/tables.py +2 -1
  2. nautobot/core/filters.py +2 -0
  3. nautobot/core/jobs/cleanup.py +47 -11
  4. nautobot/core/settings.py +3 -0
  5. nautobot/core/settings.yaml +8 -0
  6. nautobot/core/templates/inc/media.html +3 -0
  7. nautobot/core/templates/nautobot_config.py.j2 +3 -0
  8. nautobot/core/templates/search.html +7 -0
  9. nautobot/core/testing/filters.py +20 -5
  10. nautobot/core/testing/mixins.py +7 -2
  11. nautobot/core/tests/integration/test_app_home.py +0 -1
  12. nautobot/core/tests/integration/test_app_navbar.py +0 -1
  13. nautobot/core/tests/integration/test_filters.py +0 -2
  14. nautobot/core/tests/integration/test_home.py +0 -1
  15. nautobot/core/tests/integration/test_navbar.py +0 -1
  16. nautobot/core/tests/integration/test_view_authentication.py +1 -0
  17. nautobot/core/tests/test_views.py +29 -0
  18. nautobot/core/urls.py +9 -0
  19. nautobot/dcim/forms.py +6 -5
  20. nautobot/dcim/models/devices.py +1 -0
  21. nautobot/dcim/tests/test_forms.py +51 -2
  22. nautobot/extras/forms/mixins.py +11 -3
  23. nautobot/extras/jobs.py +6 -4
  24. nautobot/extras/models/customfields.py +12 -11
  25. nautobot/extras/tests/integration/test_plugin_banner.py +0 -2
  26. nautobot/extras/tests/test_forms.py +20 -1
  27. nautobot/ipam/api/views.py +17 -15
  28. nautobot/ipam/models.py +62 -11
  29. nautobot/ipam/tables.py +2 -2
  30. nautobot/ipam/tests/test_api.py +402 -2
  31. nautobot/ipam/tests/test_models.py +41 -0
  32. nautobot/project-static/docs/404.html +2 -2
  33. nautobot/project-static/docs/apps/index.html +2 -2
  34. nautobot/project-static/docs/apps/nautobot-apps.html +2 -2
  35. nautobot/project-static/docs/assets/javascripts/{bundle.83f73b43.min.js → bundle.88dd0f4e.min.js} +2 -2
  36. nautobot/project-static/docs/assets/javascripts/{bundle.83f73b43.min.js.map → bundle.88dd0f4e.min.js.map} +2 -2
  37. nautobot/project-static/docs/code-reference/nautobot/apps/__init__.html +2 -2
  38. nautobot/project-static/docs/code-reference/nautobot/apps/admin.html +2 -2
  39. nautobot/project-static/docs/code-reference/nautobot/apps/api.html +2 -2
  40. nautobot/project-static/docs/code-reference/nautobot/apps/change_logging.html +2 -2
  41. nautobot/project-static/docs/code-reference/nautobot/apps/choices.html +2 -2
  42. nautobot/project-static/docs/code-reference/nautobot/apps/config.html +2 -2
  43. nautobot/project-static/docs/code-reference/nautobot/apps/constants.html +2 -2
  44. nautobot/project-static/docs/code-reference/nautobot/apps/datasources.html +2 -2
  45. nautobot/project-static/docs/code-reference/nautobot/apps/exceptions.html +2 -2
  46. nautobot/project-static/docs/code-reference/nautobot/apps/factory.html +2 -2
  47. nautobot/project-static/docs/code-reference/nautobot/apps/filters.html +2 -2
  48. nautobot/project-static/docs/code-reference/nautobot/apps/forms.html +2 -2
  49. nautobot/project-static/docs/code-reference/nautobot/apps/graphql.html +2 -2
  50. nautobot/project-static/docs/code-reference/nautobot/apps/jobs.html +8 -6
  51. nautobot/project-static/docs/code-reference/nautobot/apps/models.html +2 -2
  52. nautobot/project-static/docs/code-reference/nautobot/apps/querysets.html +2 -2
  53. nautobot/project-static/docs/code-reference/nautobot/apps/secrets.html +2 -2
  54. nautobot/project-static/docs/code-reference/nautobot/apps/tables.html +2 -2
  55. nautobot/project-static/docs/code-reference/nautobot/apps/testing.html +12 -5
  56. nautobot/project-static/docs/code-reference/nautobot/apps/ui.html +2 -2
  57. nautobot/project-static/docs/code-reference/nautobot/apps/urls.html +2 -2
  58. nautobot/project-static/docs/code-reference/nautobot/apps/utils.html +2 -2
  59. nautobot/project-static/docs/code-reference/nautobot/apps/views.html +2 -2
  60. nautobot/project-static/docs/development/apps/api/configuration-view.html +2 -2
  61. nautobot/project-static/docs/development/apps/api/database-backend-config.html +2 -2
  62. nautobot/project-static/docs/development/apps/api/models/django-admin.html +2 -2
  63. nautobot/project-static/docs/development/apps/api/models/global-search.html +2 -2
  64. nautobot/project-static/docs/development/apps/api/models/graphql.html +2 -2
  65. nautobot/project-static/docs/development/apps/api/models/index.html +2 -2
  66. nautobot/project-static/docs/development/apps/api/nautobot-app-config.html +2 -2
  67. nautobot/project-static/docs/development/apps/api/platform-features/custom-validators.html +2 -2
  68. nautobot/project-static/docs/development/apps/api/platform-features/filter-extensions.html +2 -2
  69. nautobot/project-static/docs/development/apps/api/platform-features/git-repository-content.html +2 -2
  70. nautobot/project-static/docs/development/apps/api/platform-features/index.html +2 -2
  71. nautobot/project-static/docs/development/apps/api/platform-features/jinja2-filters.html +2 -2
  72. nautobot/project-static/docs/development/apps/api/platform-features/jobs.html +2 -2
  73. nautobot/project-static/docs/development/apps/api/platform-features/populating-extensibility-features.html +2 -2
  74. nautobot/project-static/docs/development/apps/api/platform-features/secrets-providers.html +2 -2
  75. nautobot/project-static/docs/development/apps/api/platform-features/table-extensions.html +2 -2
  76. nautobot/project-static/docs/development/apps/api/platform-features/uniquely-identify-objects.html +2 -2
  77. nautobot/project-static/docs/development/apps/api/prometheus.html +2 -2
  78. nautobot/project-static/docs/development/apps/api/setup.html +2 -2
  79. nautobot/project-static/docs/development/apps/api/testing.html +2 -2
  80. nautobot/project-static/docs/development/apps/api/ui-extensions/banners.html +2 -2
  81. nautobot/project-static/docs/development/apps/api/ui-extensions/home-page.html +2 -2
  82. nautobot/project-static/docs/development/apps/api/ui-extensions/index.html +2 -2
  83. nautobot/project-static/docs/development/apps/api/ui-extensions/navigation.html +2 -2
  84. nautobot/project-static/docs/development/apps/api/ui-extensions/object-views.html +2 -2
  85. nautobot/project-static/docs/development/apps/api/views/base-template.html +2 -2
  86. nautobot/project-static/docs/development/apps/api/views/core-view-overrides.html +2 -2
  87. nautobot/project-static/docs/development/apps/api/views/django-generic-views.html +2 -2
  88. nautobot/project-static/docs/development/apps/api/views/help-documentation.html +2 -2
  89. nautobot/project-static/docs/development/apps/api/views/index.html +2 -2
  90. nautobot/project-static/docs/development/apps/api/views/nautobot-generic-views.html +2 -2
  91. nautobot/project-static/docs/development/apps/api/views/nautobotuiviewset.html +2 -2
  92. nautobot/project-static/docs/development/apps/api/views/nautobotuiviewsetrouter.html +2 -2
  93. nautobot/project-static/docs/development/apps/api/views/notes.html +2 -2
  94. nautobot/project-static/docs/development/apps/api/views/rest-api.html +2 -2
  95. nautobot/project-static/docs/development/apps/api/views/urls.html +2 -2
  96. nautobot/project-static/docs/development/apps/index.html +2 -2
  97. nautobot/project-static/docs/development/apps/migration/code-updates.html +2 -2
  98. nautobot/project-static/docs/development/apps/migration/dependency-updates.html +2 -2
  99. nautobot/project-static/docs/development/apps/migration/from-v1.html +2 -2
  100. nautobot/project-static/docs/development/apps/migration/model-updates/dcim.html +2 -2
  101. nautobot/project-static/docs/development/apps/migration/model-updates/extras.html +2 -2
  102. nautobot/project-static/docs/development/apps/migration/model-updates/global.html +2 -2
  103. nautobot/project-static/docs/development/apps/migration/model-updates/ipam.html +2 -2
  104. nautobot/project-static/docs/development/apps/porting-from-netbox.html +2 -2
  105. nautobot/project-static/docs/development/core/application-registry.html +2 -2
  106. nautobot/project-static/docs/development/core/best-practices.html +2 -2
  107. nautobot/project-static/docs/development/core/bootstrap-ui.html +2 -2
  108. nautobot/project-static/docs/development/core/caching.html +2 -2
  109. nautobot/project-static/docs/development/core/controllers.html +2 -2
  110. nautobot/project-static/docs/development/core/docker-compose-advanced-use-cases.html +27 -70
  111. nautobot/project-static/docs/development/core/generic-views.html +2 -2
  112. nautobot/project-static/docs/development/core/getting-started.html +155 -141
  113. nautobot/project-static/docs/development/core/homepage.html +2 -2
  114. nautobot/project-static/docs/development/core/index.html +2 -2
  115. nautobot/project-static/docs/development/core/model-checklist.html +2 -2
  116. nautobot/project-static/docs/development/core/model-features.html +2 -2
  117. nautobot/project-static/docs/development/core/natural-keys.html +2 -2
  118. nautobot/project-static/docs/development/core/navigation-menu.html +2 -2
  119. nautobot/project-static/docs/development/core/release-checklist.html +2 -2
  120. nautobot/project-static/docs/development/core/role-internals.html +2 -2
  121. nautobot/project-static/docs/development/core/settings.html +2 -2
  122. nautobot/project-static/docs/development/core/style-guide.html +2 -2
  123. nautobot/project-static/docs/development/core/templates.html +2 -2
  124. nautobot/project-static/docs/development/core/testing.html +2 -2
  125. nautobot/project-static/docs/development/core/user-preferences.html +2 -2
  126. nautobot/project-static/docs/development/index.html +2 -2
  127. nautobot/project-static/docs/development/jobs/index.html +143 -119
  128. nautobot/project-static/docs/development/jobs/migration/from-v1.html +2 -2
  129. nautobot/project-static/docs/index.html +2 -2
  130. nautobot/project-static/docs/overview/application_stack.html +2 -2
  131. nautobot/project-static/docs/overview/design_philosophy.html +2 -2
  132. nautobot/project-static/docs/release-notes/index.html +2 -2
  133. nautobot/project-static/docs/release-notes/version-1.0.html +2 -2
  134. nautobot/project-static/docs/release-notes/version-1.1.html +2 -2
  135. nautobot/project-static/docs/release-notes/version-1.2.html +2 -2
  136. nautobot/project-static/docs/release-notes/version-1.3.html +2 -2
  137. nautobot/project-static/docs/release-notes/version-1.4.html +2 -2
  138. nautobot/project-static/docs/release-notes/version-1.5.html +2 -2
  139. nautobot/project-static/docs/release-notes/version-1.6.html +2 -2
  140. nautobot/project-static/docs/release-notes/version-2.0.html +2 -2
  141. nautobot/project-static/docs/release-notes/version-2.1.html +2 -2
  142. nautobot/project-static/docs/release-notes/version-2.2.html +2 -2
  143. nautobot/project-static/docs/release-notes/version-2.3.html +536 -216
  144. nautobot/project-static/docs/requirements.txt +2 -2
  145. nautobot/project-static/docs/search/search_index.json +1 -1
  146. nautobot/project-static/docs/sitemap.xml +270 -270
  147. nautobot/project-static/docs/sitemap.xml.gz +0 -0
  148. nautobot/project-static/docs/user-guide/administration/configuration/authentication/ldap.html +2 -2
  149. nautobot/project-static/docs/user-guide/administration/configuration/authentication/remote.html +2 -2
  150. nautobot/project-static/docs/user-guide/administration/configuration/authentication/sso.html +2 -2
  151. nautobot/project-static/docs/user-guide/administration/configuration/index.html +2 -2
  152. nautobot/project-static/docs/user-guide/administration/configuration/redis.html +2 -2
  153. nautobot/project-static/docs/user-guide/administration/configuration/settings.html +29 -2
  154. nautobot/project-static/docs/user-guide/administration/configuration/time-zones.html +2 -2
  155. nautobot/project-static/docs/user-guide/administration/guides/celery-queues.html +2 -2
  156. nautobot/project-static/docs/user-guide/administration/guides/docker.html +2 -2
  157. nautobot/project-static/docs/user-guide/administration/guides/health-checks.html +2 -2
  158. nautobot/project-static/docs/user-guide/administration/guides/permissions.html +2 -2
  159. nautobot/project-static/docs/user-guide/administration/guides/prometheus-metrics.html +2 -2
  160. nautobot/project-static/docs/user-guide/administration/guides/replicating-nautobot.html +2 -2
  161. nautobot/project-static/docs/user-guide/administration/guides/request-profiling.html +2 -2
  162. nautobot/project-static/docs/user-guide/administration/guides/s3-django-storage.html +2 -2
  163. nautobot/project-static/docs/user-guide/administration/guides/selinux-troubleshooting.html +2 -2
  164. nautobot/project-static/docs/user-guide/administration/installation/app-install.html +2 -2
  165. nautobot/project-static/docs/user-guide/administration/installation/external-authentication.html +2 -2
  166. nautobot/project-static/docs/user-guide/administration/installation/http-server.html +2 -2
  167. nautobot/project-static/docs/user-guide/administration/installation/index.html +2 -2
  168. nautobot/project-static/docs/user-guide/administration/installation/install_system.html +2 -2
  169. nautobot/project-static/docs/user-guide/administration/installation/nautobot.html +2 -2
  170. nautobot/project-static/docs/user-guide/administration/installation/services.html +2 -2
  171. nautobot/project-static/docs/user-guide/administration/migration/migrating-from-netbox.html +2 -2
  172. nautobot/project-static/docs/user-guide/administration/migration/migrating-from-postgresql.html +2 -2
  173. nautobot/project-static/docs/user-guide/administration/tools/nautobot-server.html +2 -2
  174. nautobot/project-static/docs/user-guide/administration/tools/nautobot-shell.html +2 -2
  175. nautobot/project-static/docs/user-guide/administration/upgrading/database-backup.html +2 -2
  176. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/after-you-upgrade.html +2 -2
  177. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/before-you-upgrade.html +2 -2
  178. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/for-developers.html +2 -2
  179. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/index.html +2 -2
  180. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/whats-changed.html +2 -2
  181. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/region-and-site-data-migration-guide.html +2 -2
  182. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +2 -2
  183. nautobot/project-static/docs/user-guide/administration/upgrading/upgrading.html +2 -2
  184. nautobot/project-static/docs/user-guide/core-data-model/circuits/circuit.html +2 -2
  185. nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittermination.html +2 -2
  186. nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittype.html +2 -2
  187. nautobot/project-static/docs/user-guide/core-data-model/circuits/provider.html +2 -2
  188. nautobot/project-static/docs/user-guide/core-data-model/circuits/providernetwork.html +2 -2
  189. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloud.html +2 -2
  190. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudaccount.html +2 -2
  191. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudnetwork.html +2 -2
  192. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudnetworkprefixassignment.html +2 -2
  193. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudresourcetype.html +2 -2
  194. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudservice.html +2 -2
  195. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudservicenetworkassignment.html +2 -2
  196. nautobot/project-static/docs/user-guide/core-data-model/dcim/cable.html +2 -2
  197. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleport.html +2 -2
  198. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleporttemplate.html +2 -2
  199. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverport.html +2 -2
  200. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverporttemplate.html +2 -2
  201. nautobot/project-static/docs/user-guide/core-data-model/dcim/controller.html +2 -2
  202. nautobot/project-static/docs/user-guide/core-data-model/dcim/controllermanageddevicegroup.html +2 -2
  203. nautobot/project-static/docs/user-guide/core-data-model/dcim/device.html +2 -2
  204. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebay.html +2 -2
  205. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebaytemplate.html +2 -2
  206. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicefamily.html +2 -2
  207. nautobot/project-static/docs/user-guide/core-data-model/dcim/deviceredundancygroup.html +2 -2
  208. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicetype.html +2 -2
  209. nautobot/project-static/docs/user-guide/core-data-model/dcim/frontport.html +2 -2
  210. nautobot/project-static/docs/user-guide/core-data-model/dcim/frontporttemplate.html +2 -2
  211. nautobot/project-static/docs/user-guide/core-data-model/dcim/interface.html +2 -2
  212. nautobot/project-static/docs/user-guide/core-data-model/dcim/interfaceredundancygroup.html +2 -2
  213. nautobot/project-static/docs/user-guide/core-data-model/dcim/interfacetemplate.html +2 -2
  214. nautobot/project-static/docs/user-guide/core-data-model/dcim/inventoryitem.html +2 -2
  215. nautobot/project-static/docs/user-guide/core-data-model/dcim/location.html +2 -2
  216. nautobot/project-static/docs/user-guide/core-data-model/dcim/locationtype.html +2 -2
  217. nautobot/project-static/docs/user-guide/core-data-model/dcim/manufacturer.html +2 -2
  218. nautobot/project-static/docs/user-guide/core-data-model/dcim/module.html +2 -2
  219. nautobot/project-static/docs/user-guide/core-data-model/dcim/modulebay.html +2 -2
  220. nautobot/project-static/docs/user-guide/core-data-model/dcim/modulebaytemplate.html +2 -2
  221. nautobot/project-static/docs/user-guide/core-data-model/dcim/moduletype.html +2 -2
  222. nautobot/project-static/docs/user-guide/core-data-model/dcim/platform.html +2 -2
  223. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerfeed.html +2 -2
  224. nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlet.html +2 -2
  225. nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlettemplate.html +2 -2
  226. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerpanel.html +2 -2
  227. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerport.html +2 -2
  228. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerporttemplate.html +2 -2
  229. nautobot/project-static/docs/user-guide/core-data-model/dcim/rack.html +2 -2
  230. nautobot/project-static/docs/user-guide/core-data-model/dcim/rackgroup.html +2 -2
  231. nautobot/project-static/docs/user-guide/core-data-model/dcim/rackreservation.html +2 -2
  232. nautobot/project-static/docs/user-guide/core-data-model/dcim/rearport.html +2 -2
  233. nautobot/project-static/docs/user-guide/core-data-model/dcim/rearporttemplate.html +2 -2
  234. nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareimagefile.html +2 -2
  235. nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareversion.html +2 -2
  236. nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualchassis.html +2 -2
  237. nautobot/project-static/docs/user-guide/core-data-model/extras/configcontext.html +2 -2
  238. nautobot/project-static/docs/user-guide/core-data-model/extras/configcontextschema.html +2 -2
  239. nautobot/project-static/docs/user-guide/core-data-model/extras/contact.html +2 -2
  240. nautobot/project-static/docs/user-guide/core-data-model/extras/team.html +2 -2
  241. nautobot/project-static/docs/user-guide/core-data-model/ipam/ipaddress.html +2 -2
  242. nautobot/project-static/docs/user-guide/core-data-model/ipam/namespace.html +2 -2
  243. nautobot/project-static/docs/user-guide/core-data-model/ipam/prefix.html +2 -2
  244. nautobot/project-static/docs/user-guide/core-data-model/ipam/rir.html +2 -2
  245. nautobot/project-static/docs/user-guide/core-data-model/ipam/routetarget.html +2 -2
  246. nautobot/project-static/docs/user-guide/core-data-model/ipam/service.html +2 -2
  247. nautobot/project-static/docs/user-guide/core-data-model/ipam/vlan.html +2 -2
  248. nautobot/project-static/docs/user-guide/core-data-model/ipam/vlangroup.html +2 -2
  249. nautobot/project-static/docs/user-guide/core-data-model/ipam/vrf.html +2 -2
  250. nautobot/project-static/docs/user-guide/core-data-model/overview/introduction.html +2 -2
  251. nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenant.html +2 -2
  252. nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenantgroup.html +2 -2
  253. nautobot/project-static/docs/user-guide/core-data-model/virtualization/cluster.html +2 -2
  254. nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustergroup.html +2 -2
  255. nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustertype.html +2 -2
  256. nautobot/project-static/docs/user-guide/core-data-model/virtualization/virtualmachine.html +2 -2
  257. nautobot/project-static/docs/user-guide/core-data-model/virtualization/vminterface.html +2 -2
  258. nautobot/project-static/docs/user-guide/feature-guides/contacts-and-teams.html +2 -2
  259. nautobot/project-static/docs/user-guide/feature-guides/custom-fields.html +2 -2
  260. nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-devices.html +2 -2
  261. nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-location-types-and-locations.html +2 -2
  262. nautobot/project-static/docs/user-guide/feature-guides/getting-started/index.html +2 -2
  263. nautobot/project-static/docs/user-guide/feature-guides/getting-started/interfaces.html +2 -2
  264. nautobot/project-static/docs/user-guide/feature-guides/getting-started/ipam.html +2 -2
  265. nautobot/project-static/docs/user-guide/feature-guides/getting-started/platforms.html +2 -2
  266. nautobot/project-static/docs/user-guide/feature-guides/getting-started/search-bar.html +2 -2
  267. nautobot/project-static/docs/user-guide/feature-guides/getting-started/tenants.html +2 -2
  268. nautobot/project-static/docs/user-guide/feature-guides/getting-started/vlans-and-vlan-groups.html +2 -2
  269. nautobot/project-static/docs/user-guide/feature-guides/git-data-source.html +2 -2
  270. nautobot/project-static/docs/user-guide/feature-guides/graphql.html +2 -2
  271. nautobot/project-static/docs/user-guide/feature-guides/ip-address-merge-tool.html +2 -2
  272. nautobot/project-static/docs/user-guide/feature-guides/relationships.html +2 -2
  273. nautobot/project-static/docs/user-guide/feature-guides/software-image-files-and-versions.html +2 -2
  274. nautobot/project-static/docs/user-guide/index.html +2 -2
  275. nautobot/project-static/docs/user-guide/platform-functionality/change-logging.html +2 -2
  276. nautobot/project-static/docs/user-guide/platform-functionality/computedfield.html +2 -2
  277. nautobot/project-static/docs/user-guide/platform-functionality/customfield.html +2 -2
  278. nautobot/project-static/docs/user-guide/platform-functionality/customlink.html +2 -2
  279. nautobot/project-static/docs/user-guide/platform-functionality/dynamicgroup.html +2 -2
  280. nautobot/project-static/docs/user-guide/platform-functionality/exporttemplate.html +2 -2
  281. nautobot/project-static/docs/user-guide/platform-functionality/externalintegration.html +2 -2
  282. nautobot/project-static/docs/user-guide/platform-functionality/gitrepository.html +2 -2
  283. nautobot/project-static/docs/user-guide/platform-functionality/graphql.html +2 -2
  284. nautobot/project-static/docs/user-guide/platform-functionality/graphqlquery.html +2 -2
  285. nautobot/project-static/docs/user-guide/platform-functionality/imageattachment.html +2 -2
  286. nautobot/project-static/docs/user-guide/platform-functionality/jobs/index.html +2 -2
  287. nautobot/project-static/docs/user-guide/platform-functionality/jobs/job-scheduling-and-approvals.html +2 -2
  288. nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobbutton.html +2 -2
  289. nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobhook.html +2 -2
  290. nautobot/project-static/docs/user-guide/platform-functionality/jobs/models.html +2 -2
  291. nautobot/project-static/docs/user-guide/platform-functionality/napalm.html +2 -2
  292. nautobot/project-static/docs/user-guide/platform-functionality/note.html +2 -2
  293. nautobot/project-static/docs/user-guide/platform-functionality/objectmetadata.html +2 -2
  294. nautobot/project-static/docs/user-guide/platform-functionality/relationship.html +2 -2
  295. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/authentication.html +2 -2
  296. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/filtering.html +2 -2
  297. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/overview.html +2 -2
  298. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/ui-related-endpoints.html +2 -2
  299. nautobot/project-static/docs/user-guide/platform-functionality/role.html +2 -2
  300. nautobot/project-static/docs/user-guide/platform-functionality/savedview.html +2 -2
  301. nautobot/project-static/docs/user-guide/platform-functionality/secret.html +2 -2
  302. nautobot/project-static/docs/user-guide/platform-functionality/staticgroupassociation.html +2 -2
  303. nautobot/project-static/docs/user-guide/platform-functionality/status.html +2 -2
  304. nautobot/project-static/docs/user-guide/platform-functionality/tag.html +2 -2
  305. nautobot/project-static/docs/user-guide/platform-functionality/template-filters.html +2 -2
  306. nautobot/project-static/docs/user-guide/platform-functionality/users/objectpermission.html +2 -2
  307. nautobot/project-static/docs/user-guide/platform-functionality/users/token.html +2 -2
  308. nautobot/project-static/docs/user-guide/platform-functionality/webhook.html +2 -2
  309. {nautobot-2.3.13.dist-info → nautobot-2.3.15.dist-info}/METADATA +5 -4
  310. {nautobot-2.3.13.dist-info → nautobot-2.3.15.dist-info}/RECORD +314 -315
  311. nautobot/core/fixtures/user-data.json +0 -59
  312. {nautobot-2.3.13.dist-info → nautobot-2.3.15.dist-info}/LICENSE.txt +0 -0
  313. {nautobot-2.3.13.dist-info → nautobot-2.3.15.dist-info}/NOTICE +0 -0
  314. {nautobot-2.3.13.dist-info → nautobot-2.3.15.dist-info}/WHEEL +0 -0
  315. {nautobot-2.3.13.dist-info → nautobot-2.3.15.dist-info}/entry_points.txt +0 -0
@@ -227,7 +227,8 @@ class PrefixViewSet(NautobotModelViewSet):
227
227
 
228
228
  # Create the new Prefix(es)
229
229
  serializer.is_valid(raise_exception=True)
230
- serializer.save()
230
+ self.perform_create(serializer)
231
+
231
232
  return Response(serializer.data, status=status.HTTP_201_CREATED)
232
233
 
233
234
  else:
@@ -318,7 +319,8 @@ class PrefixViewSet(NautobotModelViewSet):
318
319
 
319
320
  # Create the new IP address(es)
320
321
  serializer.is_valid(raise_exception=True)
321
- serializer.save()
322
+ self.perform_create(serializer)
323
+
322
324
  return Response(serializer.data, status=status.HTTP_201_CREATED)
323
325
 
324
326
  # Determine the maximum number of IPs to return
@@ -396,21 +398,20 @@ class VLANGroupViewSet(NautobotModelViewSet):
396
398
  serializer_class = serializers.VLANGroupSerializer
397
399
  filterset_class = filters.VLANGroupFilterSet
398
400
 
399
- def restrict_queryset(self, request, *args, **kwargs):
400
- """
401
- Apply "view" permissions on the POST /available-vlans/ endpoint, otherwise as ModelViewSetMixin.
402
- """
403
- if request.user.is_authenticated and self.action == "available_vlans":
404
- self.queryset = self.queryset.restrict(request.user, "view")
405
- else:
406
- super().restrict_queryset(request, *args, **kwargs)
401
+ @staticmethod
402
+ def vlan_group_queryset():
403
+ return (
404
+ VLANGroup.objects.select_related("location")
405
+ .prefetch_related("tags")
406
+ .annotate(vlan_count=count_related(VLAN, "vlan_group"))
407
+ )
407
408
 
408
409
  class AvailableVLANPermissions(TokenPermissions):
409
- """As nautobot.core.api.authentication.TokenPermissions, but enforcing add_vlan permission."""
410
+ """As nautobot.core.api.authentication.TokenPermissions, but enforcing `add_vlan` and `view_vlan` permission."""
410
411
 
411
412
  perms_map = {
412
- "GET": ["ipam.view_vlangroup"],
413
- "POST": ["ipam.view_vlangroup", "ipam.add_vlan"],
413
+ "GET": ["ipam.view_vlangroup", "ipam.view_vlan"],
414
+ "POST": ["ipam.view_vlangroup", "ipam.view_vlan", "ipam.add_vlan"],
414
415
  }
415
416
 
416
417
  @extend_schema(methods=["get"], responses={200: ListSerializer(child=IntegerField())})
@@ -426,6 +427,7 @@ class VLANGroupViewSet(NautobotModelViewSet):
426
427
  methods=["get", "post"],
427
428
  permission_classes=[AvailableVLANPermissions],
428
429
  filterset_class=None,
430
+ queryset=VLAN.objects.all(),
429
431
  )
430
432
  def available_vlans(self, request, pk=None):
431
433
  """
@@ -433,7 +435,7 @@ class VLANGroupViewSet(NautobotModelViewSet):
433
435
  By default, the number of VIDs returned will be equivalent to PAGINATE_COUNT.
434
436
  An arbitrary limit (up to MAX_PAGE_SIZE, if set) may be passed, however results will not be paginated.
435
437
  """
436
- vlan_group = get_object_or_404(self.queryset, pk=pk)
438
+ vlan_group = get_object_or_404(self.vlan_group_queryset().restrict(user=request.user), pk=pk)
437
439
 
438
440
  if request.method == "POST":
439
441
  with cache.lock(
@@ -509,7 +511,7 @@ class VLANGroupViewSet(NautobotModelViewSet):
509
511
 
510
512
  # Create the new VLANs
511
513
  serializer.is_valid(raise_exception=True)
512
- serializer.save()
514
+ self.perform_create(serializer)
513
515
 
514
516
  data = serializer.data
515
517
 
nautobot/ipam/models.py CHANGED
@@ -531,8 +531,32 @@ class Prefix(PrimaryModel):
531
531
  prefix = kwargs.pop("prefix", None)
532
532
  self._location = kwargs.pop("location", None)
533
533
  super().__init__(*args, **kwargs)
534
+
535
+ # Initialize cached fields
536
+ self._parent = None
537
+ self._network = None
538
+ self._prefix_length = None
539
+ self._namespace_id = None
540
+
534
541
  self._deconstruct_prefix(prefix)
535
542
 
543
+ @staticmethod
544
+ def _extract_field_value(field_name, field_names, values):
545
+ for current_field, field_value in zip(field_names, values):
546
+ if field_name == current_field:
547
+ return field_value
548
+ return None
549
+
550
+ @classmethod
551
+ def from_db(cls, db, field_names, values):
552
+ instance = super().from_db(db, field_names, values)
553
+ # These cached values are used to detect changes during save,
554
+ # avoiding unnecessary re-parenting of subnets and IPs if these fields have not been updated.
555
+ instance._network = cls._extract_field_value("network", field_names, values)
556
+ instance._prefix_length = cls._extract_field_value("prefix_length", field_names, values)
557
+ instance._namespace_id = cls._extract_field_value("namespace_id", field_names, values)
558
+ return instance
559
+
536
560
  def __str__(self):
537
561
  return str(self.prefix)
538
562
 
@@ -612,6 +636,23 @@ class Prefix(PrimaryModel):
612
636
  protected_objects.update(parent=self.parent)
613
637
  return super().delete(*args, **kwargs)
614
638
 
639
+ def get_parent(self):
640
+ # Determine if a parent exists and set it to the closest ancestor by `prefix_length`.
641
+ if self._parent is not None:
642
+ return self._parent
643
+
644
+ if supernets := self.supernets():
645
+ parent = max(supernets, key=operator.attrgetter("prefix_length"))
646
+ self._parent = parent
647
+ return parent
648
+ return None
649
+
650
+ def clean(self):
651
+ if self.prefix:
652
+ # self.parent depends on self.prefix having a value
653
+ self.parent = self.get_parent()
654
+ super().clean()
655
+
615
656
  def save(self, *args, **kwargs):
616
657
  if isinstance(self.prefix, netaddr.IPNetwork):
617
658
  # Clear host bits from prefix
@@ -619,11 +660,7 @@ class Prefix(PrimaryModel):
619
660
  # which will (re)set the broadcast and ip_version values of this instance to their correct values.
620
661
  self.prefix = self.prefix.cidr
621
662
 
622
- # Determine if a parent exists and set it to the closest ancestor by `prefix_length`.
623
- supernets = self.supernets()
624
- if supernets:
625
- parent = max(supernets, key=operator.attrgetter("prefix_length"))
626
- self.parent = parent
663
+ self.parent = self.get_parent()
627
664
 
628
665
  # Validate that creation of this prefix does not create an invalid parent/child relationship
629
666
  # 3.0 TODO: uncomment this to enforce this constraint
@@ -655,15 +692,26 @@ class Prefix(PrimaryModel):
655
692
  # )
656
693
  # raise ValidationError({"__all__": err_msg})
657
694
 
695
+ # cache the value of present_in_database; because after `super().save()`
696
+ # `self.present_in_database` would always return True`
697
+ present_in_database = self.present_in_database
698
+
658
699
  with transaction.atomic():
659
700
  super().save(*args, **kwargs)
660
701
  if self._location is not None:
661
702
  self.location = self._location
662
703
 
663
- # Determine the subnets and reparent them to this prefix.
664
- self.reparent_subnets()
665
- # Determine the child IPs and reparent them to this prefix.
666
- self.reparent_ips()
704
+ # Only reparent subnets and ips if any of these fields has been updated.
705
+ if (
706
+ not present_in_database
707
+ or self._network != self.network
708
+ or self._namespace_id != self.namespace_id
709
+ or self._prefix_length != self.prefix_length
710
+ ):
711
+ # Determine the subnets and reparent them to this prefix.
712
+ self.reparent_subnets()
713
+ # Determine the child IPs and reparent them to this prefix.
714
+ self.reparent_ips()
667
715
 
668
716
  @property
669
717
  def cidr_str(self):
@@ -739,6 +787,7 @@ class Prefix(PrimaryModel):
739
787
  Returns:
740
788
  QuerySet
741
789
  """
790
+
742
791
  query = Prefix.objects.all()
743
792
 
744
793
  if for_update:
@@ -750,7 +799,7 @@ class Prefix(PrimaryModel):
750
799
  if not include_self:
751
800
  query = query.exclude(id=self.id)
752
801
 
753
- return query.filter(
802
+ supernets = query.filter(
754
803
  ip_version=self.ip_version,
755
804
  prefix_length__lte=self.prefix_length,
756
805
  network__lte=self.network,
@@ -758,6 +807,8 @@ class Prefix(PrimaryModel):
758
807
  namespace=self.namespace,
759
808
  )
760
809
 
810
+ return supernets
811
+
761
812
  def subnets(self, direct=False, include_self=False, for_update=False):
762
813
  """
763
814
  Return subnets of this Prefix.
@@ -867,7 +918,7 @@ class Prefix(PrimaryModel):
867
918
  Return all available IPs within this prefix as an IPSet.
868
919
  """
869
920
  prefix = netaddr.IPSet(self.prefix)
870
- child_ips = netaddr.IPSet([ip.address.ip for ip in self.ip_addresses.all()])
921
+ child_ips = netaddr.IPSet([ip.address.ip for ip in self.get_all_ips()])
871
922
  available_ips = prefix - child_ips
872
923
 
873
924
  # IPv6, pool, or IPv4 /31-32 sets are fully usable
nautobot/ipam/tables.py CHANGED
@@ -404,7 +404,7 @@ class PrefixDetailTable(PrefixTable):
404
404
  "type",
405
405
  "status",
406
406
  "children",
407
- # "vrf",
407
+ "vrf_count",
408
408
  "utilization",
409
409
  "tenant",
410
410
  "location_count",
@@ -420,7 +420,7 @@ class PrefixDetailTable(PrefixTable):
420
420
  "type",
421
421
  "status",
422
422
  "children",
423
- # "vrf",
423
+ "vrf_count",
424
424
  "utilization",
425
425
  "tenant",
426
426
  "location_count",