From f1a6f72249436d9cd675db485a08f7059d5df2ef Mon Sep 17 00:00:00 2001 From: Doston Toirov Date: Mon, 16 Dec 2024 14:22:49 -0500 Subject: [PATCH] Remove obsolete audit rules filter classes --- src/aap_eda/api/filters/__init__.py | 10 +------- src/aap_eda/api/filters/rulebook.py | 36 ----------------------------- 2 files changed, 1 insertion(+), 45 deletions(-) diff --git a/src/aap_eda/api/filters/__init__.py b/src/aap_eda/api/filters/__init__.py index aa0445f3b..d881c198f 100644 --- a/src/aap_eda/api/filters/__init__.py +++ b/src/aap_eda/api/filters/__init__.py @@ -23,12 +23,7 @@ from .event_stream import EventStreamFilter from .organization import OrganizationFilter from .project import ProjectFilter -from .rulebook import ( - AuditRuleActionFilter, - AuditRuleEventFilter, - AuditRuleFilter, - RulebookFilter, -) +from .rulebook import RulebookFilter from .team import OrganizationTeamFilter, TeamFilter from .user import UserFilter @@ -37,9 +32,6 @@ "ProjectFilter", # rulebook "RulebookFilter", - "AuditRuleFilter", - "AuditRuleActionFilter", - "AuditRuleEventFilter", # credential type "CredentialTypeFilter", "EdaCredentialFilter", diff --git a/src/aap_eda/api/filters/rulebook.py b/src/aap_eda/api/filters/rulebook.py index 62a16717a..f721a06b8 100644 --- a/src/aap_eda/api/filters/rulebook.py +++ b/src/aap_eda/api/filters/rulebook.py @@ -33,39 +33,3 @@ class RulebookFilter(django_filters.FilterSet): class Meta: model = models.Rulebook fields = ["name", "project_id"] - - -class AuditRuleFilter(django_filters.FilterSet): - name = django_filters.CharFilter( - field_name="name", - lookup_expr="istartswith", - label="Filter by rule audit name.", - ) - - class Meta: - model = models.AuditRule - fields = ["name"] - - -class AuditRuleActionFilter(django_filters.FilterSet): - name = django_filters.CharFilter( - field_name="name", - lookup_expr="istartswith", - label="Filter by rule audit action name.", - ) - - class Meta: - model = models.AuditAction - fields = ["name"] - - -class AuditRuleEventFilter(django_filters.FilterSet): - source_name = django_filters.CharFilter( - field_name="source_name", - lookup_expr="istartswith", - label="Filter by rule audit event source name.", - ) - - class Meta: - model = models.AuditEvent - fields = ["source_name"]