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