Update egress ACL service to match on lport-tag reg6 mask
[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.actions.ActionNxConntrack
11 import org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit
12 import org.opendaylight.genius.mdsalutil.actions.ActionDrop
13 import org.opendaylight.genius.mdsalutil.FlowEntity
14 import org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions
15 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetDestination
16 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetSource
17 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetType
18 import org.opendaylight.genius.mdsalutil.matches.MatchIcmpv4
19 import org.opendaylight.genius.mdsalutil.matches.MatchIcmpv6
20 import org.opendaylight.genius.mdsalutil.matches.MatchIpProtocol
21 import org.opendaylight.genius.mdsalutil.matches.MatchIpv4Destination
22 import org.opendaylight.genius.mdsalutil.matches.MatchIpv4Source
23 import org.opendaylight.genius.mdsalutil.matches.MatchUdpDestinationPort
24 import org.opendaylight.genius.mdsalutil.matches.MatchUdpSourcePort
25 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchCtState
26 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchTcpDestinationPort
27 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchUdpDestinationPort
28 import org.opendaylight.genius.mdsalutil.MetaDataUtil
29 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress
30
31 import org.opendaylight.genius.mdsalutil.matches.MatchArpSha
32 import org.opendaylight.genius.mdsalutil.NwConstants
33 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchRegister
34 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg6
35 import org.opendaylight.genius.mdsalutil.matches.MatchMetadata
36
37 class FlowEntryObjectsStateful extends FlowEntryObjectsBase {
38
39     protected def etherFlows() {
40         fixedIngressFlowsPort1
41         + fixedConntrackIngressFlowsPort1
42         + fixedEgressFlowsPort1
43         + fixedConntrackEgressFlowsPort1
44         + etherEgressFlowsPort1
45         + fixedIngressFlowsPort2
46         + fixedConntrackIngressFlowsPort2
47         + etherIngressFlowsPort2
48         + fixedEgressFlowsPort2
49         + fixedConntrackEgressFlowsPort2
50         + etheregressFlowPort2
51     }
52
53     protected def tcpFlows() {
54         fixedIngressFlowsPort1
55         + fixedConntrackIngressFlowsPort1
56         + tcpIngressFlowPort1
57         + fixedEgressFlowsPort1
58         + fixedConntrackEgressFlowsPort1
59         + fixedIngressFlowsPort2
60         + fixedConntrackIngressFlowsPort2
61         + tcpIngressFlowPort2
62         + fixedEgressFlowsPort2
63         + fixedConntrackEgressFlowsPort2
64         + tcpEgressFlowPort2
65     }
66
67     protected def udpFlows() {
68         fixedIngressFlowsPort1
69         + fixedConntrackIngressFlowsPort1
70         + fixedEgressFlowsPort1
71         + fixedConntrackEgressFlowsPort1
72         + udpEgressFlowsPort1
73         + fixedIngressFlowsPort2
74         + fixedConntrackIngressFlowsPort2
75         + udpIngressFlowsPort2
76         + fixedEgressFlowsPort2
77         + fixedConntrackEgressFlowsPort2
78         + udpEgressFlowsPort2
79     }
80
81     protected def icmpFlows() {
82         fixedIngressFlowsPort1
83         + fixedConntrackIngressFlowsPort1
84         + icmpIngressFlowsPort1
85         + fixedEgressFlowsPort1
86         + fixedConntrackEgressFlowsPort1
87         + fixedIngressFlowsPort2
88         + fixedConntrackIngressFlowsPort2
89         + icmpIngressFlowsPort2
90         + fixedEgressFlowsPort2
91         + fixedConntrackEgressFlowsPort2
92         + icmpEgressFlowsPort2
93     }
94
95     protected def dstRangeFlows() {
96         fixedIngressFlowsPort1
97         +fixedConntrackIngressFlowsPort1
98         + udpIngressPortRangeFlows
99         + fixedEgressFlowsPort1
100         + fixedConntrackEgressFlowsPort1
101         + tcpEgressRangeFlows
102     }
103
104     protected def dstAllFlows() {
105         fixedIngressFlowsPort1
106         + fixedConntrackIngressFlowsPort1
107         + udpIngressAllFlows
108         + fixedEgressFlowsPort1
109         + fixedConntrackEgressFlowsPort1
110         + tcpEgressAllFlows
111     }
112
113     protected def icmpFlowsForTwoAclsHavingSameRules() {
114         fixedIngressFlowsPort3
115         + fixedConntrackIngressFlowsPort3
116         + icmpIngressFlowsPort3
117         + fixedEgressFlowsPort3
118         + fixedConntrackEgressFlowsPort3
119         + icmpEgressFlowsPort3
120     }
121
122     protected def aapWithIpv4AllFlows() {
123         icmpFlows()
124         + aapIpv4AllFlowsPort2
125     }
126
127     protected def aapIpv4AllFlowsPort2() {
128         #[
129             new FlowEntity(123bi) => [
130                 cookie = 110100480bi
131                 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F4_0.0.0.0/0_Recirc"
132                 flowName = "ACL"
133                 instructionInfoList = #[
134                     new InstructionApplyActions(#[
135                         new ActionNxConntrack(2, 0, 0, 5000, NwConstants.INGRESS_ACL_REMOTE_ACL_TABLE)
136                     ])
137                 ]
138                 matchInfoList = #[
139                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4")),
140                     new MatchEthernetType(2048L)
141                 ]
142                 priority = 61010
143                 tableId = NwConstants.INGRESS_ACL_TABLE
144             ],
145             new FlowEntity(123bi) => [
146                 cookie = 110100480bi
147                 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F4_0.0.0.0/0_Recirc"
148                 flowName = "ACL"
149                 instructionInfoList = #[
150                     new InstructionApplyActions(#[
151                         new ActionNxConntrack(2, 0, 0, 5000, NwConstants.EGRESS_ACL_REMOTE_ACL_TABLE)
152                     ])
153                 ]
154                 matchInfoList = #[
155                     new MatchEthernetType(2048L),
156                     new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F4")),
157                     new MatchEthernetType(2048L)
158                 ]
159                 priority = 61010
160                 tableId = NwConstants.EGRESS_ACL_TABLE
161             ],
162             new FlowEntity(123bi) => [
163                 cookie = 110100480bi
164                 flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F4"
165                 flowName = "ACL"
166                 instructionInfoList = #[
167                     new InstructionApplyActions(#[
168                         new ActionNxResubmit(17 as short)
169                     ])
170                 ]
171                 matchInfoList = #[
172                     new MatchEthernetType(2054L),
173                     new MatchArpSha(new MacAddress("0D:AA:D8:42:30:F4")),
174                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
175                 ]
176                 priority = 63010
177                 tableId = NwConstants.INGRESS_ACL_TABLE
178             ]
179          ]
180     }
181
182     protected def fixedConntrackIngressFlowsPort1() {
183         #[
184            new FlowEntity(123bi) => [
185                 cookie = 110100480bi
186                 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F3_10.0.0.1/32_Recirc"
187             flowName = "ACL"
188             instructionInfoList = #[
189                 new InstructionApplyActions(#[
190                     new ActionNxConntrack(2, 0, 0, 5000, 242 as short)
191                 ])
192             ]
193             matchInfoList = #[
194                 new MatchEthernetType(2048L),
195                 new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F3")),
196             new MatchEthernetType(2048L),
197             new MatchIpv4Destination("10.0.0.1", "32")
198                 ]
199                 priority = 61010
200                 tableId = 241 as short
201             ],
202             new FlowEntity(123bi) => [
203                 cookie = 110100481bi
204                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
205                 flowName = "ACL"
206                 instructionInfoList = #[
207                     new InstructionApplyActions(#[
208                         new ActionDrop()
209                     ])
210                 ]
211                 matchInfoList = #[
212                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
213                     new NxMatchCtState(33L, 33L)
214                 ]
215                 priority = 50
216                 tableId = 213 as short
217             ],
218             new FlowEntity(123bi) => [
219                 cookie = 110100481bi
220                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
221                 flowName = "ACL"
222                 instructionInfoList = #[
223                     new InstructionApplyActions(#[
224                         new ActionDrop()
225                     ])
226                 ]
227                 matchInfoList = #[
228                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
229                     new NxMatchCtState(48L, 48L)
230                 ]
231                 priority = 62015
232                 tableId = 213 as short
233             ]
234         ]
235     }
236
237     protected def etherIngressFlowsPort2() {
238         #[
239             new FlowEntity(123bi) => [
240                 cookie = 110100480bi
241                 flowId = "ETHERnull_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F3_10.0.0.1/32"
242                         +"Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
243                 flowName = "ACL"
244                 instructionInfoList = #[
245                     new InstructionApplyActions(#[
246                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
247                         new ActionNxResubmit(220 as short)
248                     ])
249                 ]
250                 matchInfoList = #[
251                     new MatchEthernetType(2048L),
252                     new MatchIpv4Source("10.0.0.1", "32"),
253                     new MatchEthernetType(2048L),
254                     new MatchEthernetType(2048L),
255                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
256                     new NxMatchCtState(33L, 33L)
257                 ]
258                 priority = IdHelper.getFlowPriority(flowId)
259                 tableId = 243 as short
260             ],
261             new FlowEntity(123bi) => [
262                 cookie = 110100480bi
263                 flowId = "ETHERnull_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F4_10.0.0.2/32"
264                         +"Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
265                 flowName = "ACL"
266                 instructionInfoList = #[
267                     new InstructionApplyActions(#[
268                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
269                         new ActionNxResubmit(220 as short)
270                     ])
271                 ]
272                 matchInfoList = #[
273                     new MatchEthernetType(2048L),
274                     new MatchIpv4Source("10.0.0.2", "32"),
275                     new MatchEthernetType(2048L),
276                     new MatchEthernetType(2048L),
277                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
278                     new NxMatchCtState(33L, 33L)
279                 ]
280                 priority = IdHelper.getFlowPriority(flowId)
281                 tableId = 243 as short
282             ]
283         ]
284     }
285
286     protected def fixedConntrackEgressFlowsPort1() {
287         #[
288             new FlowEntity(123bi) => [
289                 cookie = 110100480bi
290                 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F3_10.0.0.1/32_Recirc"
291                 flowName = "ACL"
292                 instructionInfoList = #[
293                     new InstructionApplyActions(#[
294                         new ActionNxConntrack(2, 0, 0, 5000, 212 as short)
295                     ])
296                 ]
297                 matchInfoList = #[
298                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F3")),
299                     new MatchEthernetType(2048L),
300                     new MatchIpv4Source("10.0.0.1", "32")
301                 ]
302                 priority = 61010
303                 tableId = 211 as short
304             ],
305             new FlowEntity(123bi) => [
306                 cookie = 110100481bi
307                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
308                 flowName = "ACL"
309                 instructionInfoList = #[
310                     new InstructionApplyActions(#[
311                         new ActionDrop()
312                     ])
313                 ]
314                 matchInfoList = #[
315                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
316                     new NxMatchCtState(33L, 33L)
317                 ]
318                 priority = 50
319                 tableId = 243 as short
320             ],
321             new FlowEntity(123bi) => [
322                 cookie = 110100481bi
323                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
324                 flowName = "ACL"
325                 instructionInfoList = #[
326                     new InstructionApplyActions(#[
327                         new ActionDrop()
328                     ])
329                 ]
330                 matchInfoList = #[
331                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
332                     new NxMatchCtState(48L, 48L)
333                 ]
334                 priority = 62015
335                 tableId = 243 as short
336             ]
337         ]
338     }
339
340     protected def fixedConntrackIngressFlowsPort2() {
341         #[
342              new FlowEntity(123bi) => [
343                 cookie = 110100480bi
344                 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F4_10.0.0.2/32_Recirc"
345                 flowName = "ACL"
346                 instructionInfoList = #[
347                     new InstructionApplyActions(#[
348                         new ActionNxConntrack(2, 0, 0, 5000, 242 as short)
349                     ])
350                 ]
351                 matchInfoList = #[
352                     new MatchEthernetType(2048L),
353                     new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F4")),
354                     new MatchEthernetType(2048L),
355                     new MatchIpv4Destination("10.0.0.2", "32")
356                 ]
357                 priority = 61010
358                 tableId = 241 as short
359             ],
360             new FlowEntity(123bi) => [
361                 cookie = 110100481bi
362                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
363                 flowName = "ACL"
364                 instructionInfoList = #[
365                     new InstructionApplyActions(#[
366                         new ActionDrop()
367                     ])
368                 ]
369                 matchInfoList = #[
370                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
371                     new NxMatchCtState(33L, 33L)
372                 ]
373                 priority = 50
374                 tableId = 213 as short
375             ],
376             new FlowEntity(123bi) => [
377                 cookie = 110100481bi
378                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
379                 flowName = "ACL"
380                 instructionInfoList = #[
381                     new InstructionApplyActions(#[
382                         new ActionDrop()
383                     ])
384                 ]
385                 matchInfoList = #[
386                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
387                     new NxMatchCtState(48L, 48L)
388                 ]
389                 priority = 62015
390                 tableId = 213 as short
391             ]
392         ]
393     }
394
395     protected def fixedConntrackEgressFlowsPort2() {
396         #[
397             new FlowEntity(123bi) => [
398                 cookie = 110100480bi
399                 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F4_10.0.0.2/32_Recirc"
400                 flowName = "ACL"
401                 instructionInfoList = #[
402                     new InstructionApplyActions(#[
403                         new ActionNxConntrack(2, 0, 0, 5000, 212 as short)
404                     ])
405                 ]
406                 matchInfoList = #[
407                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4")),
408                     new MatchEthernetType(2048L),
409                     new MatchIpv4Source("10.0.0.2", "32")
410                 ]
411                 priority = 61010
412                 tableId = 211 as short
413             ],
414             new FlowEntity(123bi) => [
415                 cookie = 110100481bi
416                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
417                 flowName = "ACL"
418                 instructionInfoList = #[
419                     new InstructionApplyActions(#[
420                         new ActionDrop()
421                     ])
422                 ]
423                 matchInfoList = #[
424                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
425                     new NxMatchCtState(33L, 33L)
426                 ]
427                 priority = 50
428                 tableId = 243 as short
429             ],
430             new FlowEntity(123bi) => [
431                 cookie = 110100481bi
432                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
433                 flowName = "ACL"
434                 instructionInfoList = #[
435                     new InstructionApplyActions(#[
436                         new ActionDrop()
437                     ])
438                 ]
439                 matchInfoList = #[
440                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
441                     new NxMatchCtState(48L, 48L)
442                 ]
443                 priority = 62015
444                 tableId = 243 as short
445             ]
446         ]
447     }
448
449     protected def fixedConntrackIngressFlowsPort3() {
450         #[
451             new FlowEntity(123bi) => [
452                 cookie = 110100480bi
453                 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F5_10.0.0.3/32_Recirc"
454                 flowName = "ACL"
455                 instructionInfoList = #[
456                     new InstructionApplyActions(#[
457                         new ActionNxConntrack(2, 0, 0, 5000, 242 as short)
458                     ])
459                 ]
460                 matchInfoList = #[
461                     new MatchEthernetType(2048L),
462                     new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F5")),
463                     new MatchEthernetType(2048L),
464                     new MatchIpv4Destination("10.0.0.3", "32")
465                 ]
466                 priority = 61010
467                 tableId = 241 as short
468             ],
469             new FlowEntity(123bi) => [
470                 cookie = 110100481bi
471                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
472                 flowName = "ACL"
473                 instructionInfoList = #[
474                     new InstructionApplyActions(#[
475                         new ActionDrop()
476                     ])
477                 ]
478                 matchInfoList = #[
479                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
480                     new NxMatchCtState(33L, 33L)
481                 ]
482                 priority = 50
483                 tableId = 213 as short
484             ],
485             new FlowEntity(123bi) => [
486                 cookie = 110100481bi
487                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
488                 flowName = "ACL"
489                 instructionInfoList = #[
490                     new InstructionApplyActions(#[
491                         new ActionDrop()
492                     ])
493                 ]
494                 matchInfoList = #[
495                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
496                     new NxMatchCtState(48L, 48L)
497                 ]
498                 priority = 62015
499                 tableId = 213 as short
500             ]
501         ]
502     }
503
504     protected def fixedConntrackEgressFlowsPort3() {
505         #[
506             new FlowEntity(123bi) => [
507                 cookie = 110100480bi
508                 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F5_10.0.0.3/32_Recirc"
509                 flowName = "ACL"
510                 instructionInfoList = #[
511                     new InstructionApplyActions(#[
512                         new ActionNxConntrack(2, 0, 0, 5000, 212 as short)
513                     ])
514                 ]
515                 matchInfoList = #[
516                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F5")),
517                     new MatchEthernetType(2048L),
518                     new MatchIpv4Source("10.0.0.3", "32")
519                 ]
520                 priority = 61010
521                 tableId = 211 as short
522             ],
523             new FlowEntity(123bi) => [
524                 cookie = 110100481bi
525                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
526                 flowName = "ACL"
527                 instructionInfoList = #[
528                     new InstructionApplyActions(#[
529                         new ActionDrop()
530                     ])
531                 ]
532                 matchInfoList = #[
533                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
534                     new NxMatchCtState(33L, 33L)
535                 ]
536                 priority = 50
537                 tableId = 243 as short
538             ],
539             new FlowEntity(123bi) => [
540                 cookie = 110100481bi
541                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
542                 flowName = "ACL"
543                 instructionInfoList = #[
544                     new InstructionApplyActions(#[
545                         new ActionDrop()
546                     ])
547                 ]
548                 matchInfoList = #[
549                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
550                     new NxMatchCtState(48L, 48L)
551                 ]
552                 priority = 62015
553                 tableId = 243 as short
554             ]
555         ]
556     }
557
558     static def fixedConntrackIngressFlowsPort4() {
559         #[
560             new FlowEntity(123bi) => [
561                 cookie = 110100480bi
562                 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F6_10.0.0.4/32_Recirc"
563                 flowName = "ACL"
564                 instructionInfoList = #[
565                     new InstructionApplyActions(#[
566                         new ActionNxConntrack(2, 0, 0, 5000, 242 as short)
567                     ])
568                 ]
569                 matchInfoList = #[
570                     new MatchEthernetType(2048L),
571                     new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F6")),
572                     new MatchEthernetType(2048L),
573                     new MatchIpv4Destination("10.0.0.4", "32")
574                 ]
575                 priority = 61010
576                 tableId = 241 as short
577             ],
578             new FlowEntity(123bi) => [
579                 cookie = 110100480bi
580                 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F6_0.0.0.0/0_Recirc"
581                 flowName = "ACL"
582                 instructionInfoList = #[
583                     new InstructionApplyActions(#[
584                         new ActionNxConntrack(2, 0, 0, 5000, 242 as short)
585                     ])
586                 ]
587                 matchInfoList = #[
588                     new MatchEthernetType(2048L),
589                     new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F6")),
590                     new MatchEthernetType(2048L)
591                 ]
592                 priority = 61010
593                 tableId = 241 as short
594             ],
595             new FlowEntity(123bi) => [
596                 cookie = 110100481bi
597                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
598                 flowName = "ACL"
599                 instructionInfoList = #[
600                     new InstructionApplyActions(#[
601                         new ActionDrop()
602                     ])
603                 ]
604                 matchInfoList = #[
605                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
606                     new NxMatchCtState(33L, 33L)
607                 ]
608                 priority = 50
609                 tableId = 213 as short
610             ],
611             new FlowEntity(123bi) => [
612                 cookie = 110100481bi
613                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
614                 flowName = "ACL"
615                 instructionInfoList = #[
616                     new InstructionApplyActions(#[
617                         new ActionDrop()
618                     ])
619                 ]
620                 matchInfoList = #[
621                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
622                     new NxMatchCtState(48L, 48L)
623                 ]
624                 priority = 62015
625                 tableId = 213 as short
626             ]
627         ]
628     }
629
630     static def fixedConntrackEgressFlowsPort4() {
631         #[
632             new FlowEntity(123bi) => [
633                 cookie = 110100480bi
634                 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F6_10.0.0.4/32_Recirc"
635                 flowName = "ACL"
636                 instructionInfoList = #[
637                     new InstructionApplyActions(#[
638                         new ActionNxConntrack(2, 0, 0, 5000, 212 as short)
639                     ])
640                 ]
641                 matchInfoList = #[
642                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F6")),
643                     new MatchEthernetType(2048L),
644                     new MatchIpv4Source("10.0.0.4", "32")
645                 ]
646                 priority = 61010
647                 tableId = 211 as short
648             ],
649             new FlowEntity(123bi) => [
650                 cookie = 110100480bi
651                 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F6_0.0.0.0/0_Recirc"
652                 flowName = "ACL"
653                 instructionInfoList = #[
654                     new InstructionApplyActions(#[
655                         new ActionNxConntrack(2, 0, 0, 5000, 212 as short)
656                     ])
657                 ]
658                 matchInfoList = #[
659                     new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F6")),
660                     new MatchEthernetType(2048L)
661                 ]
662                 priority = 61010
663                 tableId = 211 as short
664             ],
665             new FlowEntity(123bi) => [
666                 cookie = 110100481bi
667                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
668                 flowName = "ACL"
669                 instructionInfoList = #[
670                     new InstructionApplyActions(#[
671                         new ActionDrop()
672                     ])
673                 ]
674                 matchInfoList = #[
675                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
676                     new NxMatchCtState(33L, 33L)
677                 ]
678                 priority = 50
679                 tableId = 243 as short
680             ],
681             new FlowEntity(123bi) => [
682                 cookie = 110100481bi
683                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
684                 flowName = "ACL"
685                 instructionInfoList = #[
686                     new InstructionApplyActions(#[
687                         new ActionDrop()
688                     ])
689                 ]
690                 matchInfoList = #[
691                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
692                     new NxMatchCtState(48L, 48L)
693                 ]
694                 priority = 62015
695                 tableId = 243 as short
696             ]
697         ]
698     }
699
700     protected def etherEgressFlowsPort1() {
701         #[
702             new FlowEntity(123bi) => [
703                 cookie = 110100480bi
704                 flowId = "ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6"
705                 flowName = "ACL"
706                 instructionInfoList = #[
707                     new InstructionApplyActions(#[
708                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
709                         new ActionNxResubmit(17 as short)
710                     ])
711                 ]
712                 matchInfoList = #[
713                     new MatchEthernetType(2048L),
714                     new MatchEthernetType(2048L),
715                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
716                     new NxMatchCtState(33L, 33L)
717                 ]
718                 priority = IdHelper.getFlowPriority(flowId)
719                 tableId = 213 as short
720             ]
721         ]
722     }
723
724     protected def etheregressFlowPort2() {
725         #[
726             new FlowEntity(123bi) => [
727                 cookie = 110100480bi
728                 flowId = "ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6"
729                 flowName = "ACL"
730                 instructionInfoList = #[
731                     new InstructionApplyActions(#[
732                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
733                         new ActionNxResubmit(17 as short)
734                     ])
735                 ]
736                 matchInfoList = #[
737                     new MatchEthernetType(2048L),
738                     new MatchEthernetType(2048L),
739                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
740                     new NxMatchCtState(33L, 33L)
741                 ]
742                 priority = IdHelper.getFlowPriority(flowId)
743                 tableId = 213 as short
744             ]
745         ]
746     }
747
748     protected def tcpIngressFlowPort1() {
749         #[
750             new FlowEntity(123bi) => [
751                 cookie = 110100480bi
752                 flowId = "TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
753                 flowName = "ACL"
754                 instructionInfoList = #[
755                     new InstructionApplyActions(#[
756                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
757                         new ActionNxResubmit(220 as short)
758                     ])
759                 ]
760                 matchInfoList = #[
761                     new MatchEthernetType(2048L),
762                     new MatchEthernetType(2048L),
763                     new NxMatchTcpDestinationPort(80, 65535),
764                     new MatchIpProtocol(6 as short),
765                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
766                     new NxMatchCtState(33L, 33L)
767                 ]
768                 priority = IdHelper.getFlowPriority(flowId)
769                 tableId = 243 as short
770             ]
771         ]
772     }
773
774     protected def tcpIngressFlowPort2() {
775         #[
776             new FlowEntity(123bi) => [
777                 cookie = 110100480bi
778                 flowId = "TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
779                 flowName = "ACL"
780                 instructionInfoList = #[
781                     new InstructionApplyActions(#[
782                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
783                         new ActionNxResubmit(220 as short)
784                     ])
785                 ]
786                 matchInfoList = #[
787                     new MatchEthernetType(2048L),
788                     new MatchEthernetType(2048L),
789                     new NxMatchTcpDestinationPort(80, 65535),
790                     new MatchIpProtocol(6 as short),
791                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
792                     new NxMatchCtState(33L, 33L)
793                 ]
794                 priority = IdHelper.getFlowPriority(flowId)
795                 tableId = 243 as short
796             ]
797         ]
798     }
799
800     protected def tcpEgressFlowPort2() {
801         #[
802             new FlowEntity(123bi) => [
803                 cookie = 110100480bi
804                 flowId = "TCP_DESTINATION_80_65535_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F3_10.0.0.1/32"
805                         +"Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
806                 flowName = "ACL"
807                 instructionInfoList = #[
808                     new InstructionApplyActions(#[
809                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
810                         new ActionNxResubmit(17 as short)
811                     ])
812                 ]
813                 matchInfoList = #[
814                     new MatchEthernetType(2048L),
815                     new MatchIpv4Destination("10.0.0.1", "32"),
816                     new MatchEthernetType(2048L),
817                     new MatchEthernetType(2048L),
818                     new NxMatchTcpDestinationPort(80, 65535),
819                     new MatchIpProtocol(6 as short),
820                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
821                     new NxMatchCtState(33L, 33L)
822                 ]
823                 priority = IdHelper.getFlowPriority(flowId)
824                 tableId = 213 as short
825             ],
826             new FlowEntity(123bi) => [
827                 cookie = 110100480bi
828                 flowId = "TCP_DESTINATION_80_65535_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F4_10.0.0.2/32Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
829                 flowName = "ACL"
830                 instructionInfoList = #[
831                     new InstructionApplyActions(#[
832                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
833                         new ActionNxResubmit(17 as short)
834                     ])
835                 ]
836                 matchInfoList = #[
837                     new MatchEthernetType(2048L),
838                     new MatchIpv4Destination("10.0.0.2", "32"),
839                     new MatchEthernetType(2048L),
840                     new MatchEthernetType(2048L),
841                     new NxMatchTcpDestinationPort(80, 65535),
842                     new MatchIpProtocol(6 as short),
843                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
844                     new NxMatchCtState(33L, 33L)
845                 ]
846                 priority = IdHelper.getFlowPriority(flowId)
847                 tableId = 213 as short
848             ]
849         ]
850     }
851
852     protected def udpEgressFlowsPort1() {
853         #[
854              new FlowEntity(123bi) => [
855                 cookie = 110100480bi
856                 flowId = "UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
857                 flowName = "ACL"
858                 instructionInfoList = #[
859                     new InstructionApplyActions(#[
860                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
861                         new ActionNxResubmit(17 as short)
862                     ])
863                 ]
864                 matchInfoList = #[
865                     new MatchEthernetType(2048L),
866                     new MatchEthernetType(2048L),
867                     new NxMatchUdpDestinationPort(80, 65535),
868                     new MatchIpProtocol(17 as short),
869                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
870                     new NxMatchCtState(33L, 33L)
871                 ]
872                 priority = IdHelper.getFlowPriority(flowId)
873                 tableId = 213 as short
874             ]
875         ]
876     }
877
878     protected def udpIngressFlowsPort2() {
879         #[
880             new FlowEntity(123bi) => [
881                 cookie = 110100480bi
882                 flowId = "UDP_DESTINATION_80_65535_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F3_10.0.0.1/32"
883                         +"Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
884                 flowName = "ACL"
885                 instructionInfoList = #[
886                     new InstructionApplyActions(#[
887                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
888                         new ActionNxResubmit(220 as short)
889                     ])
890                 ]
891                 matchInfoList = #[
892                     new MatchEthernetType(2048L),
893                     new MatchIpv4Source("10.0.0.1", "32"),
894                     new MatchEthernetType(2048L),
895                     new MatchEthernetType(2048L),
896                     new NxMatchUdpDestinationPort(80, 65535),
897                     new MatchIpProtocol(17 as short),
898                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
899                     new NxMatchCtState(33L, 33L)
900                 ]
901                 priority = IdHelper.getFlowPriority(flowId)
902                 tableId = 243 as short
903             ],
904             new FlowEntity(123bi) => [
905                 cookie = 110100480bi
906                 flowId = "UDP_DESTINATION_80_65535_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F4_10.0.0.2/32Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
907                 flowName = "ACL"
908                 instructionInfoList = #[
909                     new InstructionApplyActions(#[
910                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
911                         new ActionNxResubmit(220 as short)
912                     ])
913                 ]
914                 matchInfoList = #[
915                     new MatchEthernetType(2048L),
916                     new MatchIpv4Source("10.0.0.2", "32"),
917                     new MatchEthernetType(2048L),
918                     new MatchEthernetType(2048L),
919                     new NxMatchUdpDestinationPort(80, 65535),
920                     new MatchIpProtocol(17 as short),
921                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
922                     new NxMatchCtState(33L, 33L)
923                 ]
924                 priority = IdHelper.getFlowPriority(flowId)
925                 tableId = 243 as short
926             ]
927         ]
928     }
929
930     protected def udpEgressFlowsPort2() {
931         #[
932             new FlowEntity(123bi) => [
933                 cookie = 110100480bi
934                 flowId = "UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
935                 flowName = "ACL"
936                 instructionInfoList = #[
937                     new InstructionApplyActions(#[
938                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
939                         new ActionNxResubmit(17 as short)
940                     ])
941                 ]
942                 matchInfoList = #[
943                     new MatchEthernetType(2048L),
944                     new MatchEthernetType(2048L),
945                     new NxMatchUdpDestinationPort(80, 65535),
946                     new MatchIpProtocol(17 as short),
947                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
948                     new NxMatchCtState(33L, 33L)
949                 ]
950                 priority = IdHelper.getFlowPriority(flowId)
951                 tableId = 213 as short
952             ]
953         ]
954     }
955
956     protected def icmpIngressFlowsPort1() {
957         #[
958             new FlowEntity(123bi) => [
959                 cookie = 110100480bi
960                 flowId = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
961                 flowName = "ACL"
962                 instructionInfoList = #[
963                     new InstructionApplyActions(#[
964                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
965                         new ActionNxResubmit(220 as short)
966                     ])
967                 ]
968                 matchInfoList = #[
969                     new MatchEthernetType(2048L),
970                     new MatchEthernetType(2048L),
971                     new MatchIcmpv4(2 as short, 3 as short),
972                     new MatchIpProtocol(1 as short),
973                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
974                     new NxMatchCtState(33L, 33L)
975                 ]
976                 priority = IdHelper.getFlowPriority(flowId)
977                 tableId = 243 as short
978             ]
979         ]
980     }
981
982     protected def icmpIngressFlowsPort2() {
983         #[
984             new FlowEntity(123bi) => [
985                 cookie = 110100480bi
986                 flowId = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
987                 flowName = "ACL"
988                 instructionInfoList = #[
989                     new InstructionApplyActions(#[
990                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
991                         new ActionNxResubmit(220 as short)
992                     ])
993                 ]
994                 matchInfoList = #[
995                     new MatchEthernetType(2048L),
996                     new MatchEthernetType(2048L),
997                     new MatchIcmpv4(2 as short, 3 as short),
998                     new MatchIpProtocol(1 as short),
999                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1000                     new NxMatchCtState(33L, 33L)
1001                 ]
1002                 priority = IdHelper.getFlowPriority(flowId)
1003                 tableId = 243 as short
1004             ]
1005         ]
1006     }
1007
1008     protected def icmpEgressFlowsPort2() {
1009         #[
1010             new FlowEntity(123bi) => [
1011                 cookie = 110100480bi
1012                 flowId = "ICMP_V4_DESTINATION_23__ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F3_10.0.0.1/32"
1013                         +"Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1014                 flowName = "ACL"
1015                 instructionInfoList = #[
1016                     new InstructionApplyActions(#[
1017                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1018                         new ActionNxResubmit(17 as short)
1019                     ])
1020                 ]
1021                 matchInfoList = #[
1022                     new MatchEthernetType(2048L),
1023                     new MatchIpv4Destination("10.0.0.1", "32"),
1024                     new MatchEthernetType(2048L),
1025                     new MatchEthernetType(2048L),
1026                     new MatchIcmpv4(2 as short, 3 as short),
1027                     new MatchIpProtocol(1 as short),
1028                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1029                     new NxMatchCtState(33L, 33L)
1030                 ]
1031                 priority = IdHelper.getFlowPriority(flowId)
1032                 tableId = 213 as short
1033             ],
1034             new FlowEntity(123bi) => [
1035                 cookie = 110100480bi
1036                 flowId = "ICMP_V4_DESTINATION_23__ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F4_10.0.0.2/32"
1037                         +"Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1038                 flowName = "ACL"
1039                 instructionInfoList = #[
1040                     new InstructionApplyActions(#[
1041                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1042                         new ActionNxResubmit(17 as short)
1043                     ])
1044                 ]
1045                 matchInfoList = #[
1046                     new MatchEthernetType(2048L),
1047                     new MatchIpv4Destination("10.0.0.2", "32"),
1048                     new MatchEthernetType(2048L),
1049                     new MatchEthernetType(2048L),
1050                     new MatchIcmpv4(2 as short, 3 as short),
1051                     new MatchIpProtocol(1 as short),
1052                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1053                     new NxMatchCtState(33L, 33L)
1054                 ]
1055                 priority = IdHelper.getFlowPriority(flowId)
1056                 tableId = 213 as short
1057             ]
1058         ]
1059     }
1060
1061     protected def udpIngressPortRangeFlows() {
1062         #[
1063             new FlowEntity(123bi) => [
1064                 cookie = 110100480bi
1065                 flowId = "UDP_DESTINATION_2000_65532Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
1066                 flowName = "ACL"
1067                 instructionInfoList = #[
1068                     new InstructionApplyActions(#[
1069                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1070                         new ActionNxResubmit(220 as short)
1071                     ])
1072                 ]
1073                 matchInfoList = #[
1074                     new MatchEthernetType(2048L),
1075                     new MatchEthernetType(2048L),
1076                     new NxMatchUdpDestinationPort(2000, 65532),
1077                     new MatchIpProtocol(17 as short),
1078                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1079                     new NxMatchCtState(33L, 33L)
1080                 ]
1081                 priority = IdHelper.getFlowPriority(flowId)
1082                 tableId = 243 as short
1083             ]
1084         ]
1085     }
1086
1087     protected def tcpEgressRangeFlows() {
1088         #[
1089             new FlowEntity(123bi) => [
1090                 cookie = 110100480bi
1091                 flowId = "TCP_DESTINATION_776_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1092                 flowName = "ACL"
1093                 instructionInfoList = #[
1094                     new InstructionApplyActions(#[
1095                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1096                         new ActionNxResubmit(17 as short)
1097                     ])
1098                 ]
1099                 matchInfoList = #[
1100                     new MatchEthernetType(2048L),
1101                     new MatchEthernetType(2048L),
1102                     new NxMatchTcpDestinationPort(776, 65534),
1103                     new MatchIpProtocol(6 as short),
1104                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1105                     new NxMatchCtState(33L, 33L)
1106                 ]
1107                 priority = IdHelper.getFlowPriority(flowId)
1108                 tableId = 213 as short
1109             ],
1110             new FlowEntity(123bi) => [
1111                 cookie = 110100480bi
1112                 flowId = "TCP_DESTINATION_512_65280Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1113                 flowName = "ACL"
1114                 instructionInfoList = #[
1115                     new InstructionApplyActions(#[
1116                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1117                         new ActionNxResubmit(17 as short)
1118                     ])
1119                 ]
1120                 matchInfoList = #[
1121                     new MatchEthernetType(2048L),
1122                     new MatchEthernetType(2048L),
1123                     new NxMatchTcpDestinationPort(512, 65280),
1124                     new MatchIpProtocol(6 as short),
1125                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1126                     new NxMatchCtState(33L, 33L)
1127                 ]
1128                 priority = IdHelper.getFlowPriority(flowId)
1129                 tableId = 213 as short
1130             ],
1131             new FlowEntity(123bi) => [
1132                 cookie = 110100480bi
1133                 flowId = "TCP_DESTINATION_334_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1134                 flowName = "ACL"
1135                 instructionInfoList = #[
1136                     new InstructionApplyActions(#[
1137                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1138                         new ActionNxResubmit(17 as short)
1139                     ])
1140                 ]
1141                 matchInfoList = #[
1142                     new MatchEthernetType(2048L),
1143                     new MatchEthernetType(2048L),
1144                     new NxMatchTcpDestinationPort(334, 65534),
1145                     new MatchIpProtocol(6 as short),
1146                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1147                     new NxMatchCtState(33L, 33L)
1148                 ]
1149                 priority = IdHelper.getFlowPriority(flowId)
1150                 tableId = 213 as short
1151             ],
1152             new FlowEntity(123bi) => [
1153                 cookie = 110100480bi
1154                 flowId = "TCP_DESTINATION_333_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1155                 flowName = "ACL"
1156                 instructionInfoList = #[
1157                     new InstructionApplyActions(#[
1158                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1159                         new ActionNxResubmit(17 as short)
1160                     ])
1161                 ]
1162                 matchInfoList = #[
1163                     new MatchEthernetType(2048L),
1164                     new MatchEthernetType(2048L),
1165                     new NxMatchTcpDestinationPort(333, 65535),
1166                     new MatchIpProtocol(6 as short),
1167                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1168                     new NxMatchCtState(33L, 33L)
1169                 ]
1170                 priority = IdHelper.getFlowPriority(flowId)
1171                 tableId = 213 as short
1172             ],
1173             new FlowEntity(123bi) => [
1174                 cookie = 110100480bi
1175                 flowId = "TCP_DESTINATION_336_65520Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1176                 flowName = "ACL"
1177                 instructionInfoList = #[
1178                     new InstructionApplyActions(#[
1179                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1180                         new ActionNxResubmit(17 as short)
1181                     ])
1182                 ]
1183                 matchInfoList = #[
1184                     new MatchEthernetType(2048L),
1185                     new MatchEthernetType(2048L),
1186                     new NxMatchTcpDestinationPort(336, 65520),
1187                     new MatchIpProtocol(6 as short),
1188                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1189                     new NxMatchCtState(33L, 33L)
1190                 ]
1191                 priority = IdHelper.getFlowPriority(flowId)
1192                 tableId = 213 as short
1193             ],
1194             new FlowEntity(123bi) => [
1195                 cookie = 110100480bi
1196                 flowId = "TCP_DESTINATION_352_65504Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1197                 flowName = "ACL"
1198                 instructionInfoList = #[
1199                     new InstructionApplyActions(#[
1200                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1201                         new ActionNxResubmit(17 as short)
1202                     ])
1203                 ]
1204                 matchInfoList = #[
1205                     new MatchEthernetType(2048L),
1206                     new MatchEthernetType(2048L),
1207                     new NxMatchTcpDestinationPort(352, 65504),
1208                     new MatchIpProtocol(6 as short),
1209                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1210                     new NxMatchCtState(33L, 33L)
1211                 ]
1212                 priority = IdHelper.getFlowPriority(flowId)
1213                 tableId = 213 as short
1214             ],
1215             new FlowEntity(123bi) => [
1216                 cookie = 110100480bi
1217                 flowId = "TCP_DESTINATION_384_65408Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1218                 flowName = "ACL"
1219                 instructionInfoList = #[
1220                     new InstructionApplyActions(#[
1221                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1222                         new ActionNxResubmit(17 as short)
1223                     ])
1224                 ]
1225                 matchInfoList = #[
1226                     new MatchEthernetType(2048L),
1227                     new MatchEthernetType(2048L),
1228                     new NxMatchTcpDestinationPort(384, 65408),
1229                     new MatchIpProtocol(6 as short),
1230                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1231                     new NxMatchCtState(33L, 33L)
1232                 ]
1233                 priority = IdHelper.getFlowPriority(flowId)
1234                 tableId = 213 as short
1235             ],
1236             new FlowEntity(123bi) => [
1237                 cookie = 110100480bi
1238                 flowId = "TCP_DESTINATION_768_65528Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1239                 flowName = "ACL"
1240                 instructionInfoList = #[
1241                     new InstructionApplyActions(#[
1242                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1243                         new ActionNxResubmit(17 as short)
1244                     ])
1245                 ]
1246                 matchInfoList = #[
1247                     new MatchEthernetType(2048L),
1248                     new MatchEthernetType(2048L),
1249                     new NxMatchTcpDestinationPort(768, 65528),
1250                     new MatchIpProtocol(6 as short),
1251                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1252                     new NxMatchCtState(33L, 33L)
1253                 ]
1254                 priority = IdHelper.getFlowPriority(flowId)
1255                 tableId = 213 as short
1256             ]
1257         ]
1258     }
1259
1260     protected def udpIngressAllFlows() {
1261         #[
1262             new FlowEntity(123bi) => [
1263                 cookie = 110100480bi
1264                 flowId = "UDP_DESTINATION_1_0Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
1265                 flowName = "ACL"
1266                 instructionInfoList = #[
1267                     new InstructionApplyActions(#[
1268                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1269                         new ActionNxResubmit(220 as short)
1270                     ])
1271                 ]
1272                 matchInfoList = #[
1273                     new MatchEthernetType(2048L),
1274                     new MatchEthernetType(2048L),
1275                     new MatchIpProtocol(17 as short),
1276                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1277                     new NxMatchCtState(33L, 33L)
1278                 ]
1279                 priority = IdHelper.getFlowPriority(flowId)
1280                 tableId = 243 as short
1281             ]
1282         ]
1283     }
1284
1285     protected def tcpEgressAllFlows() {
1286          #[
1287              new FlowEntity(123bi) => [
1288                 cookie = 110100480bi
1289                 flowId = "TCP_DESTINATION_1_0Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1290                 flowName = "ACL"
1291                 instructionInfoList = #[
1292                     new InstructionApplyActions(#[
1293                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1294                         new ActionNxResubmit(17 as short)
1295                     ])
1296                 ]
1297                 matchInfoList = #[
1298                     new MatchEthernetType(2048L),
1299                     new MatchEthernetType(2048L),
1300                     new MatchIpProtocol(6 as short),
1301                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1302                     new NxMatchCtState(33L, 33L)
1303                 ]
1304                 priority = IdHelper.getFlowPriority(flowId)
1305                 tableId = 213 as short
1306             ]
1307          ]
1308
1309      }
1310
1311     protected def icmpIngressFlowsPort3() {
1312         #[
1313             new FlowEntity(123bi) => [
1314                 cookie = 110100480bi
1315                 flowId = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
1316                 flowName = "ACL"
1317                 instructionInfoList = #[
1318                     new InstructionApplyActions(#[
1319                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1320                         new ActionNxResubmit(220 as short)
1321                     ])
1322                 ]
1323                 matchInfoList = #[
1324                     new MatchEthernetType(2048L),
1325                     new MatchEthernetType(2048L),
1326                     new MatchIcmpv4(2 as short, 3 as short),
1327                     new MatchIpProtocol(1 as short),
1328                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1329                     new NxMatchCtState(33L, 33L)
1330                 ]
1331                 priority = IdHelper.getFlowPriority(flowId)
1332                 tableId = 243 as short
1333             ],
1334             new FlowEntity(123bi) => [
1335                 cookie = 110100480bi
1336                 flowId = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426a22"
1337                 flowName = "ACL"
1338                 instructionInfoList = #[
1339                     new InstructionApplyActions(#[
1340                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1341                         new ActionNxResubmit(220 as short)
1342                     ])
1343                 ]
1344                 matchInfoList = #[
1345                     new MatchEthernetType(2048L),
1346                     new MatchEthernetType(2048L),
1347                     new MatchIcmpv4(2 as short, 3 as short),
1348                     new MatchIpProtocol(1 as short),
1349                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1350                     new NxMatchCtState(33L, 33L)
1351                 ]
1352                 priority = IdHelper.getFlowPriority(flowId)
1353                 tableId = 243 as short
1354             ]
1355         ]
1356     }
1357
1358     protected def icmpEgressFlowsPort3() {
1359         #[
1360             new FlowEntity(123bi) => [
1361                 cookie = 110100480bi
1362                 flowId = "ICMP_V4_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1363                 flowName = "ACL"
1364                 instructionInfoList = #[
1365                     new InstructionApplyActions(#[
1366                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1367                         new ActionNxResubmit(17 as short)
1368                     ])
1369                 ]
1370                 matchInfoList = #[
1371                     new MatchEthernetType(2048L),
1372                     new MatchEthernetType(2048L),
1373                     new MatchIcmpv4(2 as short, 3 as short),
1374                     new MatchIpProtocol(1 as short),
1375                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1376                     new NxMatchCtState(33L, 33L)
1377                 ]
1378                 priority = IdHelper.getFlowPriority(flowId)
1379                 tableId = 213 as short
1380             ],
1381             new FlowEntity(123bi) => [
1382                 cookie = 110100480bi
1383                 flowId = "ICMP_V4_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426a21"
1384                 flowName = "ACL"
1385                 instructionInfoList = #[
1386                     new InstructionApplyActions(#[
1387                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1388                         new ActionNxResubmit(17 as short)
1389                     ])
1390                 ]
1391                 matchInfoList = #[
1392                     new MatchEthernetType(2048L),
1393                     new MatchEthernetType(2048L),
1394                     new MatchIcmpv4(2 as short, 3 as short),
1395                     new MatchIpProtocol(1 as short),
1396                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1397                     new NxMatchCtState(33L, 33L)
1398                 ]
1399                 priority = IdHelper.getFlowPriority(flowId)
1400                 tableId = 213 as short
1401             ]
1402         ]
1403     }
1404
1405     override def expectedFlows(String mac) {
1406         // Code auto. generated by https://github.com/vorburger/xtendbeans
1407         #[
1408             new FlowEntity(123bi) => [
1409                 cookie = 110100480bi
1410                 flowId = "Ingress_DHCP_Server_v4123_987__Permit_"
1411                 flowName = "ACL"
1412                 instructionInfoList = #[
1413                     new InstructionApplyActions(#[
1414                         new ActionNxResubmit(220 as short)
1415                     ])
1416                 ]
1417                 matchInfoList = #[
1418                     new MatchEthernetType(2048L),
1419                     new MatchIpProtocol(17 as short),
1420                     new MatchUdpDestinationPort(68 as short),
1421                     new MatchUdpSourcePort(67 as short),
1422                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1423                 ]
1424                 priority = 63010
1425                 tableId = 241 as short
1426             ],
1427             new FlowEntity(123bi) => [
1428                 cookie = 110100480bi
1429                 flowId = "Ingress_DHCP_Server_v6_123_987___Permit_"
1430                 flowName = "ACL"
1431                 instructionInfoList = #[
1432                     new InstructionApplyActions(#[
1433                         new ActionNxResubmit(220 as short)
1434                     ])
1435                 ]
1436                 matchInfoList = #[
1437                     new MatchEthernetType(34525L),
1438                     new MatchIpProtocol(17 as short),
1439                     new MatchUdpDestinationPort(546 as short),
1440                     new MatchUdpSourcePort(547 as short),
1441                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1442                 ]
1443                 priority = 63010
1444                 tableId = 241 as short
1445             ],
1446             new FlowEntity(123bi) => [
1447                 cookie = 110100480bi
1448                 flowId = "Ingress_ICMPv6_123_987_130_Permit_"
1449                 flowName = "ACL"
1450                 instructionInfoList = #[
1451                     new InstructionApplyActions(#[
1452                         new ActionNxResubmit(220 as short)
1453                     ])
1454                 ]
1455                 matchInfoList = #[
1456                     new MatchEthernetType(34525L),
1457                     new MatchIpProtocol(58 as short),
1458                     new MatchIcmpv6(130 as short, 0 as short),
1459                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1460                 ]
1461                 priority = 63010
1462                 tableId = 241 as short
1463             ],
1464             new FlowEntity(123bi) => [
1465                 cookie = 110100480bi
1466                 flowId = "Ingress_ICMPv6_123_987_135_Permit_"
1467                 flowName = "ACL"
1468                 instructionInfoList = #[
1469                     new InstructionApplyActions(#[
1470                         new ActionNxResubmit(220 as short)
1471                     ])
1472                 ]
1473                 matchInfoList = #[
1474                     new MatchEthernetType(34525L),
1475                     new MatchIpProtocol(58 as short),
1476                     new MatchIcmpv6(135 as short, 0 as short),
1477                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1478                 ]
1479                 priority = 63010
1480                 tableId = 241 as short
1481             ],
1482             new FlowEntity(123bi) => [
1483                 cookie = 110100480bi
1484                 flowId = "Ingress_ICMPv6_123_987_136_Permit_"
1485                 flowName = "ACL"
1486                 instructionInfoList = #[
1487                     new InstructionApplyActions(#[
1488                         new ActionNxResubmit(220 as short)
1489                     ])
1490                 ]
1491                 matchInfoList = #[
1492                     new MatchEthernetType(34525L),
1493                     new MatchIpProtocol(58 as short),
1494                     new MatchIcmpv6(136 as short, 0 as short),
1495                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1496                 ]
1497                 priority = 63010
1498                 tableId = 241 as short
1499             ],
1500             new FlowEntity(123bi) => [
1501                 cookie = 110100480bi
1502                 flowId = "Ingress_ARP_123_987"
1503                 flowName = "ACL"
1504                 instructionInfoList = #[
1505                     new InstructionApplyActions(#[
1506                         new ActionNxResubmit(220 as short)
1507                     ])
1508                 ]
1509                 matchInfoList = #[
1510                     new MatchEthernetType(2054L),
1511                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1512                 ]
1513                 priority = 63010
1514                 tableId = 241 as short
1515             ],
1516             new FlowEntity(123bi) => [
1517                 cookie = 110100481bi
1518                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
1519                 flowName = "ACL"
1520                 instructionInfoList = #[
1521                     new InstructionApplyActions(#[
1522                         new ActionDrop()
1523                     ])
1524                 ]
1525                 matchInfoList = #[
1526                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1527                     new NxMatchCtState(33L, 33L)
1528                 ]
1529                 priority = 50
1530                 tableId = 213 as short
1531             ],
1532             new FlowEntity(123bi) => [
1533                 cookie = 110100481bi
1534                 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
1535                 flowName = "ACL"
1536                 instructionInfoList = #[
1537                     new InstructionApplyActions(#[
1538                         new ActionDrop()
1539                     ])
1540                 ]
1541                 matchInfoList = #[
1542                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1543                     new NxMatchCtState(48L, 48L)
1544                 ]
1545                 priority = 62015
1546                 tableId = 213 as short
1547             ],
1548             new FlowEntity(123bi) => [
1549                 cookie = 110100480bi
1550                 flowId = "Egress_DHCP_Client_v4123_987__Permit_"
1551                 flowName = "ACL"
1552                 instructionInfoList = #[
1553                     new InstructionApplyActions(#[
1554                         new ActionNxResubmit(17 as short)
1555                     ])
1556                 ]
1557                 matchInfoList = #[
1558                     new MatchEthernetType(2048L),
1559                     new MatchIpProtocol(17 as short),
1560                     new MatchUdpDestinationPort(67 as short),
1561                     new MatchUdpSourcePort(68 as short),
1562                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1563                 ]
1564                 priority = 63010
1565                 tableId = 211 as short
1566             ],
1567             new FlowEntity(123bi) => [
1568                 cookie = 110100480bi
1569                 flowId = "Egress_DHCP_Client_v6_123_987__Permit_"
1570                 flowName = "ACL"
1571                 instructionInfoList = #[
1572                     new InstructionApplyActions(#[
1573                         new ActionNxResubmit(17 as short)
1574                     ])
1575                 ]
1576                 matchInfoList = #[
1577                     new MatchEthernetType(34525L),
1578                     new MatchIpProtocol(17 as short),
1579                     new MatchUdpDestinationPort(547 as short),
1580                     new MatchUdpSourcePort(546 as short),
1581                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1582                 ]
1583                 priority = 63010
1584                 tableId = 211 as short
1585             ],
1586             new FlowEntity(123bi) => [
1587                 cookie = 110100480bi
1588                 flowId = "Egress_DHCP_Server_v4123_987__Drop_"
1589                 flowName = "ACL"
1590                 instructionInfoList = #[
1591                 ]
1592                 matchInfoList = #[
1593                     new MatchEthernetType(2048L),
1594                     new MatchIpProtocol(17 as short),
1595                     new MatchUdpDestinationPort(68 as short),
1596                     new MatchUdpSourcePort(67 as short),
1597                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1598                 ]
1599                 priority = 63010
1600                 tableId = 211 as short
1601             ],
1602             new FlowEntity(123bi) => [
1603                 cookie = 110100480bi
1604                 flowId = "Egress_DHCP_Server_v6_123_987__Drop_"
1605                 flowName = "ACL"
1606                 instructionInfoList = #[
1607                 ]
1608                 matchInfoList = #[
1609                     new MatchEthernetType(34525L),
1610                     new MatchIpProtocol(17 as short),
1611                     new MatchUdpDestinationPort(546 as short),
1612                     new MatchUdpSourcePort(547 as short),
1613                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1614                 ]
1615                 priority = 63010
1616                 tableId = 211 as short
1617             ],
1618             new FlowEntity(123bi) => [
1619                 cookie = 110100480bi
1620                 flowId = "Egress_ICMPv6_123_987_134_Drop_"
1621                 flowName = "ACL"
1622                 instructionInfoList = #[
1623                 ]
1624                 matchInfoList = #[
1625                     new MatchEthernetType(34525L),
1626                     new MatchIpProtocol(58 as short),
1627                     new MatchIcmpv6(134 as short, 0 as short),
1628                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1629                 ]
1630                 priority = 63020
1631                 tableId = 211 as short
1632             ],
1633             new FlowEntity(123bi) => [
1634                 cookie = 110100480bi
1635                 flowId = "Egress_ICMPv6_123_987_133_Permit_"
1636                 flowName = "ACL"
1637                 instructionInfoList = #[
1638                     new InstructionApplyActions(#[
1639                         new ActionNxResubmit(17 as short)
1640                     ])
1641                 ]
1642                 matchInfoList = #[
1643                     new MatchEthernetType(34525L),
1644                     new MatchIpProtocol(58 as short),
1645                     new MatchIcmpv6(133 as short, 0 as short),
1646                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1647                 ]
1648                 priority = 63010
1649                 tableId = 211 as short
1650             ],
1651             new FlowEntity(123bi) => [
1652                 cookie = 110100480bi
1653                 flowId = "Egress_ICMPv6_123_987_135_Permit_"
1654                 flowName = "ACL"
1655                 instructionInfoList = #[
1656                     new InstructionApplyActions(#[
1657                         new ActionNxResubmit(17 as short)
1658                     ])
1659                 ]
1660                 matchInfoList = #[
1661                     new MatchEthernetType(34525L),
1662                     new MatchIpProtocol(58 as short),
1663                     new MatchIcmpv6(135 as short, 0 as short),
1664                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1665                 ]
1666                 priority = 63010
1667                 tableId = 211 as short
1668             ],
1669             new FlowEntity(123bi) => [
1670                 cookie = 110100480bi
1671                 flowId = "Egress_ICMPv6_123_987_136_Permit_"
1672                 flowName = "ACL"
1673                 instructionInfoList = #[
1674                     new InstructionApplyActions(#[
1675                         new ActionNxResubmit(17 as short)
1676                     ])
1677                 ]
1678                 matchInfoList = #[
1679                     new MatchEthernetType(34525L),
1680                     new MatchIpProtocol(58 as short),
1681                     new MatchIcmpv6(136 as short, 0 as short),
1682                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1683                 ]
1684                 priority = 63010
1685                 tableId = 211 as short
1686             ],
1687             new FlowEntity(123bi) => [
1688                 cookie = 110100481bi
1689                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
1690                 flowName = "ACL"
1691                 instructionInfoList = #[
1692                     new InstructionApplyActions(#[
1693                         new ActionDrop()
1694                     ])
1695                 ]
1696                 matchInfoList = #[
1697                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1698                     new NxMatchCtState(33L, 33L)
1699                 ]
1700                 priority = 50
1701                 tableId = 243 as short
1702             ],
1703             new FlowEntity(123bi) => [
1704                 cookie = 110100481bi
1705                 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
1706                 flowName = "ACL"
1707                 instructionInfoList = #[
1708                     new InstructionApplyActions(#[
1709                         new ActionDrop()
1710                     ])
1711                 ]
1712                 matchInfoList = #[
1713                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1714                     new NxMatchCtState(48L, 48L)
1715                 ]
1716                 priority = 62015
1717                 tableId = 243 as short
1718             ]
1719         ]
1720     }
1721 }