nautobot 2.1.8__py3-none-any.whl → 2.1.9__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 (296) hide show
  1. nautobot/apps/api.py +1 -2
  2. nautobot/apps/utils.py +4 -0
  3. nautobot/apps/views.py +2 -0
  4. nautobot/circuits/api/urls.py +1 -2
  5. nautobot/circuits/api/views.py +0 -12
  6. nautobot/core/api/routers.py +25 -3
  7. nautobot/core/api/utils.py +4 -0
  8. nautobot/core/api/views.py +21 -15
  9. nautobot/core/settings.py +1 -0
  10. nautobot/core/templates/admin/base.html +23 -94
  11. nautobot/core/templates/graphene/graphiql.html +18 -47
  12. nautobot/core/templates/inc/footer.html +5 -5
  13. nautobot/core/templates/inc/nav_menu.html +0 -7
  14. nautobot/core/templates/rest_framework/api.html +12 -5
  15. nautobot/core/tests/integration/test_view_authentication.py +67 -0
  16. nautobot/core/tests/test_graphql.py +2 -14
  17. nautobot/core/tests/test_views.py +22 -16
  18. nautobot/core/utils/lookup.py +124 -0
  19. nautobot/core/views/__init__.py +3 -7
  20. nautobot/core/views/generic.py +9 -0
  21. nautobot/dcim/api/urls.py +1 -2
  22. nautobot/dcim/api/views.py +1 -12
  23. nautobot/dcim/models/racks.py +1 -3
  24. nautobot/dcim/templates/dcim/device/lldp_neighbors.html +67 -43
  25. nautobot/dcim/tests/test_api.py +3 -0
  26. nautobot/dcim/views.py +5 -2
  27. nautobot/extras/api/urls.py +1 -2
  28. nautobot/extras/api/views.py +0 -10
  29. nautobot/extras/plugins/views.py +6 -9
  30. nautobot/extras/tests/test_views.py +101 -0
  31. nautobot/extras/views.py +10 -10
  32. nautobot/ipam/api/urls.py +1 -2
  33. nautobot/ipam/api/views.py +0 -11
  34. nautobot/ipam/tables.py +0 -1
  35. nautobot/ipam/tests/test_graphql.py +2 -3
  36. nautobot/ipam/views.py +9 -9
  37. nautobot/project-static/css/base.css +1 -0
  38. nautobot/project-static/docs/404.html +14 -0
  39. nautobot/project-static/docs/apps/index.html +14 -0
  40. nautobot/project-static/docs/apps/nautobot-apps.html +14 -0
  41. nautobot/project-static/docs/code-reference/nautobot/apps/__init__.html +14 -0
  42. nautobot/project-static/docs/code-reference/nautobot/apps/admin.html +14 -0
  43. nautobot/project-static/docs/code-reference/nautobot/apps/api.html +394 -408
  44. nautobot/project-static/docs/code-reference/nautobot/apps/change_logging.html +14 -0
  45. nautobot/project-static/docs/code-reference/nautobot/apps/choices.html +14 -0
  46. nautobot/project-static/docs/code-reference/nautobot/apps/config.html +14 -0
  47. nautobot/project-static/docs/code-reference/nautobot/apps/datasources.html +14 -0
  48. nautobot/project-static/docs/code-reference/nautobot/apps/exceptions.html +14 -0
  49. nautobot/project-static/docs/code-reference/nautobot/apps/factory.html +14 -0
  50. nautobot/project-static/docs/code-reference/nautobot/apps/filters.html +14 -0
  51. nautobot/project-static/docs/code-reference/nautobot/apps/forms.html +14 -0
  52. nautobot/project-static/docs/code-reference/nautobot/apps/graphql.html +14 -0
  53. nautobot/project-static/docs/code-reference/nautobot/apps/jobs.html +14 -0
  54. nautobot/project-static/docs/code-reference/nautobot/apps/models.html +14 -0
  55. nautobot/project-static/docs/code-reference/nautobot/apps/querysets.html +14 -0
  56. nautobot/project-static/docs/code-reference/nautobot/apps/secrets.html +14 -0
  57. nautobot/project-static/docs/code-reference/nautobot/apps/tables.html +14 -0
  58. nautobot/project-static/docs/code-reference/nautobot/apps/testing.html +14 -0
  59. nautobot/project-static/docs/code-reference/nautobot/apps/ui.html +14 -0
  60. nautobot/project-static/docs/code-reference/nautobot/apps/urls.html +14 -0
  61. nautobot/project-static/docs/code-reference/nautobot/apps/utils.html +649 -183
  62. nautobot/project-static/docs/code-reference/nautobot/apps/views.html +1811 -1744
  63. nautobot/project-static/docs/development/apps/api/configuration-view.html +14 -0
  64. nautobot/project-static/docs/development/apps/api/database-backend-config.html +14 -0
  65. nautobot/project-static/docs/development/apps/api/models/django-admin.html +14 -0
  66. nautobot/project-static/docs/development/apps/api/models/global-search.html +14 -0
  67. nautobot/project-static/docs/development/apps/api/models/graphql.html +14 -0
  68. nautobot/project-static/docs/development/apps/api/models/index.html +14 -0
  69. nautobot/project-static/docs/development/apps/api/nautobot-app-config.html +14 -0
  70. nautobot/project-static/docs/development/apps/api/platform-features/custom-validators.html +14 -0
  71. nautobot/project-static/docs/development/apps/api/platform-features/filter-extensions.html +14 -0
  72. nautobot/project-static/docs/development/apps/api/platform-features/git-repository-content.html +14 -0
  73. nautobot/project-static/docs/development/apps/api/platform-features/index.html +14 -0
  74. nautobot/project-static/docs/development/apps/api/platform-features/jinja2-filters.html +14 -0
  75. nautobot/project-static/docs/development/apps/api/platform-features/jobs.html +14 -0
  76. nautobot/project-static/docs/development/apps/api/platform-features/populating-extensibility-features.html +14 -0
  77. nautobot/project-static/docs/development/apps/api/platform-features/secrets-providers.html +14 -0
  78. nautobot/project-static/docs/development/apps/api/platform-features/uniquely-identify-objects.html +14 -0
  79. nautobot/project-static/docs/development/apps/api/prometheus.html +14 -0
  80. nautobot/project-static/docs/development/apps/api/setup.html +14 -0
  81. nautobot/project-static/docs/development/apps/api/testing.html +14 -0
  82. nautobot/project-static/docs/development/apps/api/ui-extensions/banners.html +14 -0
  83. nautobot/project-static/docs/development/apps/api/ui-extensions/home-page.html +14 -0
  84. nautobot/project-static/docs/development/apps/api/ui-extensions/index.html +14 -0
  85. nautobot/project-static/docs/development/apps/api/ui-extensions/navigation.html +14 -0
  86. nautobot/project-static/docs/development/apps/api/ui-extensions/object-views.html +14 -0
  87. nautobot/project-static/docs/development/apps/api/views/base-template.html +14 -0
  88. nautobot/project-static/docs/development/apps/api/views/core-view-overrides.html +28 -9
  89. nautobot/project-static/docs/development/apps/api/views/django-generic-views.html +31 -12
  90. nautobot/project-static/docs/development/apps/api/views/help-documentation.html +14 -0
  91. nautobot/project-static/docs/development/apps/api/views/index.html +14 -0
  92. nautobot/project-static/docs/development/apps/api/views/nautobot-generic-views.html +14 -0
  93. nautobot/project-static/docs/development/apps/api/views/nautobotuiviewset.html +14 -0
  94. nautobot/project-static/docs/development/apps/api/views/nautobotuiviewsetrouter.html +14 -0
  95. nautobot/project-static/docs/development/apps/api/views/notes.html +14 -0
  96. nautobot/project-static/docs/development/apps/api/views/rest-api.html +14 -0
  97. nautobot/project-static/docs/development/apps/api/views/urls.html +14 -0
  98. nautobot/project-static/docs/development/apps/index.html +14 -0
  99. nautobot/project-static/docs/development/apps/migration/code-updates.html +14 -0
  100. nautobot/project-static/docs/development/apps/migration/dependency-updates.html +14 -0
  101. nautobot/project-static/docs/development/apps/migration/from-v1.html +14 -0
  102. nautobot/project-static/docs/development/apps/migration/model-updates/dcim.html +14 -0
  103. nautobot/project-static/docs/development/apps/migration/model-updates/extras.html +14 -0
  104. nautobot/project-static/docs/development/apps/migration/model-updates/global.html +14 -0
  105. nautobot/project-static/docs/development/apps/migration/model-updates/ipam.html +14 -0
  106. nautobot/project-static/docs/development/apps/porting-from-netbox.html +14 -0
  107. nautobot/project-static/docs/development/core/application-registry.html +14 -0
  108. nautobot/project-static/docs/development/core/best-practices.html +14 -0
  109. nautobot/project-static/docs/development/core/bootstrap-ui.html +14 -0
  110. nautobot/project-static/docs/development/core/caching.html +14 -0
  111. nautobot/project-static/docs/development/core/docker-compose-advanced-use-cases.html +14 -0
  112. nautobot/project-static/docs/development/core/extending-models.html +14 -0
  113. nautobot/project-static/docs/development/core/generic-views.html +14 -0
  114. nautobot/project-static/docs/development/core/getting-started.html +33 -10
  115. nautobot/project-static/docs/development/core/homepage.html +14 -0
  116. nautobot/project-static/docs/development/core/index.html +14 -0
  117. nautobot/project-static/docs/development/core/model-features.html +14 -0
  118. nautobot/project-static/docs/development/core/natural-keys.html +14 -0
  119. nautobot/project-static/docs/development/core/navigation-menu.html +14 -0
  120. nautobot/project-static/docs/development/core/release-checklist.html +14 -0
  121. nautobot/project-static/docs/development/core/role-internals.html +14 -0
  122. nautobot/project-static/docs/development/core/style-guide.html +14 -0
  123. nautobot/project-static/docs/development/core/templates.html +14 -0
  124. nautobot/project-static/docs/development/core/testing.html +14 -0
  125. nautobot/project-static/docs/development/core/user-preferences.html +14 -0
  126. nautobot/project-static/docs/development/index.html +14 -0
  127. nautobot/project-static/docs/development/jobs/index.html +14 -0
  128. nautobot/project-static/docs/development/jobs/migration/from-v1.html +14 -0
  129. nautobot/project-static/docs/index.html +14 -0
  130. nautobot/project-static/docs/objects.inv +0 -0
  131. nautobot/project-static/docs/release-notes/index.html +14 -0
  132. nautobot/project-static/docs/release-notes/version-1.0.html +14 -0
  133. nautobot/project-static/docs/release-notes/version-1.1.html +14 -0
  134. nautobot/project-static/docs/release-notes/version-1.2.html +14 -0
  135. nautobot/project-static/docs/release-notes/version-1.3.html +14 -0
  136. nautobot/project-static/docs/release-notes/version-1.4.html +14 -0
  137. nautobot/project-static/docs/release-notes/version-1.5.html +14 -0
  138. nautobot/project-static/docs/release-notes/version-1.6.html +14 -0
  139. nautobot/project-static/docs/release-notes/version-2.0.html +14 -0
  140. nautobot/project-static/docs/release-notes/version-2.1.html +365 -159
  141. nautobot/project-static/docs/search/search_index.json +1 -1
  142. nautobot/project-static/docs/sitemap.xml +245 -240
  143. nautobot/project-static/docs/sitemap.xml.gz +0 -0
  144. nautobot/project-static/docs/user-guide/administration/configuration/authentication/ldap.html +14 -0
  145. nautobot/project-static/docs/user-guide/administration/configuration/authentication/remote.html +14 -0
  146. nautobot/project-static/docs/user-guide/administration/configuration/authentication/sso.html +14 -0
  147. nautobot/project-static/docs/user-guide/administration/configuration/index.html +14 -0
  148. nautobot/project-static/docs/user-guide/administration/configuration/optional-settings.html +14 -0
  149. nautobot/project-static/docs/user-guide/administration/configuration/required-settings.html +14 -0
  150. nautobot/project-static/docs/user-guide/administration/configuration/time-zones.html +14 -0
  151. nautobot/project-static/docs/user-guide/administration/guides/caching.html +14 -0
  152. nautobot/project-static/docs/user-guide/administration/guides/celery-queues.html +14 -0
  153. nautobot/project-static/docs/user-guide/administration/guides/healthcheck.html +14 -0
  154. nautobot/project-static/docs/user-guide/administration/guides/permissions.html +14 -0
  155. nautobot/project-static/docs/user-guide/administration/guides/prometheus-metrics.html +14 -0
  156. nautobot/project-static/docs/user-guide/administration/guides/replicating-nautobot.html +14 -0
  157. nautobot/project-static/docs/user-guide/administration/guides/request-profiling.html +14 -0
  158. nautobot/project-static/docs/user-guide/administration/guides/s3-django-storage.html +14 -0
  159. nautobot/project-static/docs/user-guide/administration/installation/app-install.html +14 -0
  160. nautobot/project-static/docs/user-guide/administration/installation/docker.html +21 -3
  161. nautobot/project-static/docs/user-guide/administration/installation/external-authentication.html +14 -0
  162. nautobot/project-static/docs/user-guide/administration/installation/health-checks.html +6019 -0
  163. nautobot/project-static/docs/user-guide/administration/installation/http-server.html +14 -0
  164. nautobot/project-static/docs/user-guide/administration/installation/index.html +14 -0
  165. nautobot/project-static/docs/user-guide/administration/installation/install_system.html +14 -0
  166. nautobot/project-static/docs/user-guide/administration/installation/nautobot.html +14 -0
  167. nautobot/project-static/docs/user-guide/administration/installation/selinux-troubleshooting.html +17 -3
  168. nautobot/project-static/docs/user-guide/administration/installation/services.html +14 -0
  169. nautobot/project-static/docs/user-guide/administration/migration/migrating-from-netbox.html +14 -0
  170. nautobot/project-static/docs/user-guide/administration/migration/migrating-from-postgresql.html +14 -0
  171. nautobot/project-static/docs/user-guide/administration/tools/nautobot-server.html +14 -0
  172. nautobot/project-static/docs/user-guide/administration/tools/nautobot-shell.html +14 -0
  173. nautobot/project-static/docs/user-guide/administration/upgrading/database-backup.html +14 -0
  174. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/after-you-upgrade.html +14 -0
  175. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/before-you-upgrade.html +14 -0
  176. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/for-developers.html +14 -0
  177. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/index.html +14 -0
  178. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/ipam/whats-changed.html +14 -0
  179. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/region-and-site-data-migration-guide.html +14 -0
  180. nautobot/project-static/docs/user-guide/administration/upgrading/from-v1/upgrading-from-nautobot-v1.html +14 -0
  181. nautobot/project-static/docs/user-guide/administration/upgrading/upgrading.html +14 -0
  182. nautobot/project-static/docs/user-guide/core-data-model/circuits/circuit.html +14 -0
  183. nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittermination.html +14 -0
  184. nautobot/project-static/docs/user-guide/core-data-model/circuits/circuittype.html +14 -0
  185. nautobot/project-static/docs/user-guide/core-data-model/circuits/provider.html +14 -0
  186. nautobot/project-static/docs/user-guide/core-data-model/circuits/providernetwork.html +14 -0
  187. nautobot/project-static/docs/user-guide/core-data-model/dcim/cable.html +14 -0
  188. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleport.html +14 -0
  189. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleporttemplate.html +14 -0
  190. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverport.html +14 -0
  191. nautobot/project-static/docs/user-guide/core-data-model/dcim/consoleserverporttemplate.html +14 -0
  192. nautobot/project-static/docs/user-guide/core-data-model/dcim/device.html +14 -0
  193. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebay.html +14 -0
  194. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicebaytemplate.html +14 -0
  195. nautobot/project-static/docs/user-guide/core-data-model/dcim/deviceredundancygroup.html +14 -0
  196. nautobot/project-static/docs/user-guide/core-data-model/dcim/devicetype.html +14 -0
  197. nautobot/project-static/docs/user-guide/core-data-model/dcim/frontport.html +14 -0
  198. nautobot/project-static/docs/user-guide/core-data-model/dcim/frontporttemplate.html +14 -0
  199. nautobot/project-static/docs/user-guide/core-data-model/dcim/interface.html +14 -0
  200. nautobot/project-static/docs/user-guide/core-data-model/dcim/interfaceredundancygroup.html +14 -0
  201. nautobot/project-static/docs/user-guide/core-data-model/dcim/interfacetemplate.html +14 -0
  202. nautobot/project-static/docs/user-guide/core-data-model/dcim/inventoryitem.html +14 -0
  203. nautobot/project-static/docs/user-guide/core-data-model/dcim/location.html +14 -0
  204. nautobot/project-static/docs/user-guide/core-data-model/dcim/locationtype.html +14 -0
  205. nautobot/project-static/docs/user-guide/core-data-model/dcim/manufacturer.html +14 -0
  206. nautobot/project-static/docs/user-guide/core-data-model/dcim/platform.html +14 -0
  207. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerfeed.html +14 -0
  208. nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlet.html +14 -0
  209. nautobot/project-static/docs/user-guide/core-data-model/dcim/poweroutlettemplate.html +14 -0
  210. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerpanel.html +14 -0
  211. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerport.html +14 -0
  212. nautobot/project-static/docs/user-guide/core-data-model/dcim/powerporttemplate.html +14 -0
  213. nautobot/project-static/docs/user-guide/core-data-model/dcim/rack.html +14 -0
  214. nautobot/project-static/docs/user-guide/core-data-model/dcim/rackgroup.html +14 -0
  215. nautobot/project-static/docs/user-guide/core-data-model/dcim/rackreservation.html +14 -0
  216. nautobot/project-static/docs/user-guide/core-data-model/dcim/rearport.html +14 -0
  217. nautobot/project-static/docs/user-guide/core-data-model/dcim/rearporttemplate.html +14 -0
  218. nautobot/project-static/docs/user-guide/core-data-model/dcim/virtualchassis.html +14 -0
  219. nautobot/project-static/docs/user-guide/core-data-model/extras/configcontext.html +14 -0
  220. nautobot/project-static/docs/user-guide/core-data-model/extras/configcontextschema.html +14 -0
  221. nautobot/project-static/docs/user-guide/core-data-model/ipam/ipaddress.html +14 -0
  222. nautobot/project-static/docs/user-guide/core-data-model/ipam/namespace.html +14 -0
  223. nautobot/project-static/docs/user-guide/core-data-model/ipam/prefix.html +14 -0
  224. nautobot/project-static/docs/user-guide/core-data-model/ipam/rir.html +14 -0
  225. nautobot/project-static/docs/user-guide/core-data-model/ipam/routetarget.html +14 -0
  226. nautobot/project-static/docs/user-guide/core-data-model/ipam/service.html +14 -0
  227. nautobot/project-static/docs/user-guide/core-data-model/ipam/vlan.html +14 -0
  228. nautobot/project-static/docs/user-guide/core-data-model/ipam/vlangroup.html +14 -0
  229. nautobot/project-static/docs/user-guide/core-data-model/ipam/vrf.html +14 -0
  230. nautobot/project-static/docs/user-guide/core-data-model/overview/introduction.html +14 -0
  231. nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenant.html +14 -0
  232. nautobot/project-static/docs/user-guide/core-data-model/tenancy/tenantgroup.html +14 -0
  233. nautobot/project-static/docs/user-guide/core-data-model/virtualization/cluster.html +14 -0
  234. nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustergroup.html +14 -0
  235. nautobot/project-static/docs/user-guide/core-data-model/virtualization/clustertype.html +14 -0
  236. nautobot/project-static/docs/user-guide/core-data-model/virtualization/virtualmachine.html +14 -0
  237. nautobot/project-static/docs/user-guide/core-data-model/virtualization/vminterface.html +14 -0
  238. nautobot/project-static/docs/user-guide/feature-guides/custom-fields.html +14 -0
  239. nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-devices.html +14 -0
  240. nautobot/project-static/docs/user-guide/feature-guides/getting-started/creating-location-types-and-locations.html +14 -0
  241. nautobot/project-static/docs/user-guide/feature-guides/getting-started/index.html +14 -0
  242. nautobot/project-static/docs/user-guide/feature-guides/getting-started/interfaces.html +14 -0
  243. nautobot/project-static/docs/user-guide/feature-guides/getting-started/ipam.html +14 -0
  244. nautobot/project-static/docs/user-guide/feature-guides/getting-started/platforms.html +14 -0
  245. nautobot/project-static/docs/user-guide/feature-guides/getting-started/search-bar.html +14 -0
  246. nautobot/project-static/docs/user-guide/feature-guides/getting-started/tenants.html +14 -0
  247. nautobot/project-static/docs/user-guide/feature-guides/getting-started/vlans-and-vlan-groups.html +14 -0
  248. nautobot/project-static/docs/user-guide/feature-guides/git-data-source.html +14 -0
  249. nautobot/project-static/docs/user-guide/feature-guides/graphql.html +14 -0
  250. nautobot/project-static/docs/user-guide/feature-guides/ip-address-merge-tool.html +14 -0
  251. nautobot/project-static/docs/user-guide/feature-guides/relationships.html +14 -0
  252. nautobot/project-static/docs/user-guide/index.html +14 -0
  253. nautobot/project-static/docs/user-guide/platform-functionality/change-logging.html +14 -0
  254. nautobot/project-static/docs/user-guide/platform-functionality/computedfield.html +14 -0
  255. nautobot/project-static/docs/user-guide/platform-functionality/customfield.html +14 -0
  256. nautobot/project-static/docs/user-guide/platform-functionality/customlink.html +14 -0
  257. nautobot/project-static/docs/user-guide/platform-functionality/dynamicgroup.html +14 -0
  258. nautobot/project-static/docs/user-guide/platform-functionality/exporttemplate.html +14 -0
  259. nautobot/project-static/docs/user-guide/platform-functionality/externalintegration.html +14 -0
  260. nautobot/project-static/docs/user-guide/platform-functionality/gitrepository.html +14 -0
  261. nautobot/project-static/docs/user-guide/platform-functionality/graphql.html +14 -0
  262. nautobot/project-static/docs/user-guide/platform-functionality/graphqlquery.html +14 -0
  263. nautobot/project-static/docs/user-guide/platform-functionality/imageattachment.html +14 -0
  264. nautobot/project-static/docs/user-guide/platform-functionality/jobs/index.html +14 -0
  265. nautobot/project-static/docs/user-guide/platform-functionality/jobs/job-scheduling-and-approvals.html +14 -0
  266. nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobbutton.html +14 -0
  267. nautobot/project-static/docs/user-guide/platform-functionality/jobs/jobhook.html +14 -0
  268. nautobot/project-static/docs/user-guide/platform-functionality/jobs/models.html +14 -0
  269. nautobot/project-static/docs/user-guide/platform-functionality/napalm.html +14 -0
  270. nautobot/project-static/docs/user-guide/platform-functionality/note.html +14 -0
  271. nautobot/project-static/docs/user-guide/platform-functionality/relationship.html +14 -0
  272. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/authentication.html +14 -0
  273. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/filtering.html +14 -0
  274. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/overview.html +14 -0
  275. nautobot/project-static/docs/user-guide/platform-functionality/rest-api/ui-related-endpoints.html +14 -0
  276. nautobot/project-static/docs/user-guide/platform-functionality/role.html +14 -0
  277. nautobot/project-static/docs/user-guide/platform-functionality/secret.html +14 -0
  278. nautobot/project-static/docs/user-guide/platform-functionality/status.html +14 -0
  279. nautobot/project-static/docs/user-guide/platform-functionality/tag.html +14 -0
  280. nautobot/project-static/docs/user-guide/platform-functionality/template-filters.html +14 -0
  281. nautobot/project-static/docs/user-guide/platform-functionality/users/objectpermission.html +14 -0
  282. nautobot/project-static/docs/user-guide/platform-functionality/users/token.html +14 -0
  283. nautobot/project-static/docs/user-guide/platform-functionality/webhook.html +14 -0
  284. nautobot/tenancy/api/urls.py +1 -2
  285. nautobot/tenancy/api/views.py +0 -12
  286. nautobot/users/api/urls.py +1 -2
  287. nautobot/users/api/views.py +2 -65
  288. nautobot/users/views.py +8 -8
  289. nautobot/virtualization/api/urls.py +1 -2
  290. nautobot/virtualization/api/views.py +0 -12
  291. {nautobot-2.1.8.dist-info → nautobot-2.1.9.dist-info}/METADATA +2 -2
  292. {nautobot-2.1.8.dist-info → nautobot-2.1.9.dist-info}/RECORD +296 -294
  293. {nautobot-2.1.8.dist-info → nautobot-2.1.9.dist-info}/LICENSE.txt +0 -0
  294. {nautobot-2.1.8.dist-info → nautobot-2.1.9.dist-info}/NOTICE +0 -0
  295. {nautobot-2.1.8.dist-info → nautobot-2.1.9.dist-info}/WHEEL +0 -0
  296. {nautobot-2.1.8.dist-info → nautobot-2.1.9.dist-info}/entry_points.txt +0 -0
