Removal of deprecated ACL table constants.
[netvirt.git] / aclservice / impl / src / test / java / org / opendaylight / netvirt / aclservice / tests / FlowEntryObjectsStateful.xtend
1 /*
2  * Copyright (c) 2016 Red Hat, Inc. and others. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.netvirt.aclservice.tests
9
10 import org.opendaylight.genius.mdsalutil.MetaDataUtil
11 import org.opendaylight.genius.mdsalutil.NwConstants
12 import org.opendaylight.genius.mdsalutil.actions.ActionDrop
13 import org.opendaylight.genius.mdsalutil.actions.ActionNxConntrack
14 import org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit
15 import org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions
16 import org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable
17 import org.opendaylight.genius.mdsalutil.matches.MatchArpSha
18 import org.opendaylight.genius.mdsalutil.matches.MatchArpSpa
19 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetDestination
20 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetSource
21 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetType
22 import org.opendaylight.genius.mdsalutil.matches.MatchIcmpv4
23 import org.opendaylight.genius.mdsalutil.matches.MatchIcmpv6
24 import org.opendaylight.genius.mdsalutil.matches.MatchIpProtocol
25 import org.opendaylight.genius.mdsalutil.matches.MatchIpv4Destination
26 import org.opendaylight.genius.mdsalutil.matches.MatchIpv4Source
27 import org.opendaylight.genius.mdsalutil.matches.MatchMetadata
28 import org.opendaylight.genius.mdsalutil.matches.MatchUdpDestinationPort
29 import org.opendaylight.genius.mdsalutil.matches.MatchUdpSourcePort
30 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchCtState
31 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchRegister
32 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchTcpDestinationPort
33 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchUdpDestinationPort
34 import org.opendaylight.genius.mdsalutil.FlowEntityBuilder
35 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix
36 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress
37 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg6
38
39 import static extension org.opendaylight.mdsal.binding.testutils.XtendBuilderExtensions.operator_doubleGreaterThan
40 import org.opendaylight.netvirt.aclservice.utils.AclConstants
41 import java.util.Collections
42
43 import org.opendaylight.genius.mdsalutil.instructions.InstructionWriteMetadata
44
45
46 class FlowEntryObjectsStateful extends FlowEntryObjectsBase {
47
48     protected def etherFlows() {
49         fixedIngressFlowsPort1
50         + fixedConntrackIngressFlowsPort1
51         + fixedEgressL2BroadcastFlowsPort1
52         + fixedIngressL3BroadcastFlows
53         + fixedEgressFlowsPort1
54         + fixedConntrackEgressFlowsPort1
55         + etherEgressFlowsPort1
56         + fixedIngressFlowsPort2
57         + fixedConntrackIngressFlowsPort2
58         + etherIngressFlowsPort2
59         + etherIngressFlowsPort2
60         + fixedEgressL2BroadcastFlowsPort2
61         + fixedIngressL3BroadcastFlows
62         + fixedEgressFlowsPort2
63         + fixedConntrackEgressFlowsPort2
64         + etheregressFlowPort2
65         + remoteEgressFlowsPort1
66         + remoteEgressFlowsPort2
67         + remoteEgressFlowsPort1
68         + remoteEgressFlowsPort2
69         + ingressCommitNonConntrack1
70         + ingressCommitNonConntrack1
71         + egressCommitNonConntrack1
72         + egressCommitNonConntrack1
73         + ingressCommitConntrack1
74         + ingressCommitConntrack1
75         + egressCommitConntrack1
76         + egressCommitConntrack1
77         + ingressfixedAclMissDrop1
78         + ingressfixedAclMissDrop1
79         + egressfixedAclMissDrop1
80         + egressfixedAclMissDrop1
81         + ingressDispatcherFirst
82         + ingressDispatcherFirst
83         + ingressDispatcherLast
84         + ingressDispatcherLast
85     }
86
87     protected def tcpFlows() {
88         fixedIngressFlowsPort1
89         + fixedConntrackIngressFlowsPort1
90         + tcpIngressFlowPort1
91         + fixedEgressL2BroadcastFlowsPort1
92         + fixedIngressL3BroadcastFlows
93         + fixedEgressFlowsPort1
94         + fixedConntrackEgressFlowsPort1
95         + fixedIngressFlowsPort2
96         + fixedConntrackIngressFlowsPort2
97         + tcpIngressFlowPort2
98         + fixedEgressL2BroadcastFlowsPort2
99         + fixedIngressL3BroadcastFlows
100         + fixedEgressFlowsPort2
101         + fixedConntrackEgressFlowsPort2
102         + tcpEgressFlowPort2
103         + tcpEgressFlowPort2
104         + egressDispatcherFirst
105         + egressDispatcherFirst
106         + egressDispatcherLast
107         + egressDispatcherLast
108         + remoteIngressFlowsPort1
109         + remoteIngressFlowsPort2
110         + remoteIngressFlowsPort1
111         + remoteIngressFlowsPort2
112         + ingressCommitNonConntrack1
113         + ingressCommitNonConntrack1
114         + egressCommitNonConntrack1
115         + egressCommitNonConntrack1
116         + ingressCommitConntrack1
117         + ingressCommitConntrack1
118         + egressCommitConntrack1
119         + egressCommitConntrack1
120         + ingressfixedAclMissDrop1
121         + ingressfixedAclMissDrop1
122         + egressfixedAclMissDrop1
123         + egressfixedAclMissDrop1
124
125     }
126
127     protected def udpFlows() {
128         fixedIngressFlowsPort1
129         + fixedConntrackIngressFlowsPort1
130         + fixedEgressL2BroadcastFlowsPort1
131         + fixedIngressL3BroadcastFlows
132         + fixedEgressFlowsPort1
133         + fixedConntrackEgressFlowsPort1
134         + udpEgressFlowsPort1
135         + fixedIngressFlowsPort2
136         + fixedConntrackIngressFlowsPort2
137         + udpIngressFlowsPort2
138         + udpIngressFlowsPort2
139         + fixedEgressL2BroadcastFlowsPort2
140         + fixedIngressL3BroadcastFlows
141         + fixedEgressFlowsPort2
142         + fixedConntrackEgressFlowsPort2
143         + udpEgressFlowsPort2
144         + ingressDispatcherFirst
145         + ingressDispatcherFirst
146         + ingressDispatcherLast
147         + ingressDispatcherLast
148         + remoteEgressFlowsPort1
149         + remoteEgressFlowsPort2
150         + remoteEgressFlowsPort1
151         + remoteEgressFlowsPort2
152         + ingressCommitNonConntrack1
153         + ingressCommitNonConntrack1
154         + egressCommitNonConntrack1
155         + egressCommitNonConntrack1
156         + ingressCommitConntrack1
157         + ingressCommitConntrack1
158         + egressCommitConntrack1
159         + egressCommitConntrack1
160         + ingressfixedAclMissDrop1
161         + ingressfixedAclMissDrop1
162         + egressfixedAclMissDrop1
163         + egressfixedAclMissDrop1
164     }
165
166     protected def icmpFlows() {
167         fixedIngressFlowsPort1
168         + fixedConntrackIngressFlowsPort1
169         + icmpIngressFlowsPort1
170         + fixedEgressL2BroadcastFlowsPort1
171         + fixedIngressL3BroadcastFlows
172         + fixedEgressFlowsPort1
173         + fixedConntrackEgressFlowsPort1
174         + fixedIngressFlowsPort2
175         + fixedConntrackIngressFlowsPort2
176         + icmpIngressFlowsPort2
177         + fixedEgressL2BroadcastFlowsPort2
178         + fixedIngressL3BroadcastFlows
179         + fixedEgressFlowsPort2
180         + fixedConntrackEgressFlowsPort2
181         + icmpEgressFlowsPort2
182         + icmpEgressFlowsPort2
183         + egressDispatcherFirst
184         + egressDispatcherFirst
185         + egressDispatcherLast
186         + egressDispatcherLast
187         + remoteIngressFlowsPort1
188         + remoteIngressFlowsPort2
189         + remoteIngressFlowsPort1
190         + remoteIngressFlowsPort2
191         + ingressCommitNonConntrack1
192         + ingressCommitNonConntrack1
193         + egressCommitNonConntrack1
194         + egressCommitNonConntrack1
195         + ingressCommitConntrack1
196         + ingressCommitConntrack1
197         + egressCommitConntrack1
198         + egressCommitConntrack1
199         + ingressfixedAclMissDrop1
200         + ingressfixedAclMissDrop1
201         + egressfixedAclMissDrop1
202         + egressfixedAclMissDrop1
203     }
204
205     protected def dstRangeFlows() {
206         fixedIngressFlowsPort1
207         +fixedConntrackIngressFlowsPort1
208         + udpIngressPortRangeFlows
209         + fixedEgressL2BroadcastFlowsPort1
210         + fixedIngressL3BroadcastFlows
211         + fixedEgressFlowsPort1
212         + fixedConntrackEgressFlowsPort1
213         + tcpEgressRangeFlows
214         + ingressCommitNonConntrack1
215         + egressCommitNonConntrack1
216         + ingressCommitConntrack1
217         + egressCommitConntrack1
218         + ingressfixedAclMissDrop1
219         + egressfixedAclMissDrop1
220
221     }
222
223     protected def dstAllFlows() {
224         fixedIngressFlowsPort1
225         + fixedConntrackIngressFlowsPort1
226         + udpIngressAllFlows
227         + fixedEgressL2BroadcastFlowsPort1
228         + fixedIngressL3BroadcastFlows
229         + fixedEgressFlowsPort1
230         + fixedConntrackEgressFlowsPort1
231         + tcpEgressAllFlows
232         + ingressCommitNonConntrack1
233         + egressCommitNonConntrack1
234         + ingressCommitConntrack1
235         + egressCommitConntrack1
236         + ingressfixedAclMissDrop1
237         + egressfixedAclMissDrop1
238     }
239
240     protected def icmpFlowsForTwoAclsHavingSameRules() {
241         fixedIngressFlowsPort3
242         + fixedConntrackIngressFlowsPort3
243         + icmpIngressFlowsPort3
244         + fixedEgressFlowsPort3
245         + fixedConntrackEgressFlowsPort3
246         + icmpEgressFlowsPort3
247         + ingressCommitConntrack1
248         + egressCommitConntrack1
249         + ingressCommitNonConntrack1
250         + egressCommitNonConntrack1
251         + ingressfixedAclMissDrop1
252         + egressfixedAclMissDrop1
253         + fixedIngressL3BroadcastFlows
254         + fixedEgressL2BroadcastFlowsPort3
255     }
256
257     protected def aapWithIpv4AllFlows() {
258         icmpFlows()
259         + aapIpv4AllFlowsPort2
260     }
261
262     protected def aapFlows() {
263         icmpFlows()
264         + aapRemoteFlowsPort1
265         + aapRemoteFlowsPort1
266         + aapFlowsPort2
267     }
268
269     protected def multipleAcl() {
270         fixedIngressFlowsPort1
271         + fixedConntrackIngressFlowsPort1
272         + fixedEgressL2BroadcastFlowsPort1
273         + fixedIngressL3BroadcastFlows
274         + fixedEgressFlowsPort1
275         + fixedConntrackEgressFlowsPort1
276         + etherEgressFlowsPort1
277         + fixedIngressFlowsPort2
278         + fixedConntrackIngressFlowsPort2
279         + etherIngressFlowsPort2
280         + etherIngressFlowsPort2
281         + fixedEgressL2BroadcastFlowsPort2
282         + fixedIngressL3BroadcastFlows
283         + fixedEgressFlowsPort2
284         + fixedConntrackEgressFlowsPort2
285         + etheregressFlowPort2
286         + remoteEgressFlowsPort1
287         + remoteEgressFlowsPort2
288         + remoteEgressFlowsPort1
289         + remoteEgressFlowsPort2
290         + tcpEgressFlowPort2WithRemoteIpSg
291         + tcpEgressFlowPort2WithRemoteIpSg
292         + tcpIngressFlowPort1WithMultipleSG
293         + tcpIngressFlowPort1WithMultipleSG
294         + ingressCommitNonConntrack1
295         + ingressCommitNonConntrack1
296         + egressCommitNonConntrack1
297         + egressCommitNonConntrack1
298         + ingressCommitConntrack1
299         + ingressCommitConntrack1
300         + egressCommitConntrack1
301         + egressCommitConntrack1
302         + ingressfixedAclMissDrop1
303         + ingressfixedAclMissDrop1
304         + egressfixedAclMissDrop1
305         + egressfixedAclMissDrop1
306         + remoteEgressFlowsPort3
307         + egressDispatcherLast1
308         + egressDispatcherFirst1
309         + ingressDispatcherLast
310         + ingressDispatcherFirst
311         + egressDispatcherLast1
312         + egressDispatcherFirst1
313         + ingressDispatcherLast
314         + ingressDispatcherFirst
315         + ingressDispatcherFirst
316         + ingressDispatcherFirst
317         + ingressDispatcherLast
318         + ingressDispatcherLast
319
320     }
321
322     protected def tcpEgressFlowPort2WithRemoteIpSg() {
323         val theFlowId1 ="TCP_DESTINATION_80_65535Egress_123_987_85cc3048-abc3-43cc-89b3-377341426a21"
324         #[
325              new FlowEntityBuilder >> [
326                 dpnId = 123bi
327                 cookie = 110100480bi
328                 flowId = theFlowId1
329                 flowName = "ACL"
330                 instructionInfoList = #[
331                     new InstructionGotoTable(NwConstants.INGRESS_REMOTE_ACL_TABLE)
332                 ]
333                 matchInfoList = #[
334                     new MatchEthernetType(2048L),
335                     new MatchEthernetType(2048L),
336                     new NxMatchTcpDestinationPort(80, 65535),
337                     new MatchIpProtocol(6 as short),
338                     new MatchMetadata(1085217976614976bi, 1152920405111996400bi)
339                 ]
340                 priority = IdHelper.getId(theFlowId1)
341                 tableId = NwConstants.INGRESS_ACL_RULE_BASED_FILTER_TABLE
342             ]
343         ]
344     }
345
346     protected def tcpIngressFlowPort1WithMultipleSG() {
347         val theFlowId = "TCP_DESTINATION_80_65535Ingress_123_987_85cc3048-abc3-43cc-89b3-377341426a22"
348         #[
349             new FlowEntityBuilder >> [
350                 dpnId = 123bi
351                 cookie = 110100480bi
352                 flowId = theFlowId
353                 flowName = "ACL"
354                 instructionInfoList = #[
355                     new InstructionGotoTable(NwConstants.EGRESS_ACL_COMMITTER_TABLE)
356                 ]
357                 matchInfoList = #[
358                     new MatchEthernetType(2048L),
359                     new MatchEthernetType(2048L),
360                     new NxMatchTcpDestinationPort(80, 65535),
361                     new MatchIpProtocol(6 as short),
362                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
363                 ]
364                 priority = IdHelper.getId(theFlowId)
365                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
366             ]
367         ]
368     }
369
370     protected def aapIpv4AllFlowsPort2() {
371         #[
372             new FlowEntityBuilder >> [
373                 dpnId = 123bi
374                 cookie = 110100480bi
375                 flowId = "Egress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F4_0.0.0.0/0"
376                 flowName = "ACL"
377                 instructionInfoList = #[
378                     new InstructionGotoTable(211 as short)
379                 ]
380                 matchInfoList = #[
381                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
382                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4")),
383                     new MatchEthernetType(2048L)
384                 ]
385                 priority = 61010
386                 tableId = 210 as short
387             ],
388             new FlowEntityBuilder >> [
389                 dpnId = 123bi
390                 cookie = 110100480bi
391                 flowId = "Ingress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F4_0.0.0.0/0"
392                 flowName = "ACL"
393                 instructionInfoList = #[
394                     new InstructionGotoTable(NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
395                 ]
396                 matchInfoList = #[
397                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
398                     new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F4")),
399                     new MatchEthernetType(2048L)
400                 ]
401                 priority = 61010
402                 tableId = 240 as short
403             ],
404             new FlowEntityBuilder >> [
405                 dpnId = 123bi
406                 cookie = 110100480bi
407                 flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F40.0.0.0/0"
408                 flowName = "ACL"
409                 instructionInfoList = #[
410                     new InstructionApplyActions(#[
411                         new ActionNxResubmit(17 as short)
412                     ])
413                 ]
414                 matchInfoList = #[
415                     new MatchEthernetType(2054L),
416                     new MatchArpSha(new MacAddress("0D:AA:D8:42:30:F4")),
417                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4")),
418                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
419                 ]
420                 priority = 63010
421                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
422             ],
423             new FlowEntityBuilder >> [
424                 dpnId = 123bi
425                 cookie = 110100480bi
426                 flowId = "Egress_DHCP_Client_v4123_987_0D:AA:D8:42:30:F4_Permit_"
427                 flowName = "ACL"
428                 instructionInfoList = #[
429                     new InstructionApplyActions(#[
430                     new ActionNxResubmit(17 as short)
431                     ])
432                 ]
433                 matchInfoList = #[
434                     new MatchEthernetType(2048L),
435                     new MatchIpProtocol(17 as short),
436                     new MatchUdpDestinationPort(67 as short),
437                     new MatchUdpSourcePort(68 as short),
438                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
439                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4"))
440                 ]
441                 priority = 63010
442                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
443             ]
444         ]
445     }
446
447     protected def aapRemoteFlowsPort1() {
448         #[
449             remoteIngressFlowsPort("10.0.0.100"),
450             remoteIngressFlowsPort("10.0.0.101")
451         ]
452     }
453
454     protected def aapFlowsPort2() {
455         #[
456             new FlowEntityBuilder >> [
457                 dpnId = 123bi
458                 cookie = 110100480bi
459                 flowId = "Egress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F4_10.0.0.100/32"
460                 flowName = "ACL"
461                 instructionInfoList = #[
462                    new InstructionGotoTable(211 as short)
463                 ]
464                 matchInfoList = #[
465                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
466                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4")),
467                     new MatchEthernetType(2048L),
468                     new MatchIpv4Source("10.0.0.100", "32")
469                 ]
470                 priority = 61010
471                 tableId = 210 as short
472             ],
473             new FlowEntityBuilder >> [
474                 dpnId = 123bi
475                 cookie = 110100480bi
476                 flowId = "Ingress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F4_10.0.0.100/32"
477                 flowName = "ACL"
478                 instructionInfoList = #[
479                     new InstructionGotoTable(NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
480                 ]
481                 matchInfoList = #[
482                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
483                     new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F4")),
484                     new MatchEthernetType(2048L),
485                     new MatchIpv4Destination("10.0.0.100", "32")
486                 ]
487                 priority = 61010
488                 tableId = 240 as short
489             ],
490             new FlowEntityBuilder >> [
491                 dpnId = 123bi
492                 cookie = 110100480bi
493                 flowId = "Egress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:A4_10.0.0.101/32"
494                 flowName = "ACL"
495                 instructionInfoList = #[
496                     new InstructionGotoTable(211 as short)
497                 ]
498                 matchInfoList = #[
499                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
500                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:A4")),
501                     new MatchEthernetType(2048L),
502                     new MatchIpv4Source("10.0.0.101", "32")
503                 ]
504                 priority = 61010
505                 tableId = 210 as short
506             ],
507             new FlowEntityBuilder >> [
508                 dpnId = 123bi
509                 cookie = 110100480bi
510                 flowId = "Ingress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:A4_10.0.0.101/32"
511                 flowName = "ACL"
512                 instructionInfoList = #[
513                     new InstructionGotoTable(NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
514                 ]
515                 matchInfoList = #[
516                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
517                     new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:A4")),
518                     new MatchEthernetType(2048L),
519                     new MatchIpv4Destination("10.0.0.101", "32")
520                 ]
521                 priority = 61010
522                 tableId = 240 as short
523             ],
524             new FlowEntityBuilder >> [
525                 dpnId = 123bi
526                 cookie = 110100480bi
527                 flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F410.0.0.100/32"
528                 flowName = "ACL"
529                 instructionInfoList = #[
530                     new InstructionApplyActions(#[
531                         new ActionNxResubmit(17 as short)
532                     ])
533                 ]
534                 matchInfoList = #[
535                     new MatchEthernetType(2054L),
536                     new MatchArpSha(new MacAddress("0D:AA:D8:42:30:F4")),
537                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4")),
538                     new MatchArpSpa(new Ipv4Prefix("10.0.0.100/32")),
539                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
540                 ]
541                 priority = 63010
542                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
543             ],
544             new FlowEntityBuilder >> [
545                 dpnId = 123bi
546                 cookie = 110100480bi
547                 flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:A410.0.0.101/32"
548                 flowName = "ACL"
549                 instructionInfoList = #[
550                     new InstructionApplyActions(#[
551                         new ActionNxResubmit(17 as short)
552                     ])
553                 ]
554                 matchInfoList = #[
555                     new MatchEthernetType(2054L),
556                     new MatchArpSha(new MacAddress("0D:AA:D8:42:30:A4")),
557                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:A4")),
558                     new MatchArpSpa(new Ipv4Prefix("10.0.0.101/32")),
559                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
560                 ]
561                 priority = 63010
562                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
563             ],
564             new FlowEntityBuilder >> [
565                 dpnId = 123bi
566                 cookie = 110100480bi
567                 flowId = "Egress_DHCP_Client_v4123_987_0D:AA:D8:42:30:A4_Permit_"
568                 flowName = "ACL"
569                 instructionInfoList = #[
570                     new InstructionApplyActions(#[
571                         new ActionNxResubmit(17 as short)
572                     ])
573                 ]
574                 matchInfoList = #[
575                     new MatchEthernetType(2048L),
576                     new MatchIpProtocol(17 as short),
577                     new MatchUdpDestinationPort(67 as short),
578                     new MatchUdpSourcePort(68 as short),
579                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
580                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:A4"))
581                 ]
582                 priority = 63010
583                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
584             ],
585             new FlowEntityBuilder >> [
586                 dpnId = 123bi
587                 cookie = 110100480bi
588                 flowId = "Egress_DHCP_Client_v4123_987_0D:AA:D8:42:30:F4_Permit_"
589                 flowName = "ACL"
590                 instructionInfoList = #[
591                     new InstructionApplyActions(#[
592                         new ActionNxResubmit(17 as short)
593                     ])
594                 ]
595                 matchInfoList = #[
596                     new MatchEthernetType(2048L),
597                     new MatchIpProtocol(17 as short),
598                     new MatchUdpDestinationPort(67 as short),
599                     new MatchUdpSourcePort(68 as short),
600                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
601                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4"))
602                 ]
603                 priority = 63010
604                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
605             ],
606             new FlowEntityBuilder >> [
607                 dpnId = 123bi
608                 cookie = 110100480bi
609                 flowId = "Egress_L2Broadcast_123_987_0D:AA:D8:42:30:A4"
610                 flowName = "ACL"
611                 instructionInfoList = #[
612                     new InstructionApplyActions(#[
613                         new ActionNxResubmit(17 as short)
614                     ])
615                 ]
616                 matchInfoList = #[
617                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:A4")),
618                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
619                 ]
620                 priority = 61005
621                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
622             ]
623         ]
624     }
625
626     protected def fixedConntrackIngressFlowsPort1() {
627         #[
628             new FlowEntityBuilder >> [
629                 dpnId = 123bi
630                 cookie = 110100480bi
631                 flowId = "Ingress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F3_10.0.0.1/32"
632             flowName = "ACL"
633             instructionInfoList = #[
634                 new InstructionGotoTable(NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
635             ]
636             matchInfoList = #[
637                 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
638                 new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F3")),
639                 new MatchEthernetType(2048L),
640                 new MatchIpv4Destination("10.0.0.1", "32")
641                 ]
642                 priority = 61010
643                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
644             ],
645             new FlowEntityBuilder >> [
646                 dpnId = 123bi
647                 cookie = 110100480bi
648                 flowId = "Ingress_Fixed_Conntrk_123_987_MatchEthernetType[2048]_Recirc"
649                 flowName = "ACL"
650                 instructionInfoList = #[
651                     new InstructionApplyActions(#[
652                         new ActionNxConntrack(2, 0, 0, 5000, 243 as short)
653                     ])
654                 ]
655                 matchInfoList = #[
656                     new MatchEthernetType(2048L),
657                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
658                 ]
659                 priority = 100
660                 tableId = NwConstants.EGRESS_ACL_CONNTRACK_SENDER_TABLE
661             ],
662             new FlowEntityBuilder >> [
663                 dpnId = 123bi
664                 cookie = 110100481bi
665                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
666                 flowName = "ACL"
667                 instructionInfoList = #[
668                     new InstructionApplyActions(#[
669                         new ActionDrop()
670                     ])
671                 ]
672                 matchInfoList = #[
673                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
674                     new NxMatchCtState(48L, 48L)
675                 ]
676                 priority = 62020
677                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
678             ]
679         ]
680     }
681
682     protected def etherIngressFlowsPort2() {
683         val theFlowId = "ETHERnullIngress_123_987_85cc3048-abc3-43cc-89b3-377341426ac7"
684         #[
685             new FlowEntityBuilder >> [
686                 dpnId = 123bi
687                 cookie = 110100480bi
688                 flowId = theFlowId
689                 flowName = "ACL"
690                 instructionInfoList = #[
691                      new InstructionGotoTable(NwConstants.EGRESS_REMOTE_ACL_TABLE)
692                 ]
693                 matchInfoList = #[
694                     new MatchEthernetType(2048L),
695                     new MatchEthernetType(2048L),
696                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
697                     new MatchMetadata(32bi, 16777200bi)
698                 ]
699                 priority = IdHelper.getId(theFlowId)
700                 tableId = NwConstants.EGRESS_ACL_RULE_BASED_FILTER_TABLE
701             ]
702         ]
703     }
704
705     protected def fixedConntrackEgressFlowsPort1() {
706         #[
707             new FlowEntityBuilder >> [
708                 dpnId = 123bi
709                 cookie = 110100480bi
710                 flowId = "Egress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F3_10.0.0.1/32"
711                 flowName = "ACL"
712                 instructionInfoList = #[
713                     new InstructionGotoTable(211 as short)
714                 ]
715                 matchInfoList = #[
716                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
717                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F3")),
718                     new MatchEthernetType(2048L),
719                     new MatchIpv4Source("10.0.0.1", "32")
720                 ]
721                 priority = 61010
722                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
723             ],
724             new FlowEntityBuilder >> [
725                 dpnId = 123bi
726                 cookie = 110100480bi
727                 flowId = "Egress_Fixed_Conntrk_123_987_MatchEthernetType[2048]_Recirc"
728                 flowName = "ACL"
729                 instructionInfoList = #[
730                     new InstructionApplyActions(#[
731                        new ActionNxConntrack(2, 0, 0, 5000, NwConstants.INGRESS_ACL_FOR_EXISTING_TRAFFIC_TABLE)
732                     ])
733                 ]
734                 matchInfoList = #[
735                     new MatchEthernetType(2048L),
736                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
737                 ]
738                 priority = 100
739                 tableId = NwConstants.INGRESS_ACL_CONNTRACK_SENDER_TABLE
740             ],
741             new FlowEntityBuilder >> [
742                 dpnId = 123bi
743                 cookie = 110100481bi
744                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
745                 flowName = "ACL"
746                 instructionInfoList = #[
747                     new InstructionApplyActions(#[
748                         new ActionDrop()
749                     ])
750                 ]
751                 matchInfoList = #[
752                    new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
753                    new NxMatchCtState(48L, 48L)
754                 ]
755                 priority = 62020
756                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
757             ]
758         ]
759     }
760
761     protected def fixedConntrackIngressFlowsPort2() {
762         #[
763              new FlowEntityBuilder >> [
764                 dpnId = 123bi
765                 cookie = 110100480bi
766                 flowId = "Ingress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F4_10.0.0.2/32"
767                 flowName = "ACL"
768                 instructionInfoList = #[
769                     new InstructionGotoTable(NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
770                 ]
771                 matchInfoList = #[
772                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
773                     new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F4")),
774                     new MatchEthernetType(2048L),
775                     new MatchIpv4Destination("10.0.0.2", "32")
776                 ]
777                 priority = 61010
778                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
779             ],
780             new FlowEntityBuilder >> [
781                 dpnId = 123bi
782                 cookie = 110100480bi
783                 flowId = "Ingress_Fixed_Conntrk_123_987_MatchEthernetType[2048]_Recirc"
784                 flowName = "ACL"
785                 instructionInfoList = #[
786                     new InstructionApplyActions(#[
787                         new ActionNxConntrack(2, 0, 0, 5000, NwConstants.EGRESS_ACL_FOR_EXISTING_TRAFFIC_TABLE)
788                     ])
789                 ]
790                 matchInfoList = #[
791                     new MatchEthernetType(2048L),
792                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
793                 ]
794                 priority = 100
795                 tableId = NwConstants.EGRESS_ACL_CONNTRACK_SENDER_TABLE
796             ],
797             new FlowEntityBuilder >> [
798                 dpnId = 123bi
799                 cookie = 110100481bi
800                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
801                 flowName = "ACL"
802                 instructionInfoList = #[
803                     new InstructionApplyActions(#[
804                         new ActionDrop()
805                     ])
806                 ]
807                 matchInfoList = #[
808                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
809                     new NxMatchCtState(48L, 48L)
810                 ]
811                 priority = 62020
812                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
813             ]
814         ]
815     }
816
817     protected def fixedConntrackEgressFlowsPort2() {
818         #[
819             new FlowEntityBuilder >> [
820                 dpnId = 123bi
821                 cookie = 110100480bi
822                 flowId = "Egress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F4_10.0.0.2/32"
823                 flowName = "ACL"
824                 instructionInfoList = #[
825                     new InstructionGotoTable(NwConstants.INGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
826                 ]
827                 matchInfoList = #[
828                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
829                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4")),
830                     new MatchEthernetType(2048L),
831                     new MatchIpv4Source("10.0.0.2", "32")
832                 ]
833                 priority = 61010
834                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
835             ],
836             new FlowEntityBuilder >> [
837                 dpnId = 123bi
838                 cookie = 110100480bi
839                 flowId = "Egress_Fixed_Conntrk_123_987_MatchEthernetType[2048]_Recirc"
840                 flowName = "ACL"
841                 instructionInfoList = #[
842                     new InstructionApplyActions(#[
843                         new ActionNxConntrack(2, 0, 0, 5000, 213 as short)
844                     ])
845                 ]
846                 matchInfoList = #[
847                     new MatchEthernetType(2048L),
848                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
849                 ]
850                 priority = 100
851                 tableId = NwConstants.INGRESS_ACL_CONNTRACK_SENDER_TABLE
852             ],
853             new FlowEntityBuilder >> [
854                 dpnId = 123bi
855                 cookie = 110100481bi
856                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
857                 flowName = "ACL"
858                 instructionInfoList = #[
859                     new InstructionApplyActions(#[
860                         new ActionDrop()
861                     ])
862                 ]
863                 matchInfoList = #[
864                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
865                     new NxMatchCtState(48L, 48L)
866                 ]
867                 priority = 62020
868                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
869             ]
870         ]
871     }
872
873     protected def fixedConntrackIngressFlowsPort3() {
874         #[
875             new FlowEntityBuilder >> [
876                 dpnId = 123bi
877                 cookie = 110100480bi
878                 flowId = "Ingress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F5_10.0.0.3/32"
879                 flowName = "ACL"
880                 instructionInfoList = #[
881                     new InstructionGotoTable(NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
882                 ]
883                 matchInfoList = #[
884                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
885                     new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F5")),
886                     new MatchEthernetType(2048L),
887                     new MatchIpv4Destination("10.0.0.3", "32")
888                 ]
889                 priority = 61010
890                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
891             ],
892             new FlowEntityBuilder >> [
893                 dpnId = 123bi
894                 cookie = 110100480bi
895                 flowId = "Ingress_Fixed_Conntrk_123_987_MatchEthernetType[2048]_Recirc"
896                 flowName = "ACL"
897                 instructionInfoList = #[
898                     new InstructionApplyActions(#[
899                         new ActionNxConntrack(2, 0, 0, 5000, NwConstants.EGRESS_ACL_FOR_EXISTING_TRAFFIC_TABLE)
900                     ])
901                 ]
902                 matchInfoList = #[
903                     new MatchEthernetType(2048L),
904                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
905                 ]
906                 priority = 100
907                 tableId = NwConstants.EGRESS_ACL_CONNTRACK_SENDER_TABLE
908             ],
909             new FlowEntityBuilder >> [
910                 dpnId = 123bi
911                 cookie = 110100481bi
912                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
913                 flowName = "ACL"
914                 instructionInfoList = #[
915                     new InstructionApplyActions(#[
916                         new ActionDrop()
917                     ])
918                 ]
919                 matchInfoList = #[
920                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
921                     new NxMatchCtState(48L, 48L)
922                 ]
923                 priority = 62020
924                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
925             ]
926         ]
927     }
928
929     protected def fixedConntrackEgressFlowsPort3() {
930         #[
931             new FlowEntityBuilder >> [
932                 dpnId = 123bi
933                 cookie = 110100480bi
934                 flowId = "Egress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F5_10.0.0.3/32"
935                 flowName = "ACL"
936                 instructionInfoList = #[
937                     new InstructionGotoTable(NwConstants.INGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
938                 ]
939                 matchInfoList = #[
940                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
941                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F5")),
942                     new MatchEthernetType(2048L),
943                     new MatchIpv4Source("10.0.0.3", "32")
944                 ]
945                 priority = 61010
946                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
947             ],
948             new FlowEntityBuilder >> [
949                 dpnId = 123bi
950                 cookie = 110100480bi
951                 flowId = "Egress_Fixed_Conntrk_123_987_MatchEthernetType[2048]_Recirc"
952                 flowName = "ACL"
953                 instructionInfoList = #[
954                     new InstructionApplyActions(#[
955                         new ActionNxConntrack(2, 0, 0, 5000, NwConstants.INGRESS_ACL_FOR_EXISTING_TRAFFIC_TABLE)
956                     ])
957                 ]
958                 matchInfoList = #[
959                     new MatchEthernetType(2048L),
960                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
961                 ]
962                 priority = 100
963                 tableId = NwConstants.INGRESS_ACL_CONNTRACK_SENDER_TABLE
964             ],
965             new FlowEntityBuilder >> [
966                 dpnId = 123bi
967                 cookie = 110100481bi
968                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
969                 flowName = "ACL"
970                 instructionInfoList = #[
971                     new InstructionApplyActions(#[
972                         new ActionDrop()
973                     ])
974                 ]
975                 matchInfoList = #[
976                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
977                     new NxMatchCtState(48L, 48L)
978                 ]
979                 priority = 62020
980                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
981             ]
982         ]
983     }
984
985     static def fixedConntrackIngressFlowsPort4() {
986         #[
987             new FlowEntityBuilder >> [
988                 dpnId = 123bi
989                 cookie = 110100480bi
990                 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F6_10.0.0.4/32_Recirc"
991                 flowName = "ACL"
992                 instructionInfoList = #[
993                     new InstructionApplyActions(#[
994                         new ActionNxConntrack(2, 0, 0, 5000, NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
995                     ])
996                 ]
997                 matchInfoList = #[
998                     new MatchEthernetType(2048L),
999                     new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F6")),
1000                     new MatchEthernetType(2048L),
1001                     new MatchIpv4Destination("10.0.0.4", "32")
1002                 ]
1003                 priority = 61010
1004                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1005             ],
1006             new FlowEntityBuilder >> [
1007                 dpnId = 123bi
1008                 cookie = 110100480bi
1009                 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F6_0.0.0.0/0_Recirc"
1010                 flowName = "ACL"
1011                 instructionInfoList = #[
1012                     new InstructionApplyActions(#[
1013                         new ActionNxConntrack(2, 0, 0, 5000, NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
1014                     ])
1015                 ]
1016                 matchInfoList = #[
1017                     new MatchEthernetType(2048L),
1018                     new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F6")),
1019                     new MatchEthernetType(2048L)
1020                 ]
1021                 priority = 61010
1022                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1023             ],
1024             new FlowEntityBuilder >> [
1025                 dpnId = 123bi
1026                 cookie = 110100481bi
1027                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
1028                 flowName = "ACL"
1029                 instructionInfoList = #[
1030                     new InstructionApplyActions(#[
1031                         new ActionDrop()
1032                     ])
1033                 ]
1034                 matchInfoList = #[
1035                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1036                     new NxMatchCtState(32L, 32L)
1037                 ]
1038                 priority = 50
1039                 tableId = NwConstants.INGRESS_ACL_FOR_EXISTING_TRAFFIC_TABLE
1040             ],
1041             new FlowEntityBuilder >> [
1042                 dpnId = 123bi
1043                 cookie = 110100481bi
1044                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
1045                 flowName = "ACL"
1046                 instructionInfoList = #[
1047                     new InstructionApplyActions(#[
1048                         new ActionDrop()
1049                     ])
1050                 ]
1051                 matchInfoList = #[
1052                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1053                     new NxMatchCtState(48L, 48L)
1054                 ]
1055                 priority = 62020
1056                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1057             ]
1058         ]
1059     }
1060
1061     static def fixedConntrackEgressFlowsPort4() {
1062         #[
1063             new FlowEntityBuilder >> [
1064                 dpnId = 123bi
1065                 cookie = 110100480bi
1066                 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F6_10.0.0.4/32_Recirc"
1067                 flowName = "ACL"
1068                 instructionInfoList = #[
1069                     new InstructionApplyActions(#[
1070                         new ActionNxConntrack(2, 0, 0, 5000, NwConstants.INGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
1071                     ])
1072                 ]
1073                 matchInfoList = #[
1074                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F6")),
1075                     new MatchEthernetType(2048L),
1076                     new MatchIpv4Source("10.0.0.4", "32")
1077                 ]
1078                 priority = 61010
1079                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1080             ],
1081             new FlowEntityBuilder >> [
1082                 dpnId = 123bi
1083                 cookie = 110100480bi
1084                 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F6_0.0.0.0/0_Recirc"
1085                 flowName = "ACL"
1086                 instructionInfoList = #[
1087                     new InstructionApplyActions(#[
1088                         new ActionNxConntrack(2, 0, 0, 5000, NwConstants.INGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
1089                     ])
1090                 ]
1091                 matchInfoList = #[
1092                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F6")),
1093                     new MatchEthernetType(2048L)
1094                 ]
1095                 priority = 61010
1096                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1097             ],
1098             new FlowEntityBuilder >> [
1099                 dpnId = 123bi
1100                 cookie = 110100481bi
1101                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
1102                 flowName = "ACL"
1103                 instructionInfoList = #[
1104                     new InstructionApplyActions(#[
1105                         new ActionDrop()
1106                     ])
1107                 ]
1108                 matchInfoList = #[
1109                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1110                     new NxMatchCtState(32L, 32L)
1111                 ]
1112                 priority = 50
1113                 tableId = NwConstants.EGRESS_ACL_FOR_EXISTING_TRAFFIC_TABLE
1114             ],
1115             new FlowEntityBuilder >> [
1116                 dpnId = 123bi
1117                 cookie = 110100481bi
1118                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
1119                 flowName = "ACL"
1120                 instructionInfoList = #[
1121                     new InstructionApplyActions(#[
1122                         new ActionDrop()
1123                     ])
1124                 ]
1125                 matchInfoList = #[
1126                    new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1127                     new NxMatchCtState(48L, 48L)
1128                 ]
1129                 priority = 62020
1130                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1131             ]
1132         ]
1133     }
1134
1135     protected def etherEgressFlowsPort1() {
1136         val theFlowId = "ETHERnullEgress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1137         #[
1138             new FlowEntityBuilder >> [
1139                 dpnId = 123bi
1140                 cookie = 110100480bi
1141                 flowId = theFlowId
1142                 flowName = "ACL"
1143                 instructionInfoList = #[
1144                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1145                 ]
1146                 matchInfoList = #[
1147                     new MatchEthernetType(2048L),
1148                     new MatchEthernetType(2048L),
1149                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1150                 ]
1151                 priority = IdHelper.getId(theFlowId)
1152                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1153             ]
1154         ]
1155     }
1156
1157     protected def etheregressFlowPort2() {
1158         val theFlowId = "ETHERnullEgress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1159         #[
1160             new FlowEntityBuilder >> [
1161                 dpnId = 123bi
1162                 cookie = 110100480bi
1163                 flowId = theFlowId
1164                 flowName = "ACL"
1165                 instructionInfoList = #[
1166                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1167                 ]
1168                 matchInfoList = #[
1169                     new MatchEthernetType(2048L),
1170                     new MatchEthernetType(2048L),
1171                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1172                 ]
1173                 priority = IdHelper.getId(theFlowId)
1174                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1175             ]
1176         ]
1177     }
1178
1179     protected def tcpIngressFlowPort1() {
1180         val theFlowId = "TCP_DESTINATION_80_65535Ingress_123_987_85cc3048-abc3-43cc-89b3-377341426ac7"
1181         #[
1182             new FlowEntityBuilder >> [
1183                 dpnId = 123bi
1184                 cookie = 110100480bi
1185                 flowId = theFlowId
1186                 flowName = "ACL"
1187                 instructionInfoList = #[
1188                    new InstructionGotoTable(NwConstants.EGRESS_ACL_COMMITTER_TABLE)
1189                 ]
1190                 matchInfoList = #[
1191                     new MatchEthernetType(2048L),
1192                     new MatchEthernetType(2048L),
1193                     new NxMatchTcpDestinationPort(80, 65535),
1194                     new MatchIpProtocol(6 as short),
1195                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1196                 ]
1197                 priority = IdHelper.getId(theFlowId)
1198                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1199             ]
1200         ]
1201     }
1202
1203     protected def tcpIngressFlowPort2() {
1204         val theFlowId = "TCP_DESTINATION_80_65535Ingress_123_987_85cc3048-abc3-43cc-89b3-377341426ac7"
1205         #[
1206             new FlowEntityBuilder >> [
1207                 dpnId = 123bi
1208                 cookie = 110100480bi
1209                 flowId = theFlowId
1210                 flowName = "ACL"
1211                 instructionInfoList = #[
1212                     new InstructionGotoTable(NwConstants.EGRESS_ACL_COMMITTER_TABLE)
1213                 ]
1214                 matchInfoList = #[
1215                     new MatchEthernetType(2048L),
1216                     new MatchEthernetType(2048L),
1217                     new NxMatchTcpDestinationPort(80, 65535),
1218                     new MatchIpProtocol(6 as short),
1219                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1220                 ]
1221                 priority = IdHelper.getId(theFlowId)
1222                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1223             ]
1224         ]
1225     }
1226
1227     protected def tcpEgressFlowPort2() {
1228         val theFlowId = "TCP_DESTINATION_80_65535Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1229         #[
1230             new FlowEntityBuilder >> [
1231                 dpnId = 123bi
1232                 cookie = 110100480bi
1233                 flowId = theFlowId
1234                 flowName = "ACL"
1235                 instructionInfoList = #[
1236                     new InstructionGotoTable(NwConstants.INGRESS_REMOTE_ACL_TABLE)
1237                 ]
1238                 matchInfoList = #[
1239                     new MatchEthernetType(2048L),
1240                     new MatchEthernetType(2048L),
1241                     new NxMatchTcpDestinationPort(80, 65535),
1242                     new MatchIpProtocol(6 as short),
1243                     new MatchMetadata(1085217976614944bi, 1152920405111996400bi)
1244                 ]
1245                 priority = IdHelper.getId(theFlowId)
1246                 tableId = NwConstants.INGRESS_ACL_RULE_BASED_FILTER_TABLE
1247             ]
1248         ]
1249     }
1250
1251     protected def udpEgressFlowsPort1() {
1252         val theFlowId = "UDP_DESTINATION_80_65535Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1253         #[
1254              new FlowEntityBuilder >> [
1255                 dpnId = 123bi
1256                 cookie = 110100480bi
1257                 flowId = theFlowId
1258                 flowName = "ACL"
1259                 instructionInfoList = #[
1260                      new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1261                 ]
1262                 matchInfoList = #[
1263                     new MatchEthernetType(2048L),
1264                     new MatchEthernetType(2048L),
1265                     new NxMatchUdpDestinationPort(80, 65535),
1266                     new MatchIpProtocol(17 as short),
1267                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1268                 ]
1269                 priority = IdHelper.getId(theFlowId)
1270                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1271             ]
1272         ]
1273     }
1274
1275     protected def udpIngressFlowsPort2() {
1276         val theFlowId = "UDP_DESTINATION_80_65535Ingress_123_987_85cc3048-abc3-43cc-89b3-377341426ac7"
1277         #[
1278             new FlowEntityBuilder >> [
1279                 dpnId = 123bi
1280                 cookie = 110100480bi
1281                 flowId = theFlowId
1282                 flowName = "ACL"
1283                 instructionInfoList = #[
1284                     new InstructionGotoTable(NwConstants.EGRESS_REMOTE_ACL_TABLE)
1285                 ]
1286                 matchInfoList = #[
1287                     new MatchEthernetType(2048L),
1288                     new MatchEthernetType(2048L),
1289                     new NxMatchUdpDestinationPort(80, 65535),
1290                     new MatchIpProtocol(17 as short),
1291                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1292                     new MatchMetadata(32bi, 16777200bi)
1293                 ]
1294                 priority = IdHelper.getId(theFlowId)
1295                 tableId = NwConstants.EGRESS_ACL_RULE_BASED_FILTER_TABLE
1296             ]
1297         ]
1298     }
1299
1300     protected def udpEgressFlowsPort2() {
1301         val theFlowId = "UDP_DESTINATION_80_65535Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1302         #[
1303             new FlowEntityBuilder >> [
1304                 dpnId = 123bi
1305                 cookie = 110100480bi
1306                 flowId = theFlowId
1307                 flowName = "ACL"
1308                 instructionInfoList = #[
1309                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1310                 ]
1311                 matchInfoList = #[
1312                     new MatchEthernetType(2048L),
1313                     new MatchEthernetType(2048L),
1314                     new NxMatchUdpDestinationPort(80, 65535),
1315                     new MatchIpProtocol(17 as short),
1316                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1317                 ]
1318                 priority = IdHelper.getId(theFlowId)
1319                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1320             ]
1321         ]
1322     }
1323
1324     protected def icmpIngressFlowsPort1() {
1325         val theFlowId = "ICMP_V4_DESTINATION_23_Ingress_123_987_85cc3048-abc3-43cc-89b3-377341426ac7"
1326         #[
1327             new FlowEntityBuilder >> [
1328                 dpnId = 123bi
1329                 cookie = 110100480bi
1330                 flowId = theFlowId
1331                 flowName = "ACL"
1332                 instructionInfoList = #[
1333                     new InstructionGotoTable(NwConstants.EGRESS_ACL_COMMITTER_TABLE)
1334                 ]
1335                 matchInfoList = #[
1336                     new MatchEthernetType(2048L),
1337                     new MatchEthernetType(2048L),
1338                     new MatchIcmpv4(2 as short, 3 as short),
1339                     new MatchIpProtocol(1 as short),
1340                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1341                 ]
1342                 priority = IdHelper.getId(theFlowId)
1343                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1344             ]
1345         ]
1346     }
1347
1348     protected def icmpIngressFlowsPort2() {
1349         val theFlowId = "ICMP_V4_DESTINATION_23_Ingress_123_987_85cc3048-abc3-43cc-89b3-377341426ac7"
1350         #[
1351             new FlowEntityBuilder >> [
1352                 dpnId = 123bi
1353                 cookie = 110100480bi
1354                 flowId = theFlowId
1355                 flowName = "ACL"
1356                 instructionInfoList = #[
1357                     new InstructionGotoTable(NwConstants.EGRESS_ACL_COMMITTER_TABLE)
1358                 ]
1359                 matchInfoList = #[
1360                     new MatchEthernetType(2048L),
1361                     new MatchEthernetType(2048L),
1362                     new MatchIcmpv4(2 as short, 3 as short),
1363                     new MatchIpProtocol(1 as short),
1364                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1365                 ]
1366                 priority = IdHelper.getId(theFlowId)
1367                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1368             ]
1369         ]
1370     }
1371
1372     protected def icmpEgressFlowsPort2() {
1373         val theFlowId = "ICMP_V4_DESTINATION_23_Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1374         #[
1375             new FlowEntityBuilder >> [
1376                 dpnId = 123bi
1377                 cookie = 110100480bi
1378                 flowId = theFlowId
1379                 flowName = "ACL"
1380                 instructionInfoList = #[
1381                     new InstructionGotoTable(NwConstants.INGRESS_REMOTE_ACL_TABLE)
1382                 ]
1383                 matchInfoList = #[
1384                     new MatchEthernetType(2048L),
1385                     new MatchEthernetType(2048L),
1386                     new MatchIcmpv4(2 as short, 3 as short),
1387                     new MatchIpProtocol(1 as short),
1388                     new MatchMetadata(1085217976614944bi, 1152920405111996400bi)
1389                 ]
1390                 priority = IdHelper.getId(theFlowId)
1391                 tableId = NwConstants.INGRESS_ACL_RULE_BASED_FILTER_TABLE
1392             ]
1393         ]
1394     }
1395
1396     protected def udpIngressPortRangeFlows() {
1397         val theFlowId = "UDP_DESTINATION_2000_65532Ingress_123_987_85cc3048-abc3-43cc-89b3-377341426ac7"
1398         #[
1399             new FlowEntityBuilder >> [
1400                 dpnId = 123bi
1401                 cookie = 110100480bi
1402                 flowId = theFlowId
1403                 flowName = "ACL"
1404                 instructionInfoList = #[
1405                     new InstructionGotoTable(NwConstants.EGRESS_ACL_COMMITTER_TABLE)
1406                 ]
1407                 matchInfoList = #[
1408                     new MatchEthernetType(2048L),
1409                     new MatchEthernetType(2048L),
1410                     new NxMatchUdpDestinationPort(2000, 65532),
1411                     new MatchIpProtocol(17 as short),
1412                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1413                 ]
1414                 priority = IdHelper.getId(theFlowId)
1415                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1416             ]
1417         ]
1418     }
1419
1420     protected def tcpEgressRangeFlows() {
1421         val flowId1 = "TCP_DESTINATION_776_65534Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1422         val flowId2 = "TCP_DESTINATION_512_65280Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1423         val flowId3 = "TCP_DESTINATION_334_65534Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1424         val flowId4 = "TCP_DESTINATION_333_65535Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1425         val flowId5 = "TCP_DESTINATION_336_65520Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1426         val flowId6 = "TCP_DESTINATION_352_65504Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1427         val flowId7 = "TCP_DESTINATION_384_65408Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1428         val flowId8 = "TCP_DESTINATION_768_65528Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1429         #[
1430             new FlowEntityBuilder >> [
1431                 dpnId = 123bi
1432                 cookie = 110100480bi
1433                 flowId = flowId1
1434                 flowName = "ACL"
1435                 instructionInfoList = #[
1436                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1437                 ]
1438                 matchInfoList = #[
1439                     new MatchEthernetType(2048L),
1440                     new MatchEthernetType(2048L),
1441                     new NxMatchTcpDestinationPort(776, 65534),
1442                     new MatchIpProtocol(6 as short),
1443                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1444                 ]
1445                 priority = IdHelper.getId(flowId1)
1446                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1447             ],
1448             new FlowEntityBuilder >> [
1449                 dpnId = 123bi
1450                 cookie = 110100480bi
1451                 flowId = flowId2
1452                 flowName = "ACL"
1453                 instructionInfoList = #[
1454                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1455                 ]
1456                 matchInfoList = #[
1457                     new MatchEthernetType(2048L),
1458                     new MatchEthernetType(2048L),
1459                     new NxMatchTcpDestinationPort(512, 65280),
1460                     new MatchIpProtocol(6 as short),
1461                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1462                 ]
1463                 priority = IdHelper.getId(flowId2)
1464                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1465             ],
1466             new FlowEntityBuilder >> [
1467                 dpnId = 123bi
1468                 cookie = 110100480bi
1469                 flowId = flowId3
1470                 flowName = "ACL"
1471                 instructionInfoList = #[
1472                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1473                 ]
1474                 matchInfoList = #[
1475                     new MatchEthernetType(2048L),
1476                     new MatchEthernetType(2048L),
1477                     new NxMatchTcpDestinationPort(334, 65534),
1478                     new MatchIpProtocol(6 as short),
1479                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1480                 ]
1481                 priority = IdHelper.getId(flowId3)
1482                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1483             ],
1484             new FlowEntityBuilder >> [
1485                 dpnId = 123bi
1486                 cookie = 110100480bi
1487                 flowId = flowId4
1488                 flowName = "ACL"
1489                 instructionInfoList = #[
1490                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1491                 ]
1492                 matchInfoList = #[
1493                     new MatchEthernetType(2048L),
1494                     new MatchEthernetType(2048L),
1495                     new NxMatchTcpDestinationPort(333, 65535),
1496                     new MatchIpProtocol(6 as short),
1497                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1498                 ]
1499                 priority = IdHelper.getId(flowId4)
1500                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1501             ],
1502             new FlowEntityBuilder >> [
1503                 dpnId = 123bi
1504                 cookie = 110100480bi
1505                 flowId = flowId5
1506                 flowName = "ACL"
1507                 instructionInfoList = #[
1508                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1509                 ]
1510                 matchInfoList = #[
1511                     new MatchEthernetType(2048L),
1512                     new MatchEthernetType(2048L),
1513                     new NxMatchTcpDestinationPort(336, 65520),
1514                     new MatchIpProtocol(6 as short),
1515                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1516                 ]
1517                 priority = IdHelper.getId(flowId5)
1518                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1519             ],
1520             new FlowEntityBuilder >> [
1521                 dpnId = 123bi
1522                 cookie = 110100480bi
1523                 flowId = flowId6
1524                 flowName = "ACL"
1525                 instructionInfoList = #[
1526                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1527                 ]
1528                 matchInfoList = #[
1529                     new MatchEthernetType(2048L),
1530                     new MatchEthernetType(2048L),
1531                     new NxMatchTcpDestinationPort(352, 65504),
1532                     new MatchIpProtocol(6 as short),
1533                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1534                 ]
1535                 priority = IdHelper.getId(flowId6)
1536                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1537             ],
1538             new FlowEntityBuilder >> [
1539                 dpnId = 123bi
1540                 cookie = 110100480bi
1541                 flowId = flowId7
1542                 flowName = "ACL"
1543                 instructionInfoList = #[
1544                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1545                 ]
1546                 matchInfoList = #[
1547                     new MatchEthernetType(2048L),
1548                     new MatchEthernetType(2048L),
1549                     new NxMatchTcpDestinationPort(384, 65408),
1550                     new MatchIpProtocol(6 as short),
1551                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1552                 ]
1553                 priority = IdHelper.getId(flowId7)
1554                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1555             ],
1556             new FlowEntityBuilder >> [
1557                 dpnId = 123bi
1558                 cookie = 110100480bi
1559                 flowId = flowId8
1560                 flowName = "ACL"
1561                 instructionInfoList = #[
1562                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1563                 ]
1564                 matchInfoList = #[
1565                     new MatchEthernetType(2048L),
1566                     new MatchEthernetType(2048L),
1567                     new NxMatchTcpDestinationPort(768, 65528),
1568                     new MatchIpProtocol(6 as short),
1569                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1570                 ]
1571                 priority = IdHelper.getId(flowId8)
1572                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1573             ]
1574         ]
1575     }
1576
1577     protected def udpIngressAllFlows() {
1578         val theFlowId = "UDP_DESTINATION_1_0Ingress_123_987_85cc3048-abc3-43cc-89b3-377341426ac7"
1579         #[
1580             new FlowEntityBuilder >> [
1581                 dpnId = 123bi
1582                 cookie = 110100480bi
1583                 flowId = theFlowId
1584                 flowName = "ACL"
1585                 instructionInfoList = #[
1586                     new InstructionGotoTable(NwConstants.EGRESS_ACL_COMMITTER_TABLE)
1587                 ]
1588                 matchInfoList = #[
1589                     new MatchEthernetType(2048L),
1590                     new MatchEthernetType(2048L),
1591                     new MatchIpProtocol(17 as short),
1592                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1593                 ]
1594                 priority = IdHelper.getId(theFlowId)
1595                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1596             ]
1597         ]
1598     }
1599
1600     protected def tcpEgressAllFlows() {
1601         val theFlowId = "TCP_DESTINATION_1_0Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1602          #[
1603              new FlowEntityBuilder >> [
1604                 dpnId = 123bi
1605                 cookie = 110100480bi
1606                 flowId = theFlowId
1607                 flowName = "ACL"
1608                 instructionInfoList = #[
1609                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1610                 ]
1611                 matchInfoList = #[
1612                     new MatchEthernetType(2048L),
1613                     new MatchEthernetType(2048L),
1614                     new MatchIpProtocol(6 as short),
1615                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1616                 ]
1617                 priority = IdHelper.getId(theFlowId)
1618                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1619             ]
1620          ]
1621
1622      }
1623
1624     protected def icmpIngressFlowsPort3() {
1625         val flowId1 = "ICMP_V4_DESTINATION_23_Ingress_123_987_85cc3048-abc3-43cc-89b3-377341426ac7"
1626         val flowId2 = "ICMP_V4_DESTINATION_23_Ingress_123_987_85cc3048-abc3-43cc-89b3-377341426a22"
1627         #[
1628             new FlowEntityBuilder >> [
1629                 dpnId = 123bi
1630                 cookie = 110100480bi
1631                 flowId = flowId1
1632                 flowName = "ACL"
1633                 instructionInfoList = #[
1634                     new InstructionGotoTable(NwConstants.EGRESS_ACL_COMMITTER_TABLE)
1635                 ]
1636                 matchInfoList = #[
1637                     new MatchEthernetType(2048L),
1638                     new MatchEthernetType(2048L),
1639                     new MatchIcmpv4(2 as short, 3 as short),
1640                     new MatchIpProtocol(1 as short),
1641                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1642                 ]
1643                 priority = IdHelper.getId(flowId1)
1644                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1645             ],
1646             new FlowEntityBuilder >> [
1647                 dpnId = 123bi
1648                 cookie = 110100480bi
1649                 flowId = flowId2
1650                 flowName = "ACL"
1651                 instructionInfoList = #[
1652                     new InstructionGotoTable(NwConstants.EGRESS_ACL_COMMITTER_TABLE)
1653                 ]
1654                 matchInfoList = #[
1655                     new MatchEthernetType(2048L),
1656                     new MatchEthernetType(2048L),
1657                     new MatchIcmpv4(2 as short, 3 as short),
1658                     new MatchIpProtocol(1 as short),
1659                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1660                 ]
1661                 priority = IdHelper.getId(flowId2)
1662                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1663             ]
1664         ]
1665     }
1666
1667     protected def icmpEgressFlowsPort3() {
1668         val flowId1 = "ICMP_V4_DESTINATION_23_Egress_123_987_85cc3048-abc3-43cc-89b3-377341426ac6"
1669         val flowId2 = "ICMP_V4_DESTINATION_23_Egress_123_987_85cc3048-abc3-43cc-89b3-377341426a21"
1670         #[
1671             new FlowEntityBuilder >> [
1672                 dpnId = 123bi
1673                 cookie = 110100480bi
1674                 flowId = flowId1
1675                 flowName = "ACL"
1676                 instructionInfoList = #[
1677                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1678                 ]
1679                 matchInfoList = #[
1680                     new MatchEthernetType(2048L),
1681                     new MatchEthernetType(2048L),
1682                     new MatchIcmpv4(2 as short, 3 as short),
1683                     new MatchIpProtocol(1 as short),
1684                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1685                 ]
1686                 priority = IdHelper.getId(flowId1)
1687                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1688             ],
1689             new FlowEntityBuilder >> [
1690                 dpnId = 123bi
1691                 cookie = 110100480bi
1692                 flowId = flowId2
1693                 flowName = "ACL"
1694                 instructionInfoList = #[
1695                     new InstructionGotoTable(NwConstants.INGRESS_ACL_COMMITTER_TABLE)
1696                 ]
1697                 matchInfoList = #[
1698                     new MatchEthernetType(2048L),
1699                     new MatchEthernetType(2048L),
1700                     new MatchIcmpv4(2 as short, 3 as short),
1701                     new MatchIpProtocol(1 as short),
1702                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1703                 ]
1704                 priority = IdHelper.getId(flowId2)
1705                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1706             ]
1707         ]
1708     }
1709
1710     override def expectedFlows(String mac) {
1711         // Code auto. generated by https://github.com/vorburger/xtendbeans
1712         #[
1713             new FlowEntityBuilder >> [
1714                 dpnId = 123bi
1715                 cookie = 110100480bi
1716                 flowId = "Ingress_DHCP_Server_v4123_987_Permit_"
1717                 flowName = "ACL"
1718                 instructionInfoList = #[
1719                     new InstructionApplyActions(#[
1720                         new ActionNxResubmit(220 as short)
1721                     ])
1722                 ]
1723                 matchInfoList = #[
1724                     new MatchEthernetType(2048L),
1725                     new MatchIpProtocol(17 as short),
1726                     new MatchUdpDestinationPort(68 as short),
1727                     new MatchUdpSourcePort(67 as short),
1728                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1729                 ]
1730                 priority = 63010
1731                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1732             ],
1733             new FlowEntityBuilder >> [
1734                 dpnId = 123bi
1735                 cookie = 110100480bi
1736                 flowId = "Ingress_DHCP_Server_v6_123_987_Permit_"
1737                 flowName = "ACL"
1738                 instructionInfoList = #[
1739                     new InstructionApplyActions(#[
1740                         new ActionNxResubmit(220 as short)
1741                     ])
1742                 ]
1743                 matchInfoList = #[
1744                     new MatchEthernetType(34525L),
1745                     new MatchIpProtocol(17 as short),
1746                     new MatchUdpDestinationPort(546 as short),
1747                     new MatchUdpSourcePort(547 as short),
1748                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1749                 ]
1750                 priority = 63010
1751                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1752             ],
1753             new FlowEntityBuilder >> [
1754                 dpnId = 123bi
1755                 cookie = 110100480bi
1756                 flowId = "Ingress_ICMPv6_123_987_130_Permit_"
1757                 flowName = "ACL"
1758                 instructionInfoList = #[
1759                     new InstructionApplyActions(#[
1760                         new ActionNxResubmit(220 as short)
1761                     ])
1762                 ]
1763                 matchInfoList = #[
1764                     new MatchEthernetType(34525L),
1765                     new MatchIpProtocol(58 as short),
1766                     new MatchIcmpv6(130 as short, 0 as short),
1767                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1768                 ]
1769                 priority = 63010
1770                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1771             ],
1772             new FlowEntityBuilder >> [
1773                 dpnId = 123bi
1774                 cookie = 110100480bi
1775                 flowId = "Ingress_ICMPv6_123_987_135_Permit_"
1776                 flowName = "ACL"
1777                 instructionInfoList = #[
1778                     new InstructionApplyActions(#[
1779                         new ActionNxResubmit(220 as short)
1780                     ])
1781                 ]
1782                 matchInfoList = #[
1783                     new MatchEthernetType(34525L),
1784                     new MatchIpProtocol(58 as short),
1785                     new MatchIcmpv6(135 as short, 0 as short),
1786                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1787                 ]
1788                 priority = 63010
1789                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1790             ],
1791             new FlowEntityBuilder >> [
1792                 dpnId = 123bi
1793                 cookie = 110100480bi
1794                 flowId = "Ingress_ICMPv6_123_987_136_Permit_"
1795                 flowName = "ACL"
1796                 instructionInfoList = #[
1797                     new InstructionApplyActions(#[
1798                         new ActionNxResubmit(220 as short)
1799                     ])
1800                 ]
1801                 matchInfoList = #[
1802                     new MatchEthernetType(34525L),
1803                     new MatchIpProtocol(58 as short),
1804                     new MatchIcmpv6(136 as short, 0 as short),
1805                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1806                 ]
1807                 priority = 63010
1808                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1809             ],
1810             new FlowEntityBuilder >> [
1811                 dpnId = 123bi
1812                 cookie = 110100480bi
1813                 flowId = "Ingress_ARP_123_987"
1814                 flowName = "ACL"
1815                 instructionInfoList = #[
1816                     new InstructionApplyActions(#[
1817                         new ActionNxResubmit(220 as short)
1818                     ])
1819                 ]
1820                 matchInfoList = #[
1821                     new MatchEthernetType(2054L),
1822                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1823                 ]
1824                 priority = 63010
1825                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1826             ],
1827             new FlowEntityBuilder >> [
1828                 dpnId = 123bi
1829                 cookie = 110100480bi
1830                 flowId = "Ingress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F3_10.0.0.1/32"
1831                 flowName = "ACL"
1832                 instructionInfoList = #[
1833                     new InstructionGotoTable(NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
1834                 ]
1835                 matchInfoList = #[
1836                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1837                     new MatchEthernetDestination(new MacAddress(mac)),
1838                     new MatchEthernetType(2048L),
1839                     new MatchIpv4Destination("10.0.0.1", "32")
1840                 ]
1841                 priority = 61010
1842                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
1843             ],
1844             new FlowEntityBuilder >> [
1845                 dpnId = 123bi
1846                 cookie = 110100481bi
1847                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
1848                 flowName = "ACL"
1849                 instructionInfoList = #[
1850                     new InstructionApplyActions(#[
1851                         new ActionDrop()
1852                     ])
1853                 ]
1854                 matchInfoList = #[
1855                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1856                     new NxMatchCtState(48L, 48L)
1857                 ]
1858                 priority = 62020
1859                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
1860             ],
1861             new FlowEntityBuilder >> [
1862                 dpnId = 123bi
1863                 cookie = 110100480bi
1864                 flowId = "Egress_DHCP_Client_v4123_987_" + mac + "_Permit_"
1865                 flowName = "ACL"
1866                 instructionInfoList = #[
1867                     new InstructionApplyActions(#[
1868                         new ActionNxResubmit(17 as short)
1869                     ])
1870                 ]
1871                 matchInfoList = #[
1872                     new MatchEthernetType(2048L),
1873                     new MatchIpProtocol(17 as short),
1874                     new MatchUdpDestinationPort(67 as short),
1875                     new MatchUdpSourcePort(68 as short),
1876                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1877                     new MatchEthernetSource(new MacAddress(mac))
1878                 ]
1879                 priority = 63010
1880                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1881             ],
1882             new FlowEntityBuilder >> [
1883                 dpnId = 123bi
1884                 cookie = 110100480bi
1885                 flowId = "Egress_DHCP_Server_v4123_987_Drop_"
1886                 flowName = "ACL"
1887                 instructionInfoList = #[
1888                 ]
1889                 matchInfoList = #[
1890                     new MatchEthernetType(2048L),
1891                     new MatchIpProtocol(17 as short),
1892                     new MatchUdpDestinationPort(68 as short),
1893                     new MatchUdpSourcePort(67 as short),
1894                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1895                 ]
1896                 priority = 63010
1897                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1898             ],
1899             new FlowEntityBuilder >> [
1900                 dpnId = 123bi
1901                 cookie = 110100480bi
1902                 flowId = "Egress_DHCP_Server_v6_123_987_Drop_"
1903                 flowName = "ACL"
1904                 instructionInfoList = #[
1905                 ]
1906                 matchInfoList = #[
1907                     new MatchEthernetType(34525L),
1908                     new MatchIpProtocol(17 as short),
1909                     new MatchUdpDestinationPort(546 as short),
1910                     new MatchUdpSourcePort(547 as short),
1911                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1912                 ]
1913                 priority = 63010
1914                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1915             ],
1916             new FlowEntityBuilder >> [
1917                 dpnId = 123bi
1918                 cookie = 110100480bi
1919                 flowId = "Egress_ICMPv6_123_987_134_Drop_"
1920                 flowName = "ACL"
1921                 instructionInfoList = #[
1922                 ]
1923                 matchInfoList = #[
1924                     new MatchEthernetType(34525L),
1925                     new MatchIpProtocol(58 as short),
1926                     new MatchIcmpv6(134 as short, 0 as short),
1927                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1928                 ]
1929                 priority = 63020
1930                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1931             ],
1932             new FlowEntityBuilder >> [
1933                 dpnId = 123bi
1934                 cookie = 110100480bi
1935                 flowId = "Egress_ICMPv6_123_987_133_Permit_"
1936                 flowName = "ACL"
1937                 instructionInfoList = #[
1938                     new InstructionApplyActions(#[
1939                         new ActionNxResubmit(17 as short)
1940                     ])
1941                 ]
1942                 matchInfoList = #[
1943                     new MatchEthernetType(34525L),
1944                     new MatchIpProtocol(58 as short),
1945                     new MatchIcmpv6(133 as short, 0 as short),
1946                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1947                 ]
1948                 priority = 63010
1949                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1950             ],
1951             new FlowEntityBuilder >> [
1952                 dpnId = 123bi
1953                 cookie = 110100480bi
1954                 flowId = "Egress_ICMPv6_123_987_135_Permit_"
1955                 flowName = "ACL"
1956                 instructionInfoList = #[
1957                     new InstructionApplyActions(#[
1958                         new ActionNxResubmit(17 as short)
1959                     ])
1960                 ]
1961                 matchInfoList = #[
1962                     new MatchEthernetType(34525L),
1963                     new MatchIpProtocol(58 as short),
1964                     new MatchIcmpv6(135 as short, 0 as short),
1965                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1966                 ]
1967                 priority = 63010
1968                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1969             ],
1970             new FlowEntityBuilder >> [
1971                 dpnId = 123bi
1972                 cookie = 110100480bi
1973                 flowId = "Egress_ICMPv6_123_987_136_Permit_"
1974                 flowName = "ACL"
1975                 instructionInfoList = #[
1976                     new InstructionApplyActions(#[
1977                         new ActionNxResubmit(17 as short)
1978                     ])
1979                 ]
1980                 matchInfoList = #[
1981                     new MatchEthernetType(34525L),
1982                     new MatchIpProtocol(58 as short),
1983                     new MatchIcmpv6(136 as short, 0 as short),
1984                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1985                 ]
1986                 priority = 63010
1987                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
1988             ],
1989             new FlowEntityBuilder >> [
1990                 dpnId = 123bi
1991                 cookie = 110100480bi
1992                 flowId = "Egress_Fixed_Goto_Classifier_123_987_0D:AA:D8:42:30:F3_10.0.0.1/32"
1993                 flowName = "ACL"
1994                 instructionInfoList = #[
1995                     new InstructionGotoTable(211 as short)
1996                 ]
1997                 matchInfoList = #[
1998                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1999                     new MatchEthernetSource(new MacAddress(mac)),
2000                     new MatchEthernetType(2048L),
2001                     new MatchIpv4Source("10.0.0.1", "32")
2002                 ]
2003                 priority = 61010
2004                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
2005             ],
2006             new FlowEntityBuilder >> [
2007                 dpnId = 123bi
2008                 cookie = 110100481bi
2009                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
2010                 flowName = "ACL"
2011                 instructionInfoList = #[
2012                     new InstructionApplyActions(#[
2013                         new ActionDrop()
2014                     ])
2015                 ]
2016                 matchInfoList = #[
2017                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
2018                     new NxMatchCtState(48L, 48L)
2019                 ]
2020                 priority = 62020
2021                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
2022             ],
2023             new FlowEntityBuilder >> [
2024                 dpnId = 123bi
2025                 cookie = 110100480bi
2026                 flowId = "Ingress_Fixed_Conntrk_123_987_MatchEthernetType[2048]_Recirc"
2027             flowName = "ACL"
2028             instructionInfoList = #[
2029                 new InstructionApplyActions(#[
2030                     new ActionNxConntrack(2, 0, 0, 5000, NwConstants.EGRESS_ACL_FOR_EXISTING_TRAFFIC_TABLE)
2031                 ])
2032             ]
2033             matchInfoList = #[
2034                 new MatchEthernetType(2048L),
2035                 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
2036                 ]
2037                 priority = 100
2038                 tableId = NwConstants.EGRESS_ACL_CONNTRACK_SENDER_TABLE
2039             ],
2040             new FlowEntityBuilder >> [
2041                 dpnId = 123bi
2042                 cookie = 110100480bi
2043                 flowId = "Egress_Fixed_Conntrk_123_987_MatchEthernetType[2048]_Recirc"
2044                 flowName = "ACL"
2045                 instructionInfoList = #[
2046                     new InstructionApplyActions(#[
2047                         new ActionNxConntrack(2, 0, 0, 5000, NwConstants.INGRESS_ACL_FOR_EXISTING_TRAFFIC_TABLE)
2048                     ])
2049                 ]
2050                 matchInfoList = #[
2051                     new MatchEthernetType(2048L),
2052                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
2053                 ]
2054                 priority = 100
2055                 tableId = NwConstants.INGRESS_ACL_CONNTRACK_SENDER_TABLE
2056             ],
2057             new FlowEntityBuilder >> [
2058                 dpnId = 123bi
2059                 cookie = 110100480bi
2060                 flowId = "Egress_ARP_123_987_" + mac + "10.0.0.1/32"
2061                 flowName = "ACL"
2062                 instructionInfoList = #[
2063                     new InstructionApplyActions(#[
2064                         new ActionNxResubmit(17 as short)
2065                     ])
2066                 ]
2067                 matchInfoList = #[
2068                     new MatchEthernetType(2054L),
2069                     new MatchArpSha(new MacAddress(mac)),
2070                     new MatchEthernetSource(new MacAddress(mac)),
2071                     new MatchArpSpa(new Ipv4Prefix("10.0.0.1/32")),
2072                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
2073                 ]
2074                 priority = 63010
2075                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
2076             ],
2077             new FlowEntityBuilder >> [
2078                 dpnId = 123bi
2079                 cookie = 110100480bi
2080                 flowId = "Egress_L2Broadcast_123_987_" + mac
2081                 flowName = "ACL"
2082                 instructionInfoList = #[
2083                     new InstructionApplyActions(#[
2084                         new ActionNxResubmit(17 as short)
2085                     ])
2086                 ]
2087                 matchInfoList = #[
2088                     new MatchEthernetSource(new MacAddress(mac)),
2089                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
2090                 ]
2091                 priority = 61005
2092                 tableId = NwConstants.INGRESS_ACL_ANTI_SPOOFING_TABLE
2093             ],
2094             new FlowEntityBuilder >> [
2095                 cookie = 110100480bi
2096                 dpnId = 123bi
2097                 flowId = "Ingress_v4_Broadcast_123_987_10.0.0.255_Permit"
2098                 flowName = "ACL"
2099                 hardTimeOut = 0
2100                 idleTimeOut = 0
2101                 instructionInfoList = #[
2102                     new InstructionGotoTable(NwConstants.EGRESS_ACL_CONNTRACK_CLASSIFIER_TABLE)
2103                 ]
2104                 matchInfoList = #[
2105                     new MatchEthernetDestination(new MacAddress("ff:ff:ff:ff:ff:ff")),
2106                     new MatchEthernetType(2048L),
2107                     new MatchIpv4Destination(new Ipv4Prefix("10.0.0.255/32")),
2108                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
2109                 ]
2110                 priority = 61010
2111                 sendFlowRemFlag = false
2112                 strictFlag = false
2113                 tableId = NwConstants.EGRESS_ACL_ANTI_SPOOFING_TABLE
2114             ],
2115             new FlowEntityBuilder >> [
2116                 dpnId = 123bi
2117                 cookie = 110100480bi
2118                 flowId = "Ingress_Acl_Commit_Conntrack_123_987_MatchEthernetType[2048]"
2119                 flowName = "ACL"
2120                 instructionInfoList = #[
2121                     new InstructionApplyActions(#[
2122                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short,
2123                             Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE))
2124                         ),
2125                         new ActionNxResubmit(220 as short)
2126                     ])
2127                 ]
2128                 matchInfoList = #[
2129                     new MatchEthernetType(2048L),
2130                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
2131                     new MatchMetadata(0bi, 2bi)
2132                     ]
2133                 priority = 100
2134                 tableId = 247 as short
2135             ],
2136             new FlowEntityBuilder >> [
2137                 dpnId = 123bi
2138                 cookie = 110100480bi
2139                 flowId = "Ingress_Acl_Commit_Conntrack_123_987_MatchEthernetType[34525]"
2140                 flowName = "ACL"
2141                 instructionInfoList = #[
2142                     new InstructionApplyActions(#[
2143                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short,
2144                             Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE))
2145                         ),
2146                         new ActionNxResubmit(220 as short)
2147                     ])
2148                 ]
2149                 matchInfoList = #[
2150                     new MatchEthernetType(34525L),
2151                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
2152                     new MatchMetadata(0bi, 2bi)
2153                 ]
2154                 priority = 100
2155                 tableId = 247 as short
2156             ],
2157             new FlowEntityBuilder >> [
2158                 dpnId = 123bi
2159                 cookie = 110100480bi
2160                 flowId = "Egress_Acl_Commit_Conntrack_123_987_MatchEthernetType[2048]"
2161                 flowName = "ACL"
2162                 instructionInfoList = #[
2163                     new InstructionApplyActions(#[
2164                     new ActionNxConntrack(2, 1, 0, 5000, 255 as short,
2165                             Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE))
2166                     ),
2167                     new ActionNxResubmit(17 as short)
2168                     ])
2169                 ]
2170                 matchInfoList = #[
2171                     new MatchEthernetType(2048L),
2172                     new MatchMetadata(1085217976614912bi, 1152920405095219202bi)
2173                 ]
2174                 priority = 100
2175                 tableId = 217 as short
2176             ],
2177             new FlowEntityBuilder >> [
2178                 dpnId = 123bi
2179                 cookie = 110100480bi
2180                 flowId = "Egress_Acl_Commit_Conntrack_123_987_MatchEthernetType[34525]"
2181                 flowName = "ACL"
2182                 instructionInfoList = #[
2183                     new InstructionApplyActions(#[
2184                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short,
2185                             Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE))
2186                         ),
2187                         new ActionNxResubmit(17 as short)
2188                     ])
2189                 ]
2190                 matchInfoList = #[
2191                     new MatchEthernetType(34525L),
2192                         new MatchMetadata(1085217976614912bi, 1152920405095219202bi)
2193                 ]
2194                 priority = 100
2195                 tableId = 217 as short
2196             ],
2197             new FlowEntityBuilder >> [
2198                 dpnId = 123bi
2199                 cookie = 110100480bi
2200                 flowId = "Egress_Acl_Commit_Non_Conntrack_123_987"
2201                 flowName = "ACL"
2202                 instructionInfoList = #[
2203                     new InstructionApplyActions(#[
2204                         new ActionNxResubmit(17 as short)
2205                     ])
2206                 ]
2207                 matchInfoList = #[
2208                 new MatchMetadata(1085217976614914bi, 1152920405095219202bi)
2209                 ]
2210                 priority = 100
2211                 tableId = 217 as short
2212             ],
2213             new FlowEntityBuilder >> [
2214                 dpnId = 123bi
2215                 cookie = 110100480bi
2216                 flowId = "Ingress_Acl_Commit_Non_Conntrack_123_987"
2217                 flowName = "ACL"
2218                 instructionInfoList = #[
2219                     new InstructionApplyActions(#[
2220                     new ActionNxResubmit(220 as short)
2221                     ])
2222                 ]
2223                 matchInfoList = #[
2224                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
2225                     new MatchMetadata(2bi, 2bi)
2226                 ]
2227                 priority = 100
2228                 tableId = 247 as short
2229             ],
2230             new FlowEntityBuilder >> [
2231                 dpnId = 123bi
2232                 cookie = 110100481bi
2233                 flowId = "Ingress_Fixed_Acl_Rule_Miss_Drop_123_987"
2234                 flowName = "ACL"
2235                 instructionInfoList = #[
2236                     new InstructionApplyActions(#[
2237                         new ActionDrop()
2238                     ])
2239                 ]
2240                 matchInfoList = #[
2241                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
2242                 ]
2243                 priority = 50
2244                 tableId = 244 as short
2245             ],
2246             new FlowEntityBuilder >> [
2247                 dpnId = 123bi
2248                 cookie = 110100481bi
2249                 flowId = "Egress_Fixed_Acl_Rule_Miss_Drop_123_987"
2250                 flowName = "ACL"
2251                 instructionInfoList = #[
2252                     new InstructionApplyActions(#[
2253                         new ActionDrop()
2254                     ])
2255                 ]
2256                 matchInfoList = #[
2257                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
2258                 ]
2259                 priority = 50
2260                 tableId = 214 as short
2261             ]
2262         ]
2263     }
2264
2265     protected def ingressCommitConntrack1() {
2266         val flowId1 = "Ingress_Acl_Commit_Conntrack_123_987_MatchEthernetType[2048]"
2267         val flowId2 = "Ingress_Acl_Commit_Conntrack_123_987_MatchEthernetType[34525]"
2268         #[
2269             new FlowEntityBuilder >> [
2270                     dpnId = 123bi
2271                     cookie = 110100480bi
2272                     flowId = flowId1
2273                     flowName = "ACL"
2274                     instructionInfoList = #[
2275                         new InstructionApplyActions(#[
2276                             new ActionNxConntrack(2, 1, 0, 5000, 255 as short,
2277                                 Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE)
2278                                 )
2279                             ),
2280                             new ActionNxResubmit(220 as short)
2281                         ])
2282                     ]
2283                     matchInfoList = #[
2284                         new MatchEthernetType(2048L),
2285                         new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
2286                         new MatchMetadata(0bi, 2bi)
2287                     ]
2288                     priority = 100
2289                     tableId = 247 as short
2290             ],
2291             new FlowEntityBuilder >> [
2292                 dpnId = 123bi
2293                 cookie = 110100480bi
2294                 flowId = flowId2
2295                 flowName = "ACL"
2296                 instructionInfoList = #[
2297                     new InstructionApplyActions(#[
2298                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short,
2299                             Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE))
2300                         ),
2301                         new ActionNxResubmit(220 as short)
2302                         ])
2303                     ]
2304                     matchInfoList = #[
2305                         new MatchEthernetType(34525L),
2306                         new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
2307                         new MatchMetadata(0bi, 2bi)
2308                     ]
2309                     priority = 100
2310                     tableId = 247 as short
2311             ]
2312         ]
2313     }
2314
2315     protected def egressCommitConntrack1() {
2316         val flowId1 = "Egress_Acl_Commit_Conntrack_123_987_MatchEthernetType[2048]"
2317         val flowId2 = "Egress_Acl_Commit_Conntrack_123_987_MatchEthernetType[34525]"
2318         #[
2319             new FlowEntityBuilder >> [
2320                 dpnId = 123bi
2321                 cookie = 110100480bi
2322                 flowId = flowId1
2323                 flowName = "ACL"
2324                 instructionInfoList = #[
2325                     new InstructionApplyActions(#[
2326                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short,
2327                             Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE))
2328                         ),
2329                         new ActionNxResubmit(17 as short)
2330                     ])
2331                 ]
2332                 matchInfoList = #[
2333                     new MatchEthernetType(2048L),
2334                     new MatchMetadata(1085217976614912bi, 1152920405095219202bi)
2335                 ]
2336                 priority = 100
2337                 tableId = 217 as short
2338             ],
2339             new FlowEntityBuilder >> [
2340                 dpnId = 123bi
2341                 cookie = 110100480bi
2342                 flowId = flowId2
2343                 flowName = "ACL"
2344                 instructionInfoList = #[
2345                     new InstructionApplyActions(#[
2346                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short,
2347                             Collections.singletonList(new ActionNxConntrack.NxCtMark(AclConstants.CT_MARK_EST_STATE))
2348                         ),
2349                         new ActionNxResubmit(17 as short)
2350                     ])
2351                 ]
2352                 matchInfoList = #[
2353                     new MatchEthernetType(34525L),
2354                         new MatchMetadata(1085217976614912bi, 1152920405095219202bi)
2355                 ]
2356                 priority = 100
2357                 tableId = 217 as short
2358             ]
2359         ]
2360     }
2361
2362     protected def egressCommitNonConntrack1() {
2363         val flowId1 = "Egress_Acl_Commit_Non_Conntrack_123_987"
2364         #[
2365             new FlowEntityBuilder >> [
2366                 dpnId = 123bi
2367                 cookie = 110100480bi
2368                 flowId = flowId1
2369                 flowName = "ACL"
2370                 instructionInfoList = #[
2371                     new InstructionApplyActions(#[
2372                     new ActionNxResubmit(17 as short)
2373                     ])
2374                 ]
2375                 matchInfoList = #[
2376                     new MatchMetadata(1085217976614914bi, 1152920405095219202bi)
2377                 ]
2378                 priority = 100
2379                 tableId = 217 as short
2380             ]
2381         ]
2382     }
2383
2384     protected def ingressCommitNonConntrack1() {
2385         val flowId1 = "Ingress_Acl_Commit_Non_Conntrack_123_987"
2386         #[
2387             new FlowEntityBuilder >> [
2388                 dpnId = 123bi
2389                 cookie = 110100480bi
2390                 flowId = flowId1
2391                 flowName = "ACL"
2392                 instructionInfoList = #[
2393                     new InstructionApplyActions(#[
2394                         new ActionNxResubmit(220 as short)
2395                     ])
2396                 ]
2397                  matchInfoList = #[
2398                      new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
2399                          new MatchMetadata(2bi, 2bi)
2400                      ]
2401                  priority = 100
2402                  tableId = 247 as short
2403             ]
2404         ]
2405     }
2406
2407     protected def ingressfixedAclMissDrop1() {
2408         val flowId1 = "Ingress_Fixed_Acl_Rule_Miss_Drop_123_987"
2409         #[
2410             new FlowEntityBuilder >> [
2411                 dpnId = 123bi
2412                 cookie = 110100481bi
2413                 flowId = flowId1
2414                 flowName = "ACL"
2415                 instructionInfoList = #[
2416                     new InstructionApplyActions(#[
2417                         new ActionDrop()
2418                     ])
2419                 ]
2420                 matchInfoList = #[
2421                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
2422                 ]
2423                 priority = 50
2424                 tableId = 244 as short
2425             ]
2426         ]
2427     }
2428
2429     protected def egressfixedAclMissDrop1() {
2430         val flowId1 = "Egress_Fixed_Acl_Rule_Miss_Drop_123_987"
2431         #[
2432             new FlowEntityBuilder >> [
2433                 dpnId = 123bi
2434                 cookie = 110100481bi
2435                 flowId = flowId1
2436                 flowName = "ACL"
2437                 instructionInfoList = #[
2438                     new InstructionApplyActions(#[
2439                         new ActionDrop()
2440                     ])
2441                 ]
2442                 matchInfoList = #[
2443                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
2444                 ]
2445                 priority = 50
2446                 tableId = 214 as short
2447             ]
2448         ]
2449     }
2450
2451     protected def ingressDispatcherFirst() {
2452         val flowId1 = "Ingress_ACL_Dispatcher_First_123_987_2"
2453         #[
2454             new FlowEntityBuilder >> [
2455                 dpnId = 123bi
2456                 cookie = 110100480bi
2457                 flowId = flowId1
2458                 flowName = "ACL"
2459                 instructionInfoList = #[
2460                     new InstructionGotoTable(245 as short),
2461                     new InstructionWriteMetadata(32bi, 16777200bi)
2462                 ]
2463                 matchInfoList = #[
2464                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
2465                 ]
2466                 priority = IdHelper.getId(flowId1)
2467                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
2468             ]
2469         ]
2470     }
2471
2472     protected def ingressDispatcherLast() {
2473         val flowId1 = "Ingress_ACL_Dispatcher_Last_123_987_2"
2474         #[
2475             new FlowEntityBuilder >> [
2476                 dpnId = 123bi
2477                 cookie = 110100481bi
2478                 flowId = flowId1
2479                 flowName = "ACL"
2480                 instructionInfoList = #[
2481                     new InstructionApplyActions(#[
2482                         new ActionDrop()
2483                     ])
2484                 ]
2485                 matchInfoList = #[
2486                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
2487                     new MatchMetadata(32bi, 16777200bi)
2488                 ]
2489                 priority = IdHelper.getId(flowId1)
2490                 tableId = NwConstants.EGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
2491             ]
2492         ]
2493     }
2494
2495     protected def egressDispatcherFirst() {
2496         val flowId1 = "Egress_ACL_Dispatcher_First_123_987_2"
2497         #[
2498             new FlowEntityBuilder >> [
2499                 dpnId = 123bi
2500                 cookie = 110100480bi
2501                 flowId = flowId1
2502                 flowName = "ACL"
2503                 instructionInfoList = #[
2504                     new InstructionGotoTable(215 as short),
2505                     new InstructionWriteMetadata(32bi, 16777200bi)
2506                 ]
2507                 matchInfoList = #[
2508                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
2509                 ]
2510                 priority = IdHelper.getId(flowId1)
2511                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
2512             ]
2513         ]
2514     }
2515
2516     protected def egressDispatcherLast() {
2517         val flowId1 = "Egress_ACL_Dispatcher_Last_123_987_2"
2518         #[
2519             new FlowEntityBuilder >> [
2520                 dpnId = 123bi
2521                 cookie = 110100481bi
2522                 flowId = flowId1
2523                 flowName = "ACL"
2524                 instructionInfoList = #[
2525                     new InstructionApplyActions(#[
2526                         new ActionDrop()
2527                     ])
2528                 ]
2529                 matchInfoList = #[
2530                     new MatchMetadata(1085217976614944bi, 1152920405111996400bi)
2531                 ]
2532                 priority = IdHelper.getId(flowId1)
2533                 tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
2534             ]
2535         ]
2536     }
2537
2538     protected def egressDispatcherFirst1() {
2539             val flowId1 = "Egress_ACL_Dispatcher_First_123_987_4"
2540             #[
2541                 new FlowEntityBuilder >> [
2542                     dpnId = 123bi
2543                     cookie = 110100480bi
2544                     flowId = flowId1
2545                     flowName = "ACL"
2546                     instructionInfoList = #[
2547                         new InstructionGotoTable(215 as short),
2548                         new InstructionWriteMetadata(64bi, 16777200bi)
2549                     ]
2550                     matchInfoList = #[
2551                         new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
2552                     ]
2553                     priority = IdHelper.getId(flowId1)
2554                     tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
2555                 ]
2556             ]
2557         }
2558
2559         protected def egressDispatcherLast1() {
2560             val flowId1 = "Egress_ACL_Dispatcher_Last_123_987_4"
2561             #[
2562                 new FlowEntityBuilder >> [
2563                     dpnId = 123bi
2564                     cookie = 110100481bi
2565                     flowId = flowId1
2566                     flowName = "ACL"
2567                     instructionInfoList = #[
2568                         new InstructionApplyActions(#[
2569                             new ActionDrop()
2570                         ])
2571                     ]
2572                     matchInfoList = #[
2573                         new MatchMetadata(1085217976614976bi, 1152920405111996400bi)
2574                     ]
2575                     priority = IdHelper.getId(flowId1)
2576                     tableId = NwConstants.INGRESS_ACL_FILTER_CUM_DISPATCHER_TABLE
2577                 ]
2578             ]
2579         }
2580 }