nautobot 2.3.15__py3-none-any.whl → 2.3.16__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 (106) hide show
  1. nautobot/circuits/views.py +3 -3
  2. nautobot/cloud/models.py +1 -1
  3. nautobot/core/api/fields.py +5 -5
  4. nautobot/core/api/serializers.py +9 -9
  5. nautobot/core/api/views.py +3 -2
  6. nautobot/core/apps/__init__.py +5 -2
  7. nautobot/core/celery/schedulers.py +1 -1
  8. nautobot/core/filters.py +19 -16
  9. nautobot/core/forms/fields.py +5 -5
  10. nautobot/core/graphql/types.py +1 -1
  11. nautobot/core/jobs/__init__.py +4 -4
  12. nautobot/core/jobs/cleanup.py +1 -1
  13. nautobot/core/jobs/groups.py +1 -1
  14. nautobot/core/management/commands/validate_models.py +1 -1
  15. nautobot/core/models/__init__.py +1 -1
  16. nautobot/core/models/query_functions.py +2 -2
  17. nautobot/core/models/tree_queries.py +2 -2
  18. nautobot/core/tables.py +5 -5
  19. nautobot/core/testing/filters.py +7 -3
  20. nautobot/core/testing/views.py +5 -0
  21. nautobot/core/tests/runner.py +1 -1
  22. nautobot/core/views/generic.py +51 -43
  23. nautobot/core/views/mixins.py +21 -11
  24. nautobot/dcim/api/serializers.py +48 -48
  25. nautobot/dcim/forms.py +2 -0
  26. nautobot/dcim/graphql/types.py +2 -2
  27. nautobot/dcim/models/device_component_templates.py +2 -2
  28. nautobot/dcim/models/device_components.py +22 -20
  29. nautobot/dcim/models/devices.py +1 -1
  30. nautobot/dcim/models/locations.py +3 -3
  31. nautobot/dcim/models/power.py +6 -5
  32. nautobot/dcim/models/racks.py +4 -4
  33. nautobot/dcim/tables/__init__.py +3 -3
  34. nautobot/dcim/tables/devicetypes.py +2 -2
  35. nautobot/dcim/tests/test_filters.py +1 -0
  36. nautobot/dcim/tests/test_graphql.py +52 -0
  37. nautobot/dcim/tests/test_models.py +4 -1
  38. nautobot/dcim/views.py +1 -1
  39. nautobot/extras/api/customfields.py +2 -2
  40. nautobot/extras/api/serializers.py +72 -69
  41. nautobot/extras/api/views.py +4 -4
  42. nautobot/extras/health_checks.py +1 -2
  43. nautobot/extras/jobs.py +5 -5
  44. nautobot/extras/managers.py +3 -1
  45. nautobot/extras/migrations/0018_joblog_data_migration.py +7 -9
  46. nautobot/extras/models/groups.py +13 -9
  47. nautobot/extras/models/jobs.py +4 -4
  48. nautobot/extras/models/models.py +2 -2
  49. nautobot/extras/plugins/views.py +1 -1
  50. nautobot/extras/tables.py +5 -5
  51. nautobot/extras/test_jobs/api_test_job.py +1 -1
  52. nautobot/extras/test_jobs/atomic_transaction.py +2 -2
  53. nautobot/extras/test_jobs/dry_run.py +1 -1
  54. nautobot/extras/test_jobs/fail.py +5 -5
  55. nautobot/extras/test_jobs/file_output.py +1 -1
  56. nautobot/extras/test_jobs/file_upload_fail.py +1 -1
  57. nautobot/extras/test_jobs/file_upload_pass.py +1 -1
  58. nautobot/extras/test_jobs/ipaddress_vars.py +3 -1
  59. nautobot/extras/test_jobs/jobs_module/jobs_submodule/jobs.py +1 -1
  60. nautobot/extras/test_jobs/location_with_custom_field.py +1 -1
  61. nautobot/extras/test_jobs/log_redaction.py +1 -1
  62. nautobot/extras/test_jobs/log_skip_db_logging.py +1 -1
  63. nautobot/extras/test_jobs/modify_db.py +1 -1
  64. nautobot/extras/test_jobs/object_var_optional.py +1 -1
  65. nautobot/extras/test_jobs/object_var_required.py +1 -1
  66. nautobot/extras/test_jobs/object_vars.py +1 -1
  67. nautobot/extras/test_jobs/pass.py +3 -3
  68. nautobot/extras/test_jobs/profiling.py +1 -1
  69. nautobot/extras/test_jobs/relative_import.py +3 -3
  70. nautobot/extras/test_jobs/soft_time_limit_greater_than_time_limit.py +1 -1
  71. nautobot/extras/test_jobs/task_queues.py +1 -1
  72. nautobot/extras/tests/test_api.py +13 -13
  73. nautobot/extras/tests/test_customfields.py +1 -1
  74. nautobot/extras/tests/test_datasources.py +2 -1
  75. nautobot/extras/tests/test_dynamicgroups.py +1 -1
  76. nautobot/extras/tests/test_filters.py +6 -6
  77. nautobot/extras/tests/test_jobs.py +11 -11
  78. nautobot/extras/tests/test_models.py +10 -10
  79. nautobot/extras/tests/test_relationships.py +1 -1
  80. nautobot/extras/tests/test_views.py +16 -16
  81. nautobot/extras/views.py +20 -16
  82. nautobot/ipam/api/fields.py +3 -3
  83. nautobot/ipam/api/serializers.py +33 -33
  84. nautobot/ipam/api/views.py +37 -61
  85. nautobot/ipam/querysets.py +2 -2
  86. nautobot/ipam/tests/test_api.py +12 -1
  87. nautobot/ipam/tests/test_forms.py +51 -47
  88. nautobot/ipam/tests/test_migrations.py +30 -30
  89. nautobot/ipam/tests/test_querysets.py +14 -0
  90. nautobot/project-static/docs/code-reference/nautobot/apps/forms.html +1 -1
  91. nautobot/project-static/docs/code-reference/nautobot/apps/testing.html +1 -1
  92. nautobot/project-static/docs/code-reference/nautobot/apps/views.html +2 -2
  93. nautobot/project-static/docs/release-notes/version-2.3.html +181 -99
  94. nautobot/project-static/docs/search/search_index.json +1 -1
  95. nautobot/project-static/docs/sitemap.xml +270 -270
  96. nautobot/project-static/docs/sitemap.xml.gz +0 -0
  97. nautobot/users/admin.py +1 -1
  98. nautobot/users/api/serializers.py +4 -4
  99. nautobot/users/api/views.py +1 -1
  100. nautobot/virtualization/api/serializers.py +4 -4
  101. {nautobot-2.3.15.dist-info → nautobot-2.3.16.dist-info}/METADATA +1 -1
  102. {nautobot-2.3.15.dist-info → nautobot-2.3.16.dist-info}/RECORD +106 -106
  103. {nautobot-2.3.15.dist-info → nautobot-2.3.16.dist-info}/WHEEL +1 -1
  104. {nautobot-2.3.15.dist-info → nautobot-2.3.16.dist-info}/LICENSE.txt +0 -0
  105. {nautobot-2.3.15.dist-info → nautobot-2.3.16.dist-info}/NOTICE +0 -0
  106. {nautobot-2.3.15.dist-info → nautobot-2.3.16.dist-info}/entry_points.txt +0 -0
