nautobot 2.3.9__py3-none-any.whl → 2.3.11__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 (335) hide show
  1. nautobot/apps/utils.py +2 -0
  2. nautobot/cloud/tables.py +1 -0
  3. nautobot/core/forms/forms.py +5 -1
  4. nautobot/core/models/query_functions.py +147 -1
  5. nautobot/core/tables.py +88 -22
  6. nautobot/core/templates/generic/object_bulk_destroy.html +12 -3
  7. nautobot/core/templates/generic/object_bulk_update.html +4 -2
  8. nautobot/core/templates/generic/object_create.html +1 -1
  9. nautobot/core/templates/rest_framework/api.html +3 -0
  10. nautobot/core/testing/api.py +3 -1
  11. nautobot/core/testing/integration.py +64 -0
  12. nautobot/core/testing/views.py +33 -27
  13. nautobot/core/tests/integration/test_app_navbar.py +3 -3
  14. nautobot/core/tests/integration/test_navbar.py +1 -1
  15. nautobot/core/tests/test_csv.py +3 -0
  16. nautobot/core/tests/test_models_query_functions.py +108 -0
  17. nautobot/core/tests/test_utils.py +25 -5
  18. nautobot/core/utils/lookup.py +35 -0
  19. nautobot/core/views/generic.py +50 -39
  20. nautobot/core/views/mixins.py +97 -43
  21. nautobot/core/views/renderers.py +8 -5
  22. nautobot/dcim/tables/devices.py +3 -0
  23. nautobot/dcim/templates/dcim/device_component_add.html +8 -8
  24. nautobot/dcim/templates/dcim/modulebay_create.html +39 -0
  25. nautobot/dcim/templates/dcim/modulebay_update.html +39 -0
  26. nautobot/dcim/templates/dcim/virtualchassis_add_member.html +2 -2
  27. nautobot/dcim/templates/dcim/virtualchassis_edit.html +2 -2
  28. nautobot/dcim/tests/integration/test_create_device.py +86 -0
  29. nautobot/dcim/views.py +1 -1
  30. nautobot/extras/api/customfields.py +3 -10
  31. nautobot/extras/context_managers.py +23 -3
  32. nautobot/extras/jobs.py +20 -14
  33. nautobot/extras/models/customfields.py +12 -0
  34. nautobot/extras/signals.py +2 -0
  35. nautobot/extras/tasks.py +88 -69
  36. nautobot/extras/tests/test_context_managers.py +9 -4
  37. nautobot/extras/tests/test_relationships.py +1 -0
  38. nautobot/extras/tests/test_webhooks.py +1 -1
  39. nautobot/extras/views.py +1 -0
  40. nautobot/extras/webhooks.py +16 -7
  41. nautobot/ipam/factory.py +3 -0
  42. nautobot/ipam/filters.py +5 -0
  43. nautobot/ipam/forms.py +17 -0
  44. nautobot/ipam/models.py +2 -1
  45. nautobot/ipam/signals.py +2 -2
  46. nautobot/ipam/tables.py +3 -3
  47. nautobot/ipam/templates/ipam/ipaddress_assign.html +2 -2
  48. nautobot/ipam/tests/test_models.py +113 -1
  49. nautobot/ipam/tests/test_views.py +39 -5
  50. nautobot/project-static/docs/404.html +1 -1
  51. nautobot/project-static/docs/apps/index.html +1 -1
  52. nautobot/project-static/docs/apps/nautobot-apps.html +1 -1
  53. nautobot/project-static/docs/code-reference/nautobot/apps/__init__.html +1 -1
  54. nautobot/project-static/docs/code-reference/nautobot/apps/admin.html +1 -1
  55. nautobot/project-static/docs/code-reference/nautobot/apps/api.html +1 -1
  56. nautobot/project-static/docs/code-reference/nautobot/apps/change_logging.html +1 -1
  57. nautobot/project-static/docs/code-reference/nautobot/apps/choices.html +1 -1
  58. nautobot/project-static/docs/code-reference/nautobot/apps/config.html +1 -1
  59. nautobot/project-static/docs/code-reference/nautobot/apps/constants.html +1 -1
  60. nautobot/project-static/docs/code-reference/nautobot/apps/datasources.html +1 -1
  61. nautobot/project-static/docs/code-reference/nautobot/apps/exceptions.html +1 -1
  62. nautobot/project-static/docs/code-reference/nautobot/apps/factory.html +1 -1
  63. nautobot/project-static/docs/code-reference/nautobot/apps/filters.html +1 -1
  64. nautobot/project-static/docs/code-reference/nautobot/apps/forms.html +1 -1
  65. nautobot/project-static/docs/code-reference/nautobot/apps/graphql.html +1 -1
  66. nautobot/project-static/docs/code-reference/nautobot/apps/jobs.html +62 -5
  67. nautobot/project-static/docs/code-reference/nautobot/apps/models.html +1 -1
  68. nautobot/project-static/docs/code-reference/nautobot/apps/querysets.html +1 -1
  69. nautobot/project-static/docs/code-reference/nautobot/apps/secrets.html +1 -1
  70. nautobot/project-static/docs/code-reference/nautobot/apps/tables.html +132 -7
  71. nautobot/project-static/docs/code-reference/nautobot/apps/testing.html +176 -1
  72. nautobot/project-static/docs/code-reference/nautobot/apps/ui.html +1 -1
  73. nautobot/project-static/docs/code-reference/nautobot/apps/urls.html +1 -1
  74. nautobot/project-static/docs/code-reference/nautobot/apps/utils.html +95 -1
  75. nautobot/project-static/docs/code-reference/nautobot/apps/views.html +5 -5
  76. nautobot/project-static/docs/development/apps/api/configuration-view.html +1 -1
  77. nautobot/project-static/docs/development/apps/api/database-backend-config.html +1 -1
  78. nautobot/project-static/docs/development/apps/api/models/django-admin.html +1 -1
  79. nautobot/project-static/docs/development/apps/api/models/global-search.html +1 -1
  80. nautobot/project-static/docs/development/apps/api/models/graphql.html +1 -1
  81. nautobot/project-static/docs/development/apps/api/models/index.html +1 -1
  82. nautobot/project-static/docs/development/apps/api/nautobot-app-config.html +1 -1
  83. nautobot/project-static/docs/development/apps/api/platform-features/custom-validators.html +1 -1
  84. nautobot/project-static/docs/development/apps/api/platform-features/filter-extensions.html +1 -1
  85. nautobot/project-static/docs/development/apps/api/platform-features/git-repository-content.html +1 -1
  86. nautobot/project-static/docs/development/apps/api/platform-features/index.html +1 -1
  87. nautobot/project-static/docs/development/apps/api/platform-features/jinja2-filters.html +1 -1
  88. nautobot/project-static/docs/development/apps/api/platform-features/jobs.html +1 -1
  89. nautobot/project-static/docs/development/apps/api/platform-features/populating-extensibility-features.html +1 -1
  90. nautobot/project-static/docs/development/apps/api/platform-features/secrets-providers.html +1 -1
  91. nautobot/project-static/docs/development/apps/api/platform-features/table-extensions.html +1 -1
  92. nautobot/project-static/docs/development/apps/api/platform-features/uniquely-identify-objects.html +1 -1
  93. nautobot/project-static/docs/development/apps/api/prometheus.html +1 -1
  94. nautobot/project-static/docs/development/apps/api/setup.html +1 -1
  95. nautobot/project-static/docs/development/apps/api/testing.html +1 -1
  96. nautobot/project-static/docs/development/apps/api/ui-extensions/banners.html +1 -1
  97. nautobot/project-static/docs/development/apps/api/ui-extensions/home-page.html +1 -1
  98. nautobot/project-static/docs/development/apps/api/ui-extensions/index.html +1 -1
  99. nautobot/project-static/docs/development/apps/api/ui-extensions/navigation.html +1 -1
  100. nautobot/project-static/docs/development/apps/api/ui-extensions/object-views.html +1 -1
  101. nautobot/project-static/docs/development/apps/api/views/base-template.html +1 -1
  102. nautobot/project-static/docs/development/apps/api/views/core-view-overrides.html +1 -1
  103. nautobot/project-static/docs/development/apps/api/views/django-generic-views.html +1 -1
  104. nautobot/project-static/docs/development/apps/api/views/help-documentation.html +1 -1
  105. nautobot/project-static/docs/development/apps/api/views/index.html +1 -1
  106. nautobot/project-static/docs/development/apps/api/views/nautobot-generic-views.html +1 -1
  107. nautobot/project-static/docs/development/apps/api/views/nautobotuiviewset.html +1 -1
  108. nautobot/project-static/docs/development/apps/api/views/nautobotuiviewsetrouter.html +1 -1
  109. nautobot/project-static/docs/development/apps/api/views/notes.html +1 -1
  110. nautobot/project-static/docs/development/apps/api/views/rest-api.html +1 -1
  111. nautobot/project-static/docs/development/apps/api/views/urls.html +1 -1
  112. nautobot/project-static/docs/development/apps/index.html +1 -1
  113. nautobot/project-static/docs/development/apps/migration/code-updates.html +1 -1
  114. nautobot/project-static/docs/development/apps/migration/dependency-updates.html +1 -1
  115. nautobot/project-static/docs/development/apps/migration/from-v1.html +1 -1
  116. nautobot/project-static/docs/development/apps/migration/model-updates/dcim.html +1 -1
  117. nautobot/project-static/docs/development/apps/migration/model-updates/extras.html +1 -1
  118. nautobot/project-static/docs/development/apps/migration/model-updates/global.html +1 -1
  119. nautobot/project-static/docs/development/apps/migration/model-updates/ipam.html +1 -1
  120. nautobot/project-static/docs/development/apps/porting-from-netbox.html +1 -1
  121. nautobot/project-static/docs/development/core/application-registry.html +1 -1
  122. nautobot/project-static/docs/development/core/best-practices.html +1 -1
  123. nautobot/project-static/docs/development/core/bootstrap-ui.html +1 -1
  124. nautobot/project-static/docs/development/core/caching.html +1 -1
  125. nautobot/project-static/docs/development/core/controllers.html +1 -1
  126. nautobot/project-static/docs/development/core/docker-compose-advanced-use-cases.html +1 -1
  127. nautobot/project-static/docs/development/core/generic-views.html +1 -1
  128. nautobot/project-static/docs/development/core/getting-started.html +1 -1
  129. nautobot/project-static/docs/development/core/homepage.html +1 -1
  130. nautobot/project-static/docs/development/core/index.html +1 -1
  131. nautobot/project-static/docs/development/core/model-checklist.html +1 -1
  132. nautobot/project-static/docs/development/core/model-features.html +1 -1
  133. nautobot/project-static/docs/development/core/natural-keys.html +1 -1
  134. nautobot/project-static/docs/development/core/navigation-menu.html +1 -1
  135. nautobot/project-static/docs/development/core/release-checklist.html +1 -1
  136. nautobot/project-static/docs/development/core/role-internals.html +1 -1
  137. nautobot/project-static/docs/development/core/settings.html +1 -1
  138. nautobot/project-static/docs/development/core/style-guide.html +1 -1
  139. nautobot/project-static/docs/development/core/templates.html +1 -1
  140. nautobot/project-static/docs/development/core/testing.html +1 -1
  141. nautobot/project-static/docs/development/core/user-preferences.html +1 -1
  142. nautobot/project-static/docs/development/index.html +1 -1
  143. nautobot/project-static/docs/development/jobs/index.html +1 -1
  144. nautobot/project-static/docs/development/jobs/migration/from-v1.html +1 -1
  145. nautobot/project-static/docs/index.html +1 -1
  146. nautobot/project-static/docs/objects.inv +0 -0
  147. nautobot/project-static/docs/overview/application_stack.html +1 -1
  148. nautobot/project-static/docs/overview/design_philosophy.html +1 -1
  149. nautobot/project-static/docs/release-notes/index.html +1 -1
  150. nautobot/project-static/docs/release-notes/version-1.0.html +1 -1
  151. nautobot/project-static/docs/release-notes/version-1.1.html +1 -1
  152. nautobot/project-static/docs/release-notes/version-1.2.html +1 -1
  153. nautobot/project-static/docs/release-notes/version-1.3.html +1 -1
  154. nautobot/project-static/docs/release-notes/version-1.4.html +1 -1
  155. nautobot/project-static/docs/release-notes/version-1.5.html +1 -1
  156. nautobot/project-static/docs/release-notes/version-1.6.html +1 -1
  157. nautobot/project-static/docs/release-notes/version-2.0.html +1 -1
  158. nautobot/project-static/docs/release-notes/version-2.1.html +1 -1
  159. nautobot/project-static/docs/release-notes/version-2.2.html +1 -1
  160. nautobot/project-static/docs/release-notes/version-2.3.html +440 -140
  161. nautobot/project-static/docs/requirements.txt +1 -1
  162. nautobot/project-static/docs/search/search_index.json +1 -1
  163. nautobot/project-static/docs/sitemap.xml +270 -270
  164. nautobot/project-static/docs/sitemap.xml.gz +0 -0
  165. nautobot/project-static/docs/user-guide/administration/configuration/authentication/ldap.html +1 -1
  166. nautobot/project-static/docs/user-guide/administration/configuration/authentication/remote.html +1 -1
  167. nautobot/project-static/docs/user-guide/administration/configuration/authentication/sso.html +1 -1
  168. nautobot/project-static/docs/user-guide/administration/configuration/index.html +1 -1
  169. nautobot/project-static/docs/user-guide/administration/configuration/redis.html +1 -1
  170. nautobot/project-static/docs/user-guide/administration/configuration/settings.html +1 -1
  171. nautobot/project-static/docs/user-guide/administration/configuration/time-zones.html +1 -1
  172. nautobot/project-static/docs/user-guide/administration/guides/celery-queues.html +1 -1
  173. nautobot/project-static/docs/user-guide/administration/guides/docker.html +1 -1
  174. nautobot/project-static/docs/user-guide/administration/guides/health-checks.html +1 -1
  175. nautobot/project-static/docs/user-guide/administration/guides/permissions.html +1 -1
  176. nautobot/project-static/docs/user-guide/administration/guides/prometheus-metrics.html +1 -1
  177. nautobot/project-static/docs/user-guide/administration/guides/replicating-nautobot.html +1 -1
  178. nautobot/project-static/docs/user-guide/administration/guides/request-profiling.html +40 -1
  179. nautobot/project-static/docs/user-guide/administration/guides/s3-django-storage.html +1 -1
  180. nautobot/project-static/docs/user-guide/administration/guides/selinux-troubleshooting.html +1 -1
  181. nautobot/project-static/docs/user-guide/administration/installation/app-install.html +1 -1
  182. nautobot/project-static/docs/user-guide/administration/installation/external-authentication.html +1 -1
  183. nautobot/project-static/docs/user-guide/administration/installation/http-server.html +1 -1
  184. nautobot/project-static/docs/user-guide/administration/installation/index.html +1 -1
  185. nautobot/project-static/docs/user-guide/administration/installation/install_system.html +1 -1
  186. nautobot/project-static/docs/user-guide/administration/installation/nautobot.html +1 -1
  187. nautobot/project-static/docs/user-guide/administration/installation/services.html +1 -1
  188. nautobot/project-static/docs/user-guide/administration/migration/migrating-from-netbox.html +1 -1
  189. nautobot/project-static/docs/user-guide/administration/migration/migrating-from-postgresql.html +1 -1
  190. nautobot/project-static/docs/user-guide/administration/tools/nautobot-server.html +1 -1
  191. nautobot/project-static/docs/user-guide/administration/tools/nautobot-shell.html +1 -1
  192. nautobot/project-static/docs/user-guide/administration/upgrading/database-backup.html +1 -1
  193. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/after-you-upgrade.html +1 -1
  194. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/before-you-upgrade.html +1 -1
  195. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/for-developers.html +1 -1
  196. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/index.html +1 -1
  197. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/whats-changed.html +1 -1
  198. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/region-and-site-data-migration-guide.html +1 -1
  199. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +1 -1
  200. nautobot/project-static/docs/user-guide/administration/upgrading/upgrading.html +1 -1
  201. nautobot/project-static/docs/user-guide/core-data-model/circuits/circuit.html +1 -1
  202. nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittermination.html +1 -1
  203. nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittype.html +1 -1
  204. nautobot/project-static/docs/user-guide/core-data-model/circuits/provider.html +1 -1
  205. nautobot/project-static/docs/user-guide/core-data-model/circuits/providernetwork.html +1 -1
  206. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloud.html +1 -1
  207. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudaccount.html +1 -1
  208. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudnetwork.html +1 -1
  209. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudnetworkprefixassignment.html +1 -1
  210. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudresourcetype.html +1 -1
  211. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudservice.html +1 -1
  212. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudservicenetworkassignment.html +1 -1
  213. nautobot/project-static/docs/user-guide/core-data-model/dcim/cable.html +1 -1
  214. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleport.html +1 -1
  215. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleporttemplate.html +1 -1
  216. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverport.html +1 -1
  217. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverporttemplate.html +1 -1
  218. nautobot/project-static/docs/user-guide/core-data-model/dcim/controller.html +1 -1
  219. nautobot/project-static/docs/user-guide/core-data-model/dcim/controllermanageddevicegroup.html +1 -1
  220. nautobot/project-static/docs/user-guide/core-data-model/dcim/device.html +1 -1
  221. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebay.html +1 -1
  222. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebaytemplate.html +1 -1
  223. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicefamily.html +1 -1
  224. nautobot/project-static/docs/user-guide/core-data-model/dcim/deviceredundancygroup.html +1 -1
  225. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicetype.html +1 -1
  226. nautobot/project-static/docs/user-guide/core-data-model/dcim/frontport.html +1 -1
  227. nautobot/project-static/docs/user-guide/core-data-model/dcim/frontporttemplate.html +1 -1
  228. nautobot/project-static/docs/user-guide/core-data-model/dcim/interface.html +1 -1
  229. nautobot/project-static/docs/user-guide/core-data-model/dcim/interfaceredundancygroup.html +1 -1
  230. nautobot/project-static/docs/user-guide/core-data-model/dcim/interfacetemplate.html +1 -1
  231. nautobot/project-static/docs/user-guide/core-data-model/dcim/inventoryitem.html +1 -1
  232. nautobot/project-static/docs/user-guide/core-data-model/dcim/location.html +1 -1
  233. nautobot/project-static/docs/user-guide/core-data-model/dcim/locationtype.html +1 -1
  234. nautobot/project-static/docs/user-guide/core-data-model/dcim/manufacturer.html +1 -1
  235. nautobot/project-static/docs/user-guide/core-data-model/dcim/module.html +1 -1
  236. nautobot/project-static/docs/user-guide/core-data-model/dcim/modulebay.html +1 -1
  237. nautobot/project-static/docs/user-guide/core-data-model/dcim/modulebaytemplate.html +1 -1
  238. nautobot/project-static/docs/user-guide/core-data-model/dcim/moduletype.html +1 -1
  239. nautobot/project-static/docs/user-guide/core-data-model/dcim/platform.html +1 -1
  240. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerfeed.html +1 -1
  241. nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlet.html +1 -1
  242. nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlettemplate.html +1 -1
  243. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerpanel.html +1 -1
  244. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerport.html +1 -1
  245. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerporttemplate.html +1 -1
  246. nautobot/project-static/docs/user-guide/core-data-model/dcim/rack.html +1 -1
  247. nautobot/project-static/docs/user-guide/core-data-model/dcim/rackgroup.html +1 -1
  248. nautobot/project-static/docs/user-guide/core-data-model/dcim/rackreservation.html +1 -1
  249. nautobot/project-static/docs/user-guide/core-data-model/dcim/rearport.html +1 -1
  250. nautobot/project-static/docs/user-guide/core-data-model/dcim/rearporttemplate.html +1 -1
  251. nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareimagefile.html +1 -1
  252. nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareversion.html +1 -1
  253. nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualchassis.html +1 -1
  254. nautobot/project-static/docs/user-guide/core-data-model/extras/configcontext.html +1 -1
  255. nautobot/project-static/docs/user-guide/core-data-model/extras/configcontextschema.html +1 -1
  256. nautobot/project-static/docs/user-guide/core-data-model/extras/contact.html +1 -1
  257. nautobot/project-static/docs/user-guide/core-data-model/extras/team.html +1 -1
  258. nautobot/project-static/docs/user-guide/core-data-model/ipam/ipaddress.html +1 -1
  259. nautobot/project-static/docs/user-guide/core-data-model/ipam/namespace.html +1 -1
  260. nautobot/project-static/docs/user-guide/core-data-model/ipam/prefix.html +1 -1
  261. nautobot/project-static/docs/user-guide/core-data-model/ipam/rir.html +1 -1
  262. nautobot/project-static/docs/user-guide/core-data-model/ipam/routetarget.html +1 -1
  263. nautobot/project-static/docs/user-guide/core-data-model/ipam/service.html +1 -1
  264. nautobot/project-static/docs/user-guide/core-data-model/ipam/vlan.html +1 -1
  265. nautobot/project-static/docs/user-guide/core-data-model/ipam/vlangroup.html +1 -1
  266. nautobot/project-static/docs/user-guide/core-data-model/ipam/vrf.html +1 -1
  267. nautobot/project-static/docs/user-guide/core-data-model/overview/introduction.html +1 -1
  268. nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenant.html +1 -1
  269. nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenantgroup.html +1 -1
  270. nautobot/project-static/docs/user-guide/core-data-model/virtualization/cluster.html +1 -1
  271. nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustergroup.html +1 -1
  272. nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustertype.html +1 -1
  273. nautobot/project-static/docs/user-guide/core-data-model/virtualization/virtualmachine.html +1 -1
  274. nautobot/project-static/docs/user-guide/core-data-model/virtualization/vminterface.html +1 -1
  275. nautobot/project-static/docs/user-guide/feature-guides/contacts-and-teams.html +1 -1
  276. nautobot/project-static/docs/user-guide/feature-guides/custom-fields.html +1 -1
  277. nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-devices.html +1 -1
  278. nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-location-types-and-locations.html +1 -1
  279. nautobot/project-static/docs/user-guide/feature-guides/getting-started/index.html +1 -1
  280. nautobot/project-static/docs/user-guide/feature-guides/getting-started/interfaces.html +1 -1
  281. nautobot/project-static/docs/user-guide/feature-guides/getting-started/ipam.html +1 -1
  282. nautobot/project-static/docs/user-guide/feature-guides/getting-started/platforms.html +1 -1
  283. nautobot/project-static/docs/user-guide/feature-guides/getting-started/search-bar.html +1 -1
  284. nautobot/project-static/docs/user-guide/feature-guides/getting-started/tenants.html +1 -1
  285. nautobot/project-static/docs/user-guide/feature-guides/getting-started/vlans-and-vlan-groups.html +1 -1
  286. nautobot/project-static/docs/user-guide/feature-guides/git-data-source.html +1 -1
  287. nautobot/project-static/docs/user-guide/feature-guides/graphql.html +1 -1
  288. nautobot/project-static/docs/user-guide/feature-guides/ip-address-merge-tool.html +1 -1
  289. nautobot/project-static/docs/user-guide/feature-guides/relationships.html +1 -1
  290. nautobot/project-static/docs/user-guide/feature-guides/software-image-files-and-versions.html +1 -1
  291. nautobot/project-static/docs/user-guide/index.html +1 -1
  292. nautobot/project-static/docs/user-guide/platform-functionality/change-logging.html +1 -1
  293. nautobot/project-static/docs/user-guide/platform-functionality/computedfield.html +1 -1
  294. nautobot/project-static/docs/user-guide/platform-functionality/customfield.html +1 -1
  295. nautobot/project-static/docs/user-guide/platform-functionality/customlink.html +1 -1
  296. nautobot/project-static/docs/user-guide/platform-functionality/dynamicgroup.html +1 -1
  297. nautobot/project-static/docs/user-guide/platform-functionality/exporttemplate.html +1 -1
  298. nautobot/project-static/docs/user-guide/platform-functionality/externalintegration.html +1 -1
  299. nautobot/project-static/docs/user-guide/platform-functionality/gitrepository.html +1 -1
  300. nautobot/project-static/docs/user-guide/platform-functionality/graphql.html +1 -1
  301. nautobot/project-static/docs/user-guide/platform-functionality/graphqlquery.html +1 -1
  302. nautobot/project-static/docs/user-guide/platform-functionality/imageattachment.html +1 -1
  303. nautobot/project-static/docs/user-guide/platform-functionality/jobs/index.html +1 -1
  304. nautobot/project-static/docs/user-guide/platform-functionality/jobs/job-scheduling-and-approvals.html +1 -1
  305. nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobbutton.html +1 -1
  306. nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobhook.html +1 -1
  307. nautobot/project-static/docs/user-guide/platform-functionality/jobs/models.html +1 -1
  308. nautobot/project-static/docs/user-guide/platform-functionality/napalm.html +1 -1
  309. nautobot/project-static/docs/user-guide/platform-functionality/note.html +1 -1
  310. nautobot/project-static/docs/user-guide/platform-functionality/objectmetadata.html +1 -1
  311. nautobot/project-static/docs/user-guide/platform-functionality/relationship.html +1 -1
  312. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/authentication.html +1 -1
  313. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/filtering.html +1 -1
  314. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/overview.html +1 -1
  315. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/ui-related-endpoints.html +1 -1
  316. nautobot/project-static/docs/user-guide/platform-functionality/role.html +1 -1
  317. nautobot/project-static/docs/user-guide/platform-functionality/savedview.html +1 -1
  318. nautobot/project-static/docs/user-guide/platform-functionality/secret.html +1 -1
  319. nautobot/project-static/docs/user-guide/platform-functionality/staticgroupassociation.html +1 -1
  320. nautobot/project-static/docs/user-guide/platform-functionality/status.html +1 -1
  321. nautobot/project-static/docs/user-guide/platform-functionality/tag.html +1 -1
  322. nautobot/project-static/docs/user-guide/platform-functionality/template-filters.html +1 -1
  323. nautobot/project-static/docs/user-guide/platform-functionality/users/objectpermission.html +1 -1
  324. nautobot/project-static/docs/user-guide/platform-functionality/users/token.html +1 -1
  325. nautobot/project-static/docs/user-guide/platform-functionality/webhook.html +1 -1
  326. nautobot/project-static/js/forms.js +0 -38
  327. nautobot/virtualization/forms.py +24 -0
  328. nautobot/virtualization/templates/virtualization/vminterface_edit.html +1 -0
  329. nautobot/virtualization/tests/test_views.py +7 -2
  330. {nautobot-2.3.9.dist-info → nautobot-2.3.11.dist-info}/METADATA +2 -2
  331. {nautobot-2.3.9.dist-info → nautobot-2.3.11.dist-info}/RECORD +335 -331
  332. {nautobot-2.3.9.dist-info → nautobot-2.3.11.dist-info}/LICENSE.txt +0 -0
  333. {nautobot-2.3.9.dist-info → nautobot-2.3.11.dist-info}/NOTICE +0 -0
  334. {nautobot-2.3.9.dist-info → nautobot-2.3.11.dist-info}/WHEEL +0 -0
  335. {nautobot-2.3.9.dist-info → nautobot-2.3.11.dist-info}/entry_points.txt +0 -0
