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