Binary file
nautobot/users/admin.py CHANGED
@@ -44,7 +44,7 @@ class ObjectPermissionInline(admin.TabularInline):
44
44
 
45
45
 
46
46
  class GroupObjectPermissionInline(ObjectPermissionInline):
47
- model = AdminGroup.object_permissions.through
47
+ model = AdminGroup.object_permissions.through # pylint: disable=no-member
48
48
 
49
49
 
50
50
  class UserObjectPermissionInline(ObjectPermissionInline):
@@ -18,13 +18,13 @@ class UserSerializer(ValidatedModelSerializer):
18
18
  exclude = ["user_permissions"]
19
19
  extra_kwargs = {"password": {"write_only": True, "required": False, "allow_null": True}}
20
20
 
21
- def validate(self, data):
21
+ def validate(self, attrs):
22
22
  """Handle omission of a password by setting it to the unusable None value."""
23
23
  mock_password = False
24
- if "password" not in data and not self.partial:
25
- data["password"] = make_password(None)
24
+ if "password" not in attrs and not self.partial:
25
+ attrs["password"] = make_password(None)
26
26
  mock_password = True
27
- validated_data = super().validate(data)
27
+ validated_data = super().validate(attrs)
28
28
  if mock_password:
29
29
  validated_data["password"] = None
30
30
  return validated_data
@@ -43,7 +43,7 @@ class GroupViewSet(ModelViewSet):
43
43
 
44
44
 
45
45
  class TokenViewSet(ModelViewSet):
46
- queryset = RestrictedQuerySet(model=Token).select_related("user")
46
+ queryset = RestrictedQuerySet(model=Token).select_related("user") # pylint: disable=not-callable # no idea why?
47
47
  serializer_class = serializers.TokenSerializer
48
48
  filterset_class = filters.TokenFilterSet
49
49
 
@@ -87,10 +87,10 @@ class VMInterfaceSerializer(
87
87
  model = VMInterface
88
88
  fields = "__all__"
89
89
 
90
- def validate(self, data):
90
+ def validate(self, attrs):
91
91
  # Validate many-to-many VLAN assignments
92
- virtual_machine = self.instance.virtual_machine if self.instance else data.get("virtual_machine")
93
- for vlan in data.get("tagged_vlans", []):
92
+ virtual_machine = self.instance.virtual_machine if self.instance else attrs.get("virtual_machine")
93
+ for vlan in attrs.get("tagged_vlans", []):
94
94
  if vlan.location not in [virtual_machine.location, None]:
95
95
  raise serializers.ValidationError(
96
96
  {
@@ -99,4 +99,4 @@ class VMInterfaceSerializer(
99
99
  }
100
100
  )
101
101
 
102
- return super().validate(data)
102
+ return super().validate(attrs)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nautobot
3
- Version: 2.3.15
3
+ Version: 2.3.16
4
4
  Summary: Source of truth and network automation platform.
5
5
  Home-page: https://nautobot.com
6
6
  License: Apache-2.0