Skip to content

Commit 8d35acb

Browse files
committed
feat(form): Adding new Sources to the ACLExtendedRule creation form
1 parent d290ae1 commit 8d35acb

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

netbox_acls/forms/models.py

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,31 @@ class ACLExtendedRuleForm(NetBoxModelForm):
602602
help_text=help_text_acl_rule_logic,
603603
label="Source Prefix",
604604
)
605+
source_iprange = DynamicModelChoiceField(
606+
queryset=IPRange.objects.all(),
607+
required=False,
608+
help_text=help_text_acl_rule_logic,
609+
label="Source IP-Range",
610+
)
611+
source_ipaddress = DynamicModelChoiceField(
612+
queryset=IPAddress.objects.all(),
613+
required=False,
614+
help_text=help_text_acl_rule_logic,
615+
label="Source IP-Address",
616+
)
617+
source_aggregate = DynamicModelChoiceField(
618+
queryset=Aggregate.objects.all(),
619+
required=False,
620+
help_text=help_text_acl_rule_logic,
621+
label="Source Aggregate",
622+
)
623+
source_service = DynamicModelChoiceField(
624+
queryset=Service.objects.all(),
625+
required=False,
626+
help_text=help_text_acl_rule_logic,
627+
label="Source Service",
628+
)
629+
605630
destination_prefix = DynamicModelChoiceField(
606631
queryset=Prefix.objects.all(),
607632
required=False,
@@ -619,9 +644,16 @@ class Meta:
619644
"index",
620645
"action",
621646
"remark",
647+
622648
"source_prefix",
623-
"source_ports",
649+
"source_iprange",
650+
"source_ipaddress",
651+
"source_aggregate",
652+
"source_service",
653+
624654
"destination_prefix",
655+
656+
"source_ports",
625657
"destination_ports",
626658
"protocol",
627659
"tags",

0 commit comments

Comments
 (0)