nautobot 2.4.13__py3-none-any.whl → 2.4.14__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 (356) hide show
  1. nautobot/core/graphql/generators.py +8 -0
  2. nautobot/core/graphql/schema.py +30 -30
  3. nautobot/core/management/commands/migrate.py +90 -1
  4. nautobot/core/settings.yaml +3 -3
  5. nautobot/core/tables.py +4 -4
  6. nautobot/core/testing/api.py +7 -0
  7. nautobot/core/views/utils.py +1 -1
  8. nautobot/dcim/choices.py +2 -0
  9. nautobot/dcim/constants.py +0 -16
  10. nautobot/dcim/factory.py +1 -1
  11. nautobot/dcim/templates/dcim/rack.html +2 -318
  12. nautobot/dcim/templates/dcim/rack_edit.html +2 -47
  13. nautobot/dcim/templates/dcim/rack_retrieve.html +318 -0
  14. nautobot/dcim/templates/dcim/rack_update.html +47 -0
  15. nautobot/dcim/urls.py +2 -27
  16. nautobot/dcim/utils.py +4 -30
  17. nautobot/dcim/views.py +38 -69
  18. nautobot/extras/choices.py +12 -4
  19. nautobot/extras/filters/mixins.py +8 -6
  20. nautobot/extras/forms/forms.py +9 -0
  21. nautobot/extras/forms/mixins.py +4 -2
  22. nautobot/extras/migrations/0062_collect_roles_from_related_apps_roles.py +30 -7
  23. nautobot/extras/migrations/0124_add_joblogentry_index.py +16 -0
  24. nautobot/extras/models/customfields.py +52 -3
  25. nautobot/extras/models/jobs.py +6 -0
  26. nautobot/extras/models/relationships.py +55 -6
  27. nautobot/extras/templates/extras/graphqlquery.html +2 -97
  28. nautobot/extras/templates/extras/graphqlquery_list.html +1 -0
  29. nautobot/extras/templates/extras/graphqlquery_retrieve.html +97 -0
  30. nautobot/extras/templates/extras/secretsgroup.html +2 -29
  31. nautobot/extras/templates/extras/secretsgroup_edit.html +2 -82
  32. nautobot/extras/templates/extras/secretsgroup_retrieve.html +29 -0
  33. nautobot/extras/templates/extras/secretsgroup_update.html +82 -0
  34. nautobot/extras/tests/test_customfields.py +115 -7
  35. nautobot/extras/tests/test_relationships.py +7 -1
  36. nautobot/extras/tests/test_views.py +113 -1
  37. nautobot/extras/urls.py +2 -51
  38. nautobot/extras/utils.py +4 -1
  39. nautobot/extras/views.py +39 -133
  40. nautobot/ipam/api/views.py +69 -6
  41. nautobot/ipam/tests/test_api.py +350 -0
  42. nautobot/project-static/docs/404.html +11 -34
  43. nautobot/project-static/docs/apps/index.html +11 -34
  44. nautobot/project-static/docs/apps/nautobot-apps.html +11 -34
  45. nautobot/project-static/docs/assets/javascripts/{bundle.56ea9cef.min.js → bundle.50899def.min.js} +2 -2
  46. nautobot/project-static/docs/assets/javascripts/{bundle.56ea9cef.min.js.map → bundle.50899def.min.js.map} +2 -2
  47. nautobot/project-static/docs/assets/stylesheets/{main.342714a4.min.css → main.7e37652d.min.css} +1 -1
  48. nautobot/project-static/docs/assets/stylesheets/{main.342714a4.min.css.map → main.7e37652d.min.css.map} +1 -1
  49. nautobot/project-static/docs/code-reference/nautobot/apps/__init__.html +11 -34
  50. nautobot/project-static/docs/code-reference/nautobot/apps/admin.html +11 -34
  51. nautobot/project-static/docs/code-reference/nautobot/apps/api.html +11 -34
  52. nautobot/project-static/docs/code-reference/nautobot/apps/change_logging.html +11 -34
  53. nautobot/project-static/docs/code-reference/nautobot/apps/choices.html +11 -34
  54. nautobot/project-static/docs/code-reference/nautobot/apps/config.html +11 -34
  55. nautobot/project-static/docs/code-reference/nautobot/apps/constants.html +11 -34
  56. nautobot/project-static/docs/code-reference/nautobot/apps/datasources.html +11 -34
  57. nautobot/project-static/docs/code-reference/nautobot/apps/events.html +11 -34
  58. nautobot/project-static/docs/code-reference/nautobot/apps/exceptions.html +11 -34
  59. nautobot/project-static/docs/code-reference/nautobot/apps/factory.html +11 -34
  60. nautobot/project-static/docs/code-reference/nautobot/apps/filters.html +11 -34
  61. nautobot/project-static/docs/code-reference/nautobot/apps/forms.html +11 -34
  62. nautobot/project-static/docs/code-reference/nautobot/apps/graphql.html +11 -34
  63. nautobot/project-static/docs/code-reference/nautobot/apps/jobs.html +11 -34
  64. nautobot/project-static/docs/code-reference/nautobot/apps/models.html +11 -34
  65. nautobot/project-static/docs/code-reference/nautobot/apps/querysets.html +11 -34
  66. nautobot/project-static/docs/code-reference/nautobot/apps/secrets.html +11 -34
  67. nautobot/project-static/docs/code-reference/nautobot/apps/tables.html +11 -34
  68. nautobot/project-static/docs/code-reference/nautobot/apps/testing.html +11 -34
  69. nautobot/project-static/docs/code-reference/nautobot/apps/ui.html +11 -34
  70. nautobot/project-static/docs/code-reference/nautobot/apps/urls.html +11 -34
  71. nautobot/project-static/docs/code-reference/nautobot/apps/utils.html +11 -34
  72. nautobot/project-static/docs/code-reference/nautobot/apps/views.html +11 -34
  73. nautobot/project-static/docs/development/apps/api/configuration-view.html +11 -34
  74. nautobot/project-static/docs/development/apps/api/database-backend-config.html +11 -34
  75. nautobot/project-static/docs/development/apps/api/models/django-admin.html +11 -34
  76. nautobot/project-static/docs/development/apps/api/models/global-search.html +11 -34
  77. nautobot/project-static/docs/development/apps/api/models/graphql.html +11 -34
  78. nautobot/project-static/docs/development/apps/api/models/index.html +11 -34
  79. nautobot/project-static/docs/development/apps/api/nautobot-app-config.html +11 -34
  80. nautobot/project-static/docs/development/apps/api/platform-features/custom-validators.html +11 -34
  81. nautobot/project-static/docs/development/apps/api/platform-features/filter-extensions.html +11 -34
  82. nautobot/project-static/docs/development/apps/api/platform-features/git-repository-content.html +11 -34
  83. nautobot/project-static/docs/development/apps/api/platform-features/index.html +11 -34
  84. nautobot/project-static/docs/development/apps/api/platform-features/jinja2-filters.html +11 -34
  85. nautobot/project-static/docs/development/apps/api/platform-features/jobs.html +11 -34
  86. nautobot/project-static/docs/development/apps/api/platform-features/populating-extensibility-features.html +11 -34
  87. nautobot/project-static/docs/development/apps/api/platform-features/secrets-providers.html +11 -34
  88. nautobot/project-static/docs/development/apps/api/platform-features/table-extensions.html +11 -34
  89. nautobot/project-static/docs/development/apps/api/platform-features/uniquely-identify-objects.html +11 -34
  90. nautobot/project-static/docs/development/apps/api/prometheus.html +11 -34
  91. nautobot/project-static/docs/development/apps/api/setup.html +11 -34
  92. nautobot/project-static/docs/development/apps/api/testing.html +11 -34
  93. nautobot/project-static/docs/development/apps/api/ui-extensions/banners.html +11 -34
  94. nautobot/project-static/docs/development/apps/api/ui-extensions/home-page.html +11 -34
  95. nautobot/project-static/docs/development/apps/api/ui-extensions/index.html +11 -34
  96. nautobot/project-static/docs/development/apps/api/ui-extensions/navigation.html +11 -34
  97. nautobot/project-static/docs/development/apps/api/ui-extensions/object-views.html +11 -34
  98. nautobot/project-static/docs/development/apps/api/views/base-template.html +11 -34
  99. nautobot/project-static/docs/development/apps/api/views/core-view-overrides.html +11 -34
  100. nautobot/project-static/docs/development/apps/api/views/django-generic-views.html +11 -34
  101. nautobot/project-static/docs/development/apps/api/views/help-documentation.html +11 -34
  102. nautobot/project-static/docs/development/apps/api/views/index.html +11 -34
  103. nautobot/project-static/docs/development/apps/api/views/nautobot-generic-views.html +11 -34
  104. nautobot/project-static/docs/development/apps/api/views/nautobotuiviewset.html +11 -34
  105. nautobot/project-static/docs/development/apps/api/views/nautobotuiviewsetrouter.html +11 -34
  106. nautobot/project-static/docs/development/apps/api/views/notes.html +11 -34
  107. nautobot/project-static/docs/development/apps/api/views/rest-api.html +11 -34
  108. nautobot/project-static/docs/development/apps/api/views/urls.html +11 -34
  109. nautobot/project-static/docs/development/apps/index.html +11 -34
  110. nautobot/project-static/docs/development/apps/migration/code-updates.html +11 -34
  111. nautobot/project-static/docs/development/apps/migration/dependency-updates.html +11 -34
  112. nautobot/project-static/docs/development/apps/migration/from-v1.html +11 -34
  113. nautobot/project-static/docs/development/apps/migration/model-updates/dcim.html +11 -34
  114. nautobot/project-static/docs/development/apps/migration/model-updates/extras.html +11 -34
  115. nautobot/project-static/docs/development/apps/migration/model-updates/global.html +11 -34
  116. nautobot/project-static/docs/development/apps/migration/model-updates/ipam.html +11 -34
  117. nautobot/project-static/docs/development/apps/migration/ui-component-framework/best-practices.html +11 -34
  118. nautobot/project-static/docs/development/apps/migration/ui-component-framework/custom-content.html +11 -34
  119. nautobot/project-static/docs/development/apps/migration/ui-component-framework/index.html +11 -34
  120. nautobot/project-static/docs/development/apps/migration/ui-component-framework/migration-steps.html +11 -34
  121. nautobot/project-static/docs/development/apps/porting-from-netbox.html +11 -34
  122. nautobot/project-static/docs/development/core/application-registry.html +139 -133
  123. nautobot/project-static/docs/development/core/best-practices.html +11 -34
  124. nautobot/project-static/docs/development/core/bootstrap-ui.html +11 -34
  125. nautobot/project-static/docs/development/core/caching.html +11 -34
  126. nautobot/project-static/docs/development/core/controllers.html +11 -34
  127. nautobot/project-static/docs/development/core/docker-compose-advanced-use-cases.html +11 -34
  128. nautobot/project-static/docs/development/core/generic-views.html +11 -34
  129. nautobot/project-static/docs/development/core/getting-started.html +11 -34
  130. nautobot/project-static/docs/development/core/homepage.html +11 -34
  131. nautobot/project-static/docs/development/core/index.html +11 -34
  132. nautobot/project-static/docs/development/core/minikube-dev-environment-for-k8s-jobs.html +11 -34
  133. nautobot/project-static/docs/development/core/model-checklist.html +11 -34
  134. nautobot/project-static/docs/development/core/model-features.html +11 -34
  135. nautobot/project-static/docs/development/core/natural-keys.html +11 -34
  136. nautobot/project-static/docs/development/core/navigation-menu.html +11 -34
  137. nautobot/project-static/docs/development/core/release-checklist.html +11 -34
  138. nautobot/project-static/docs/development/core/role-internals.html +11 -34
  139. nautobot/project-static/docs/development/core/settings.html +11 -34
  140. nautobot/project-static/docs/development/core/style-guide.html +11 -34
  141. nautobot/project-static/docs/development/core/templates.html +11 -34
  142. nautobot/project-static/docs/development/core/testing.html +11 -34
  143. nautobot/project-static/docs/development/core/ui-component-framework.html +11 -34
  144. nautobot/project-static/docs/development/core/user-preferences.html +11 -34
  145. nautobot/project-static/docs/development/index.html +11 -34
  146. nautobot/project-static/docs/development/jobs/getting-started.html +11 -34
  147. nautobot/project-static/docs/development/jobs/index.html +11 -34
  148. nautobot/project-static/docs/development/jobs/installation.html +11 -34
  149. nautobot/project-static/docs/development/jobs/job-extensions.html +11 -34
  150. nautobot/project-static/docs/development/jobs/job-logging.html +11 -34
  151. nautobot/project-static/docs/development/jobs/job-patterns.html +11 -34
  152. nautobot/project-static/docs/development/jobs/job-structure.html +11 -34
  153. nautobot/project-static/docs/development/jobs/migration/from-v1.html +11 -34
  154. nautobot/project-static/docs/development/jobs/testing.html +11 -34
  155. nautobot/project-static/docs/index.html +11 -34
  156. nautobot/project-static/docs/overview/application_stack.html +11 -34
  157. nautobot/project-static/docs/overview/design_philosophy.html +11 -34
  158. nautobot/project-static/docs/release-notes/index.html +11 -34
  159. nautobot/project-static/docs/release-notes/version-1.0.html +11 -34
  160. nautobot/project-static/docs/release-notes/version-1.1.html +11 -34
  161. nautobot/project-static/docs/release-notes/version-1.2.html +11 -34
  162. nautobot/project-static/docs/release-notes/version-1.3.html +11 -34
  163. nautobot/project-static/docs/release-notes/version-1.4.html +11 -34
  164. nautobot/project-static/docs/release-notes/version-1.5.html +11 -34
  165. nautobot/project-static/docs/release-notes/version-1.6.html +11 -34
  166. nautobot/project-static/docs/release-notes/version-2.0.html +11 -34
  167. nautobot/project-static/docs/release-notes/version-2.1.html +11 -34
  168. nautobot/project-static/docs/release-notes/version-2.2.html +11 -34
  169. nautobot/project-static/docs/release-notes/version-2.3.html +11 -34
  170. nautobot/project-static/docs/release-notes/version-2.4.html +171 -34
  171. nautobot/project-static/docs/requirements.txt +1 -1
  172. nautobot/project-static/docs/search/search_index.json +1 -1
  173. nautobot/project-static/docs/sitemap.xml +299 -299
  174. nautobot/project-static/docs/sitemap.xml.gz +0 -0
  175. nautobot/project-static/docs/user-guide/administration/configuration/authentication/ldap.html +11 -34
  176. nautobot/project-static/docs/user-guide/administration/configuration/authentication/remote.html +11 -34
  177. nautobot/project-static/docs/user-guide/administration/configuration/authentication/sso.html +11 -34
  178. nautobot/project-static/docs/user-guide/administration/configuration/index.html +11 -34
  179. nautobot/project-static/docs/user-guide/administration/configuration/redis.html +11 -34
  180. nautobot/project-static/docs/user-guide/administration/configuration/settings.html +14 -37
  181. nautobot/project-static/docs/user-guide/administration/configuration/time-zones.html +11 -34
  182. nautobot/project-static/docs/user-guide/administration/guides/celery-queues.html +11 -34
  183. nautobot/project-static/docs/user-guide/administration/guides/docker.html +11 -34
  184. nautobot/project-static/docs/user-guide/administration/guides/health-checks.html +11 -34
  185. nautobot/project-static/docs/user-guide/administration/guides/permissions.html +11 -34
  186. nautobot/project-static/docs/user-guide/administration/guides/prometheus-metrics.html +11 -34
  187. nautobot/project-static/docs/user-guide/administration/guides/replicating-nautobot.html +11 -34
  188. nautobot/project-static/docs/user-guide/administration/guides/request-profiling.html +11 -34
  189. nautobot/project-static/docs/user-guide/administration/guides/s3-django-storage.html +11 -34
  190. nautobot/project-static/docs/user-guide/administration/guides/selinux-troubleshooting.html +11 -34
  191. nautobot/project-static/docs/user-guide/administration/installation/app-install.html +11 -34
  192. nautobot/project-static/docs/user-guide/administration/installation/external-authentication.html +11 -34
  193. nautobot/project-static/docs/user-guide/administration/installation/http-server.html +11 -34
  194. nautobot/project-static/docs/user-guide/administration/installation/index.html +11 -34
  195. nautobot/project-static/docs/user-guide/administration/installation/install_system.html +11 -34
  196. nautobot/project-static/docs/user-guide/administration/installation/nautobot.html +11 -34
  197. nautobot/project-static/docs/user-guide/administration/installation/services.html +11 -34
  198. nautobot/project-static/docs/user-guide/administration/migration/migrating-from-netbox.html +11 -34
  199. nautobot/project-static/docs/user-guide/administration/migration/migrating-from-postgresql.html +11 -34
  200. nautobot/project-static/docs/user-guide/administration/security/index.html +11 -34
  201. nautobot/project-static/docs/user-guide/administration/security/notices.html +11 -34
  202. nautobot/project-static/docs/user-guide/administration/tools/nautobot-server.html +19 -39
  203. nautobot/project-static/docs/user-guide/administration/tools/nautobot-shell.html +11 -34
  204. nautobot/project-static/docs/user-guide/administration/upgrading/database-backup.html +11 -34
  205. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/after-you-upgrade.html +11 -34
  206. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/before-you-upgrade.html +11 -34
  207. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/for-developers.html +11 -34
  208. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/index.html +11 -34
  209. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/whats-changed.html +11 -34
  210. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/region-and-site-data-migration-guide.html +11 -34
  211. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +11 -34
  212. nautobot/project-static/docs/user-guide/administration/upgrading/upgrading.html +11 -34
  213. nautobot/project-static/docs/user-guide/core-data-model/circuits/circuit.html +11 -34
  214. nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittermination.html +11 -34
  215. nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittype.html +11 -34
  216. nautobot/project-static/docs/user-guide/core-data-model/circuits/provider.html +11 -34
  217. nautobot/project-static/docs/user-guide/core-data-model/circuits/providernetwork.html +11 -34
  218. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloud.html +11 -34
  219. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudaccount.html +11 -34
  220. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudnetwork.html +11 -34
  221. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudnetworkprefixassignment.html +11 -34
  222. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudresourcetype.html +11 -34
  223. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudservice.html +11 -34
  224. nautobot/project-static/docs/user-guide/core-data-model/cloud/cloudservicenetworkassignment.html +11 -34
  225. nautobot/project-static/docs/user-guide/core-data-model/dcim/cable.html +11 -34
  226. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleport.html +11 -34
  227. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleporttemplate.html +11 -34
  228. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverport.html +11 -34
  229. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverporttemplate.html +11 -34
  230. nautobot/project-static/docs/user-guide/core-data-model/dcim/controller.html +11 -34
  231. nautobot/project-static/docs/user-guide/core-data-model/dcim/controllermanageddevicegroup.html +11 -34
  232. nautobot/project-static/docs/user-guide/core-data-model/dcim/device.html +11 -34
  233. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebay.html +11 -34
  234. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebaytemplate.html +11 -34
  235. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicefamily.html +11 -34
  236. nautobot/project-static/docs/user-guide/core-data-model/dcim/deviceredundancygroup.html +11 -34
  237. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicetype.html +11 -34
  238. nautobot/project-static/docs/user-guide/core-data-model/dcim/frontport.html +11 -34
  239. nautobot/project-static/docs/user-guide/core-data-model/dcim/frontporttemplate.html +11 -34
  240. nautobot/project-static/docs/user-guide/core-data-model/dcim/interface.html +14 -37
  241. nautobot/project-static/docs/user-guide/core-data-model/dcim/interfaceredundancygroup.html +11 -34
  242. nautobot/project-static/docs/user-guide/core-data-model/dcim/interfacetemplate.html +11 -34
  243. nautobot/project-static/docs/user-guide/core-data-model/dcim/inventoryitem.html +19 -52
  244. nautobot/project-static/docs/user-guide/core-data-model/dcim/location.html +11 -34
  245. nautobot/project-static/docs/user-guide/core-data-model/dcim/locationtype.html +11 -34
  246. nautobot/project-static/docs/user-guide/core-data-model/dcim/manufacturer.html +11 -34
  247. nautobot/project-static/docs/user-guide/core-data-model/dcim/module.html +11 -34
  248. nautobot/project-static/docs/user-guide/core-data-model/dcim/modulebay.html +14 -37
  249. nautobot/project-static/docs/user-guide/core-data-model/dcim/modulebaytemplate.html +11 -34
  250. nautobot/project-static/docs/user-guide/core-data-model/dcim/modulefamily.html +11 -34
  251. nautobot/project-static/docs/user-guide/core-data-model/dcim/moduletype.html +11 -34
  252. nautobot/project-static/docs/user-guide/core-data-model/dcim/platform.html +11 -34
  253. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerfeed.html +11 -34
  254. nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlet.html +11 -34
  255. nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlettemplate.html +11 -34
  256. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerpanel.html +11 -34
  257. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerport.html +11 -34
  258. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerporttemplate.html +11 -34
  259. nautobot/project-static/docs/user-guide/core-data-model/dcim/rack.html +11 -34
  260. nautobot/project-static/docs/user-guide/core-data-model/dcim/rackgroup.html +11 -34
  261. nautobot/project-static/docs/user-guide/core-data-model/dcim/rackreservation.html +11 -34
  262. nautobot/project-static/docs/user-guide/core-data-model/dcim/rearport.html +11 -34
  263. nautobot/project-static/docs/user-guide/core-data-model/dcim/rearporttemplate.html +11 -34
  264. nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareimagefile.html +11 -34
  265. nautobot/project-static/docs/user-guide/core-data-model/dcim/softwareversion.html +11 -34
  266. nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualchassis.html +11 -34
  267. nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualdevicecontext.html +11 -34
  268. nautobot/project-static/docs/user-guide/core-data-model/extras/configcontext.html +11 -34
  269. nautobot/project-static/docs/user-guide/core-data-model/extras/configcontextschema.html +11 -34
  270. nautobot/project-static/docs/user-guide/core-data-model/extras/contact.html +11 -34
  271. nautobot/project-static/docs/user-guide/core-data-model/extras/team.html +11 -34
  272. nautobot/project-static/docs/user-guide/core-data-model/ipam/ipaddress.html +11 -34
  273. nautobot/project-static/docs/user-guide/core-data-model/ipam/namespace.html +11 -34
  274. nautobot/project-static/docs/user-guide/core-data-model/ipam/prefix.html +11 -34
  275. nautobot/project-static/docs/user-guide/core-data-model/ipam/rir.html +11 -34
  276. nautobot/project-static/docs/user-guide/core-data-model/ipam/routetarget.html +11 -34
  277. nautobot/project-static/docs/user-guide/core-data-model/ipam/service.html +11 -34
  278. nautobot/project-static/docs/user-guide/core-data-model/ipam/vlan.html +11 -34
  279. nautobot/project-static/docs/user-guide/core-data-model/ipam/vlangroup.html +11 -34
  280. nautobot/project-static/docs/user-guide/core-data-model/ipam/vrf.html +11 -34
  281. nautobot/project-static/docs/user-guide/core-data-model/overview/introduction.html +11 -34
  282. nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenant.html +11 -34
  283. nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenantgroup.html +11 -34
  284. nautobot/project-static/docs/user-guide/core-data-model/virtualization/cluster.html +11 -34
  285. nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustergroup.html +11 -34
  286. nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustertype.html +11 -34
  287. nautobot/project-static/docs/user-guide/core-data-model/virtualization/virtualmachine.html +11 -34
  288. nautobot/project-static/docs/user-guide/core-data-model/virtualization/vminterface.html +11 -34
  289. nautobot/project-static/docs/user-guide/core-data-model/wireless/index.html +11 -34
  290. nautobot/project-static/docs/user-guide/core-data-model/wireless/radioprofile.html +11 -34
  291. nautobot/project-static/docs/user-guide/core-data-model/wireless/supporteddatarate.html +11 -34
  292. nautobot/project-static/docs/user-guide/core-data-model/wireless/wirelessnetwork.html +11 -34
  293. nautobot/project-static/docs/user-guide/feature-guides/contacts-and-teams.html +11 -34
  294. nautobot/project-static/docs/user-guide/feature-guides/custom-fields.html +11 -34
  295. nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-devices.html +11 -34
  296. nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-location-types-and-locations.html +11 -34
  297. nautobot/project-static/docs/user-guide/feature-guides/getting-started/index.html +11 -34
  298. nautobot/project-static/docs/user-guide/feature-guides/getting-started/interfaces.html +11 -34
  299. nautobot/project-static/docs/user-guide/feature-guides/getting-started/ipam.html +11 -34
  300. nautobot/project-static/docs/user-guide/feature-guides/getting-started/platforms.html +11 -34
  301. nautobot/project-static/docs/user-guide/feature-guides/getting-started/search-bar.html +11 -34
  302. nautobot/project-static/docs/user-guide/feature-guides/getting-started/tenants.html +11 -34
  303. nautobot/project-static/docs/user-guide/feature-guides/getting-started/vlans-and-vlan-groups.html +11 -34
  304. nautobot/project-static/docs/user-guide/feature-guides/git-data-source.html +11 -34
  305. nautobot/project-static/docs/user-guide/feature-guides/graphql.html +11 -34
  306. nautobot/project-static/docs/user-guide/feature-guides/ip-address-merge-tool.html +11 -34
  307. nautobot/project-static/docs/user-guide/feature-guides/relationships.html +11 -34
  308. nautobot/project-static/docs/user-guide/feature-guides/software-image-files-and-versions.html +11 -34
  309. nautobot/project-static/docs/user-guide/feature-guides/wireless-networks-and-controllers.html +11 -34
  310. nautobot/project-static/docs/user-guide/index.html +11 -34
  311. nautobot/project-static/docs/user-guide/platform-functionality/change-logging.html +11 -34
  312. nautobot/project-static/docs/user-guide/platform-functionality/computedfield.html +11 -34
  313. nautobot/project-static/docs/user-guide/platform-functionality/customfield.html +11 -34
  314. nautobot/project-static/docs/user-guide/platform-functionality/customlink.html +11 -34
  315. nautobot/project-static/docs/user-guide/platform-functionality/dynamicgroup.html +11 -34
  316. nautobot/project-static/docs/user-guide/platform-functionality/events.html +11 -34
  317. nautobot/project-static/docs/user-guide/platform-functionality/exporttemplate.html +11 -34
  318. nautobot/project-static/docs/user-guide/platform-functionality/externalintegration.html +11 -34
  319. nautobot/project-static/docs/user-guide/platform-functionality/gitrepository.html +11 -34
  320. nautobot/project-static/docs/user-guide/platform-functionality/graphql.html +11 -34
  321. nautobot/project-static/docs/user-guide/platform-functionality/graphqlquery.html +11 -34
  322. nautobot/project-static/docs/user-guide/platform-functionality/imageattachment.html +11 -34
  323. nautobot/project-static/docs/user-guide/platform-functionality/jobs/index.html +11 -34
  324. nautobot/project-static/docs/user-guide/platform-functionality/jobs/job-scheduling-and-approvals.html +11 -34
  325. nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobbutton.html +11 -34
  326. nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobhook.html +11 -34
  327. nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobqueue.html +11 -34
  328. nautobot/project-static/docs/user-guide/platform-functionality/jobs/kubernetes-job-support.html +11 -34
  329. nautobot/project-static/docs/user-guide/platform-functionality/jobs/managing-jobs.html +11 -34
  330. nautobot/project-static/docs/user-guide/platform-functionality/jobs/models.html +11 -34
  331. nautobot/project-static/docs/user-guide/platform-functionality/napalm.html +11 -34
  332. nautobot/project-static/docs/user-guide/platform-functionality/note.html +11 -34
  333. nautobot/project-static/docs/user-guide/platform-functionality/objectmetadata.html +11 -34
  334. nautobot/project-static/docs/user-guide/platform-functionality/relationship.html +11 -34
  335. nautobot/project-static/docs/user-guide/platform-functionality/rendering-jinja-templates.html +11 -34
  336. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/authentication.html +11 -34
  337. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/filtering.html +11 -34
  338. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/overview.html +11 -34
  339. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/ui-related-endpoints.html +11 -34
  340. nautobot/project-static/docs/user-guide/platform-functionality/role.html +11 -34
  341. nautobot/project-static/docs/user-guide/platform-functionality/savedview.html +11 -34
  342. nautobot/project-static/docs/user-guide/platform-functionality/secret.html +11 -34
  343. nautobot/project-static/docs/user-guide/platform-functionality/staticgroupassociation.html +11 -34
  344. nautobot/project-static/docs/user-guide/platform-functionality/status.html +11 -34
  345. nautobot/project-static/docs/user-guide/platform-functionality/tag.html +11 -34
  346. nautobot/project-static/docs/user-guide/platform-functionality/template-filters.html +11 -34
  347. nautobot/project-static/docs/user-guide/platform-functionality/users/objectpermission.html +11 -34
  348. nautobot/project-static/docs/user-guide/platform-functionality/users/token.html +11 -34
  349. nautobot/project-static/docs/user-guide/platform-functionality/webhook.html +11 -34
  350. nautobot/tenancy/api/views.py +2 -1
  351. {nautobot-2.4.13.dist-info → nautobot-2.4.14.dist-info}/METADATA +5 -5
  352. {nautobot-2.4.13.dist-info → nautobot-2.4.14.dist-info}/RECORD +356 -349
  353. {nautobot-2.4.13.dist-info → nautobot-2.4.14.dist-info}/LICENSE.txt +0 -0
  354. {nautobot-2.4.13.dist-info → nautobot-2.4.14.dist-info}/NOTICE +0 -0
  355. {nautobot-2.4.13.dist-info → nautobot-2.4.14.dist-info}/WHEEL +0 -0
  356. {nautobot-2.4.13.dist-info → nautobot-2.4.14.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,318 @@
1
+ {% extends 'generic/object_retrieve.html' %}
2
+ {% load helpers %}
3
+ {% load static %}
4
+
5
+ {% block extra_breadcrumbs %}
6
+ <li><a href="{% url 'dcim:rack_list' %}?location={{ object.location.pk }}">{{ object.location }}</a></li>
7
+ {% if object.rack_group %}
8
+ {% for rack_group in object.rack_group.ancestors %}
9
+ <li>{{ rack_group|hyperlinked_object }}</li>
10
+ {% endfor %}
11
+ <li>{{ object.rack_group|hyperlinked_object }}</li>
12
+ {% endif %}
13
+ {% endblock extra_breadcrumbs %}
14
+
15
+ {% block extra_buttons %}
16
+ <a {% if prev_rack %}href="{% url 'dcim:rack' pk=prev_rack.pk %}"{% else %}disabled="disabled"{% endif %} class="btn btn-primary">
17
+ <span class="mdi mdi-chevron-left" aria-hidden="true"></span> Previous Rack
18
+ </a>
19
+ <a {% if next_rack %}href="{% url 'dcim:rack' pk=next_rack.pk %}"{% else %}disabled="disabled"{% endif %} class="btn btn-primary">
20
+ <span class="mdi mdi-chevron-right" aria-hidden="true"></span> Next Rack
21
+ </a>
22
+ {% endblock extra_buttons %}
23
+
24
+ {% block title %}Rack {{ object }}{% endblock title %}
25
+
26
+ {% block panel_buttons %}
27
+ <button class="btn btn-sm btn-default toggle-fullname" selected="selected">
28
+ <span class="mdi mdi-checkbox-marked-circle-outline" aria-hidden="true"></span> Show Device Full Name
29
+ </button>
30
+ <button class="btn btn-sm btn-default toggle-images" selected="selected">
31
+ <span class="mdi mdi-checkbox-marked-circle-outline" aria-hidden="true"></span> Show Images
32
+ </button>
33
+ {% endblock panel_buttons %}
34
+
35
+ {% block content_left_page %}
36
+ <div class="panel panel-default">
37
+ <div class="panel-heading">
38
+ <strong>Rack</strong>
39
+ </div>
40
+ <table class="table table-hover panel-body attr-table">
41
+ <tr>
42
+ <td>Location</td>
43
+ <td>{% include 'dcim/inc/location_hierarchy.html' with location=object.location %}</td>
44
+ </tr>
45
+ <tr>
46
+ <td>Rack Group</td>
47
+ <td>
48
+ {% if object.rack_group %}
49
+ {% for rack_group in object.rack_group.ancestors %}
50
+ {{ rack_group|hyperlinked_object }} /
51
+ {% endfor %}
52
+ {% endif %}
53
+ {{ object.rack_group|hyperlinked_object }}
54
+ </td>
55
+ </tr>
56
+ <tr>
57
+ <td>Facility ID</td>
58
+ <td>{{ object.facility_id|placeholder }}</td>
59
+ </tr>
60
+ {% include 'inc/tenant_table_row.html' %}
61
+ <tr>
62
+ <td>Status</td>
63
+ <td>
64
+ {{ object.status| hyperlinked_object_with_color }}
65
+ </td>
66
+ </tr>
67
+ <tr>
68
+ <td>Role</td>
69
+ <td>{{ object.role | hyperlinked_object_with_color }}</td>
70
+ </tr>
71
+ <tr>
72
+ <td>Serial Number</td>
73
+ <td>{{ object.serial|placeholder }}</td>
74
+ </tr>
75
+ <tr>
76
+ <td>Asset Tag</td>
77
+ <td>{{ object.asset_tag|placeholder }}</td>
78
+ </tr>
79
+ <tr>
80
+ <td>Devices</td>
81
+ <td>
82
+ <a href="{% url 'dcim:device_list' %}?rack={{ object.id }}">{{ device_count }}</a>
83
+ </td>
84
+ </tr>
85
+ <tr>
86
+ <td>Space Utilization</td>
87
+ <td>{% utilization_graph object.get_utilization %}</td>
88
+ </tr>
89
+ <tr>
90
+ <td>Power Utilization</td>
91
+ <td>{% utilization_graph object.get_power_utilization %}</td>
92
+ </tr>
93
+ </table>
94
+ </div>
95
+ <div class="panel panel-default">
96
+ <div class="panel-heading">
97
+ <strong>Dimensions</strong>
98
+ </div>
99
+ <table class="table table-hover panel-body attr-table">
100
+ <tr>
101
+ <td>Type</td>
102
+ <td>
103
+ {% if object.type %}
104
+ {{ object.get_type_display }}
105
+ {% else %}
106
+ <span class="text-muted">None</span>
107
+ {% endif %}
108
+ </td>
109
+ </tr>
110
+ <tr>
111
+ <td>Width</td>
112
+ <td>{{ object.get_width_display }}</td>
113
+ </tr>
114
+ <tr>
115
+ <td>Height</td>
116
+ <td>{{ object.u_height }}U ({% if object.desc_units %}descending{% else %}ascending{% endif %})</td>
117
+ </tr>
118
+ <tr>
119
+ <td>Outer Width</td>
120
+ <td>
121
+ {% if object.outer_width %}
122
+ <span>{{ object.outer_width }} {{ object.get_outer_unit_display }}</span>
123
+ {% else %}
124
+ <span class="text-muted">&mdash;</span>
125
+ {% endif %}
126
+ </td>
127
+ </tr>
128
+ <tr>
129
+ <td>Outer Depth</td>
130
+ <td>
131
+ {% if object.outer_depth %}
132
+ <span>{{ object.outer_depth }} {{ object.get_outer_unit_display }}</span>
133
+ {% else %}
134
+ <span class="text-muted">&mdash;</span>
135
+ {% endif %}
136
+ </td>
137
+ </tr>
138
+ </table>
139
+ </div>
140
+ <div class="panel panel-default">
141
+ <div class="panel-heading">
142
+ <strong>Comments</strong>
143
+ </div>
144
+ <div class="panel-body rendered-markdown">
145
+ {% if object.comments %}
146
+ {{ object.comments|render_markdown }}
147
+ {% else %}
148
+ <span class="text-muted">None</span>
149
+ {% endif %}
150
+ </div>
151
+ </div>
152
+ {% if power_feeds %}
153
+ <div class="panel panel-default">
154
+ <div class="panel-heading">
155
+ <strong>Power Feeds</strong>
156
+ </div>
157
+ <table class="table panel-body">
158
+ <tr>
159
+ <th>Panel</th>
160
+ <th>Feed</th>
161
+ <th>Status</th>
162
+ <th>Type</th>
163
+ <th>Utilization</th>
164
+ </tr>
165
+ {% for powerfeed in power_feeds %}
166
+ <tr>
167
+ <td>{{ powerfeed.power_panel|hyperlinked_object }}</td>
168
+ <td>{{ powerfeed|hyperlinked_object }}</td>
169
+ <td>
170
+ <span class="label" style="color: {{ powerfeed.status.color|fgcolor }}; background-color: #{{powerfeed.status.color}}">{{ powerfeed.get_status_display }}</span>
171
+ </td>
172
+ <td>
173
+ <span class="label label-{{ powerfeed.get_type_class }}">{{ powerfeed.get_type_display }}</span>
174
+ </td>
175
+ {% with power_port=powerfeed.connected_endpoint %}
176
+ {% if power_port %}
177
+ {% with utilization=power_port.get_power_draw %}
178
+ {% if utilization %}
179
+ {% if powerfeed.available_power > 0 %}
180
+ <td>{% utilization_graph_raw_data utilization.allocated powerfeed.available_power %}</td>
181
+ {% endif %}
182
+ {% endif %}
183
+ {% endwith %}
184
+ {% else %}
185
+ <td class="text-muted">N/A</td>
186
+ {% endif %}
187
+ {% endwith %}
188
+ </tr>
189
+ {% endfor %}
190
+ </table>
191
+ </div>
192
+ {% endif %}
193
+ <div class="panel panel-default">
194
+ <div class="panel-heading">
195
+ <strong>Images</strong>
196
+ </div>
197
+ {% include 'inc/image_attachments.html' with images=object.images.all %}
198
+ {% if perms.extras.add_imageattachment %}
199
+ <div class="panel-footer text-right noprint">
200
+ <a href="{% url 'dcim:rack_add_image' object_id=object.pk %}" class="btn btn-primary btn-xs">
201
+ <span class="mdi mdi-plus-thick" aria-hidden="true"></span>
202
+ Attach an image
203
+ </a>
204
+ </div>
205
+ {% endif %}
206
+ </div>
207
+ <div class="panel panel-default">
208
+ <div class="panel-heading">
209
+ <strong>Reservations</strong>
210
+ </div>
211
+ {% if reservations %}
212
+ <table class="table table-hover panel-body">
213
+ <tr>
214
+ <th>Units</th>
215
+ <th>Tenant</th>
216
+ <th>Description</th>
217
+ <th></th>
218
+ </tr>
219
+ {% for resv in reservations %}
220
+ <tr>
221
+ <td>
222
+ <a href="{{ resv.get_absolute_url }}">{{ resv.unit_list }}</a>
223
+ </td>
224
+ <td>
225
+ {{ resv.tenant|hyperlinked_object }}
226
+ </td>
227
+ <td>
228
+ {{ resv.description }}<br />
229
+ <small>{{ resv.user }} &middot; {{ resv.created }}</small>
230
+ </td>
231
+ <td class="text-right noprint">
232
+ {% if perms.dcim.change_rackreservation %}
233
+ <a href="{% url 'dcim:rackreservation_edit' pk=resv.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-warning btn-xs" title="Edit reservation">
234
+ <i class="mdi mdi-pencil" aria-hidden="true"></i>
235
+ </a>
236
+ {% endif %}
237
+ {% if perms.dcim.delete_rackreservation %}
238
+ <a href="{% url 'dcim:rackreservation_delete' pk=resv.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-danger btn-xs" title="Delete reservation">
239
+ <i class="mdi mdi-trash-can-outline" aria-hidden="true"></i>
240
+ </a>
241
+ {% endif %}
242
+ </td>
243
+ </tr>
244
+ {% endfor %}
245
+ </table>
246
+ {% else %}
247
+ <div class="panel-body text-muted">None</div>
248
+ {% endif %}
249
+ {% if perms.dcim.add_rackreservation %}
250
+ <div class="panel-footer text-right noprint">
251
+ <a href="{% url 'dcim:rackreservation_add' %}?rack={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary btn-xs">
252
+ <span class="mdi mdi-plus-thick" aria-hidden="true"></span>
253
+ Add a reservation
254
+ </a>
255
+ </div>
256
+ {% endif %}
257
+ </div>
258
+ {% endblock content_left_page %}
259
+
260
+ {% block content_right_page %}
261
+ <div class="row" style="margin-bottom: 20px">
262
+ <div class="col-md-6 col-sm-6 col-xs-12 text-center">
263
+ <div style="margin-left: 30px">
264
+ <h4>Front</h4>
265
+ {% include 'dcim/inc/rack_elevation.html' with face='front' %}
266
+ </div>
267
+ </div>
268
+ <div class="col-md-6 col-sm-6 col-xs-12 text-center">
269
+ <div style="margin-left: 30px">
270
+ <h4>Rear</h4>
271
+ {% include 'dcim/inc/rack_elevation.html' with face='rear' %}
272
+ </div>
273
+ </div>
274
+ </div>
275
+ <div class="panel panel-default">
276
+ <div class="panel-heading">
277
+ <strong>Non-Racked Devices</strong>
278
+ </div>
279
+ {% if nonracked_devices %}
280
+ <table class="table table-hover panel-body">
281
+ <tr>
282
+ <th>Name</th>
283
+ <th>Role</th>
284
+ <th>Type</th>
285
+ <th colspan="2">Parent Device</th>
286
+ </tr>
287
+ {% for device in nonracked_devices %}
288
+ <tr{% if device.device_type.u_height %} class="warning"{% endif %}>
289
+ <td>{{ device|hyperlinked_object }}</td>
290
+ <td>{{ device.role }}</td>
291
+ <td>{{ device.device_type.display }}</td>
292
+ {% if device.parent_bay %}
293
+ <td>{{ device.parent_bay.device|hyperlinked_object }}</td>
294
+ <td>{{ device.parent_bay }}</td>
295
+ {% else %}
296
+ <td colspan="2" class="text-muted">&mdash;</td>
297
+ {% endif %}
298
+ </tr>
299
+ {% endfor %}
300
+ </table>
301
+ {% else %}
302
+ <div class="panel-body text-muted">None</div>
303
+ {% endif %}
304
+ {% if perms.dcim.add_device %}
305
+ <div class="panel-footer text-right noprint">
306
+ <a href="{% url 'dcim:device_add' %}?location={{ object.location.pk }}&rack={{ object.pk }}" class="btn btn-primary btn-xs">
307
+ <span class="mdi mdi-plus-thick" aria-hidden="true"></span>
308
+ Add a non-racked device
309
+ </a>
310
+ </div>
311
+ {% endif %}
312
+ </div>
313
+ {% endblock content_right_page %}
314
+
315
+ {% block javascript %}
316
+ {{block.super}}
317
+ <script src="{% versioned_static 'js/rack_elevations.js' %}"></script>
318
+ {% endblock javascript %}
@@ -0,0 +1,47 @@
1
+ {% extends 'generic/object_create.html' %}
2
+ {% load form_helpers %}
3
+
4
+ {% block form %}
5
+ <div class="panel panel-default">
6
+ <div class="panel-heading"><strong>Rack</strong></div>
7
+ <div class="panel-body">
8
+ {% render_field form.location %}
9
+ {% render_field form.rack_group %}
10
+ {% render_field form.name %}
11
+ {% render_field form.facility_id %}
12
+ {% render_field form.status %}
13
+ {% render_field form.role %}
14
+ {% render_field form.serial %}
15
+ {% render_field form.asset_tag %}
16
+ </div>
17
+ </div>
18
+ {% include 'inc/tenancy_form_panel.html' %}
19
+ <div class="panel panel-default">
20
+ <div class="panel-heading"><strong>Dimensions</strong></div>
21
+ <div class="panel-body">
22
+ {% render_field form.type %}
23
+ {% render_field form.width %}
24
+ {% render_field form.u_height %}
25
+ <div class="form-group">
26
+ <label class="col-md-3 control-label">Outer dimensions</label>
27
+ <div class="col-md-3">
28
+ {{ form.outer_width }}
29
+ </div>
30
+ <div class="col-md-3">
31
+ {{ form.outer_depth }}
32
+ </div>
33
+ <div class="col-md-2">
34
+ {{ form.outer_unit }}
35
+ </div>
36
+ </div>
37
+ {% render_field form.desc_units %}
38
+ </div>
39
+ </div>
40
+ {% include 'inc/extras_features_edit_form_fields.html' %}
41
+ <div class="panel panel-default">
42
+ <div class="panel-heading"><strong>Comments</strong></div>
43
+ <div class="panel-body">
44
+ {% render_field form.comments %}
45
+ </div>
46
+ </div>
47
+ {% endblock %}
nautobot/dcim/urls.py CHANGED
@@ -2,7 +2,7 @@ from django.urls import path
2
2
  from django.views.generic.base import RedirectView
3
3
 
4
4
  from nautobot.core.views.routers import NautobotUIViewSetRouter
5
- from nautobot.extras.views import ImageAttachmentEditView, ObjectChangeLogView, ObjectDynamicGroupsView, ObjectNotesView
5
+ from nautobot.extras.views import ImageAttachmentEditView, ObjectChangeLogView, ObjectNotesView
6
6
  from nautobot.ipam.views import ServiceEditView
7
7
 
8
8
  from . import views
@@ -44,6 +44,7 @@ router.register("modules", views.ModuleUIViewSet)
44
44
  router.register("platforms", views.PlatformUIViewSet)
45
45
  router.register("power-feeds", views.PowerFeedUIViewSet)
46
46
  router.register("power-panels", views.PowerPanelUIViewSet)
47
+ router.register("racks", views.RackUIViewSet)
47
48
  router.register("rack-groups", views.RackGroupUIViewSet)
48
49
  router.register("rack-reservations", views.RackReservationUIViewSet)
49
50
  router.register("software-image-files", views.SoftwareImageFileUIViewSet)
@@ -65,37 +66,11 @@ urlpatterns = [
65
66
  kwargs={"model": Location},
66
67
  ),
67
68
  # Racks
68
- path("racks/", views.RackListView.as_view(), name="rack_list"),
69
69
  path(
70
70
  "rack-elevations/",
71
71
  views.RackElevationListView.as_view(),
72
72
  name="rack_elevation_list",
73
73
  ),
74
- path("racks/add/", views.RackEditView.as_view(), name="rack_add"),
75
- path("racks/import/", views.RackBulkImportView.as_view(), name="rack_import"), # 3.0 TODO: remove, unused
76
- path("racks/edit/", views.RackBulkEditView.as_view(), name="rack_bulk_edit"),
77
- path("racks/delete/", views.RackBulkDeleteView.as_view(), name="rack_bulk_delete"),
78
- path("racks/<uuid:pk>/", views.RackView.as_view(), name="rack"),
79
- path("racks/<uuid:pk>/edit/", views.RackEditView.as_view(), name="rack_edit"),
80
- path("racks/<uuid:pk>/delete/", views.RackDeleteView.as_view(), name="rack_delete"),
81
- path(
82
- "racks/<uuid:pk>/changelog/",
83
- ObjectChangeLogView.as_view(),
84
- name="rack_changelog",
85
- kwargs={"model": Rack},
86
- ),
87
- path(
88
- "racks/<uuid:pk>/notes/",
89
- ObjectNotesView.as_view(),
90
- name="rack_notes",
91
- kwargs={"model": Rack},
92
- ),
93
- path( # 3.0 TODO: remove, no longer needed/used since 2.3
94
- "racks/<uuid:pk>/dynamic-groups/",
95
- ObjectDynamicGroupsView.as_view(),
96
- name="rack_dynamicgroups",
97
- kwargs={"model": Rack},
98
- ),
99
74
  path(
100
75
  "racks/<uuid:object_id>/images/add/",
101
76
  ImageAttachmentEditView.as_view(),
nautobot/dcim/utils.py CHANGED
@@ -1,23 +1,13 @@
1
+ from copy import deepcopy
1
2
  import uuid
2
3
 
3
4
  from django.contrib.contenttypes.models import ContentType
4
5
  from django.core.exceptions import ValidationError
5
- from netutils.lib_mapper import (
6
- ANSIBLE_LIB_MAPPER_REVERSE,
7
- HIERCONFIG_LIB_MAPPER_REVERSE,
8
- NAPALM_LIB_MAPPER_REVERSE,
9
- NETMIKO_LIB_MAPPER_REVERSE,
10
- NETUTILSPARSER_LIB_MAPPER_REVERSE,
11
- NTCTEMPLATES_LIB_MAPPER_REVERSE,
12
- PYATS_LIB_MAPPER_REVERSE,
13
- PYNTC_LIB_MAPPER_REVERSE,
14
- SCRAPLI_LIB_MAPPER_REVERSE,
15
- )
6
+ from netutils.lib_mapper import NAME_TO_ALL_LIB_MAPPER, NAME_TO_LIB_MAPPER_REVERSE
16
7
 
17
8
  from nautobot.core.choices import ColorChoices
18
9
  from nautobot.core.utils.config import get_settings_or_config
19
10
  from nautobot.dcim.choices import InterfaceModeChoices
20
- from nautobot.dcim.constants import NETUTILS_NETWORK_DRIVER_MAPPING_NAMES
21
11
 
22
12
 
23
13
  def compile_path_node(ct_id, object_id):
@@ -71,7 +61,7 @@ def get_network_driver_mapping_tool_names():
71
61
 
72
62
  Tool names are "ansible", "hier_config", "napalm", "netmiko", etc...
73
63
  """
74
- network_driver_names = NETUTILS_NETWORK_DRIVER_MAPPING_NAMES.copy()
64
+ network_driver_names = set(NAME_TO_LIB_MAPPER_REVERSE.keys())
75
65
  network_driver_names.update(get_settings_or_config("NETWORK_DRIVERS", fallback={}).keys())
76
66
  return sorted(network_driver_names)
77
67
 
@@ -93,23 +83,7 @@ def get_all_network_driver_mappings():
93
83
  etc...
94
84
  }
95
85
  """
96
- network_driver_mappings = {}
97
-
98
- # initialize mapping from netutils library
99
- for tool_name, mappings in (
100
- ("ansible", ANSIBLE_LIB_MAPPER_REVERSE),
101
- ("hier_config", HIERCONFIG_LIB_MAPPER_REVERSE),
102
- ("napalm", NAPALM_LIB_MAPPER_REVERSE),
103
- ("netmiko", NETMIKO_LIB_MAPPER_REVERSE),
104
- ("netutils_parser", NETUTILSPARSER_LIB_MAPPER_REVERSE),
105
- ("ntc_templates", NTCTEMPLATES_LIB_MAPPER_REVERSE),
106
- ("pyats", PYATS_LIB_MAPPER_REVERSE),
107
- ("pyntc", PYNTC_LIB_MAPPER_REVERSE),
108
- ("scrapli", SCRAPLI_LIB_MAPPER_REVERSE),
109
- ):
110
- for normalized_name, mapped_name in mappings.items():
111
- network_driver_mappings.setdefault(normalized_name, {})
112
- network_driver_mappings[normalized_name][tool_name] = mapped_name
86
+ network_driver_mappings = deepcopy(NAME_TO_ALL_LIB_MAPPER)
113
87
 
114
88
  # add mappings from optional NETWORK_DRIVERS setting
115
89
  network_drivers_config = get_settings_or_config("NETWORK_DRIVERS", fallback={})
nautobot/dcim/views.py CHANGED
@@ -58,6 +58,7 @@ from nautobot.core.views.paginator import EnhancedPaginator, get_paginate_count
58
58
  from nautobot.core.views.viewsets import NautobotUIViewSet
59
59
  from nautobot.dcim.choices import LocationDataToContactActionChoices
60
60
  from nautobot.dcim.forms import LocationMigrateDataToContactForm
61
+ from nautobot.dcim.utils import get_all_network_driver_mappings
61
62
  from nautobot.extras.models import Contact, ContactAssociation, Role, Status, Team
62
63
  from nautobot.extras.tables import DynamicGroupTable
63
64
  from nautobot.extras.views import ObjectChangeLogView, ObjectConfigContextView, ObjectDynamicGroupsView
@@ -524,11 +525,41 @@ class RackGroupUIViewSet(NautobotUIViewSet):
524
525
  #
525
526
 
526
527
 
527
- class RackListView(generic.ObjectListView):
528
- queryset = Rack.objects.all()
529
- filterset = filters.RackFilterSet
530
- filterset_form = forms.RackFilterForm
531
- table = tables.RackDetailTable
528
+ class RackUIViewSet(NautobotUIViewSet):
529
+ bulk_update_form_class = forms.RackBulkEditForm
530
+ filterset_class = filters.RackFilterSet
531
+ filterset_form_class = forms.RackFilterForm
532
+ form_class = forms.RackForm
533
+ serializer_class = serializers.RackSerializer
534
+ table_class = tables.RackDetailTable
535
+ queryset = Rack.objects.select_related("location", "tenant__tenant_group", "rack_group", "role")
536
+
537
+ def get_extra_context(self, request, instance):
538
+ context = super().get_extra_context(request, instance)
539
+
540
+ if self.action == "retrieve":
541
+ # Get 0U and child devices located within the rack
542
+ context["nonracked_devices"] = Device.objects.filter(rack=instance, position__isnull=True).select_related(
543
+ "device_type__manufacturer"
544
+ )
545
+
546
+ peer_racks = Rack.objects.restrict(request.user, "view").filter(location=instance.location)
547
+
548
+ if instance.rack_group:
549
+ peer_racks = peer_racks.filter(rack_group=instance.rack_group)
550
+ else:
551
+ peer_racks = peer_racks.filter(rack_group__isnull=True)
552
+
553
+ context["next_rack"] = peer_racks.filter(name__gt=instance.name).order_by("name").first()
554
+ context["prev_rack"] = peer_racks.filter(name__lt=instance.name).order_by("-name").first()
555
+
556
+ context["reservations"] = RackReservation.objects.restrict(request.user, "view").filter(rack=instance)
557
+ context["power_feeds"] = (
558
+ PowerFeed.objects.restrict(request.user, "view").filter(rack=instance).select_related("power_panel")
559
+ )
560
+ context["device_count"] = Device.objects.restrict(request.user, "view").filter(rack=instance).count()
561
+
562
+ return context
532
563
 
533
564
 
534
565
  class RackElevationListView(generic.ObjectListView):
@@ -584,70 +615,6 @@ class RackElevationListView(generic.ObjectListView):
584
615
  }
585
616
 
586
617
 
587
- class RackView(generic.ObjectView):
588
- queryset = Rack.objects.select_related("location", "tenant__tenant_group", "rack_group", "role")
589
-
590
- def get_extra_context(self, request, instance):
591
- # Get 0U and child devices located within the rack
592
- nonracked_devices = Device.objects.filter(rack=instance, position__isnull=True).select_related(
593
- "device_type__manufacturer"
594
- )
595
-
596
- peer_racks = Rack.objects.restrict(request.user, "view").filter(location=instance.location)
597
-
598
- if instance.rack_group:
599
- peer_racks = peer_racks.filter(rack_group=instance.rack_group)
600
- else:
601
- peer_racks = peer_racks.filter(rack_group__isnull=True)
602
- next_rack = peer_racks.filter(name__gt=instance.name).order_by("name").first()
603
- prev_rack = peer_racks.filter(name__lt=instance.name).order_by("-name").first()
604
-
605
- reservations = RackReservation.objects.restrict(request.user, "view").filter(rack=instance)
606
- power_feeds = (
607
- PowerFeed.objects.restrict(request.user, "view").filter(rack=instance).select_related("power_panel")
608
- )
609
-
610
- device_count = Device.objects.restrict(request.user, "view").filter(rack=instance).count()
611
-
612
- return {
613
- "device_count": device_count,
614
- "reservations": reservations,
615
- "power_feeds": power_feeds,
616
- "nonracked_devices": nonracked_devices,
617
- "next_rack": next_rack,
618
- "prev_rack": prev_rack,
619
- **super().get_extra_context(request, instance),
620
- }
621
-
622
-
623
- class RackEditView(generic.ObjectEditView):
624
- queryset = Rack.objects.all()
625
- model_form = forms.RackForm
626
- template_name = "dcim/rack_edit.html"
627
-
628
-
629
- class RackDeleteView(generic.ObjectDeleteView):
630
- queryset = Rack.objects.all()
631
-
632
-
633
- class RackBulkImportView(generic.BulkImportView): # 3.0 TODO: remove, unused
634
- queryset = Rack.objects.all()
635
- table = tables.RackTable
636
-
637
-
638
- class RackBulkEditView(generic.BulkEditView):
639
- queryset = Rack.objects.all()
640
- filterset = filters.RackFilterSet
641
- table = tables.RackTable
642
- form = forms.RackBulkEditForm
643
-
644
-
645
- class RackBulkDeleteView(generic.BulkDeleteView):
646
- queryset = Rack.objects.all()
647
- filterset = filters.RackFilterSet
648
- table = tables.RackTable
649
-
650
-
651
618
  #
652
619
  # Rack reservations
653
620
  #
@@ -1666,6 +1633,8 @@ class PlatformUIViewSet(NautobotUIViewSet):
1666
1633
  context = super().get_extra_context(request, instance)
1667
1634
  if self.action == "retrieve":
1668
1635
  context["network_driver_tool_names"] = instance.fetch_network_driver_mappings()
1636
+ if self.action in ["create", "update"]:
1637
+ context["network_driver_names"] = sorted(get_all_network_driver_mappings().keys())
1669
1638
  return context
1670
1639
 
1671
1640
 
@@ -483,22 +483,30 @@ class SecretsGroupAccessTypeChoices(ChoiceSet):
483
483
 
484
484
 
485
485
  class SecretsGroupSecretTypeChoices(ChoiceSet):
486
+ TYPE_AUTHKEY = "authentication-key"
487
+ TYPE_AUTHPROTOCOL = "authentication-protocol"
486
488
  TYPE_KEY = "key"
489
+ TYPE_NOTES = "notes"
487
490
  TYPE_PASSWORD = "password" # noqa: S105 # hardcoded-password-string -- false positive
491
+ TYPE_PRIVALGORITHM = "private-algorithm"
492
+ TYPE_PRIVKEY = "private-key"
488
493
  TYPE_SECRET = "secret" # noqa: S105 # hardcoded-password-string -- false positive
489
494
  TYPE_TOKEN = "token" # noqa: S105 # hardcoded-password-string -- false positive
490
- TYPE_USERNAME = "username"
491
495
  TYPE_URL = "url"
492
- TYPE_NOTES = "notes"
496
+ TYPE_USERNAME = "username"
493
497
 
494
498
  CHOICES = (
499
+ (TYPE_AUTHKEY, "Authentication Key"),
500
+ (TYPE_AUTHPROTOCOL, "Authentication Protocol"),
495
501
  (TYPE_KEY, "Key"),
502
+ (TYPE_NOTES, "Notes"),
496
503
  (TYPE_PASSWORD, "Password"),
504
+ (TYPE_PRIVALGORITHM, "Private Algorithm"),
505
+ (TYPE_PRIVKEY, "Private Key"),
497
506
  (TYPE_SECRET, "Secret"),
498
507
  (TYPE_TOKEN, "Token"),
499
- (TYPE_USERNAME, "Username"),
500
508
  (TYPE_URL, "URL"),
501
- (TYPE_NOTES, "Notes"),
509
+ (TYPE_USERNAME, "Username"),
502
510
  )
503
511
 
504
512