Implement remote ACL indirection table
[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.getId(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.getId(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 MatchMetadata(1085217976614912bi, 1152920405095219200bi),
406                     new NxMatchCtState(48, 48)
407                 ]
408                 priority = 62015
409                 tableId = 243 as short
410             ]
411         ]
412     }
413
414     override etherEgressFlowsPort1() {
415         #[
416             new FlowEntity(123bi) => [
417                 cookie = 110100480bi
418                 flowId = "ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6"
419                 flowName = "ACL"
420                 instructionInfoList = #[
421                     new InstructionApplyActions(#[
422                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
423                         new ActionNxResubmit(17 as short)
424                     ])
425                 ]
426                 matchInfoList = #[
427                     new MatchEthernetType(34525L),
428                     new MatchIpv6Source("::/0"),
429                     new MatchEthernetType(34525L),
430                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
431                     new NxMatchCtState(33, 33)
432                 ]
433                 priority = IdHelper.getId(flowId)
434                 tableId = 213 as short
435             ]
436         ]
437     }
438
439     override etheregressFlowPort2() {
440         #[
441             new FlowEntity(123bi) => [
442                 cookie = 110100480bi
443                 flowId = "ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6"
444                 flowName = "ACL"
445                 instructionInfoList = #[
446                     new InstructionApplyActions(#[
447                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
448                         new ActionNxResubmit(17 as short)
449                     ])
450                 ]
451                 matchInfoList = #[
452                     new MatchEthernetType(34525L),
453                     new MatchIpv6Source("::/0"),
454                     new MatchEthernetType(34525L),
455                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
456                     new NxMatchCtState(33, 33)
457                 ]
458                 priority = IdHelper.getId(flowId)
459                 tableId = 213 as short
460             ]
461         ]
462     }
463
464     override tcpIngressFlowPort1() {
465         #[
466             new FlowEntity(123bi) => [
467                 cookie = 110100480bi
468                 flowId = "TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
469                 flowName = "ACL"
470                 instructionInfoList = #[
471                     new InstructionApplyActions(#[
472                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
473                         new ActionNxResubmit(220 as short)
474                     ])
475                 ]
476                 matchInfoList = #[
477                     new MatchEthernetType(34525L),
478                     new MatchIpv6Source("::/0"),
479                     new MatchEthernetType(34525L),
480                     new NxMatchTcpDestinationPort(80, 65535),
481                     new MatchIpProtocol(6 as short),
482                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
483                     new NxMatchCtState(33, 33)
484                 ]
485                 priority = IdHelper.getId(flowId)
486                 tableId = 243 as short
487             ]
488         ]
489     }
490
491     override tcpIngressFlowPort2() {
492         #[
493             new FlowEntity(123bi) => [
494                 cookie = 110100480bi
495                 flowId = "TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
496                 flowName = "ACL"
497                 instructionInfoList = #[
498                     new InstructionApplyActions(#[
499                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
500                         new ActionNxResubmit(220 as short)
501                     ])
502                 ]
503                 matchInfoList = #[
504                     new MatchEthernetType(34525L),
505                     new MatchIpv6Source("::/0"),
506                     new MatchEthernetType(34525L),
507                     new NxMatchTcpDestinationPort(80, 65535),
508                     new MatchIpProtocol(6 as short),
509                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
510                     new NxMatchCtState(33, 33)
511                 ]
512                 priority = IdHelper.getId(flowId)
513                 tableId = 243 as short
514             ]
515         ]
516     }
517
518     override tcpEgressFlowPort2() {
519         #[
520             new FlowEntity(123bi) => [
521                 cookie = 110100480bi
522                 flowId = "TCP_DESTINATION_80_65535_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F3_2001:db8:1::/64"
523                         +"Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
524                 flowName = "ACL"
525                 instructionInfoList = #[
526                     new InstructionApplyActions(#[
527                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
528                         new ActionNxResubmit(17 as short)
529                     ])
530                 ]
531                 matchInfoList = #[
532                     new MatchEthernetType(34525L),
533                     new MatchIpv6Destination("2001:db8:1::/64"),
534                     new MatchEthernetType(34525L),
535                     new MatchIpv6Source("::/0"),
536                     new MatchEthernetType(34525L),
537                     new NxMatchTcpDestinationPort(80, 65535),
538                     new MatchIpProtocol(6 as short),
539                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
540                     new NxMatchCtState(33, 33)
541                 ]
542                 priority = IdHelper.getId(flowId)
543                 tableId = 213 as short
544             ],
545             new FlowEntity(123bi) => [
546                 cookie = 110100480bi
547                 flowId = "TCP_DESTINATION_80_65535_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F4_2001:db8:2::/64Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
548                 flowName = "ACL"
549                 instructionInfoList = #[
550                     new InstructionApplyActions(#[
551                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
552                         new ActionNxResubmit(17 as short)
553                     ])
554                 ]
555                 matchInfoList = #[
556                     new MatchEthernetType(34525L),
557                     new MatchIpv6Destination("2001:db8:2::/64"),
558                     new MatchEthernetType(34525L),
559                     new MatchIpv6Source("::/0"),
560                     new MatchEthernetType(34525L),
561                     new NxMatchTcpDestinationPort(80, 65535),
562                     new MatchIpProtocol(6 as short),
563                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
564                     new NxMatchCtState(33, 33)
565                 ]
566                 priority = IdHelper.getId(flowId)
567                 tableId = 213 as short
568             ]
569         ]
570     }
571
572     override udpEgressFlowsPort1() {
573         #[
574              new FlowEntity(123bi) => [
575                 cookie = 110100480bi
576                 flowId = "UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
577                 flowName = "ACL"
578                 instructionInfoList = #[
579                     new InstructionApplyActions(#[
580                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
581                         new ActionNxResubmit(17 as short)
582                     ])
583                 ]
584                 matchInfoList = #[
585                     new MatchEthernetType(34525L),
586                     new MatchIpv6Source("::/0"),
587                     new MatchEthernetType(34525L),
588                     new NxMatchUdpDestinationPort(80, 65535),
589                     new MatchIpProtocol(17 as short),
590                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
591                     new NxMatchCtState(33, 33)
592                 ]
593                 priority = IdHelper.getId(flowId)
594                 tableId = 213 as short
595             ]
596         ]
597     }
598
599     override udpIngressFlowsPort2() {
600         #[
601             new FlowEntity(123bi) => [
602                 cookie = 110100480bi
603                 flowId = "UDP_DESTINATION_80_65535_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F3_2001:db8:1::/64"
604                         +"Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
605                 flowName = "ACL"
606                 instructionInfoList = #[
607                     new InstructionApplyActions(#[
608                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
609                         new ActionNxResubmit(220 as short)
610                     ])
611                 ]
612                 matchInfoList = #[
613                     new MatchEthernetType(34525L),
614                     new MatchIpv6Source("2001:db8:1::/64"),
615                     new MatchEthernetType(34525L),
616                     new MatchIpv6Source("::/0"),
617                     new MatchEthernetType(34525L),
618                     new NxMatchUdpDestinationPort(80, 65535),
619                     new MatchIpProtocol(17 as short),
620                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
621                     new NxMatchCtState(33, 33)
622                 ]
623                 priority = IdHelper.getId(flowId)
624                 tableId = 243 as short
625             ],
626             new FlowEntity(123bi) => [
627                 cookie = 110100480bi
628                 flowId = "UDP_DESTINATION_80_65535_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F4_2001:db8:2::/64Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
629                 flowName = "ACL"
630                 instructionInfoList = #[
631                     new InstructionApplyActions(#[
632                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
633                         new ActionNxResubmit(220 as short)
634                     ])
635                 ]
636                 matchInfoList = #[
637                     new MatchEthernetType(34525L),
638                     new MatchIpv6Source("2001:db8:2::/64"),
639                     new MatchEthernetType(34525L),
640                     new MatchIpv6Source("::/0"),
641                     new MatchEthernetType(34525L),
642                     new NxMatchUdpDestinationPort(80, 65535),
643                     new MatchIpProtocol(17 as short),
644                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
645                     new NxMatchCtState(33, 33)
646                 ]
647                 priority = IdHelper.getId(flowId)
648                 tableId = 243 as short
649             ]
650         ]
651     }
652
653     override udpEgressFlowsPort2() {
654         #[
655             new FlowEntity(123bi) => [
656                 cookie = 110100480bi
657                 flowId = "UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
658                 flowName = "ACL"
659                 instructionInfoList = #[
660                     new InstructionApplyActions(#[
661                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
662                         new ActionNxResubmit(17 as short)
663                     ])
664                 ]
665                 matchInfoList = #[
666                     new MatchEthernetType(34525L),
667                     new MatchIpv6Source("::/0"),
668                     new MatchEthernetType(34525L),
669                     new NxMatchUdpDestinationPort(80, 65535),
670                     new MatchIpProtocol(17 as short),
671                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
672                     new NxMatchCtState(33, 33)
673                 ]
674                 priority = IdHelper.getId(flowId)
675                 tableId = 213 as short
676             ]
677         ]
678     }
679
680     override icmpIngressFlowsPort1() {
681         #[
682             new FlowEntity(123bi) => [
683                 cookie = 110100480bi
684                 flowId = "ICMP_V6_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
685                 flowName = "ACL"
686                 instructionInfoList = #[
687                     new InstructionApplyActions(#[
688                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
689                         new ActionNxResubmit(220 as short)
690                     ])
691                 ]
692                 matchInfoList = #[
693                     new MatchEthernetType(34525L),
694                     new MatchIpv6Source("::/0"),
695                     new MatchEthernetType(34525L),
696                     new MatchIcmpv6(2 as short, 3 as short),
697                     new MatchIpProtocol(1 as short),
698                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
699                     new NxMatchCtState(33, 33)
700                 ]
701                 priority = IdHelper.getId(flowId)
702                 tableId = 243 as short
703             ]
704         ]
705     }
706
707     override icmpIngressFlowsPort2() {
708         #[
709             new FlowEntity(123bi) => [
710                 cookie = 110100480bi
711                 flowId = "ICMP_V6_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
712                 flowName = "ACL"
713                 instructionInfoList = #[
714                     new InstructionApplyActions(#[
715                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
716                         new ActionNxResubmit(220 as short)
717                     ])
718                 ]
719                 matchInfoList = #[
720                     new MatchEthernetType(34525L),
721                     new MatchIpv6Source("::/0"),
722                     new MatchEthernetType(34525L),
723                     new MatchIcmpv6(2 as short, 3 as short),
724                     new MatchIpProtocol(1 as short),
725                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
726                     new NxMatchCtState(33, 33)
727                 ]
728                 priority = IdHelper.getId(flowId)
729                 tableId = 243 as short
730             ]
731         ]
732     }
733
734     override icmpEgressFlowsPort2() {
735         #[
736             new FlowEntity(123bi) => [
737                 cookie = 110100480bi
738                 flowId = "ICMP_V6_DESTINATION_23__ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F3_2001:db8:1::/64"
739                         +"Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
740                 flowName = "ACL"
741                 instructionInfoList = #[
742                     new InstructionApplyActions(#[
743                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
744                         new ActionNxResubmit(17 as short)
745                     ])
746                 ]
747                 matchInfoList = #[
748                     new MatchEthernetType(34525L),
749                     new MatchIpv6Destination("2001:db8:1::/64"),
750                     new MatchEthernetType(34525L),
751                     new MatchIpv6Source("::/0"),
752                     new MatchEthernetType(34525L),
753                     new MatchIcmpv6(2 as short, 3 as short),
754                     new MatchIpProtocol(1 as short),
755                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
756                     new NxMatchCtState(33, 33)
757                 ]
758                 priority = IdHelper.getId(flowId)
759                 tableId = 213 as short
760             ],
761             new FlowEntity(123bi) => [
762                 cookie = 110100480bi
763                 flowId = "ICMP_V6_DESTINATION_23__ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F4_2001:db8:2::/64"
764                         +"Egress98785cc3048-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 MatchIpv6Destination("2001:db8:2::/64"),
775                     new MatchEthernetType(34525L),
776                     new MatchIpv6Source("::/0"),
777                     new MatchEthernetType(34525L),
778                     new MatchIcmpv6(2 as short, 3 as short),
779                     new MatchIpProtocol(1 as short),
780                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
781                     new NxMatchCtState(33, 33)
782                 ]
783                 priority = IdHelper.getId(flowId)
784                 tableId = 213 as short
785             ]
786         ]
787     }
788
789     override udpIngressPortRangeFlows() {
790         #[
791             new FlowEntity(123bi) => [
792                 cookie = 110100480bi
793                 flowId = "UDP_DESTINATION_2000_65532Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
794                 flowName = "ACL"
795                 instructionInfoList = #[
796                     new InstructionApplyActions(#[
797                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
798                         new ActionNxResubmit(220 as short)
799                     ])
800                 ]
801                 matchInfoList = #[
802                     new MatchEthernetType(34525L),
803                     new MatchIpv6Source("::/0"),
804                     new MatchEthernetType(34525L),
805                     new NxMatchUdpDestinationPort(2000, 65532),
806                     new MatchIpProtocol(17 as short),
807                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
808                     new NxMatchCtState(33, 33)
809                 ]
810                 priority = IdHelper.getId(flowId)
811                 tableId = 243 as short
812             ]
813         ]
814     }
815
816     override tcpEgressRangeFlows() {
817         #[
818             new FlowEntity(123bi) => [
819                 cookie = 110100480bi
820                 flowId = "TCP_DESTINATION_776_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
821                 flowName = "ACL"
822                 instructionInfoList = #[
823                     new InstructionApplyActions(#[
824                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
825                         new ActionNxResubmit(17 as short)
826                     ])
827                 ]
828                 matchInfoList = #[
829                     new MatchEthernetType(34525L),
830                     new MatchIpv6Source("::/0"),
831                     new MatchEthernetType(34525L),
832                     new NxMatchTcpDestinationPort(776, 65534),
833                     new MatchIpProtocol(6 as short),
834                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
835                     new NxMatchCtState(33, 33)
836                 ]
837                 priority = IdHelper.getId(flowId)
838                 tableId = 213 as short
839             ],
840             new FlowEntity(123bi) => [
841                 cookie = 110100480bi
842                 flowId = "TCP_DESTINATION_512_65280Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
843                 flowName = "ACL"
844                 instructionInfoList = #[
845                     new InstructionApplyActions(#[
846                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
847                         new ActionNxResubmit(17 as short)
848                     ])
849                 ]
850                 matchInfoList = #[
851                     new MatchEthernetType(34525L),
852                     new MatchIpv6Source("::/0"),
853                     new MatchEthernetType(34525L),
854                     new NxMatchTcpDestinationPort(512, 65280),
855                     new MatchIpProtocol(6 as short),
856                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
857                     new NxMatchCtState(33, 33)
858                 ]
859                 priority = IdHelper.getId(flowId)
860                 tableId = 213 as short
861             ],
862             new FlowEntity(123bi) => [
863                 cookie = 110100480bi
864                 flowId = "TCP_DESTINATION_334_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
865                 flowName = "ACL"
866                 instructionInfoList = #[
867                     new InstructionApplyActions(#[
868                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
869                         new ActionNxResubmit(17 as short)
870                     ])
871                 ]
872                 matchInfoList = #[
873                     new MatchEthernetType(34525L),
874                     new MatchIpv6Source("::/0"),
875                     new MatchEthernetType(34525L),
876                     new NxMatchTcpDestinationPort(334, 65534),
877                     new MatchIpProtocol(6 as short),
878                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
879                     new NxMatchCtState(33, 33)
880                 ]
881                 priority = IdHelper.getId(flowId)
882                 tableId = 213 as short
883             ],
884             new FlowEntity(123bi) => [
885                 cookie = 110100480bi
886                 flowId = "TCP_DESTINATION_333_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
887                 flowName = "ACL"
888                 instructionInfoList = #[
889                     new InstructionApplyActions(#[
890                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
891                         new ActionNxResubmit(17 as short)
892                     ])
893                 ]
894                 matchInfoList = #[
895                     new MatchEthernetType(34525L),
896                     new MatchIpv6Source("::/0"),
897                     new MatchEthernetType(34525L),
898                     new NxMatchTcpDestinationPort(333, 65535),
899                     new MatchIpProtocol(6 as short),
900                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
901                     new NxMatchCtState(33, 33)
902                 ]
903                 priority = IdHelper.getId(flowId)
904                 tableId = 213 as short
905             ],
906             new FlowEntity(123bi) => [
907                 cookie = 110100480bi
908                 flowId = "TCP_DESTINATION_336_65520Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
909                 flowName = "ACL"
910                 instructionInfoList = #[
911                     new InstructionApplyActions(#[
912                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
913                         new ActionNxResubmit(17 as short)
914                     ])
915                 ]
916                 matchInfoList = #[
917                     new MatchEthernetType(34525L),
918                     new MatchIpv6Source("::/0"),
919                     new MatchEthernetType(34525L),
920                     new NxMatchTcpDestinationPort(336, 65520),
921                     new MatchIpProtocol(6 as short),
922                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
923                     new NxMatchCtState(33, 33)
924                 ]
925                 priority = IdHelper.getId(flowId)
926                 tableId = 213 as short
927             ],
928             new FlowEntity(123bi) => [
929                 cookie = 110100480bi
930                 flowId = "TCP_DESTINATION_352_65504Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
931                 flowName = "ACL"
932                 instructionInfoList = #[
933                     new InstructionApplyActions(#[
934                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
935                         new ActionNxResubmit(17 as short)
936                     ])
937                 ]
938                 matchInfoList = #[
939                     new MatchEthernetType(34525L),
940                     new MatchIpv6Source("::/0"),
941                     new MatchEthernetType(34525L),
942                     new NxMatchTcpDestinationPort(352, 65504),
943                     new MatchIpProtocol(6 as short),
944                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
945                     new NxMatchCtState(33, 33)
946                 ]
947                 priority = IdHelper.getId(flowId)
948                 tableId = 213 as short
949             ],
950             new FlowEntity(123bi) => [
951                 cookie = 110100480bi
952                 flowId = "TCP_DESTINATION_384_65408Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
953                 flowName = "ACL"
954                 instructionInfoList = #[
955                     new InstructionApplyActions(#[
956                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
957                         new ActionNxResubmit(17 as short)
958                     ])
959                 ]
960                 matchInfoList = #[
961                     new MatchEthernetType(34525L),
962                     new MatchIpv6Source("::/0"),
963                     new MatchEthernetType(34525L),
964                     new NxMatchTcpDestinationPort(384, 65408),
965                     new MatchIpProtocol(6 as short),
966                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
967                     new NxMatchCtState(33, 33)
968                 ]
969                 priority = IdHelper.getId(flowId)
970                 tableId = 213 as short
971             ],
972             new FlowEntity(123bi) => [
973                 cookie = 110100480bi
974                 flowId = "TCP_DESTINATION_768_65528Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
975                 flowName = "ACL"
976                 instructionInfoList = #[
977                     new InstructionApplyActions(#[
978                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
979                         new ActionNxResubmit(17 as short)
980                     ])
981                 ]
982                 matchInfoList = #[
983                     new MatchEthernetType(34525L),
984                     new MatchIpv6Source("::/0"),
985                     new MatchEthernetType(34525L),
986                     new NxMatchTcpDestinationPort(768, 65528),
987                     new MatchIpProtocol(6 as short),
988                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
989                     new NxMatchCtState(33, 33)
990                 ]
991                 priority = IdHelper.getId(flowId)
992                 tableId = 213 as short
993             ]
994         ]
995     }
996
997     override udpIngressAllFlows() {
998         #[
999             new FlowEntity(123bi) => [
1000                 cookie = 110100480bi
1001                 flowId = "UDP_DESTINATION_1_0Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
1002                 flowName = "ACL"
1003                 instructionInfoList = #[
1004                     new InstructionApplyActions(#[
1005                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1006                         new ActionNxResubmit(220 as short)
1007                     ])
1008                 ]
1009                 matchInfoList = #[
1010                     new MatchEthernetType(34525L),
1011                     new MatchIpv6Source("::/0"),
1012                     new MatchEthernetType(34525L),
1013                     new MatchIpProtocol(17 as short),
1014                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1015                     new NxMatchCtState(33, 33)
1016                 ]
1017                 priority = IdHelper.getId(flowId)
1018                 tableId = 243 as short
1019             ]
1020         ]
1021     }
1022
1023     override tcpEgressAllFlows() {
1024          #[
1025              new FlowEntity(123bi) => [
1026                 cookie = 110100480bi
1027                 flowId = "TCP_DESTINATION_1_0Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1028                 flowName = "ACL"
1029                 instructionInfoList = #[
1030                     new InstructionApplyActions(#[
1031                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1032                         new ActionNxResubmit(17 as short)
1033                     ])
1034                 ]
1035                 matchInfoList = #[
1036                     new MatchEthernetType(34525L),
1037                     new MatchIpv6Source("::/0"),
1038                     new MatchEthernetType(34525L),
1039                     new MatchIpProtocol(6 as short),
1040                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1041                     new NxMatchCtState(33, 33)
1042                 ]
1043                 priority = IdHelper.getId(flowId)
1044                 tableId = 213 as short
1045             ]
1046          ]
1047
1048      }
1049
1050     override icmpIngressFlowsPort3() {
1051         #[
1052             new FlowEntity(123bi) => [
1053                 cookie = 110100480bi
1054                 flowId = "ICMP_V6_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
1055                 flowName = "ACL"
1056                 instructionInfoList = #[
1057                     new InstructionApplyActions(#[
1058                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1059                         new ActionNxResubmit(220 as short)
1060                     ])
1061                 ]
1062                 matchInfoList = #[
1063                     new MatchEthernetType(34525L),
1064                     new MatchIpv6Source("::/0"),
1065                     new MatchEthernetType(34525L),
1066                     new MatchIcmpv6(2 as short, 3 as short),
1067                     new MatchIpProtocol(1 as short),
1068                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1069                     new NxMatchCtState(33, 33)
1070                 ]
1071                 priority = IdHelper.getId(flowId)
1072                 tableId = 243 as short
1073             ],
1074             new FlowEntity(123bi) => [
1075                 cookie = 110100480bi
1076                 flowId = "ICMP_V6_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426a22"
1077                 flowName = "ACL"
1078                 instructionInfoList = #[
1079                     new InstructionApplyActions(#[
1080                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1081                         new ActionNxResubmit(220 as short)
1082                     ])
1083                 ]
1084                 matchInfoList = #[
1085                     new MatchEthernetType(34525L),
1086                     new MatchIpv6Source("::/0"),
1087                     new MatchEthernetType(34525L),
1088                     new MatchIcmpv6(2 as short, 3 as short),
1089                     new MatchIpProtocol(1 as short),
1090                     new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1091                     new NxMatchCtState(33, 33)
1092                 ]
1093                 priority = IdHelper.getId(flowId)
1094                 tableId = 243 as short
1095             ]
1096         ]
1097     }
1098
1099     override icmpEgressFlowsPort3() {
1100         #[
1101             new FlowEntity(123bi) => [
1102                 cookie = 110100480bi
1103                 flowId = "ICMP_V6_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1104                 flowName = "ACL"
1105                 instructionInfoList = #[
1106                     new InstructionApplyActions(#[
1107                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1108                         new ActionNxResubmit(17 as short)
1109                     ])
1110                 ]
1111                 matchInfoList = #[
1112                     new MatchEthernetType(34525L),
1113                     new MatchIpv6Source("::/0"),
1114                     new MatchEthernetType(34525L),
1115                     new MatchIcmpv6(2 as short, 3 as short),
1116                     new MatchIpProtocol(1 as short),
1117                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1118                     new NxMatchCtState(33, 33)
1119                 ]
1120                 priority = IdHelper.getId(flowId)
1121                 tableId = 213 as short
1122             ],
1123             new FlowEntity(123bi) => [
1124                 cookie = 110100480bi
1125                 flowId = "ICMP_V6_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426a21"
1126                 flowName = "ACL"
1127                 instructionInfoList = #[
1128                     new InstructionApplyActions(#[
1129                         new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1130                         new ActionNxResubmit(17 as short)
1131                     ])
1132                 ]
1133                 matchInfoList = #[
1134                     new MatchEthernetType(34525L),
1135                     new MatchIpv6Source("::/0"),
1136                     new MatchEthernetType(34525L),
1137                     new MatchIcmpv6(2 as short, 3 as short),
1138                     new MatchIpProtocol(1 as short),
1139                     new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1140                     new NxMatchCtState(33, 33)
1141                 ]
1142                 priority = IdHelper.getId(flowId)
1143                 tableId = 213 as short
1144             ]
1145         ]
1146     }
1147 }