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.
- nautobot/circuits/views.py +3 -3
- nautobot/cloud/models.py +1 -1
- nautobot/core/api/fields.py +5 -5
- nautobot/core/api/serializers.py +9 -9
- nautobot/core/api/views.py +3 -2
- nautobot/core/apps/__init__.py +5 -2
- nautobot/core/celery/schedulers.py +1 -1
- nautobot/core/filters.py +19 -16
- nautobot/core/forms/fields.py +5 -5
- nautobot/core/graphql/types.py +1 -1
- nautobot/core/jobs/__init__.py +4 -4
- nautobot/core/jobs/cleanup.py +1 -1
- nautobot/core/jobs/groups.py +1 -1
- nautobot/core/management/commands/validate_models.py +1 -1
- nautobot/core/models/__init__.py +1 -1
- nautobot/core/models/query_functions.py +2 -2
- nautobot/core/models/tree_queries.py +2 -2
- nautobot/core/tables.py +5 -5
- nautobot/core/testing/filters.py +7 -3
- nautobot/core/testing/views.py +5 -0
- nautobot/core/tests/runner.py +1 -1
- nautobot/core/views/generic.py +51 -43
- nautobot/core/views/mixins.py +21 -11
- nautobot/dcim/api/serializers.py +48 -48
- nautobot/dcim/forms.py +2 -0
- nautobot/dcim/graphql/types.py +2 -2
- nautobot/dcim/models/device_component_templates.py +2 -2
- nautobot/dcim/models/device_components.py +22 -20
- nautobot/dcim/models/devices.py +1 -1
- nautobot/dcim/models/locations.py +3 -3
- nautobot/dcim/models/power.py +6 -5
- nautobot/dcim/models/racks.py +4 -4
- nautobot/dcim/tables/__init__.py +3 -3
- nautobot/dcim/tables/devicetypes.py +2 -2
- nautobot/dcim/tests/test_filters.py +1 -0
- nautobot/dcim/tests/test_graphql.py +52 -0
- nautobot/dcim/tests/test_models.py +4 -1
- nautobot/dcim/views.py +1 -1
- nautobot/extras/api/customfields.py +2 -2
- nautobot/extras/api/serializers.py +72 -69
- nautobot/extras/api/views.py +4 -4
- nautobot/extras/health_checks.py +1 -2
- nautobot/extras/jobs.py +5 -5
- nautobot/extras/managers.py +3 -1
- nautobot/extras/migrations/0018_joblog_data_migration.py +7 -9
- nautobot/extras/models/groups.py +13 -9
- nautobot/extras/models/jobs.py +4 -4
- nautobot/extras/models/models.py +2 -2
- nautobot/extras/plugins/views.py +1 -1
- nautobot/extras/tables.py +5 -5
- nautobot/extras/test_jobs/api_test_job.py +1 -1
- nautobot/extras/test_jobs/atomic_transaction.py +2 -2
- nautobot/extras/test_jobs/dry_run.py +1 -1
- nautobot/extras/test_jobs/fail.py +5 -5
- nautobot/extras/test_jobs/file_output.py +1 -1
- nautobot/extras/test_jobs/file_upload_fail.py +1 -1
- nautobot/extras/test_jobs/file_upload_pass.py +1 -1
- nautobot/extras/test_jobs/ipaddress_vars.py +3 -1
- nautobot/extras/test_jobs/jobs_module/jobs_submodule/jobs.py +1 -1
- nautobot/extras/test_jobs/location_with_custom_field.py +1 -1
- nautobot/extras/test_jobs/log_redaction.py +1 -1
- nautobot/extras/test_jobs/log_skip_db_logging.py +1 -1
- nautobot/extras/test_jobs/modify_db.py +1 -1
- nautobot/extras/test_jobs/object_var_optional.py +1 -1
- nautobot/extras/test_jobs/object_var_required.py +1 -1
- nautobot/extras/test_jobs/object_vars.py +1 -1
- nautobot/extras/test_jobs/pass.py +3 -3
- nautobot/extras/test_jobs/profiling.py +1 -1
- nautobot/extras/test_jobs/relative_import.py +3 -3
- nautobot/extras/test_jobs/soft_time_limit_greater_than_time_limit.py +1 -1
- nautobot/extras/test_jobs/task_queues.py +1 -1
- nautobot/extras/tests/test_api.py +13 -13
- nautobot/extras/tests/test_customfields.py +1 -1
- nautobot/extras/tests/test_datasources.py +2 -1
- nautobot/extras/tests/test_dynamicgroups.py +1 -1
- nautobot/extras/tests/test_filters.py +6 -6
- nautobot/extras/tests/test_jobs.py +11 -11
- nautobot/extras/tests/test_models.py +10 -10
- nautobot/extras/tests/test_relationships.py +1 -1
- nautobot/extras/tests/test_views.py +16 -16
- nautobot/extras/views.py +20 -16
- nautobot/ipam/api/fields.py +3 -3
- nautobot/ipam/api/serializers.py +33 -33
- nautobot/ipam/api/views.py +37 -61
- nautobot/ipam/querysets.py +2 -2
- nautobot/ipam/tests/test_api.py +12 -1
- nautobot/ipam/tests/test_forms.py +51 -47
- nautobot/ipam/tests/test_migrations.py +30 -30
- nautobot/ipam/tests/test_querysets.py +14 -0
- nautobot/project-static/docs/code-reference/nautobot/apps/forms.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/testing.html +1 -1
- nautobot/project-static/docs/code-reference/nautobot/apps/views.html +2 -2
- nautobot/project-static/docs/release-notes/version-2.3.html +181 -99
- nautobot/project-static/docs/search/search_index.json +1 -1
- nautobot/project-static/docs/sitemap.xml +270 -270
- nautobot/project-static/docs/sitemap.xml.gz +0 -0
- nautobot/users/admin.py +1 -1
- nautobot/users/api/serializers.py +4 -4
- nautobot/users/api/views.py +1 -1
- nautobot/virtualization/api/serializers.py +4 -4
- {nautobot-2.3.15.dist-info → nautobot-2.3.16.dist-info}/METADATA +1 -1
- {nautobot-2.3.15.dist-info → nautobot-2.3.16.dist-info}/RECORD +106 -106
- {nautobot-2.3.15.dist-info → nautobot-2.3.16.dist-info}/WHEEL +1 -1
- {nautobot-2.3.15.dist-info → nautobot-2.3.16.dist-info}/LICENSE.txt +0 -0
- {nautobot-2.3.15.dist-info → nautobot-2.3.16.dist-info}/NOTICE +0 -0
- {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,
|
|
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
|
|
25
|
-
|
|
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(
|
|
27
|
+
validated_data = super().validate(attrs)
|
|
28
28
|
if mock_password:
|
|
29
29
|
validated_data["password"] = None
|
|
30
30
|
return validated_data
|
nautobot/users/api/views.py
CHANGED
|
@@ -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,
|
|
90
|
+
def validate(self, attrs):
|
|
91
91
|
# Validate many-to-many VLAN assignments
|
|
92
|
-
virtual_machine = self.instance.virtual_machine if self.instance else
|
|
93
|
-
for vlan in
|
|
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(
|
|
102
|
+
return super().validate(attrs)
|