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