@@ -9,9 +9,10 @@ from django.utils.timezone import make_aware
9
9
  from netaddr import IPNetwork
10
10
 
11
11
  from nautobot.circuits.models import Circuit, Provider
12
- from nautobot.core.templatetags.helpers import queryset_to_pks
12
+ from nautobot.core.templatetags.helpers import hyperlinked_object, queryset_to_pks
13
13
  from nautobot.core.testing import ModelViewTestCase, post_data, ViewTestCases
14
14
  from nautobot.core.testing.utils import extract_page_body
15
+ from nautobot.core.utils.lookup import get_route_for_model
15
16
  from nautobot.dcim.models import Device, DeviceType, Interface, Location, LocationType, Manufacturer
16
17
  from nautobot.extras.choices import CustomFieldTypeChoices, RelationshipTypeChoices
17
18
  from nautobot.extras.models import (
@@ -178,6 +179,24 @@ class PrefixTestCase(ViewTestCases.PrimaryObjectViewTestCase, ViewTestCases.List
178
179
  "remove_vrfs": [vrfs[1].pk],
179
180
  }
180
181
 
182
+ @override_settings(EXEMPT_VIEW_PERMISSIONS=[])
183
+ def test_list_objects_with_permission(self):
184
+ """Test rendering of LinkedCountColumn for related fields."""
185
+ response = super().test_list_objects_with_permission()
186
+ response_body = extract_page_body(response.content.decode(response.charset))
187
+
188
+ locations_list_url = reverse(get_route_for_model(Location, "list"))
189
+
190
+ for prefix in self._get_queryset().all():
191
+ if str(prefix.pk) in response_body:
192
+ count = prefix.locations.count()
193
+ if count > 1:
194
+ self.assertBodyContains(
195
+ response, f'<a href="{locations_list_url}?prefixes={prefix.pk}" class="badge">{count}</a>'
196
+ )
197
+ elif count == 1:
198
+ self.assertBodyContains(response, hyperlinked_object(prefix.locations.first()))
199
+
181
200
  @override_settings(EXEMPT_VIEW_PERMISSIONS=["*"])
182
201
  def test_empty_queryset(self):
183
202
  """
@@ -1043,7 +1062,7 @@ class VLANTestCase(ViewTestCases.PrimaryObjectViewTestCase):
1043
1062
  def setUpTestData(cls):
1044
1063
  cls.locations = Location.objects.filter(location_type=LocationType.objects.get(name="Campus"))
1045
1064
 
1046
- vlangroups = (
1065
+ cls.vlangroups = (
1047
1066
  VLANGroup.objects.create(name="VLAN Group 1", location=cls.locations.first()),
1048
1067
  VLANGroup.objects.create(name="VLAN Group 2", location=cls.locations.last()),
1049
1068
  )
@@ -1053,25 +1072,40 @@ class VLANTestCase(ViewTestCases.PrimaryObjectViewTestCase):
1053
1072
  status = Status.objects.get_for_model(VLAN).first()
1054
1073
 
1055
1074
  cls.form_data = {
1056
- "vlan_group": vlangroups[1].pk,
1075
+ "vlan_group": cls.vlangroups[0].pk,
1057
1076
  "vid": 999,
1058
1077
  "name": "VLAN999 with an unwieldy long name since we increased the limit to more than 64 characters",
1059
1078
  "tenant": None,
1060
1079
  "status": status.pk,
1061
1080
  "role": roles[1].pk,
1062
- "locations": list(cls.locations.values_list("pk", flat=True)[:2]),
1081
+ "locations": list(cls.locations.values_list("pk", flat=True)[:1]),
1063
1082
  "description": "A new VLAN",
1064
1083
  "tags": [t.pk for t in Tag.objects.get_for_model(VLAN)],
1065
1084
  }
1066
1085
 
1067
1086
  cls.bulk_edit_data = {
1068
- "vlan_group": vlangroups[0].pk,
1087
+ "vlan_group": cls.vlangroups[0].pk,
1069
1088
  "tenant": Tenant.objects.first().pk,
1070
1089
  "status": status.pk,
1071
1090
  "role": roles[0].pk,
1072
1091
  "description": "New description",
1073
1092
  }
1074
1093
 
1094
+ @override_settings(EXEMPT_VIEW_PERMISSIONS=["*"])
1095
+ def test_vlan_group_not_belong_to_vlan_locations(self):
1096
+ """Test that a VLAN cannot be assigned to a VLAN Group that is not in the same location as the VLAN."""
1097
+ vlan_group = self.vlangroups[0]
1098
+ form_data = self.form_data.copy()
1099
+ form_data["vlan_group"] = vlan_group.pk
1100
+ form_data["locations"] = [self.locations.last().pk]
1101
+ self.add_permissions("ipam.add_vlan")
1102
+ request = {
1103
+ "path": self._get_url("add"),
1104
+ "data": post_data(form_data),
1105
+ }
1106
+ response = self.client.post(**request)
1107
+ self.assertBodyContains(response, f"vlan_group: VLAN Group {vlan_group} is not in locations")
1108
+
1075
1109
 
1076
1110
  class ServiceTestCase(ViewTestCases.PrimaryObjectViewTestCase):
1077
1111
  model = Service
@@ -12,7 +12,7 @@
12
12
 
13
13
 
14
14
  <link rel="icon" href="/projects/core/en/stable/assets/favicon.ico">
15
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
15
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
16
16
 
17
17
 
18
18
 
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
  <link rel="icon" href="../assets/favicon.ico">
21
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
21
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
22
22
 
23
23
 
24
24
 
@@ -16,7 +16,7 @@
16
16
 
17
17
 
18
18
  <link rel="icon" href="../assets/favicon.ico">
19
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
19
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
20
20
 
21
21
 
22
22
 
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
  <link rel="icon" href="../../../assets/favicon.ico">
21
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
21
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
22
22
 
23
23
 
24
24
 
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
  <link rel="icon" href="../../../assets/favicon.ico">
21
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
21
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
22
22
 
23
23
 
24
24
 
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
  <link rel="icon" href="../../../assets/favicon.ico">
21
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
21
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
22
22
 
23
23
 
24
24
 
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
  <link rel="icon" href="../../../assets/favicon.ico">
21
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
21
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
22
22
 
23
23
 
24
24
 
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
  <link rel="icon" href="../../../assets/favicon.ico">
21
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
21
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
22
22
 
23
23
 
24
24
 
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
  <link rel="icon" href="../../../assets/favicon.ico">
21
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
21
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
22
22
 
23
23
 
24
24
 
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
  <link rel="icon" href="../../../assets/favicon.ico">
21
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
21
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
22
22
 
23
23
 
24
24
 
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
  <link rel="icon" href="../../../assets/favicon.ico">
21
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
21
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
22
22
 
23
23
 
24
24
 
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
  <link rel="icon" href="../../../assets/favicon.ico">
21
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
21
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
22
22
 
23
23
 
24
24
 
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
  <link rel="icon" href="../../../assets/favicon.ico">
21
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
21
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
22
22
 
23
23
 
24
24
 
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
  <link rel="icon" href="../../../assets/favicon.ico">
21
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
21
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
22
22
 
23
23
 
24
24
 
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
  <link rel="icon" href="../../../assets/favicon.ico">
21
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
21
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
22
22
 
23
23
 
24
24
 
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
  <link rel="icon" href="../../../assets/favicon.ico">
21
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
21
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
22
22
 
23
23
 
24
24
 
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
  <link rel="icon" href="../../../assets/favicon.ico">
21
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
21
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
22
22
 
23
23
 
24
24
 
@@ -11922,7 +11922,7 @@ an actual instance of the class.</p>
11922
11922
 
11923
11923
 
11924
11924
  <h2 id="nautobot.apps.jobs.enqueue_job_hooks" class="doc doc-heading">
11925
- <code class="highlight language-python"><span class="n">nautobot</span><span class="o">.</span><span class="n">apps</span><span class="o">.</span><span class="n">jobs</span><span class="o">.</span><span class="n">enqueue_job_hooks</span><span class="p">(</span><span class="n">object_change</span><span class="p">,</span> <span class="n">may_reload_jobs</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span></code>
11925
+ <code class="highlight language-python"><span class="n">nautobot</span><span class="o">.</span><span class="n">apps</span><span class="o">.</span><span class="n">jobs</span><span class="o">.</span><span class="n">enqueue_job_hooks</span><span class="p">(</span><span class="n">object_change</span><span class="p">,</span> <span class="n">may_reload_jobs</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">jobhook_queryset</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span></code>
11926
11926
 
11927
11927
  <a href="#nautobot.apps.jobs.enqueue_job_hooks" class="headerlink" title="Permanent link">&para;</a></h2>
11928
11928
 
@@ -11932,6 +11932,63 @@ an actual instance of the class.</p>
11932
11932
  <p>Find job hook(s) assigned to this changed object type + action and enqueue them to be processed.</p>
11933
11933
 
11934
11934
 
11935
+ <p><span class="doc-section-title">Parameters:</span></p>
11936
+ <table>
11937
+ <thead>
11938
+ <tr>
11939
+ <th>Name</th>
11940
+ <th>Type</th>
11941
+ <th>Description</th>
11942
+ <th>Default</th>
11943
+ </tr>
11944
+ </thead>
11945
+ <tbody>
11946
+ <tr class="doc-section-item">
11947
+ <td><code>object_change</code></td>
11948
+ <td>
11949
+ <code><autoref identifier="nautobot.extras.models.ObjectChange" optional hover>ObjectChange</autoref></code>
11950
+ </td>
11951
+ <td>
11952
+ <div class="doc-md-description">
11953
+ <p>The change that may trigger JobHooks to execute.</p>
11954
+ </div>
11955
+ </td>
11956
+ <td>
11957
+ <em>required</em>
11958
+ </td>
11959
+ </tr>
11960
+ <tr class="doc-section-item">
11961
+ <td><code>may_reload_jobs</code></td>
11962
+ <td>
11963
+ <code><autoref identifier="bool" optional>bool</autoref></code>
11964
+ </td>
11965
+ <td>
11966
+ <div class="doc-md-description">
11967
+ <p>Whether to reload JobHook source code from disk to guarantee up-to-date code.</p>
11968
+ </div>
11969
+ </td>
11970
+ <td>
11971
+ <code>True</code>
11972
+ </td>
11973
+ </tr>
11974
+ <tr class="doc-section-item">
11975
+ <td><code>jobhook_queryset</code></td>
11976
+ <td>
11977
+ <code><autoref identifier="django.db.models.query.QuerySet" optional hover>QuerySet</autoref></code>
11978
+ </td>
11979
+ <td>
11980
+ <div class="doc-md-description">
11981
+ <p>Previously retrieved set of JobHooks to potentially enqueue</p>
11982
+ </div>
11983
+ </td>
11984
+ <td>
11985
+ <code>None</code>
11986
+ </td>
11987
+ </tr>
11988
+ </tbody>
11989
+ </table>
11990
+
11991
+
11935
11992
  <p><span class="doc-section-title">Returns:</span></p>
11936
11993
  <table>
11937
11994
  <thead>
@@ -11942,12 +11999,12 @@ an actual instance of the class.</p>
11942
11999
  </thead>
11943
12000
  <tbody>
11944
12001
  <tr class="doc-section-item">
11945
- <td><code>jobs_reloaded</code></td> <td>
11946
- <code><autoref identifier="bool" optional>bool</autoref></code>
12002
+ <td><code>result</code></td> <td>
12003
+ <code><autoref identifier="tuple" optional>tuple</autoref>[<autoref identifier="bool" optional>bool</autoref>, <autoref identifier="django.db.models.query.QuerySet" optional hover>QuerySet</autoref>]</code>
11947
12004
  </td>
11948
12005
  <td>
11949
12006
  <div class="doc-md-description">
11950
- <p>whether Jobs were reloaded to make this happen</p>
12007
+ <p>whether Jobs were reloaded here, and the jobhooks that were considered</p>
11951
12008
  </div>
11952
12009
  </td>
11953
12010
  </tr>
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
  <link rel="icon" href="../../../assets/favicon.ico">
21
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
21
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
22
22
 
23
23
 
24
24
 
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
  <link rel="icon" href="../../../assets/favicon.ico">
21
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
21
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
22
22
 
23
23
 
24
24
 
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
  <link rel="icon" href="../../../assets/favicon.ico">
21
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
21
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
22
22
 
23
23
 
24
24
 
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
  <link rel="icon" href="../../../assets/favicon.ico">
21
- <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.41">
21
+ <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.42">
22
22
 
23
23
 
24
24
 
@@ -9444,12 +9444,137 @@ set <code>sort_items=False</code>.</p>
9444
9444
  Bases: <code><autoref identifier="django_tables2.Column" optional hover>Column</autoref></code></p>
9445
9445
 
9446
9446
 
9447
- <p>Render a count of related objects linked to a filtered URL.</p>
9448
- <p>:param viewname: The view name to use for URL resolution
9449
- :param view_kwargs: Additional kwargs to pass for URL resolution (optional)
9450
- :param url_params: A dict of query parameters to append to the URL (e.g. ?foo=bar) (optional)
9451
- :param reverse_lookup: The reverse lookup parameter to use to derive the count. If not specified, the first key
9452
- in <code>url_params</code> will be implicitly used as the <code>reverse_lookup</code> value.</p>
9447
+ <p>Render a count of related objects linked to a filtered URL, or if a single related object is present, the object.</p>
9448
+
9449
+
9450
+ <p><span class="doc-section-title">Parameters:</span></p>
9451
+ <table>
9452
+ <thead>
9453
+ <tr>
9454
+ <th>Name</th>
9455
+ <th>Type</th>
9456
+ <th>Description</th>
9457
+ <th>Default</th>
9458
+ </tr>
9459
+ </thead>
9460
+ <tbody>
9461
+ <tr class="doc-section-item">
9462
+ <td><code>viewname</code></td>
9463
+ <td>
9464
+ <code><autoref identifier="str" optional>str</autoref></code>
9465
+ </td>
9466
+ <td>
9467
+ <div class="doc-md-description">
9468
+ <p>The list view name to use for URL resolution, for example <code>"dcim:location_list"</code></p>
9469
+ </div>
9470
+ </td>
9471
+ <td>
9472
+ <em>required</em>
9473
+ </td>
9474
+ </tr>
9475
+ <tr class="doc-section-item">
9476
+ <td><code>url_params</code></td>
9477
+ <td>
9478
+ <code><autoref identifier="dict" optional>dict</autoref></code>
9479
+ </td>
9480
+ <td>
9481
+ <div class="doc-md-description">
9482
+ <p>Query parameters to apply to filter the list URL (e.g. <code>{"vlans": "pk"}</code> will add
9483
+ <code>?vlans=&lt;record.pk&gt;</code> to the linked list URL)</p>
9484
+ </div>
9485
+ </td>
9486
+ <td>
9487
+ <code>None</code>
9488
+ </td>
9489
+ </tr>
9490
+ <tr class="doc-section-item">
9491
+ <td><code>view_kwargs</code></td>
9492
+ <td>
9493
+ <code><autoref identifier="dict" optional>dict</autoref></code>
9494
+ </td>
9495
+ <td>
9496
+ <div class="doc-md-description">
9497
+ <p>Additional kwargs to pass to <code>reverse()</code> for list URL resolution. Rarely used.</p>
9498
+ </div>
9499
+ </td>
9500
+ <td>
9501
+ <code>None</code>
9502
+ </td>
9503
+ </tr>
9504
+ <tr class="doc-section-item">
9505
+ <td><code>lookup</code></td>
9506
+ <td>
9507
+ <code><autoref identifier="str" optional>str</autoref></code>
9508
+ </td>
9509
+ <td>
9510
+ <div class="doc-md-description">
9511
+ <p>The field name on the base record that can be used to query the related objects.
9512
+ If not specified, <code>nautobot.core.utils.lookup.get_related_field_for_models()</code> will be called at render time
9513
+ to attempt to intelligently find the appropriate field.
9514
+ TODO: this currently does <em>not</em> support nested lookups via <code>__</code>. That may be solvable in the future.</p>
9515
+ </div>
9516
+ </td>
9517
+ <td>
9518
+ <code>None</code>
9519
+ </td>
9520
+ </tr>
9521
+ <tr class="doc-section-item">
9522
+ <td><code>reverse_lookup</code></td>
9523
+ <td>
9524
+ <code><autoref identifier="str" optional>str</autoref></code>
9525
+ </td>
9526
+ <td>
9527
+ <div class="doc-md-description">
9528
+ <p>The reverse lookup parameter to use to derive the count.
9529
+ If not specified, the first key in <code>url_params</code> will be implicitly used as the <code>reverse_lookup</code> value.</p>
9530
+ </div>
9531
+ </td>
9532
+ <td>
9533
+ <code>None</code>
9534
+ </td>
9535
+ </tr>
9536
+ <tr class="doc-section-item">
9537
+ <td><code>**kwargs</code></td>
9538
+ <td>
9539
+ <code><autoref identifier="dict" optional>dict</autoref></code>
9540
+ </td>
9541
+ <td>
9542
+ <div class="doc-md-description">
9543
+ <p>As the parent Column class.</p>
9544
+ </div>
9545
+ </td>
9546
+ <td>
9547
+ <code>{}</code>
9548
+ </td>
9549
+ </tr>
9550
+ </tbody>
9551
+ </table>
9552
+
9553
+
9554
+ <p><span class="doc-section-title">Examples:</span></p>
9555
+ <div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="k">class</span> <span class="nc">VLANTable</span><span class="p">(</span><span class="o">...</span><span class="p">,</span> <span class="n">BaseTable</span><span class="p">):</span>
9556
+ <a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a> <span class="o">...</span>
9557
+ <a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a> <span class="n">location_count</span> <span class="o">=</span> <span class="n">LinkedCountColumn</span><span class="p">(</span>
9558
+ <a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a> <span class="c1"># Link for N related locations will be reverse(&quot;dcim:location_list&quot;) + &quot;?vlans=&lt;record.pk&gt;&quot;</span>
9559
+ <a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a> <span class="n">viewname</span><span class="o">=</span><span class="s2">&quot;dcim:location_list&quot;</span><span class="p">,</span>
9560
+ <a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a> <span class="n">url_params</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;vlans&quot;</span><span class="p">:</span> <span class="s2">&quot;pk&quot;</span><span class="p">},</span>
9561
+ <a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a> <span class="n">verbose_name</span><span class="o">=</span><span class="s2">&quot;Locations&quot;</span><span class="p">,</span>
9562
+ <a id="__codelineno-0-8" name="__codelineno-0-8" href="#__codelineno-0-8"></a> <span class="p">)</span>
9563
+ </code></pre></div>
9564
+ <div class="highlight"><pre><span></span><code><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a><span class="k">class</span> <span class="nc">CloudNetworkTable</span><span class="p">(</span><span class="n">BaseTable</span><span class="p">):</span>
9565
+ <a id="__codelineno-1-2" name="__codelineno-1-2" href="#__codelineno-1-2"></a> <span class="o">...</span>
9566
+ <a id="__codelineno-1-3" name="__codelineno-1-3" href="#__codelineno-1-3"></a> <span class="n">circuit_count</span> <span class="o">=</span> <span class="n">LinkedCountColumn</span><span class="p">(</span>
9567
+ <a id="__codelineno-1-4" name="__codelineno-1-4" href="#__codelineno-1-4"></a> <span class="c1"># Link for N related circuits will be reverse(&quot;circuits:circuit_list&quot;) + &quot;?cloud_network=&lt;record.name&gt;&quot;</span>
9568
+ <a id="__codelineno-1-5" name="__codelineno-1-5" href="#__codelineno-1-5"></a> <span class="n">viewname</span><span class="o">=</span><span class="s2">&quot;circuits:circuit_list&quot;</span><span class="p">,</span>
9569
+ <a id="__codelineno-1-6" name="__codelineno-1-6" href="#__codelineno-1-6"></a> <span class="n">url_params</span><span class="o">=</span><span class="p">{</span><span class="s2">&quot;cloud_network&quot;</span><span class="p">:</span> <span class="s2">&quot;name&quot;</span><span class="p">},</span>
9570
+ <a id="__codelineno-1-7" name="__codelineno-1-7" href="#__codelineno-1-7"></a> <span class="c1"># We&#39;d like to do the below but this module isn&#39;t currently smart enough to build the right Prefetch()</span>
9571
+ <a id="__codelineno-1-8" name="__codelineno-1-8" href="#__codelineno-1-8"></a> <span class="c1"># for a nested lookup:</span>
9572
+ <a id="__codelineno-1-9" name="__codelineno-1-9" href="#__codelineno-1-9"></a> <span class="c1"># lookup=&quot;circuit_terminations__circuit&quot;,</span>
9573
+ <a id="__codelineno-1-10" name="__codelineno-1-10" href="#__codelineno-1-10"></a> <span class="c1"># For the count, .annotate(circuit_count=count_related(Circuit, &quot;circuit_terminations__cloud_network&quot;))</span>
9574
+ <a id="__codelineno-1-11" name="__codelineno-1-11" href="#__codelineno-1-11"></a> <span class="n">reverse_lookup</span><span class="o">=</span><span class="s2">&quot;circuit_terminations__cloud_network&quot;</span><span class="p">,</span>
9575
+ <a id="__codelineno-1-12" name="__codelineno-1-12" href="#__codelineno-1-12"></a> <span class="n">verbose_name</span><span class="o">=</span><span class="s2">&quot;Circuits&quot;</span><span class="p">,</span>
9576
+ <a id="__codelineno-1-13" name="__codelineno-1-13" href="#__codelineno-1-13"></a> <span class="p">)</span>
9577
+ </code></pre></div>
9453
9578
 
9454
9579
 
9455
9580