Skip to content

Commit d9704a0

Browse files
committed
feat(form): Adding new Sources to the ACLExtendedRule creation form
1 parent 1eb5a00 commit d9704a0

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
@@ -585,6 +585,31 @@ class ACLExtendedRuleForm(NetBoxModelForm):
585585
help_text=help_text_acl_rule_logic,
586586
label="Source Prefix",
587587
)
588+
source_iprange = DynamicModelChoiceField(
589+
queryset=IPRange.objects.all(),
590+
required=False,
591+
help_text=help_text_acl_rule_logic,
592+
label="Source IP-Range",
593+
)
594+
source_ipaddress = DynamicModelChoiceField(
595+
queryset=IPAddress.objects.all(),
596+
required=False,
597+
help_text=help_text_acl_rule_logic,
598+
label="Source IP-Address",
599+
)
600+
source_aggregate = DynamicModelChoiceField(
601+
queryset=Aggregate.objects.all(),
602+
required=False,
603+
help_text=help_text_acl_rule_logic,
604+
label="Source Aggregate",
605+
)
606+
source_service = DynamicModelChoiceField(
607+
queryset=Service.objects.all(),
608+
required=False,
609+
help_text=help_text_acl_rule_logic,
610+
label="Source Service",
611+
)
612+
588613
destination_prefix = DynamicModelChoiceField(
589614
queryset=Prefix.objects.all(),
590615
required=False,
@@ -615,9 +640,16 @@ class Meta:
615640
"index",
616641
"action",
617642
"remark",
643+
618644
"source_prefix",
619-
"source_ports",
645+
"source_iprange",
646+
"source_ipaddress",
647+
"source_aggregate",
648+
"source_service",
649+
620650
"destination_prefix",
651+
652+
"source_ports",
621653
"destination_ports",
622654
"protocol",
623655
"tags",

0 commit comments

Comments
 (0)