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