@@ -1,14 +1,10 @@
1
- from django.contrib.auth import get_user_model, login, logout
1
+ from django.contrib.auth import get_user_model
2
2
  from django.contrib.auth.models import Group
3
3
  from django.db.models import Count
4
- from django.utils.decorators import method_decorator
5
- from django.views.decorators.csrf import ensure_csrf_cookie
6
4
  from drf_spectacular.utils import extend_schema, extend_schema_view, OpenApiTypes
7
5
  from rest_framework.authentication import BasicAuthentication
8
- from rest_framework.decorators import action
9
- from rest_framework.permissions import AllowAny, IsAuthenticated
6
+ from rest_framework.permissions import IsAuthenticated
10
7
  from rest_framework.response import Response
11
- from rest_framework.routers import APIRootView
12
8
  from rest_framework.viewsets import ViewSet
13
9
 
14
10
  from nautobot.core.api.serializers import BulkOperationIntegerIDSerializer
@@ -20,16 +16,6 @@ from nautobot.users.models import ObjectPermission, Token
20
16
 
21
17
  from . import serializers
22
18
 
23
-
24
- class UsersRootView(APIRootView):
25
- """
26
- Users API root view
27
- """
28
-
29
- def get_view_name(self):
30
- return "Users"
31
-
32
-
33
19
  #
