@@ -198,22 +198,17 @@ class Meta(ACLRule.Meta):
198
198
class ACLExtendedRule (ACLRule ):
199
199
"""
200
200
Inherits ACLRule.
201
- Add ACLExtendedRule specific fields: source_ports, desintation_prefix , destination_ports, and protocol
201
+ Add ACLExtendedRule specific fields: destination, source_ports , destination_ports and protocol
202
202
"""
203
203
204
204
access_list = models .ForeignKey (
205
205
on_delete = models .CASCADE ,
206
206
to = AccessList ,
207
207
verbose_name = "Extended Access List" ,
208
- limit_choices_to = {"type" : "extended" },
208
+ limit_choices_to = {"type" : ACLTypeChoices . TYPE_EXTENDED },
209
209
related_name = "aclextendedrules" ,
210
210
)
211
- source_ports = ArrayField (
212
- base_field = models .PositiveIntegerField (),
213
- blank = True ,
214
- null = True ,
215
- verbose_name = "Soure Ports" ,
216
- )
211
+
217
212
destination_prefix = models .ForeignKey (
218
213
blank = True ,
219
214
null = True ,
@@ -254,6 +249,13 @@ class ACLExtendedRule(ACLRule):
254
249
to = Service ,
255
250
verbose_name = "Destination Service" ,
256
251
)
252
+
253
+ source_ports = ArrayField (
254
+ base_field = models .PositiveIntegerField (),
255
+ blank = True ,
256
+ null = True ,
257
+ verbose_name = "Source Ports" ,
258
+ )
257
259
destination_ports = ArrayField (
258
260
base_field = models .PositiveIntegerField (),
259
261
blank = True ,
0 commit comments