MatchInfo redesign
[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.MetaDataUtil
13 import org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions
14 import org.opendaylight.genius.mdsalutil.matches.MatchArpSha
15 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetType
16 import org.opendaylight.genius.mdsalutil.matches.MatchIcmpv6
17 import org.opendaylight.genius.mdsalutil.matches.MatchIpProtocol
18 import org.opendaylight.genius.mdsalutil.matches.MatchUdpDestinationPort
19 import org.opendaylight.genius.mdsalutil.matches.MatchUdpSourcePort
20 import org.opendaylight.genius.mdsalutil.matches.MatchMetadata
21 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress
22
23 class FlowEntryObjectsBase {
24
25     static def fixedFlowsPort1() {
26         #[ fixedIngressFlowsPort1, fixedEgressFlowsPort1 ]
27     }
28
29     static def fixedIngressFlowsPort1() {
30         #[
31             new FlowEntity(123bi) => [
32                 cookie = 110100480bi
33                 flowId = "Ingress_DHCP_Server_v4123_987__Permit_"
34             flowName = "ACL"
35             instructionInfoList = #[
36                 new InstructionApplyActions(#[
37                     new ActionNxResubmit(220 as short)
38                     ])
39                 ]
40                 matchInfoList = #[
41                     new MatchEthernetType(2048L),
42                     new MatchIpProtocol(17 as short),
43                     new MatchUdpDestinationPort(68),
44                     new MatchUdpSourcePort(67),
45                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
46                 ]
47                 priority = 63010
48                 tableId = 251 as short
49             ],
50             new FlowEntity(123bi) => [
51                 cookie = 110100480bi
52                 flowId = "Ingress_DHCP_Server_v6_123_987___Permit_"
53             flowName = "ACL"
54             instructionInfoList = #[
55                 new InstructionApplyActions(#[
56                     new ActionNxResubmit(220 as short)
57                     ])
58                 ]
59                 matchInfoList = #[
60                     new MatchEthernetType(34525L),
61                     new MatchIpProtocol(17 as short),
62                     new MatchUdpDestinationPort(546),
63                     new MatchUdpSourcePort(547),
64                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
65                 ]
66                 priority = 63010
67                 tableId = 251 as short
68             ],
69             new FlowEntity(123bi) => [
70                 cookie = 110100480bi
71                 flowId = "Ingress_ICMPv6_123_987_130_Permit_"
72             flowName = "ACL"
73             instructionInfoList = #[
74                 new InstructionApplyActions(#[
75                     new ActionNxResubmit(220 as short)
76                     ])
77                 ]
78                 matchInfoList = #[
79                     new MatchEthernetType(34525L),
80                     new MatchIpProtocol(58 as short),
81                     new MatchIcmpv6(130 as short, 0 as short),
82                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
83                 ]
84                 priority = 63010
85                 tableId = 251 as short
86             ],
87             new FlowEntity(123bi) => [
88                 cookie = 110100480bi
89                 flowId = "Ingress_ICMPv6_123_987_135_Permit_"
90             flowName = "ACL"
91             instructionInfoList = #[
92                 new InstructionApplyActions(#[
93                     new ActionNxResubmit(220 as short)
94                     ])
95                 ]
96                 matchInfoList = #[
97                     new MatchEthernetType(34525L),
98                     new MatchIpProtocol(58 as short),
99                     new MatchIcmpv6(135 as short, 0 as short),
100                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
101                 ]
102                 priority = 63010
103                 tableId = 251 as short
104             ],
105             new FlowEntity(123bi) => [
106                 cookie = 110100480bi
107                 flowId = "Ingress_ICMPv6_123_987_136_Permit_"
108             flowName = "ACL"
109             instructionInfoList = #[
110                 new InstructionApplyActions(#[
111                     new ActionNxResubmit(220 as short)
112                     ])
113                 ]
114                 matchInfoList = #[
115                     new MatchEthernetType(34525L),
116                     new MatchIpProtocol(58 as short),
117                     new MatchIcmpv6(136 as short, 0 as short),
118                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
119                 ]
120                 priority = 63010
121                 tableId = 251 as short
122             ],
123             new FlowEntity(123bi) => [
124                 cookie = 110100480bi
125                 flowId = "Ingress_ARP_123_987"
126             flowName = "ACL"
127             instructionInfoList = #[
128                 new InstructionApplyActions(#[
129                     new ActionNxResubmit(220 as short)
130                     ])
131                 ]
132                 matchInfoList = #[
133                     new MatchEthernetType(2054L),
134                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
135                 ]
136                 priority = 63010
137                 tableId = 251 as short
138             ]
139
140             ]
141     }
142
143     static def fixedEgressFlowsPort1() {
144         #[
145
146             new FlowEntity(123bi) => [
147                 cookie = 110100480bi
148                 flowId = "Egress_DHCP_Client_v4123_987__Permit_"
149                 flowName = "ACL"
150                 instructionInfoList = #[
151                     new InstructionApplyActions(#[
152                         new ActionNxResubmit(17 as short)
153                     ])
154                 ]
155                 matchInfoList = #[
156                     new MatchEthernetType(2048L),
157                     new MatchIpProtocol(17 as short),
158                     new MatchUdpDestinationPort(67),
159                     new MatchUdpSourcePort(68),
160                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
161                 ]
162                 priority = 63010
163                 tableId = 40 as short
164             ],
165             new FlowEntity(123bi) => [
166                 cookie = 110100480bi
167                 flowId = "Egress_DHCP_Client_v6_123_987__Permit_"
168                 flowName = "ACL"
169                 instructionInfoList = #[
170                     new InstructionApplyActions(#[
171                         new ActionNxResubmit(17 as short)
172                     ])
173                 ]
174                 matchInfoList = #[
175                     new MatchEthernetType(34525L),
176                     new MatchIpProtocol(17 as short),
177                     new MatchUdpDestinationPort(547),
178                     new MatchUdpSourcePort(546),
179                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
180                 ]
181                 priority = 63010
182                 tableId = 40 as short
183             ],
184             new FlowEntity(123bi) => [
185                 cookie = 110100480bi
186                 flowId = "Egress_DHCP_Server_v4123_987__Drop_"
187                 flowName = "ACL"
188                 instructionInfoList = #[
189                 ]
190                 matchInfoList = #[
191                     new MatchEthernetType(2048L),
192                     new MatchIpProtocol(17 as short),
193                     new MatchUdpDestinationPort(68),
194                     new MatchUdpSourcePort(67),
195                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
196                 ]
197                 priority = 63010
198                 tableId = 40 as short
199             ],
200             new FlowEntity(123bi) => [
201                 cookie = 110100480bi
202                 flowId = "Egress_DHCP_Server_v6_123_987__Drop_"
203                 flowName = "ACL"
204                 instructionInfoList = #[
205                 ]
206                 matchInfoList = #[
207                     new MatchEthernetType(34525L),
208                     new MatchIpProtocol(17 as short),
209                     new MatchUdpDestinationPort(546),
210                     new MatchUdpSourcePort(547),
211                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
212                 ]
213                 priority = 63010
214                 tableId = 40 as short
215             ],
216             new FlowEntity(123bi) => [
217                 cookie = 110100480bi
218                 flowId = "Egress_ICMPv6_123_987_134_Drop_"
219                 flowName = "ACL"
220                 instructionInfoList = #[
221                 ]
222                 matchInfoList = #[
223                     new MatchEthernetType(34525L),
224                     new MatchIpProtocol(58 as short),
225                     new MatchIcmpv6(134 as short, 0 as short),
226                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
227                 ]
228                 priority = 63020
229                 tableId = 40 as short
230             ],
231             new FlowEntity(123bi) => [
232                 cookie = 110100480bi
233                 flowId = "Egress_ICMPv6_123_987_133_Permit_"
234                 flowName = "ACL"
235                 instructionInfoList = #[
236                     new InstructionApplyActions(#[
237                         new ActionNxResubmit(17 as short)
238                     ])
239                 ]
240                 matchInfoList = #[
241                     new MatchEthernetType(34525L),
242                     new MatchIpProtocol(58 as short),
243                     new MatchIcmpv6(133 as short, 0 as short),
244                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
245                 ]
246                 priority = 63010
247                 tableId = 40 as short
248             ],
249             new FlowEntity(123bi) => [
250                 cookie = 110100480bi
251                 flowId = "Egress_ICMPv6_123_987_135_Permit_"
252                 flowName = "ACL"
253                 instructionInfoList = #[
254                     new InstructionApplyActions(#[
255                         new ActionNxResubmit(17 as short)
256                     ])
257                 ]
258                 matchInfoList = #[
259                     new MatchEthernetType(34525L),
260                     new MatchIpProtocol(58 as short),
261                     new MatchIcmpv6(135 as short, 0 as short),
262                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
263                 ]
264                 priority = 63010
265                 tableId = 40 as short
266             ],
267             new FlowEntity(123bi) => [
268                 cookie = 110100480bi
269                 flowId = "Egress_ICMPv6_123_987_136_Permit_"
270                 flowName = "ACL"
271                 instructionInfoList = #[
272                     new InstructionApplyActions(#[
273                         new ActionNxResubmit(17 as short)
274                     ])
275                 ]
276                 matchInfoList = #[
277                     new MatchEthernetType(34525L),
278                     new MatchIpProtocol(58 as short),
279                     new MatchIcmpv6(136 as short, 0 as short),
280                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
281                 ]
282                 priority = 63010
283                 tableId = 40 as short
284             ],
285             new FlowEntity(123bi) => [
286                 cookie = 110100480bi
287                 flowId = "Egress_ARP_123_0D:AA:D8:42:30:F3"
288                 flowName = "ACL"
289                 instructionInfoList = #[
290                     new InstructionApplyActions(#[
291                         new ActionNxResubmit(17 as short)
292                     ])
293                 ]
294                 matchInfoList = #[
295                     new MatchEthernetType(2054L),
296                     new MatchArpSha(new MacAddress("0D:AA:D8:42:30:F3")),
297                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
298                 ]
299                 priority = 63010
300                 tableId = 40 as short
301             ]
302         ]
303     }
304
305
306     static def fixedIngressFlowsPort2() {
307         #[
308             new FlowEntity(123bi) => [
309                 cookie = 110100480bi
310                 flowId = "Ingress_DHCP_Server_v4123_987__Permit_"
311                 flowName = "ACL"
312                 instructionInfoList = #[
313                     new InstructionApplyActions(#[
314                         new ActionNxResubmit(220 as short)
315                     ])
316                 ]
317                 matchInfoList = #[
318                     new MatchEthernetType(2048L),
319                     new MatchIpProtocol(17 as short),
320                     new MatchUdpDestinationPort(68),
321                     new MatchUdpSourcePort(67),
322                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
323                 ]
324                 priority = 63010
325                 tableId = 251 as short
326             ],
327             new FlowEntity(123bi) => [
328                 cookie = 110100480bi
329                 flowId = "Ingress_DHCP_Server_v6_123_987___Permit_"
330                 flowName = "ACL"
331                 instructionInfoList = #[
332                     new InstructionApplyActions(#[
333                         new ActionNxResubmit(220 as short)
334                     ])
335                 ]
336                 matchInfoList = #[
337                     new MatchEthernetType(34525L),
338                     new MatchIpProtocol(17 as short),
339                     new MatchUdpDestinationPort(546),
340                     new MatchUdpSourcePort(547),
341                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
342                 ]
343                 priority = 63010
344                 tableId = 251 as short
345             ],
346             new FlowEntity(123bi) => [
347                 cookie = 110100480bi
348                 flowId = "Ingress_ICMPv6_123_987_130_Permit_"
349                 flowName = "ACL"
350                 instructionInfoList = #[
351                     new InstructionApplyActions(#[
352                         new ActionNxResubmit(220 as short)
353                     ])
354                 ]
355                 matchInfoList = #[
356                     new MatchEthernetType(34525L),
357                     new MatchIpProtocol(58 as short),
358                     new MatchIcmpv6(130 as short, 0 as short),
359                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
360                 ]
361                 priority = 63010
362                 tableId = 251 as short
363             ],
364             new FlowEntity(123bi) => [
365                 cookie = 110100480bi
366                 flowId = "Ingress_ICMPv6_123_987_135_Permit_"
367                 flowName = "ACL"
368                 instructionInfoList = #[
369                     new InstructionApplyActions(#[
370                         new ActionNxResubmit(220 as short)
371                     ])
372                 ]
373                 matchInfoList = #[
374                     new MatchEthernetType(34525L),
375                     new MatchIpProtocol(58 as short),
376                     new MatchIcmpv6(135 as short, 0 as short),
377                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
378                 ]
379                 priority = 63010
380                 tableId = 251 as short
381             ],
382             new FlowEntity(123bi) => [
383                 cookie = 110100480bi
384                 flowId = "Ingress_ICMPv6_123_987_136_Permit_"
385                 flowName = "ACL"
386                 instructionInfoList = #[
387                     new InstructionApplyActions(#[
388                         new ActionNxResubmit(220 as short)
389                     ])
390                 ]
391                 matchInfoList = #[
392                     new MatchEthernetType(34525L),
393                     new MatchIpProtocol(58 as short),
394                     new MatchIcmpv6(136 as short, 0 as short),
395                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
396                 ]
397                 priority = 63010
398                 tableId = 251 as short
399             ],
400             new FlowEntity(123bi) => [
401                 cookie = 110100480bi
402                 flowId = "Ingress_ARP_123_987"
403                 flowName = "ACL"
404                 instructionInfoList = #[
405                     new InstructionApplyActions(#[
406                         new ActionNxResubmit(220 as short)
407                     ])
408                 ]
409                 matchInfoList = #[
410                     new MatchEthernetType(2054L),
411                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
412                 ]
413                 priority = 63010
414                 tableId = 251 as short
415             ]
416         ]
417     }
418
419     static def fixedEgrssFlowsPort2 () {
420         #[
421             new FlowEntity(123bi) => [
422                 cookie = 110100480bi
423                 flowId = "Egress_DHCP_Client_v4123_987__Permit_"
424                 flowName = "ACL"
425                 instructionInfoList = #[
426                     new InstructionApplyActions(#[
427                         new ActionNxResubmit(17 as short)
428                     ])
429                 ]
430                 matchInfoList = #[
431                     new MatchEthernetType(2048L),
432                     new MatchIpProtocol(17 as short),
433                     new MatchUdpDestinationPort(67),
434                     new MatchUdpSourcePort(68),
435                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
436                 ]
437                 priority = 63010
438                 tableId = 40 as short
439             ],
440             new FlowEntity(123bi) => [
441                 cookie = 110100480bi
442                 flowId = "Egress_DHCP_Client_v6_123_987__Permit_"
443                 flowName = "ACL"
444                 instructionInfoList = #[
445                     new InstructionApplyActions(#[
446                         new ActionNxResubmit(17 as short)
447                     ])
448                 ]
449                 matchInfoList = #[
450                     new MatchEthernetType(34525L),
451                     new MatchIpProtocol(17 as short),
452                     new MatchUdpDestinationPort(547),
453                     new MatchUdpSourcePort(546),
454                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
455                 ]
456                 priority = 63010
457                 tableId = 40 as short
458             ],
459             new FlowEntity(123bi) => [
460                 cookie = 110100480bi
461                 flowId = "Egress_DHCP_Server_v4123_987__Drop_"
462                 flowName = "ACL"
463                 instructionInfoList = #[
464                 ]
465                 matchInfoList = #[
466                     new MatchEthernetType(2048L),
467                     new MatchIpProtocol(17 as short),
468                     new MatchUdpDestinationPort(68),
469                     new MatchUdpSourcePort(67),
470                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
471                 ]
472                 priority = 63010
473                 tableId = 40 as short
474             ],
475             new FlowEntity(123bi) => [
476                 cookie = 110100480bi
477                 flowId = "Egress_DHCP_Server_v6_123_987__Drop_"
478                 flowName = "ACL"
479                 instructionInfoList = #[
480                 ]
481                 matchInfoList = #[
482                     new MatchEthernetType(34525L),
483                     new MatchIpProtocol(17 as short),
484                     new MatchUdpDestinationPort(546),
485                     new MatchUdpSourcePort(547),
486                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
487                 ]
488                 priority = 63010
489                 tableId = 40 as short
490             ],
491             new FlowEntity(123bi) => [
492                 cookie = 110100480bi
493                 flowId = "Egress_ICMPv6_123_987_134_Drop_"
494                 flowName = "ACL"
495                 instructionInfoList = #[
496                 ]
497                 matchInfoList = #[
498                     new MatchEthernetType(34525L),
499                     new MatchIpProtocol(58 as short),
500                     new MatchIcmpv6(134 as short, 0 as short),
501                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
502                 ]
503                 priority = 63020
504                 tableId = 40 as short
505             ],
506             new FlowEntity(123bi) => [
507                 cookie = 110100480bi
508                 flowId = "Egress_ICMPv6_123_987_133_Permit_"
509                 flowName = "ACL"
510                 instructionInfoList = #[
511                     new InstructionApplyActions(#[
512                         new ActionNxResubmit(17 as short)
513                     ])
514                 ]
515                 matchInfoList = #[
516                     new MatchEthernetType(34525L),
517                     new MatchIpProtocol(58 as short),
518                     new MatchIcmpv6(133 as short, 0 as short),
519                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
520                 ]
521                 priority = 63010
522                 tableId = 40 as short
523             ],
524             new FlowEntity(123bi) => [
525                 cookie = 110100480bi
526                 flowId = "Egress_ICMPv6_123_987_135_Permit_"
527                 flowName = "ACL"
528                 instructionInfoList = #[
529                     new InstructionApplyActions(#[
530                         new ActionNxResubmit(17 as short)
531                     ])
532                 ]
533                 matchInfoList = #[
534                     new MatchEthernetType(34525L),
535                     new MatchIpProtocol(58 as short),
536                     new MatchIcmpv6(135 as short, 0 as short),
537                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
538                 ]
539                 priority = 63010
540                 tableId = 40 as short
541             ],
542             new FlowEntity(123bi) => [
543                 cookie = 110100480bi
544                 flowId = "Egress_ICMPv6_123_987_136_Permit_"
545                 flowName = "ACL"
546                 instructionInfoList = #[
547                     new InstructionApplyActions(#[
548                         new ActionNxResubmit(17 as short)
549                     ])
550                 ]
551                 matchInfoList = #[
552                     new MatchEthernetType(34525L),
553                     new MatchIpProtocol(58 as short),
554                     new MatchIcmpv6(136 as short, 0 as short),
555                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
556                 ]
557                 priority = 63010
558                 tableId = 40 as short
559             ],
560             new FlowEntity(123bi) => [
561                 cookie = 110100480bi
562                 flowId = "Egress_ARP_123_0D:AA:D8:42:30:F4"
563                 flowName = "ACL"
564                 instructionInfoList = #[
565                     new InstructionApplyActions(#[
566                         new ActionNxResubmit(17 as short)
567                     ])
568                 ]
569                 matchInfoList = #[
570                     new MatchEthernetType(2054L),
571                     new MatchArpSha(new MacAddress("0D:AA:D8:42:30:F4")),
572                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
573                 ]
574                 priority = 63010
575                 tableId = 40 as short
576             ]
577         ]
578
579     }
580
581     static def fixedIngressFlowsPort3() {
582         #[
583             new FlowEntity(123bi) => [
584                 cookie = 110100480bi
585                 flowId = "Ingress_DHCP_Server_v4123_987__Permit_"
586                 flowName = "ACL"
587                 instructionInfoList = #[
588                     new InstructionApplyActions(#[
589                         new ActionNxResubmit(220 as short)
590                     ])
591                 ]
592                 matchInfoList = #[
593                     new MatchEthernetType(2048L),
594                     new MatchIpProtocol(17 as short),
595                     new MatchUdpDestinationPort(68),
596                     new MatchUdpSourcePort(67),
597                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
598                 ]
599                 priority = 63010
600                 tableId = 251 as short
601             ],
602             new FlowEntity(123bi) => [
603                 cookie = 110100480bi
604                 flowId = "Ingress_DHCP_Server_v6_123_987___Permit_"
605                 flowName = "ACL"
606                 instructionInfoList = #[
607                     new InstructionApplyActions(#[
608                         new ActionNxResubmit(220 as short)
609                     ])
610                 ]
611                 matchInfoList = #[
612                     new MatchEthernetType(34525L),
613                     new MatchIpProtocol(17 as short),
614                     new MatchUdpDestinationPort(546),
615                     new MatchUdpSourcePort(547),
616                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
617                 ]
618                 priority = 63010
619                 tableId = 251 as short
620             ],
621             new FlowEntity(123bi) => [
622                 cookie = 110100480bi
623                 flowId = "Ingress_ICMPv6_123_987_130_Permit_"
624                 flowName = "ACL"
625                 instructionInfoList = #[
626                     new InstructionApplyActions(#[
627                         new ActionNxResubmit(220 as short)
628                     ])
629                 ]
630                 matchInfoList = #[
631                     new MatchEthernetType(34525L),
632                     new MatchIpProtocol(58 as short),
633                     new MatchIcmpv6(130 as short, 0 as short),
634                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
635                 ]
636                 priority = 63010
637                 tableId = 251 as short
638             ],
639             new FlowEntity(123bi) => [
640                 cookie = 110100480bi
641                 flowId = "Ingress_ICMPv6_123_987_135_Permit_"
642                 flowName = "ACL"
643                 instructionInfoList = #[
644                     new InstructionApplyActions(#[
645                         new ActionNxResubmit(220 as short)
646                     ])
647                 ]
648                 matchInfoList = #[
649                     new MatchEthernetType(34525L),
650                     new MatchIpProtocol(58 as short),
651                     new MatchIcmpv6(135 as short, 0 as short),
652                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
653                 ]
654                 priority = 63010
655                 tableId = 251 as short
656             ],
657             new FlowEntity(123bi) => [
658                 cookie = 110100480bi
659                 flowId = "Ingress_ICMPv6_123_987_136_Permit_"
660                 flowName = "ACL"
661                 instructionInfoList = #[
662                     new InstructionApplyActions(#[
663                         new ActionNxResubmit(220 as short)
664                     ])
665                 ]
666                 matchInfoList = #[
667                     new MatchEthernetType(34525L),
668                     new MatchIpProtocol(58 as short),
669                     new MatchIcmpv6(136 as short, 0 as short),
670                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
671                 ]
672                 priority = 63010
673                 tableId = 251 as short
674             ],
675             new FlowEntity(123bi) => [
676                 cookie = 110100480bi
677                 flowId = "Ingress_ARP_123_987"
678                 flowName = "ACL"
679                 instructionInfoList = #[
680                     new InstructionApplyActions(#[
681                         new ActionNxResubmit(220 as short)
682                     ])
683                 ]
684                 matchInfoList = #[
685                     new MatchEthernetType(2054L),
686                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
687                 ]
688                 priority = 63010
689                 tableId = 251 as short
690             ]
691         ]
692     }
693
694     static def fixedEgressFlowsPort3 () {
695         #[
696             new FlowEntity(123bi) => [
697                 cookie = 110100480bi
698                 flowId = "Egress_DHCP_Client_v4123_987__Permit_"
699                 flowName = "ACL"
700                 instructionInfoList = #[
701                     new InstructionApplyActions(#[
702                         new ActionNxResubmit(17 as short)
703                     ])
704                 ]
705                 matchInfoList = #[
706                     new MatchEthernetType(2048L),
707                     new MatchIpProtocol(17 as short),
708                     new MatchUdpDestinationPort(67),
709                     new MatchUdpSourcePort(68),
710                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
711                 ]
712                 priority = 63010
713                 tableId = 40 as short
714             ],
715             new FlowEntity(123bi) => [
716                 cookie = 110100480bi
717                 flowId = "Egress_DHCP_Client_v6_123_987__Permit_"
718                 flowName = "ACL"
719                 instructionInfoList = #[
720                     new InstructionApplyActions(#[
721                         new ActionNxResubmit(17 as short)
722                     ])
723                 ]
724                 matchInfoList = #[
725                     new MatchEthernetType(34525L),
726                     new MatchIpProtocol(17 as short),
727                     new MatchUdpDestinationPort(547),
728                     new MatchUdpSourcePort(546),
729                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
730                 ]
731                 priority = 63010
732                 tableId = 40 as short
733             ],
734             new FlowEntity(123bi) => [
735                 cookie = 110100480bi
736                 flowId = "Egress_DHCP_Server_v4123_987__Drop_"
737                 flowName = "ACL"
738                 instructionInfoList = #[
739                 ]
740                 matchInfoList = #[
741                     new MatchEthernetType(2048L),
742                     new MatchIpProtocol(17 as short),
743                     new MatchUdpDestinationPort(68),
744                     new MatchUdpSourcePort(67),
745                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
746                 ]
747                 priority = 63010
748                 tableId = 40 as short
749             ],
750             new FlowEntity(123bi) => [
751                 cookie = 110100480bi
752                 flowId = "Egress_DHCP_Server_v6_123_987__Drop_"
753                 flowName = "ACL"
754                 instructionInfoList = #[
755                 ]
756                 matchInfoList = #[
757                     new MatchEthernetType(34525L),
758                     new MatchIpProtocol(17 as short),
759                     new MatchUdpDestinationPort(546),
760                     new MatchUdpSourcePort(547),
761                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
762                 ]
763                 priority = 63010
764                 tableId = 40 as short
765             ],
766             new FlowEntity(123bi) => [
767                 cookie = 110100480bi
768                 flowId = "Egress_ICMPv6_123_987_134_Drop_"
769                 flowName = "ACL"
770                 instructionInfoList = #[
771                 ]
772                 matchInfoList = #[
773                     new MatchEthernetType(34525L),
774                     new MatchIpProtocol(58 as short),
775                     new MatchIcmpv6(134 as short, 0 as short),
776                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
777                 ]
778                 priority = 63020
779                 tableId = 40 as short
780             ],
781             new FlowEntity(123bi) => [
782                 cookie = 110100480bi
783                 flowId = "Egress_ICMPv6_123_987_133_Permit_"
784                 flowName = "ACL"
785                 instructionInfoList = #[
786                     new InstructionApplyActions(#[
787                         new ActionNxResubmit(17 as short)
788                     ])
789                 ]
790                 matchInfoList = #[
791                     new MatchEthernetType(34525L),
792                     new MatchIpProtocol(58 as short),
793                     new MatchIcmpv6(133 as short, 0 as short),
794                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
795                 ]
796                 priority = 63010
797                 tableId = 40 as short
798             ],
799             new FlowEntity(123bi) => [
800                 cookie = 110100480bi
801                 flowId = "Egress_ICMPv6_123_987_135_Permit_"
802                 flowName = "ACL"
803                 instructionInfoList = #[
804                     new InstructionApplyActions(#[
805                         new ActionNxResubmit(17 as short)
806                     ])
807                 ]
808                 matchInfoList = #[
809                     new MatchEthernetType(34525L),
810                     new MatchIpProtocol(58 as short),
811                     new MatchIcmpv6(135 as short, 0 as short),
812                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
813                 ]
814                 priority = 63010
815                 tableId = 40 as short
816             ],
817             new FlowEntity(123bi) => [
818                 cookie = 110100480bi
819                 flowId = "Egress_ICMPv6_123_987_136_Permit_"
820                 flowName = "ACL"
821                 instructionInfoList = #[
822                     new InstructionApplyActions(#[
823                         new ActionNxResubmit(17 as short)
824                     ])
825                 ]
826                 matchInfoList = #[
827                     new MatchEthernetType(34525L),
828                     new MatchIpProtocol(58 as short),
829                     new MatchIcmpv6(136 as short, 0 as short),
830                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
831                 ]
832                 priority = 63010
833                 tableId = 40 as short
834             ],
835             new FlowEntity(123bi) => [
836                 cookie = 110100480bi
837                 flowId = "Egress_ARP_123_0D:AA:D8:42:30:F5"
838                 flowName = "ACL"
839                 instructionInfoList = #[
840                     new InstructionApplyActions(#[
841                         new ActionNxResubmit(17 as short)
842                     ])
843                 ]
844                 matchInfoList = #[
845                     new MatchEthernetType(2054L),
846                     new MatchArpSha(new MacAddress("0D:AA:D8:42:30:F5")),
847                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
848                 ]
849                 priority = 63010
850                 tableId = 40 as short
851             ]
852         ]
853     }
854
855     static def expectedFlows(String mac) {
856         // Code auto. generated by https://github.com/vorburger/xtendbeans
857         #[
858             new FlowEntity(123bi) => [
859                 cookie = 110100480bi
860                 flowId = "Ingress_DHCP_Server_v4123_987__Permit_"
861                 flowName = "ACL"
862                 instructionInfoList = #[
863                     new InstructionApplyActions(#[
864                         new ActionNxResubmit(220 as short)
865                     ])
866                 ]
867                 matchInfoList = #[
868                     new MatchEthernetType(2048L),
869                     new MatchIpProtocol(17 as short),
870                     new MatchUdpDestinationPort(68),
871                     new MatchUdpSourcePort(67),
872                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
873                 ]
874                 priority = 63010
875                 tableId = 251 as short
876             ],
877             new FlowEntity(123bi) => [
878                 cookie = 110100480bi
879                 flowId = "Ingress_DHCP_Server_v6_123_987___Permit_"
880                 flowName = "ACL"
881                 instructionInfoList = #[
882                     new InstructionApplyActions(#[
883                         new ActionNxResubmit(220 as short)
884                     ])
885                 ]
886                 matchInfoList = #[
887                     new MatchEthernetType(34525L),
888                     new MatchIpProtocol(17 as short),
889                     new MatchUdpDestinationPort(546),
890                     new MatchUdpSourcePort(547),
891                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
892                 ]
893                 priority = 63010
894                 tableId = 251 as short
895             ],
896             new FlowEntity(123bi) => [
897                 cookie = 110100480bi
898                 flowId = "Ingress_ICMPv6_123_987_130_Permit_"
899                 flowName = "ACL"
900                 instructionInfoList = #[
901                     new InstructionApplyActions(#[
902                         new ActionNxResubmit(220 as short)
903                     ])
904                 ]
905                 matchInfoList = #[
906                     new MatchEthernetType(34525L),
907                     new MatchIpProtocol(58 as short),
908                     new MatchIcmpv6(130 as short, 0 as short),
909                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
910                 ]
911                 priority = 63010
912                 tableId = 251 as short
913             ],
914             new FlowEntity(123bi) => [
915                 cookie = 110100480bi
916                 flowId = "Ingress_ICMPv6_123_987_135_Permit_"
917                 flowName = "ACL"
918                 instructionInfoList = #[
919                     new InstructionApplyActions(#[
920                         new ActionNxResubmit(220 as short)
921                     ])
922                 ]
923                 matchInfoList = #[
924                     new MatchEthernetType(34525L),
925                     new MatchIpProtocol(58 as short),
926                     new MatchIcmpv6(135 as short, 0 as short),
927                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
928                 ]
929                 priority = 63010
930                 tableId = 251 as short
931             ],
932             new FlowEntity(123bi) => [
933                 cookie = 110100480bi
934                 flowId = "Ingress_ICMPv6_123_987_136_Permit_"
935                 flowName = "ACL"
936                 instructionInfoList = #[
937                     new InstructionApplyActions(#[
938                         new ActionNxResubmit(220 as short)
939                     ])
940                 ]
941                 matchInfoList = #[
942                     new MatchEthernetType(34525L),
943                     new MatchIpProtocol(58 as short),
944                     new MatchIcmpv6(136 as short, 0 as short),
945                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
946                 ]
947                 priority = 63010
948                 tableId = 251 as short
949             ],
950             new FlowEntity(123bi) => [
951                 cookie = 110100480bi
952                 flowId = "Ingress_ARP_123_987"
953                 flowName = "ACL"
954                 instructionInfoList = #[
955                     new InstructionApplyActions(#[
956                         new ActionNxResubmit(220 as short)
957                     ])
958                 ]
959                 matchInfoList = #[
960                     new MatchEthernetType(2054L),
961                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
962                 ]
963                 priority = 63010
964                 tableId = 251 as short
965             ],
966             new FlowEntity(123bi) => [
967                 cookie = 110100480bi
968                 flowId = "Egress_DHCP_Client_v4123_987__Permit_"
969                 flowName = "ACL"
970                 instructionInfoList = #[
971                     new InstructionApplyActions(#[
972                         new ActionNxResubmit(17 as short)
973                     ])
974                 ]
975                 matchInfoList = #[
976                     new MatchEthernetType(2048L),
977                     new MatchIpProtocol(17 as short),
978                     new MatchUdpDestinationPort(67),
979                     new MatchUdpSourcePort(68),
980                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
981                 ]
982                 priority = 63010
983                 tableId = 40 as short
984             ],
985             new FlowEntity(123bi) => [
986                 cookie = 110100480bi
987                 flowId = "Egress_DHCP_Client_v6_123_987__Permit_"
988                 flowName = "ACL"
989                 instructionInfoList = #[
990                     new InstructionApplyActions(#[
991                         new ActionNxResubmit(17 as short)
992                     ])
993                 ]
994                 matchInfoList = #[
995                     new MatchEthernetType(34525L),
996                     new MatchIpProtocol(17 as short),
997                     new MatchUdpDestinationPort(547),
998                     new MatchUdpSourcePort(546),
999                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1000                 ]
1001                 priority = 63010
1002                 tableId = 40 as short
1003             ],
1004             new FlowEntity(123bi) => [
1005                 cookie = 110100480bi
1006                 flowId = "Egress_DHCP_Server_v4123_987__Drop_"
1007                 flowName = "ACL"
1008                 instructionInfoList = #[
1009                 ]
1010                 matchInfoList = #[
1011                     new MatchEthernetType(2048L),
1012                     new MatchIpProtocol(17 as short),
1013                     new MatchUdpDestinationPort(68),
1014                     new MatchUdpSourcePort(67),
1015                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1016                 ]
1017                 priority = 63010
1018                 tableId = 40 as short
1019             ],
1020             new FlowEntity(123bi) => [
1021                 cookie = 110100480bi
1022                 flowId = "Egress_DHCP_Server_v6_123_987__Drop_"
1023                 flowName = "ACL"
1024                 instructionInfoList = #[
1025                 ]
1026                 matchInfoList = #[
1027                     new MatchEthernetType(34525L),
1028                     new MatchIpProtocol(17 as short),
1029                     new MatchUdpDestinationPort(546),
1030                     new MatchUdpSourcePort(547),
1031                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1032                 ]
1033                 priority = 63010
1034                 tableId = 40 as short
1035             ],
1036             new FlowEntity(123bi) => [
1037                 cookie = 110100480bi
1038                 flowId = "Egress_ICMPv6_123_987_134_Drop_"
1039                 flowName = "ACL"
1040                 instructionInfoList = #[
1041                 ]
1042                 matchInfoList = #[
1043                     new MatchEthernetType(34525L),
1044                     new MatchIpProtocol(58 as short),
1045                     new MatchIcmpv6(134 as short, 0 as short),
1046                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1047                 ]
1048                 priority = 63020
1049                 tableId = 40 as short
1050             ],
1051             new FlowEntity(123bi) => [
1052                 cookie = 110100480bi
1053                 flowId = "Egress_ICMPv6_123_987_133_Permit_"
1054                 flowName = "ACL"
1055                 instructionInfoList = #[
1056                     new InstructionApplyActions(#[
1057                         new ActionNxResubmit(17 as short)
1058                     ])
1059                 ]
1060                 matchInfoList = #[
1061                     new MatchEthernetType(34525L),
1062                     new MatchIpProtocol(58 as short),
1063                     new MatchIcmpv6(133 as short, 0 as short),
1064                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1065                 ]
1066                 priority = 63010
1067                 tableId = 40 as short
1068             ],
1069             new FlowEntity(123bi) => [
1070                 cookie = 110100480bi
1071                 flowId = "Egress_ICMPv6_123_987_135_Permit_"
1072                 flowName = "ACL"
1073                 instructionInfoList = #[
1074                     new InstructionApplyActions(#[
1075                         new ActionNxResubmit(17 as short)
1076                     ])
1077                 ]
1078                 matchInfoList = #[
1079                     new MatchEthernetType(34525L),
1080                     new MatchIpProtocol(58 as short),
1081                     new MatchIcmpv6(135 as short, 0 as short),
1082                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1083                 ]
1084                 priority = 63010
1085                 tableId = 40 as short
1086             ],
1087             new FlowEntity(123bi) => [
1088                 cookie = 110100480bi
1089                 flowId = "Egress_ICMPv6_123_987_136_Permit_"
1090                 flowName = "ACL"
1091                 instructionInfoList = #[
1092                     new InstructionApplyActions(#[
1093                         new ActionNxResubmit(17 as short)
1094                     ])
1095                 ]
1096                 matchInfoList = #[
1097                     new MatchEthernetType(34525L),
1098                     new MatchIpProtocol(58 as short),
1099                     new MatchIcmpv6(136 as short, 0 as short),
1100                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1101                 ]
1102                 priority = 63010
1103                 tableId = 40 as short
1104             ]
1105         ]
1106     }
1107 }