34
20
  # Users and groups
35
21
  #
@@ -40,40 +26,6 @@ class UserViewSet(ModelViewSet):
40
26
  serializer_class = serializers.UserSerializer
41
27
  filterset_class = filters.UserFilterSet
42
28
 
43
- @action(methods=["GET"], detail=False, url_path="my-profile")
44
- def my_profile(self, request):
45
- serializer = self.serializer_class(instance=request.user, context={"request": request})
46
- return Response(serializer.data)
47
-
48
- @method_decorator(ensure_csrf_cookie)
49
- @action(methods=["GET"], detail=False, permission_classes=[AllowAny])
50
- def session(self, request):
51
- from django.conf import settings as django_settings
52
- from django.urls import reverse
53
- from social_django.context_processors import backends
54
-
55
- from nautobot.core.settings_funcs import sso_auth_enabled
56
-
57
- serializer = self.serializer_class(instance=request.user, context={"request": request})
58
-
59
- _backends = []
60
- sso_enabled = sso_auth_enabled(django_settings.AUTHENTICATION_BACKENDS)
61
-
62
- social_auth_backends = backends(request)["backends"]
63
- if sso_enabled:
64
- for backend in social_auth_backends["backends"]:
65
- _backends.append(reverse("social:begin", kwargs={"backend": backend}))
66
-
67
- resp = {
68
- "user": serializer.data,
69
- "logged_in": request.user.is_authenticated,
70
- "sso_enabled": sso_enabled,
71
- "sso_user": (len(social_auth_backends["associated"]) > 0),
72
- "backends": _backends,
73
- }
74
-
75
- return Response(resp)
76
-
77
29
 
