2 * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
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
8 package org.opendaylight.netvirt.aclservice.tests
10 import org.opendaylight.genius.mdsalutil.MetaDataUtil
11 import org.opendaylight.genius.mdsalutil.actions.ActionDrop
12 import org.opendaylight.genius.mdsalutil.actions.ActionNxConntrack
13 import org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit
14 import org.opendaylight.genius.mdsalutil.FlowEntityBuilder
15 import org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions
16 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetDestination
17 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetSource
18 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetType
19 import org.opendaylight.genius.mdsalutil.matches.MatchIcmpv6
20 import org.opendaylight.genius.mdsalutil.matches.MatchIpProtocol
21 import org.opendaylight.genius.mdsalutil.matches.MatchIpv6Destination
22 import org.opendaylight.genius.mdsalutil.matches.MatchIpv6Source
23 import org.opendaylight.genius.mdsalutil.matches.MatchMetadata
24 import org.opendaylight.genius.mdsalutil.NwConstants
25 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchCtState
26 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchRegister
27 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchTcpDestinationPort
28 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchUdpDestinationPort
29 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress
30 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg6
32 import static extension org.opendaylight.mdsal.binding.testutils.XtendBuilderExtensions.operator_doubleGreaterThan
34 class FlowEntryObjectsStatefulIPv6 extends FlowEntryObjectsStateful {
36 override fixedConntrackIngressFlowsPort1() {
38 new FlowEntityBuilder >> [
41 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F3_2001:db8:1::/64_Recirc"
43 instructionInfoList = #[
44 new InstructionApplyActions(#[
45 new ActionNxConntrack(2, 0, 0, 5000, 243 as short)
49 new MatchEthernetType(34525L),
50 new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F3")),
51 new MatchEthernetType(34525L),
52 new MatchIpv6Destination("2001:db8:1::/64")
55 tableId = NwConstants.EGRESS_ACL_TABLE
57 new FlowEntityBuilder >> [
60 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
62 instructionInfoList = #[
63 new InstructionApplyActions(#[
68 new MatchMetadata(1085217976614912bi, 1152920405095219200bi),
69 new NxMatchCtState(33, 33)
72 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
74 new FlowEntityBuilder >> [
77 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
79 instructionInfoList = #[
80 new InstructionApplyActions(#[
85 new MatchMetadata(1085217976614912bi, 1152920405095219200bi),
86 new NxMatchCtState(48, 48)
89 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
94 override etherIngressFlowsPort2() {
95 val flowId1 = "ETHERnull_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F3_2001:db8:1::/64Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
96 val flowId2 = "ETHERnull_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F4_2001:db8:2::/64Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
98 new FlowEntityBuilder >> [
103 instructionInfoList = #[
104 new InstructionApplyActions(#[
105 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
106 new ActionNxResubmit(220 as short)
110 new MatchEthernetType(34525L),
111 new MatchIpv6Source("2001:db8:1::/64"),
112 new MatchEthernetType(34525L),
113 new MatchIpv6Source("::/0"),
114 new MatchEthernetType(34525L),
115 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
116 new NxMatchCtState(33, 33)
118 priority = IdHelper.getId(flowId1)
119 tableId = NwConstants.EGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
121 new FlowEntityBuilder >> [
126 instructionInfoList = #[
127 new InstructionApplyActions(#[
128 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
129 new ActionNxResubmit(220 as short)
133 new MatchEthernetType(34525L),
134 new MatchIpv6Source("2001:db8:2::/64"),
135 new MatchEthernetType(34525L),
136 new MatchIpv6Source("::/0"),
137 new MatchEthernetType(34525L),
138 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
139 new NxMatchCtState(33, 33)
141 priority = IdHelper.getId(flowId2)
142 tableId = NwConstants.EGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
147 override fixedConntrackEgressFlowsPort1() {
149 new FlowEntityBuilder >> [
152 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F3_2001:db8:1::/64_Recirc"
154 instructionInfoList = #[
155 new InstructionApplyActions(#[
156 new ActionNxConntrack(2, 0, 0, 5000, 213 as short)
160 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F3")),
161 new MatchEthernetType(34525L),
162 new MatchIpv6Source("2001:db8:1::/64")
165 tableId = NwConstants.INGRESS_ACL_TABLE
167 new FlowEntityBuilder >> [
170 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
172 instructionInfoList = #[
173 new InstructionApplyActions(#[
178 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
179 new NxMatchCtState(33, 33)
182 tableId = NwConstants.EGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
184 new FlowEntityBuilder >> [
187 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
189 instructionInfoList = #[
190 new InstructionApplyActions(#[
195 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
196 new NxMatchCtState(48, 48)
199 tableId = NwConstants.EGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
204 override fixedConntrackIngressFlowsPort2() {
206 new FlowEntityBuilder >> [
209 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F4_2001:db8:2::/64_Recirc"
211 instructionInfoList = #[
212 new InstructionApplyActions(#[
213 new ActionNxConntrack(2, 0, 0, 5000, 243 as short)
217 new MatchEthernetType(34525L),
218 new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F4")),
219 new MatchEthernetType(34525L),
220 new MatchIpv6Destination("2001:db8:2::/64")
223 tableId = NwConstants.EGRESS_ACL_TABLE
225 new FlowEntityBuilder >> [
228 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
230 instructionInfoList = #[
231 new InstructionApplyActions(#[
236 new MatchMetadata(1085217976614912bi, 1152920405095219200bi),
237 new NxMatchCtState(33, 33)
240 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
242 new FlowEntityBuilder >> [
245 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
247 instructionInfoList = #[
248 new InstructionApplyActions(#[
253 new MatchMetadata(1085217976614912bi, 1152920405095219200bi),
254 new NxMatchCtState(48, 48)
257 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
263 override fixedConntrackEgressFlowsPort2() {
265 new FlowEntityBuilder >> [
268 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F4_2001:db8:2::/64_Recirc"
270 instructionInfoList = #[
271 new InstructionApplyActions(#[
272 new ActionNxConntrack(2, 0, 0, 5000, 213 as short)
276 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4")),
277 new MatchEthernetType(34525L),
278 new MatchIpv6Source("2001:db8:2::/64")
281 tableId = NwConstants.INGRESS_ACL_TABLE
283 new FlowEntityBuilder >> [
286 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
288 instructionInfoList = #[
289 new InstructionApplyActions(#[
294 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
295 new NxMatchCtState(33, 33)
298 tableId = NwConstants.EGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
300 new FlowEntityBuilder >> [
303 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
305 instructionInfoList = #[
306 new InstructionApplyActions(#[
311 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
312 new NxMatchCtState(48, 48)
315 tableId = NwConstants.EGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
320 override fixedConntrackIngressFlowsPort3() {
322 new FlowEntityBuilder >> [
325 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F5_2001:db8:3::/64_Recirc"
327 instructionInfoList = #[
328 new InstructionApplyActions(#[
329 new ActionNxConntrack(2, 0, 0, 5000, 243 as short)
333 new MatchEthernetType(34525L),
334 new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F5")),
335 new MatchEthernetType(34525L),
336 new MatchIpv6Destination("2001:db8:3::/64")
339 tableId = NwConstants.EGRESS_ACL_TABLE
341 new FlowEntityBuilder >> [
344 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
346 instructionInfoList = #[
347 new InstructionApplyActions(#[
352 new MatchMetadata(1085217976614912bi, 1152920405095219200bi),
353 new NxMatchCtState(33, 33)
356 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
358 new FlowEntityBuilder >> [
361 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
363 instructionInfoList = #[
364 new InstructionApplyActions(#[
369 new MatchMetadata(1085217976614912bi, 1152920405095219200bi),
370 new NxMatchCtState(48, 48)
373 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
378 override fixedConntrackEgressFlowsPort3() {
380 new FlowEntityBuilder >> [
383 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F5_2001:db8:3::/64_Recirc"
385 instructionInfoList = #[
386 new InstructionApplyActions(#[
387 new ActionNxConntrack(2, 0, 0, 5000, 213 as short)
391 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F5")),
392 new MatchEthernetType(34525L),
393 new MatchIpv6Source("2001:db8:3::/64")
396 tableId = NwConstants.INGRESS_ACL_TABLE
398 new FlowEntityBuilder >> [
401 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
403 instructionInfoList = #[
404 new InstructionApplyActions(#[
409 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
410 new NxMatchCtState(33, 33)
413 tableId = NwConstants.EGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
415 new FlowEntityBuilder >> [
418 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
420 instructionInfoList = #[
421 new InstructionApplyActions(#[
426 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
427 new MatchMetadata(1085217976614912bi, 1152920405095219200bi),
428 new NxMatchCtState(48, 48)
431 tableId = NwConstants.EGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
436 override etherEgressFlowsPort1() {
437 val theFlowId = "ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6"
439 new FlowEntityBuilder >> [
444 instructionInfoList = #[
445 new InstructionApplyActions(#[
446 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
447 new ActionNxResubmit(17 as short)
451 new MatchEthernetType(34525L),
452 new MatchIpv6Source("::/0"),
453 new MatchEthernetType(34525L),
454 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
455 new NxMatchCtState(33, 33)
457 priority = IdHelper.getId(theFlowId)
458 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
463 override etheregressFlowPort2() {
464 val theFlowId = "ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6"
466 new FlowEntityBuilder >> [
471 instructionInfoList = #[
472 new InstructionApplyActions(#[
473 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
474 new ActionNxResubmit(17 as short)
478 new MatchEthernetType(34525L),
479 new MatchIpv6Source("::/0"),
480 new MatchEthernetType(34525L),
481 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
482 new NxMatchCtState(33, 33)
484 priority = IdHelper.getId(theFlowId)
485 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
490 override tcpIngressFlowPort1() {
491 val theFlowId = "TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
493 new FlowEntityBuilder >> [
498 instructionInfoList = #[
499 new InstructionApplyActions(#[
500 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
501 new ActionNxResubmit(220 as short)
505 new MatchEthernetType(34525L),
506 new MatchIpv6Source("::/0"),
507 new MatchEthernetType(34525L),
508 new NxMatchTcpDestinationPort(80, 65535),
509 new MatchIpProtocol(6 as short),
510 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
511 new NxMatchCtState(33, 33)
513 priority = IdHelper.getId(theFlowId)
514 tableId = NwConstants.EGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
519 override tcpIngressFlowPort2() {
520 val theFlowId = "TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
522 new FlowEntityBuilder >> [
527 instructionInfoList = #[
528 new InstructionApplyActions(#[
529 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
530 new ActionNxResubmit(220 as short)
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 NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
540 new NxMatchCtState(33, 33)
542 priority = IdHelper.getId(theFlowId)
543 tableId = NwConstants.EGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
548 override tcpEgressFlowPort2() {
549 val flowId1 = "TCP_DESTINATION_80_65535_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F3_2001:db8:1::/64Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
550 val flowId2 = "TCP_DESTINATION_80_65535_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F4_2001:db8:2::/64Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
552 new FlowEntityBuilder >> [
557 instructionInfoList = #[
558 new InstructionApplyActions(#[
559 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
560 new ActionNxResubmit(17 as short)
564 new MatchEthernetType(34525L),
565 new MatchIpv6Destination("2001:db8:1::/64"),
566 new MatchEthernetType(34525L),
567 new MatchIpv6Source("::/0"),
568 new MatchEthernetType(34525L),
569 new NxMatchTcpDestinationPort(80, 65535),
570 new MatchIpProtocol(6 as short),
571 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
572 new NxMatchCtState(33, 33)
574 priority = IdHelper.getId(flowId1)
575 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
577 new FlowEntityBuilder >> [
582 instructionInfoList = #[
583 new InstructionApplyActions(#[
584 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
585 new ActionNxResubmit(17 as short)
589 new MatchEthernetType(34525L),
590 new MatchIpv6Destination("2001:db8:2::/64"),
591 new MatchEthernetType(34525L),
592 new MatchIpv6Source("::/0"),
593 new MatchEthernetType(34525L),
594 new NxMatchTcpDestinationPort(80, 65535),
595 new MatchIpProtocol(6 as short),
596 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
597 new NxMatchCtState(33, 33)
599 priority = IdHelper.getId(flowId2)
600 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
605 override udpEgressFlowsPort1() {
606 val theFlowId = "UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
608 new FlowEntityBuilder >> [
613 instructionInfoList = #[
614 new InstructionApplyActions(#[
615 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
616 new ActionNxResubmit(17 as short)
620 new MatchEthernetType(34525L),
621 new MatchIpv6Source("::/0"),
622 new MatchEthernetType(34525L),
623 new NxMatchUdpDestinationPort(80, 65535),
624 new MatchIpProtocol(17 as short),
625 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
626 new NxMatchCtState(33, 33)
628 priority = IdHelper.getId(theFlowId)
629 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
634 override udpIngressFlowsPort2() {
635 val flowId1 = "UDP_DESTINATION_80_65535_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F3_2001:db8:1::/64Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
636 val flowId2 = "UDP_DESTINATION_80_65535_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F4_2001:db8:2::/64Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
638 new FlowEntityBuilder >> [
643 instructionInfoList = #[
644 new InstructionApplyActions(#[
645 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
646 new ActionNxResubmit(220 as short)
650 new MatchEthernetType(34525L),
651 new MatchIpv6Source("2001:db8:1::/64"),
652 new MatchEthernetType(34525L),
653 new MatchIpv6Source("::/0"),
654 new MatchEthernetType(34525L),
655 new NxMatchUdpDestinationPort(80, 65535),
656 new MatchIpProtocol(17 as short),
657 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
658 new NxMatchCtState(33, 33)
660 priority = IdHelper.getId(flowId1)
661 tableId = NwConstants.EGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
663 new FlowEntityBuilder >> [
668 instructionInfoList = #[
669 new InstructionApplyActions(#[
670 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
671 new ActionNxResubmit(220 as short)
675 new MatchEthernetType(34525L),
676 new MatchIpv6Source("2001:db8:2::/64"),
677 new MatchEthernetType(34525L),
678 new MatchIpv6Source("::/0"),
679 new MatchEthernetType(34525L),
680 new NxMatchUdpDestinationPort(80, 65535),
681 new MatchIpProtocol(17 as short),
682 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
683 new NxMatchCtState(33, 33)
685 priority = IdHelper.getId(flowId2)
686 tableId = NwConstants.EGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
691 override udpEgressFlowsPort2() {
692 val theFlowId = "UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
694 new FlowEntityBuilder >> [
699 instructionInfoList = #[
700 new InstructionApplyActions(#[
701 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
702 new ActionNxResubmit(17 as short)
706 new MatchEthernetType(34525L),
707 new MatchIpv6Source("::/0"),
708 new MatchEthernetType(34525L),
709 new NxMatchUdpDestinationPort(80, 65535),
710 new MatchIpProtocol(17 as short),
711 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
712 new NxMatchCtState(33, 33)
714 priority = IdHelper.getId(theFlowId)
715 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
720 override icmpIngressFlowsPort1() {
721 val theFlowId = "ICMP_V6_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
723 new FlowEntityBuilder >> [
728 instructionInfoList = #[
729 new InstructionApplyActions(#[
730 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
731 new ActionNxResubmit(220 as short)
735 new MatchEthernetType(34525L),
736 new MatchIpv6Source("::/0"),
737 new MatchEthernetType(34525L),
738 new MatchIcmpv6(2 as short, 3 as short),
739 new MatchIpProtocol(1 as short),
740 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
741 new NxMatchCtState(33, 33)
743 priority = IdHelper.getId(theFlowId)
744 tableId = NwConstants.EGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
749 override icmpIngressFlowsPort2() {
750 val theFlowId = "ICMP_V6_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
752 new FlowEntityBuilder >> [
757 instructionInfoList = #[
758 new InstructionApplyActions(#[
759 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
760 new ActionNxResubmit(220 as short)
764 new MatchEthernetType(34525L),
765 new MatchIpv6Source("::/0"),
766 new MatchEthernetType(34525L),
767 new MatchIcmpv6(2 as short, 3 as short),
768 new MatchIpProtocol(1 as short),
769 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
770 new NxMatchCtState(33, 33)
772 priority = IdHelper.getId(theFlowId)
773 tableId = NwConstants.EGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
778 override icmpEgressFlowsPort2() {
779 val flowId1 = "ICMP_V6_DESTINATION_23__ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F3_2001:db8:1::/64Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
780 val flowId2 = "ICMP_V6_DESTINATION_23__ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F4_2001:db8:2::/64Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
782 new FlowEntityBuilder >> [
787 instructionInfoList = #[
788 new InstructionApplyActions(#[
789 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
790 new ActionNxResubmit(17 as short)
794 new MatchEthernetType(34525L),
795 new MatchIpv6Destination("2001:db8:1::/64"),
796 new MatchEthernetType(34525L),
797 new MatchIpv6Source("::/0"),
798 new MatchEthernetType(34525L),
799 new MatchIcmpv6(2 as short, 3 as short),
800 new MatchIpProtocol(1 as short),
801 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
802 new NxMatchCtState(33, 33)
804 priority = IdHelper.getId(flowId1)
805 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
807 new FlowEntityBuilder >> [
812 instructionInfoList = #[
813 new InstructionApplyActions(#[
814 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
815 new ActionNxResubmit(17 as short)
819 new MatchEthernetType(34525L),
820 new MatchIpv6Destination("2001:db8:2::/64"),
821 new MatchEthernetType(34525L),
822 new MatchIpv6Source("::/0"),
823 new MatchEthernetType(34525L),
824 new MatchIcmpv6(2 as short, 3 as short),
825 new MatchIpProtocol(1 as short),
826 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
827 new NxMatchCtState(33, 33)
829 priority = IdHelper.getId(flowId2)
830 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
835 override udpIngressPortRangeFlows() {
836 val theFlowId = "UDP_DESTINATION_2000_65532Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
838 new FlowEntityBuilder >> [
843 instructionInfoList = #[
844 new InstructionApplyActions(#[
845 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
846 new ActionNxResubmit(220 as short)
850 new MatchEthernetType(34525L),
851 new MatchIpv6Source("::/0"),
852 new MatchEthernetType(34525L),
853 new NxMatchUdpDestinationPort(2000, 65532),
854 new MatchIpProtocol(17 as short),
855 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
856 new NxMatchCtState(33, 33)
858 priority = IdHelper.getId(theFlowId)
859 tableId = NwConstants.EGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
864 override tcpEgressRangeFlows() {
865 val flowId1 = "TCP_DESTINATION_776_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
866 val flowId2 = "TCP_DESTINATION_512_65280Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
867 val flowId3 = "TCP_DESTINATION_334_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
868 val flowId4 = "TCP_DESTINATION_333_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
869 val flowId5 = "TCP_DESTINATION_336_65520Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
870 val flowId6 = "TCP_DESTINATION_352_65504Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
871 val flowId7 = "TCP_DESTINATION_384_65408Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
872 val flowId8 = "TCP_DESTINATION_768_65528Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
874 new FlowEntityBuilder >> [
879 instructionInfoList = #[
880 new InstructionApplyActions(#[
881 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
882 new ActionNxResubmit(17 as short)
886 new MatchEthernetType(34525L),
887 new MatchIpv6Source("::/0"),
888 new MatchEthernetType(34525L),
889 new NxMatchTcpDestinationPort(776, 65534),
890 new MatchIpProtocol(6 as short),
891 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
892 new NxMatchCtState(33, 33)
894 priority = IdHelper.getId(flowId1)
895 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
897 new FlowEntityBuilder >> [
902 instructionInfoList = #[
903 new InstructionApplyActions(#[
904 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
905 new ActionNxResubmit(17 as short)
909 new MatchEthernetType(34525L),
910 new MatchIpv6Source("::/0"),
911 new MatchEthernetType(34525L),
912 new NxMatchTcpDestinationPort(512, 65280),
913 new MatchIpProtocol(6 as short),
914 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
915 new NxMatchCtState(33, 33)
917 priority = IdHelper.getId(flowId2)
918 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
920 new FlowEntityBuilder >> [
925 instructionInfoList = #[
926 new InstructionApplyActions(#[
927 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
928 new ActionNxResubmit(17 as short)
932 new MatchEthernetType(34525L),
933 new MatchIpv6Source("::/0"),
934 new MatchEthernetType(34525L),
935 new NxMatchTcpDestinationPort(334, 65534),
936 new MatchIpProtocol(6 as short),
937 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
938 new NxMatchCtState(33, 33)
940 priority = IdHelper.getId(flowId3)
941 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
943 new FlowEntityBuilder >> [
948 instructionInfoList = #[
949 new InstructionApplyActions(#[
950 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
951 new ActionNxResubmit(17 as short)
955 new MatchEthernetType(34525L),
956 new MatchIpv6Source("::/0"),
957 new MatchEthernetType(34525L),
958 new NxMatchTcpDestinationPort(333, 65535),
959 new MatchIpProtocol(6 as short),
960 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
961 new NxMatchCtState(33, 33)
963 priority = IdHelper.getId(flowId4)
964 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
966 new FlowEntityBuilder >> [
971 instructionInfoList = #[
972 new InstructionApplyActions(#[
973 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
974 new ActionNxResubmit(17 as short)
978 new MatchEthernetType(34525L),
979 new MatchIpv6Source("::/0"),
980 new MatchEthernetType(34525L),
981 new NxMatchTcpDestinationPort(336, 65520),
982 new MatchIpProtocol(6 as short),
983 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
984 new NxMatchCtState(33, 33)
986 priority = IdHelper.getId(flowId5)
987 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
989 new FlowEntityBuilder >> [
994 instructionInfoList = #[
995 new InstructionApplyActions(#[
996 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
997 new ActionNxResubmit(17 as short)
1001 new MatchEthernetType(34525L),
1002 new MatchIpv6Source("::/0"),
1003 new MatchEthernetType(34525L),
1004 new NxMatchTcpDestinationPort(352, 65504),
1005 new MatchIpProtocol(6 as short),
1006 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1007 new NxMatchCtState(33, 33)
1009 priority = IdHelper.getId(flowId6)
1010 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
1012 new FlowEntityBuilder >> [
1014 cookie = 110100480bi
1017 instructionInfoList = #[
1018 new InstructionApplyActions(#[
1019 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1020 new ActionNxResubmit(17 as short)
1024 new MatchEthernetType(34525L),
1025 new MatchIpv6Source("::/0"),
1026 new MatchEthernetType(34525L),
1027 new NxMatchTcpDestinationPort(384, 65408),
1028 new MatchIpProtocol(6 as short),
1029 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1030 new NxMatchCtState(33, 33)
1032 priority = IdHelper.getId(flowId7)
1033 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
1035 new FlowEntityBuilder >> [
1037 cookie = 110100480bi
1040 instructionInfoList = #[
1041 new InstructionApplyActions(#[
1042 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1043 new ActionNxResubmit(17 as short)
1047 new MatchEthernetType(34525L),
1048 new MatchIpv6Source("::/0"),
1049 new MatchEthernetType(34525L),
1050 new NxMatchTcpDestinationPort(768, 65528),
1051 new MatchIpProtocol(6 as short),
1052 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1053 new NxMatchCtState(33, 33)
1055 priority = IdHelper.getId(flowId8)
1056 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
1061 override udpIngressAllFlows() {
1062 val theFlowId = "UDP_DESTINATION_1_0Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
1064 new FlowEntityBuilder >> [
1066 cookie = 110100480bi
1069 instructionInfoList = #[
1070 new InstructionApplyActions(#[
1071 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1072 new ActionNxResubmit(220 as short)
1076 new MatchEthernetType(34525L),
1077 new MatchIpv6Source("::/0"),
1078 new MatchEthernetType(34525L),
1079 new MatchIpProtocol(17 as short),
1080 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1081 new NxMatchCtState(33, 33)
1083 priority = IdHelper.getId(theFlowId)
1084 tableId = NwConstants.EGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
1089 override tcpEgressAllFlows() {
1090 val theFlowId = "TCP_DESTINATION_1_0Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1092 new FlowEntityBuilder >> [
1094 cookie = 110100480bi
1097 instructionInfoList = #[
1098 new InstructionApplyActions(#[
1099 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1100 new ActionNxResubmit(17 as short)
1104 new MatchEthernetType(34525L),
1105 new MatchIpv6Source("::/0"),
1106 new MatchEthernetType(34525L),
1107 new MatchIpProtocol(6 as short),
1108 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1109 new NxMatchCtState(33, 33)
1111 priority = IdHelper.getId(theFlowId)
1112 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
1118 override icmpIngressFlowsPort3() {
1119 val flowId1 = "ICMP_V6_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
1120 val flowId2 = "ICMP_V6_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426a22"
1122 new FlowEntityBuilder >> [
1124 cookie = 110100480bi
1127 instructionInfoList = #[
1128 new InstructionApplyActions(#[
1129 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1130 new ActionNxResubmit(220 as short)
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 NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1140 new NxMatchCtState(33, 33)
1142 priority = IdHelper.getId(flowId1)
1143 tableId = NwConstants.EGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
1145 new FlowEntityBuilder >> [
1147 cookie = 110100480bi
1150 instructionInfoList = #[
1151 new InstructionApplyActions(#[
1152 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1153 new ActionNxResubmit(220 as short)
1157 new MatchEthernetType(34525L),
1158 new MatchIpv6Source("::/0"),
1159 new MatchEthernetType(34525L),
1160 new MatchIcmpv6(2 as short, 3 as short),
1161 new MatchIpProtocol(1 as short),
1162 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1163 new NxMatchCtState(33, 33)
1165 priority = IdHelper.getId(flowId2)
1166 tableId = NwConstants.EGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
1171 override icmpEgressFlowsPort3() {
1172 val flowId1 = "ICMP_V6_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1173 val flowId2 = "ICMP_V6_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426a21"
1175 new FlowEntityBuilder >> [
1177 cookie = 110100480bi
1180 instructionInfoList = #[
1181 new InstructionApplyActions(#[
1182 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1183 new ActionNxResubmit(17 as short)
1187 new MatchEthernetType(34525L),
1188 new MatchIpv6Source("::/0"),
1189 new MatchEthernetType(34525L),
1190 new MatchIcmpv6(2 as short, 3 as short),
1191 new MatchIpProtocol(1 as short),
1192 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1193 new NxMatchCtState(33, 33)
1195 priority = IdHelper.getId(flowId1)
1196 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE
1198 new FlowEntityBuilder >> [
1200 cookie = 110100480bi
1203 instructionInfoList = #[
1204 new InstructionApplyActions(#[
1205 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1206 new ActionNxResubmit(17 as short)
1210 new MatchEthernetType(34525L),
1211 new MatchIpv6Source("::/0"),
1212 new MatchEthernetType(34525L),
1213 new MatchIcmpv6(2 as short, 3 as short),
1214 new MatchIpProtocol(1 as short),
1215 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1216 new NxMatchCtState(33, 33)
1218 priority = IdHelper.getId(flowId2)
1219 tableId = NwConstants.INGRESS_ACL_STATEFUL_APPLY_CHANGE_EXIST_TRAFFIC_TABLE