Skip to content

Commit c39951c

Browse files
committed
refactor(views): Replace ACLInterfaceAssignment with ACLAssignment
Renames `ACLInterfaceAssignmentViewSet` to `ACLAssignmentViewSet` and updates associated classes, serializers, and queryset references. Aligns with the unified `ACLAssignment` model for improved consistency and maintainability.
1 parent 9bd4f1f commit c39951c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

netbox_acls/api/views.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
from .serializers import (
1212
AccessListSerializer,
1313
ACLExtendedRuleSerializer,
14-
ACLInterfaceAssignmentSerializer,
14+
ACLAssignmentSerializer,
1515
ACLStandardRuleSerializer,
1616
)
1717

1818
__all__ = [
1919
"AccessListViewSet",
2020
"ACLStandardRuleViewSet",
21-
"ACLInterfaceAssignmentViewSet",
21+
"ACLAssignmentViewSet",
2222
"ACLExtendedRuleViewSet",
2323
]
2424

2525

2626
class AccessListViewSet(NetBoxModelViewSet):
2727
"""
28-
Defines the view set for the django AccessList model & associates it to a view.
28+
Defines the view set for the django AccessList model and associates it with a view.
2929
"""
3030

3131
queryset = (
@@ -39,22 +39,22 @@ class AccessListViewSet(NetBoxModelViewSet):
3939
filterset_class = filtersets.AccessListFilterSet
4040

4141

42-
class ACLInterfaceAssignmentViewSet(NetBoxModelViewSet):
42+
class ACLAssignmentViewSet(NetBoxModelViewSet):
4343
"""
44-
Defines the view set for the django ACLInterfaceAssignment model & associates it to a view.
44+
Defines the view set for the django ACLAssignment model and associates it with a view.
4545
"""
4646

47-
queryset = models.ACLInterfaceAssignment.objects.prefetch_related(
47+
queryset = models.ACLAssignment.objects.prefetch_related(
4848
"access_list",
4949
"tags",
5050
)
51-
serializer_class = ACLInterfaceAssignmentSerializer
52-
filterset_class = filtersets.ACLInterfaceAssignmentFilterSet
51+
serializer_class = ACLAssignmentSerializer
52+
filterset_class = filtersets.ACLAssignmentFilterSet
5353

5454

5555
class ACLStandardRuleViewSet(NetBoxModelViewSet):
5656
"""
57-
Defines the view set for the django ACLStandardRule model & associates it to a view.
57+
Defines the view set for the django ACLStandardRule model and associates it with a view.
5858
"""
5959

6060
queryset = models.ACLStandardRule.objects.prefetch_related(
@@ -68,7 +68,7 @@ class ACLStandardRuleViewSet(NetBoxModelViewSet):
6868

6969
class ACLExtendedRuleViewSet(NetBoxModelViewSet):
7070
"""
71-
Defines the view set for the django ACLExtendedRule model & associates it to a view.
71+
Defines the view set for the django ACLExtendedRule model and associates it with a view.
7272
"""
7373

7474
queryset = models.ACLExtendedRule.objects.prefetch_related(

0 commit comments

Comments
 (0)