78
30
  @extend_schema_view(
79
31
  bulk_destroy=extend_schema(request=BulkOperationIntegerIDSerializer(many=True)),
@@ -101,21 +53,6 @@ class TokenViewSet(ModelViewSet):
101
53
  classes = super().authentication_classes
102
54
  return [*classes, BasicAuthentication]
103
55
 
104
- # TODO(timizuo): Move authenticate and logout to its own view;
105
- # as it is not proper to be on this.
106
- @action(methods=["POST"], detail=False, permission_classes=[AllowAny])
107
- def authenticate(self, request):
108
- serializer = serializers.UserLoginSerializer(data=request.data, context=self.get_serializer_context())
109
- serializer.is_valid(raise_exception=True)
110
- user = serializer.validated_data["user"]
111
- login(request, user=user)
112
- return Response(status=200)
113
-
114
- @action(methods=["GET"], detail=False)
115
- def logout(self, request):
116
- logout(request)
117
- return Response(status=200)
118
-
119
56
  def get_queryset(self):
120
57
  """
121
58
  Limit users to their own Tokens.
nautobot/users/views.py CHANGED
@@ -7,7 +7,6 @@ from django.contrib.auth import (
7
7
  logout as auth_logout,
8
8
  update_session_auth_hash,
9
9
  )
10
- from django.contrib.auth.mixins import LoginRequiredMixin
11
10
  from django.http import HttpResponseForbidden, HttpResponseRedirect
12
11
  from django.shortcuts import get_object_or_404, redirect, render
13
12
  from django.urls import reverse
@@ -18,6 +17,7 @@ from django.views.decorators.debug import sensitive_post_parameters
18
17
  from django.views.generic import View
19
18
 
20
19
  from nautobot.core.forms import ConfirmationForm
20
+ from nautobot.core.views.generic import GenericView
21
21
 
22
22
  from .forms import AdvancedProfileSettingsForm, LoginForm, PasswordChangeForm, TokenForm
23
23
  from .models import Token
@@ -118,7 +118,7 @@ def is_django_auth_user(request):
118
118
  return request.session.get(BACKEND_SESSION_KEY, None) == "nautobot.core.authentication.ObjectPermissionBackend"
119
119
 
120
120
 
121
- class ProfileView(LoginRequiredMixin, View):
121
+ class ProfileView(GenericView):
122
122
  template_name = "users/profile.html"
123
123
 
124
124
  def get(self, request):
@@ -132,7 +132,7 @@ class ProfileView(LoginRequiredMixin, View):
132
132
  )
133
133
 
134
134
 
135
- class UserConfigView(LoginRequiredMixin, View):
135
+ class UserConfigView(GenericView):
136
136
  template_name = "users/preferences.html"
137
137
 
138
138
  def get(self, request):
@@ -160,7 +160,7 @@ class UserConfigView(LoginRequiredMixin, View):
160
160
  return redirect("user:preferences")
161
161
 
162
162
 
163
- class ChangePasswordView(LoginRequiredMixin, View):
163
+ class ChangePasswordView(GenericView):
164
164
  template_name = "users/change_password.html"
165
165
 
166
166
  RESTRICTED_NOTICE = "Remotely authenticated user credentials cannot be changed within Nautobot."
@@ -218,7 +218,7 @@ class ChangePasswordView(LoginRequiredMixin, View):
218
218
  #
219
219
 
220
220
 
221
- class TokenListView(LoginRequiredMixin, View):
221
+ class TokenListView(GenericView):
222
222
  def get(self, request):
223
223
  tokens = Token.objects.filter(user=request.user)
224
224
 
@@ -233,7 +233,7 @@ class TokenListView(LoginRequiredMixin, View):
233
233
  )
234
234
 
235
235
 
236
- class TokenEditView(LoginRequiredMixin, View):
236
+ class TokenEditView(GenericView):
237
237
  def get(self, request, pk=None):
238
238
  if pk is not None:
239
239
  if not request.user.has_perm("users.change_token"):
@@ -292,7 +292,7 @@ class TokenEditView(LoginRequiredMixin, View):
292
292
  )
293
293
 
294
294
 
295
- class TokenDeleteView(LoginRequiredMixin, View):
295
+ class TokenDeleteView(GenericView):
296
296
  def get(self, request, pk):
297
297
  token = get_object_or_404(Token.objects.filter(user=request.user), pk=pk)
298
298
  initial_data = {
@@ -336,7 +336,7 @@ class TokenDeleteView(LoginRequiredMixin, View):
336
336
  #
337
337
 
338
338
 
339
- class AdvancedProfileSettingsEditView(LoginRequiredMixin, View):
339
+ class AdvancedProfileSettingsEditView(GenericView):
340
340
  template_name = "users/advanced_settings_edit.html"
341
341
 
342
342
  def get(self, request):
@@ -2,8 +2,7 @@ from nautobot.core.api.routers import OrderedDefaultRouter
2
2
 
3
3
  from . import views
4
4
 
5
- router = OrderedDefaultRouter()
6
- router.APIRootView = views.VirtualizationRootView
5
+ router = OrderedDefaultRouter(view_name="Virtualization")
7
6
 
8
7
  # Clusters
9
8
  router.register("cluster-types", views.ClusterTypeViewSet)
@@ -1,5 +1,3 @@
1
- from rest_framework.routers import APIRootView
2
-
3
1
  from nautobot.core.models.querysets import count_related
4
2
  from nautobot.dcim.models import Device
5
3
  from nautobot.extras.api.views import (
@@ -19,16 +17,6 @@ from nautobot.virtualization.models import (
19
17
 
20
18
  from . import serializers
21
19
 
22
-
23
- class VirtualizationRootView(APIRootView):
24
- """
25
- Virtualization API root view
26
- """
27
-
28
- def get_view_name(self):
29
- return "Virtualization"
30
-
31
-
32
20
  #
33
21
  # Clusters
34
22
  #
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nautobot
3
- Version: 2.1.8
3
+ Version: 2.1.9
4
4
  Summary: Source of truth and network automation platform.
5
5
  Home-page: https://nautobot.com
6
6
  License: Apache-2.0
@@ -22,7 +22,7 @@ Provides-Extra: mysql
22
22
  Provides-Extra: napalm
23
23
  Provides-Extra: remote-storage
24
24
  Provides-Extra: sso
25
- Requires-Dist: Django (>=3.2.24,<3.3.0)
25
+ Requires-Dist: Django (>=3.2.25,<3.3.0)
26
26
  Requires-Dist: GitPython (>=3.1.41,<3.2.0)
27
27
  Requires-Dist: Jinja2 (>=3.1.3,<3.2.0)
28
28
  Requires-Dist: Markdown (>=3.3.7,<3.4.0)