2 * Copyright (c) 2016 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.NwConstants
12 import org.opendaylight.genius.mdsalutil.actions.ActionDrop
13 import org.opendaylight.genius.mdsalutil.actions.ActionNxConntrack
14 import org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit
15 import org.opendaylight.genius.mdsalutil.actions.ActionDrop
16 import org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions
17 import org.opendaylight.genius.mdsalutil.matches.MatchArpSha
18 import org.opendaylight.genius.mdsalutil.matches.MatchArpSpa
19 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetDestination
20 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetSource
21 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetType
22 import org.opendaylight.genius.mdsalutil.matches.MatchIcmpv4
23 import org.opendaylight.genius.mdsalutil.matches.MatchIcmpv6
24 import org.opendaylight.genius.mdsalutil.matches.MatchIpProtocol
25 import org.opendaylight.genius.mdsalutil.matches.MatchIpv4Destination
26 import org.opendaylight.genius.mdsalutil.matches.MatchIpv4Source
27 import org.opendaylight.genius.mdsalutil.matches.MatchMetadata
28 import org.opendaylight.genius.mdsalutil.matches.MatchUdpDestinationPort
29 import org.opendaylight.genius.mdsalutil.matches.MatchUdpSourcePort
30 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchCtState
31 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchRegister
32 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchTcpDestinationPort
33 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchUdpDestinationPort
34 import org.opendaylight.genius.mdsalutil.FlowEntityBuilder
35 import org.opendaylight.genius.mdsalutil.MetaDataUtil
36 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix
37 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress
38 import org.opendaylight.genius.mdsalutil.NwConstants
39 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchRegister
40 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg6
41 import org.opendaylight.genius.mdsalutil.matches.MatchMetadata
43 import static extension org.opendaylight.mdsal.binding.testutils.XtendBuilderExtensions.operator_doubleGreaterThan
45 class FlowEntryObjectsStateful extends FlowEntryObjectsBase {
47 protected def etherFlows() {
48 fixedIngressFlowsPort1
49 + fixedConntrackIngressFlowsPort1
50 + fixedEgressFlowsPort1
51 + fixedConntrackEgressFlowsPort1
52 + etherEgressFlowsPort1
53 + fixedIngressFlowsPort2
54 + fixedConntrackIngressFlowsPort2
55 + etherIngressFlowsPort2
56 + etherIngressFlowsPort2
57 + fixedEgressFlowsPort2
58 + fixedConntrackEgressFlowsPort2
59 + etheregressFlowPort2
63 protected def tcpFlows() {
64 fixedIngressFlowsPort1
65 + fixedConntrackIngressFlowsPort1
67 + fixedEgressFlowsPort1
68 + fixedConntrackEgressFlowsPort1
69 + fixedIngressFlowsPort2
70 + fixedConntrackIngressFlowsPort2
72 + fixedEgressFlowsPort2
73 + fixedConntrackEgressFlowsPort2
79 protected def udpFlows() {
80 fixedIngressFlowsPort1
81 + fixedConntrackIngressFlowsPort1
82 + fixedEgressFlowsPort1
83 + fixedConntrackEgressFlowsPort1
85 + fixedIngressFlowsPort2
86 + fixedConntrackIngressFlowsPort2
87 + udpIngressFlowsPort2
88 + udpIngressFlowsPort2
89 + fixedEgressFlowsPort2
90 + fixedConntrackEgressFlowsPort2
95 protected def icmpFlows() {
96 fixedIngressFlowsPort1
97 + fixedConntrackIngressFlowsPort1
98 + icmpIngressFlowsPort1
99 + fixedEgressFlowsPort1
100 + fixedConntrackEgressFlowsPort1
101 + fixedIngressFlowsPort2
102 + fixedConntrackIngressFlowsPort2
103 + icmpIngressFlowsPort2
104 + fixedEgressFlowsPort2
105 + fixedConntrackEgressFlowsPort2
106 + icmpEgressFlowsPort2
107 + icmpEgressFlowsPort2
111 protected def dstRangeFlows() {
112 fixedIngressFlowsPort1
113 +fixedConntrackIngressFlowsPort1
114 + udpIngressPortRangeFlows
115 + fixedEgressFlowsPort1
116 + fixedConntrackEgressFlowsPort1
117 + tcpEgressRangeFlows
120 protected def dstAllFlows() {
121 fixedIngressFlowsPort1
122 + fixedConntrackIngressFlowsPort1
124 + fixedEgressFlowsPort1
125 + fixedConntrackEgressFlowsPort1
129 protected def icmpFlowsForTwoAclsHavingSameRules() {
130 fixedIngressFlowsPort3
131 + fixedConntrackIngressFlowsPort3
132 + icmpIngressFlowsPort3
133 + fixedEgressFlowsPort3
134 + fixedConntrackEgressFlowsPort3
135 + icmpEgressFlowsPort3
138 protected def aapWithIpv4AllFlows() {
140 + aapIpv4AllFlowsPort2
143 protected def aapFlows() {
145 + aapRemoteFlowsPort1
149 protected def multipleAcl() {
150 fixedIngressFlowsPort1
151 + fixedConntrackIngressFlowsPort1
152 + fixedEgressFlowsPort1
153 + fixedConntrackEgressFlowsPort1
154 + etherEgressFlowsPort1
155 + etherEgressFlowsPort1
156 + etherEgressFlowsPort1
157 + fixedIngressFlowsPort2
158 + fixedConntrackIngressFlowsPort2
159 + etherIngressFlowsPort2
160 + etherIngressFlowsPort2
161 + fixedEgressFlowsPort2
162 + fixedConntrackEgressFlowsPort2
163 + etheregressFlowPort2
165 + remoteIngressFlowsPort1
166 + remoteIngressFlowsPort1
167 + remoteEgressFlowsPort1
168 + remoteEgressFlowsPort1
169 + fixedEgressArpFlowsPort1()
170 + fixedEgressArpFlowsPort2()
171 + tcpEgressFlowPort2WithRemoteIpSg
172 + tcpIngressFlowPort1WithMultipleSG
173 + tcpIngressFlowPort1WithMultipleSG
174 + etherIngressFlowsPort1WithRemoteIpSg("10.0.0.1", "ETHERnull_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F3_10.0.0.1/32Ingress98785cc3048-abc3-43cc-89b3-377341426ac7")
175 + etherIngressFlowsPort1WithRemoteIpSg("10.0.0.2", "ETHERnull_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F4_10.0.0.2/32Ingress98785cc3048-abc3-43cc-89b3-377341426ac7")
176 + etherIngressFlowsPort2WithRemoteIpSg()
179 protected def etherIngressFlowsPort1WithRemoteIpSg(String ip, String theFlowId) {
181 new FlowEntityBuilder >> [
186 instructionInfoList = #[
187 new InstructionApplyActions(#[
188 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
189 new ActionNxResubmit(220 as short)
193 new MatchEthernetType(2048L),
194 new MatchIpv4Source(ip, "32"),
195 new MatchEthernetType(2048L),
196 new MatchEthernetType(2048L),
197 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
198 new NxMatchCtState(33L, 33L)
200 priority = IdHelper.getId(theFlowId)
201 tableId = 243 as short
206 protected def etherIngressFlowsPort2WithRemoteIpSg() {
207 val theFlowId = "ETHERnull_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F4_10.0.0.2/32"
208 +"Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
210 new FlowEntityBuilder >> [
215 instructionInfoList = #[
216 new InstructionApplyActions(#[
217 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
218 new ActionNxResubmit(220 as short)
222 new MatchEthernetType(2048L),
223 new MatchIpv4Source("10.0.0.2", "32"),
224 new MatchEthernetType(2048L),
225 new MatchEthernetType(2048L),
226 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
227 new NxMatchCtState(33L, 33L)
229 priority = IdHelper.getId(theFlowId)
230 tableId = 243 as short
235 protected def tcpEgressFlowPort2WithRemoteIpSg() {
236 val theFlowId1 ="TCP_DESTINATION_80_65535_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F3_10.0.0.1/32"
237 +"Egress98785cc3048-abc3-43cc-89b3-377341426a21"
238 val theFlowId2 = "TCP_DESTINATION_80_65535_ipv4_remoteACL_interface_aap_0D:AA:D8:42:30:F4_10.0.0.2/32"
239 +"Egress98785cc3048-abc3-43cc-89b3-377341426a21"
241 new FlowEntityBuilder >> [
246 instructionInfoList = #[
247 new InstructionApplyActions(#[
248 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
249 new ActionNxResubmit(17 as short)
253 new MatchEthernetType(2048L),
254 new MatchIpv4Destination("10.0.0.1", "32"),
255 new MatchEthernetType(2048L),
256 new MatchEthernetType(2048L),
257 new NxMatchTcpDestinationPort(80, 65535),
258 new MatchIpProtocol(6 as short),
259 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
260 new NxMatchCtState(33L, 33L)
262 priority = IdHelper.getId(theFlowId1)
263 tableId = 213 as short
265 new FlowEntityBuilder >> [
270 instructionInfoList = #[
271 new InstructionApplyActions(#[
272 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
273 new ActionNxResubmit(17 as short)
277 new MatchEthernetType(2048L),
278 new MatchIpv4Destination("10.0.0.2", "32"),
279 new MatchEthernetType(2048L),
280 new MatchEthernetType(2048L),
281 new NxMatchTcpDestinationPort(80, 65535),
282 new MatchIpProtocol(6 as short),
283 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
284 new NxMatchCtState(33L, 33L)
286 priority = IdHelper.getId(theFlowId2)
287 tableId = 213 as short
292 protected def tcpIngressFlowPort1WithMultipleSG() {
293 val theFlowId = "TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426a22"
295 new FlowEntityBuilder >> [
300 instructionInfoList = #[
301 new InstructionApplyActions(#[
302 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
303 new ActionNxResubmit(220 as short)
307 new MatchEthernetType(2048L),
308 new MatchEthernetType(2048L),
309 new NxMatchTcpDestinationPort(80, 65535),
310 new MatchIpProtocol(6 as short),
311 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
312 new NxMatchCtState(33L, 33L)
314 priority = IdHelper.getId(theFlowId)
315 tableId = 243 as short
320 protected def aapIpv4AllFlowsPort2() {
322 new FlowEntityBuilder >> [
325 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F4_0.0.0.0/0_Recirc"
327 instructionInfoList = #[
328 new InstructionApplyActions(#[
329 new ActionNxConntrack(2, 0, 0, 5000, NwConstants.INGRESS_ACL_REMOTE_ACL_TABLE)
333 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4")),
334 new MatchEthernetType(2048L)
337 tableId = NwConstants.INGRESS_ACL_TABLE
339 new FlowEntityBuilder >> [
342 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F4_0.0.0.0/0_Recirc"
344 instructionInfoList = #[
345 new InstructionApplyActions(#[
346 new ActionNxConntrack(2, 0, 0, 5000, NwConstants.EGRESS_ACL_REMOTE_ACL_TABLE)
350 new MatchEthernetType(2048L),
351 new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F4")),
352 new MatchEthernetType(2048L)
355 tableId = NwConstants.EGRESS_ACL_TABLE
357 new FlowEntityBuilder >> [
360 flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F410.0.0.2/32"
362 instructionInfoList = #[
363 new InstructionApplyActions(#[
364 new ActionNxResubmit(17 as short)
368 new MatchEthernetType(2054L),
369 new MatchArpSha(new MacAddress("0D:AA:D8:42:30:F4")),
370 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4")),
371 new MatchArpSpa(new Ipv4Prefix("10.0.0.2/32")),
372 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
375 tableId = NwConstants.INGRESS_ACL_TABLE
380 protected def aapRemoteFlowsPort1() {
382 remoteIngressFlowsPort("10.0.0.100"),
383 remoteIngressFlowsPort("10.0.0.101"),
385 remoteEgressFlowsPort("10.0.0.100"),
386 remoteEgressFlowsPort("10.0.0.101")
390 protected def aapFlowsPort2() {
392 new FlowEntityBuilder >> [
395 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F4_10.0.0.100/32_Recirc"
397 instructionInfoList = #[
398 new InstructionApplyActions(#[
399 new ActionNxConntrack(2, 0, 0, 5000, NwConstants.INGRESS_ACL_REMOTE_ACL_TABLE)
403 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4")),
404 new MatchEthernetType(2048L),
405 new MatchIpv4Source("10.0.0.100", "32")
408 tableId = NwConstants.INGRESS_ACL_TABLE
410 new FlowEntityBuilder >> [
413 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F4_10.0.0.100/32_Recirc"
415 instructionInfoList = #[
416 new InstructionApplyActions(#[
417 new ActionNxConntrack(2, 0, 0, 5000, NwConstants.EGRESS_ACL_REMOTE_ACL_TABLE)
421 new MatchEthernetType(2048L),
422 new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F4")),
423 new MatchEthernetType(2048L),
424 new MatchIpv4Destination("10.0.0.100", "32")
427 tableId = NwConstants.EGRESS_ACL_TABLE
429 new FlowEntityBuilder >> [
432 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:A4_10.0.0.101/32_Recirc"
434 instructionInfoList = #[
435 new InstructionApplyActions(#[
436 new ActionNxConntrack(2, 0, 0, 5000, NwConstants.INGRESS_ACL_REMOTE_ACL_TABLE)
440 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:A4")),
441 new MatchEthernetType(2048L),
442 new MatchIpv4Source("10.0.0.101", "32")
445 tableId = NwConstants.INGRESS_ACL_TABLE
447 new FlowEntityBuilder >> [
450 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:A4_10.0.0.101/32_Recirc"
452 instructionInfoList = #[
453 new InstructionApplyActions(#[
454 new ActionNxConntrack(2, 0, 0, 5000, NwConstants.EGRESS_ACL_REMOTE_ACL_TABLE)
458 new MatchEthernetType(2048L),
459 new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:A4")),
460 new MatchEthernetType(2048L),
461 new MatchIpv4Destination("10.0.0.101", "32")
464 tableId = NwConstants.EGRESS_ACL_TABLE
466 new FlowEntityBuilder >> [
469 flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F410.0.0.100/32"
471 instructionInfoList = #[
472 new InstructionApplyActions(#[
473 new ActionNxResubmit(17 as short)
477 new MatchEthernetType(2054L),
478 new MatchArpSha(new MacAddress("0D:AA:D8:42:30:F4")),
479 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4")),
480 new MatchArpSpa(new Ipv4Prefix("10.0.0.100/32")),
481 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
484 tableId = NwConstants.INGRESS_ACL_TABLE
486 new FlowEntityBuilder >> [
489 flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:A410.0.0.101/32"
491 instructionInfoList = #[
492 new InstructionApplyActions(#[
493 new ActionNxResubmit(17 as short)
497 new MatchEthernetType(2054L),
498 new MatchArpSha(new MacAddress("0D:AA:D8:42:30:A4")),
499 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:A4")),
500 new MatchArpSpa(new Ipv4Prefix("10.0.0.101/32")),
501 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
504 tableId = NwConstants.INGRESS_ACL_TABLE
506 new FlowEntityBuilder >> [
509 flowId = "Egress_DHCP_Client_v4123_987_0D:AA:D8:42:30:A4_Permit_"
511 instructionInfoList = #[
512 new InstructionApplyActions(#[
513 new ActionNxResubmit(17 as short)
517 new MatchEthernetType(2048L),
518 new MatchIpProtocol(17 as short),
519 new MatchUdpDestinationPort(67 as short),
520 new MatchUdpSourcePort(68 as short),
521 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
522 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:A4"))
525 tableId = 211 as short
527 new FlowEntityBuilder >> [
530 flowId = "Egress_DHCP_Client_v6_123_987_0D:AA:D8:42:30:A4_Permit_"
532 instructionInfoList = #[
533 new InstructionApplyActions(#[
534 new ActionNxResubmit(17 as short)
538 new MatchEthernetType(34525L),
539 new MatchIpProtocol(17 as short),
540 new MatchUdpDestinationPort(547 as short),
541 new MatchUdpSourcePort(546 as short),
542 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
543 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:A4"))
546 tableId = 211 as short
551 protected def fixedConntrackIngressFlowsPort1() {
553 new FlowEntityBuilder >> [
556 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F3_10.0.0.1/32_Recirc"
558 instructionInfoList = #[
559 new InstructionApplyActions(#[
560 new ActionNxConntrack(2, 0, 0, 5000, 242 as short)
564 new MatchEthernetType(2048L),
565 new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F3")),
566 new MatchEthernetType(2048L),
567 new MatchIpv4Destination("10.0.0.1", "32")
570 tableId = 241 as short
572 new FlowEntityBuilder >> [
575 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
577 instructionInfoList = #[
578 new InstructionApplyActions(#[
583 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
584 new NxMatchCtState(33L, 33L)
587 tableId = 213 as short
589 new FlowEntityBuilder >> [
592 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
594 instructionInfoList = #[
595 new InstructionApplyActions(#[
600 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
601 new NxMatchCtState(48L, 48L)
604 tableId = 213 as short
609 protected def etherIngressFlowsPort2() {
610 val theFlowId = "ETHERnull_remoteACL_id_85cc3048-abc3-43cc-89b3-377341426ac5Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
612 new FlowEntityBuilder >> [
617 instructionInfoList = #[
618 new InstructionApplyActions(#[
619 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
620 new ActionNxResubmit(220 as short)
624 new MatchMetadata(4bi, MetaDataUtil.METADATA_MASK_REMOTE_ACL_ID),
625 new MatchEthernetType(2048L),
626 new MatchEthernetType(2048L),
627 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
628 new NxMatchCtState(33L, 33L)
630 priority = IdHelper.getId(theFlowId)
631 tableId = 243 as short
636 protected def fixedConntrackEgressFlowsPort1() {
638 new FlowEntityBuilder >> [
641 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F3_10.0.0.1/32_Recirc"
643 instructionInfoList = #[
644 new InstructionApplyActions(#[
645 new ActionNxConntrack(2, 0, 0, 5000, 212 as short)
649 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F3")),
650 new MatchEthernetType(2048L),
651 new MatchIpv4Source("10.0.0.1", "32")
654 tableId = 211 as short
656 new FlowEntityBuilder >> [
659 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
661 instructionInfoList = #[
662 new InstructionApplyActions(#[
667 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
668 new NxMatchCtState(33L, 33L)
671 tableId = 243 as short
673 new FlowEntityBuilder >> [
676 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
678 instructionInfoList = #[
679 new InstructionApplyActions(#[
684 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
685 new NxMatchCtState(48L, 48L)
688 tableId = 243 as short
693 protected def fixedConntrackIngressFlowsPort2() {
695 new FlowEntityBuilder >> [
698 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F4_10.0.0.2/32_Recirc"
700 instructionInfoList = #[
701 new InstructionApplyActions(#[
702 new ActionNxConntrack(2, 0, 0, 5000, 242 as short)
706 new MatchEthernetType(2048L),
707 new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F4")),
708 new MatchEthernetType(2048L),
709 new MatchIpv4Destination("10.0.0.2", "32")
712 tableId = 241 as short
714 new FlowEntityBuilder >> [
717 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
719 instructionInfoList = #[
720 new InstructionApplyActions(#[
725 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
726 new NxMatchCtState(33L, 33L)
729 tableId = 213 as short
731 new FlowEntityBuilder >> [
734 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
736 instructionInfoList = #[
737 new InstructionApplyActions(#[
742 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
743 new NxMatchCtState(48L, 48L)
746 tableId = 213 as short
751 protected def fixedConntrackEgressFlowsPort2() {
753 new FlowEntityBuilder >> [
756 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F4_10.0.0.2/32_Recirc"
758 instructionInfoList = #[
759 new InstructionApplyActions(#[
760 new ActionNxConntrack(2, 0, 0, 5000, 212 as short)
764 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F4")),
765 new MatchEthernetType(2048L),
766 new MatchIpv4Source("10.0.0.2", "32")
769 tableId = 211 as short
771 new FlowEntityBuilder >> [
774 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
776 instructionInfoList = #[
777 new InstructionApplyActions(#[
782 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
783 new NxMatchCtState(33L, 33L)
786 tableId = 243 as short
788 new FlowEntityBuilder >> [
791 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
793 instructionInfoList = #[
794 new InstructionApplyActions(#[
799 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
800 new NxMatchCtState(48L, 48L)
803 tableId = 243 as short
808 protected def fixedConntrackIngressFlowsPort3() {
810 new FlowEntityBuilder >> [
813 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F5_10.0.0.3/32_Recirc"
815 instructionInfoList = #[
816 new InstructionApplyActions(#[
817 new ActionNxConntrack(2, 0, 0, 5000, 242 as short)
821 new MatchEthernetType(2048L),
822 new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F5")),
823 new MatchEthernetType(2048L),
824 new MatchIpv4Destination("10.0.0.3", "32")
827 tableId = 241 as short
829 new FlowEntityBuilder >> [
832 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
834 instructionInfoList = #[
835 new InstructionApplyActions(#[
840 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
841 new NxMatchCtState(33L, 33L)
844 tableId = 213 as short
846 new FlowEntityBuilder >> [
849 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
851 instructionInfoList = #[
852 new InstructionApplyActions(#[
857 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
858 new NxMatchCtState(48L, 48L)
861 tableId = 213 as short
866 protected def fixedConntrackEgressFlowsPort3() {
868 new FlowEntityBuilder >> [
871 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F5_10.0.0.3/32_Recirc"
873 instructionInfoList = #[
874 new InstructionApplyActions(#[
875 new ActionNxConntrack(2, 0, 0, 5000, 212 as short)
879 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F5")),
880 new MatchEthernetType(2048L),
881 new MatchIpv4Source("10.0.0.3", "32")
884 tableId = 211 as short
886 new FlowEntityBuilder >> [
889 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
891 instructionInfoList = #[
892 new InstructionApplyActions(#[
897 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
898 new NxMatchCtState(33L, 33L)
901 tableId = 243 as short
903 new FlowEntityBuilder >> [
906 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
908 instructionInfoList = #[
909 new InstructionApplyActions(#[
914 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
915 new NxMatchCtState(48L, 48L)
918 tableId = 243 as short
923 static def fixedConntrackIngressFlowsPort4() {
925 new FlowEntityBuilder >> [
928 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F6_10.0.0.4/32_Recirc"
930 instructionInfoList = #[
931 new InstructionApplyActions(#[
932 new ActionNxConntrack(2, 0, 0, 5000, 242 as short)
936 new MatchEthernetType(2048L),
937 new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F6")),
938 new MatchEthernetType(2048L),
939 new MatchIpv4Destination("10.0.0.4", "32")
942 tableId = 241 as short
944 new FlowEntityBuilder >> [
947 flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F6_0.0.0.0/0_Recirc"
949 instructionInfoList = #[
950 new InstructionApplyActions(#[
951 new ActionNxConntrack(2, 0, 0, 5000, 242 as short)
955 new MatchEthernetType(2048L),
956 new MatchEthernetDestination(new MacAddress("0D:AA:D8:42:30:F6")),
957 new MatchEthernetType(2048L)
960 tableId = 241 as short
962 new FlowEntityBuilder >> [
965 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
967 instructionInfoList = #[
968 new InstructionApplyActions(#[
973 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
974 new NxMatchCtState(33L, 33L)
977 tableId = 213 as short
979 new FlowEntityBuilder >> [
982 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
984 instructionInfoList = #[
985 new InstructionApplyActions(#[
990 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
991 new NxMatchCtState(48L, 48L)
994 tableId = 213 as short
999 static def fixedConntrackEgressFlowsPort4() {
1001 new FlowEntityBuilder >> [
1003 cookie = 110100480bi
1004 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F6_10.0.0.4/32_Recirc"
1006 instructionInfoList = #[
1007 new InstructionApplyActions(#[
1008 new ActionNxConntrack(2, 0, 0, 5000, 212 as short)
1012 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F6")),
1013 new MatchEthernetType(2048L),
1014 new MatchIpv4Source("10.0.0.4", "32")
1017 tableId = 211 as short
1019 new FlowEntityBuilder >> [
1021 cookie = 110100480bi
1022 flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F6_0.0.0.0/0_Recirc"
1024 instructionInfoList = #[
1025 new InstructionApplyActions(#[
1026 new ActionNxConntrack(2, 0, 0, 5000, 212 as short)
1030 new MatchEthernetSource(new MacAddress("0D:AA:D8:42:30:F6")),
1031 new MatchEthernetType(2048L)
1034 tableId = 211 as short
1036 new FlowEntityBuilder >> [
1038 cookie = 110100481bi
1039 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
1041 instructionInfoList = #[
1042 new InstructionApplyActions(#[
1047 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1048 new NxMatchCtState(33L, 33L)
1051 tableId = 243 as short
1053 new FlowEntityBuilder >> [
1055 cookie = 110100481bi
1056 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
1058 instructionInfoList = #[
1059 new InstructionApplyActions(#[
1064 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1065 new NxMatchCtState(48L, 48L)
1068 tableId = 243 as short
1073 protected def etherEgressFlowsPort1() {
1074 val theFlowId = "ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6"
1076 new FlowEntityBuilder >> [
1078 cookie = 110100480bi
1081 instructionInfoList = #[
1082 new InstructionApplyActions(#[
1083 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1084 new ActionNxResubmit(17 as short)
1088 new MatchEthernetType(2048L),
1089 new MatchEthernetType(2048L),
1090 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1091 new NxMatchCtState(33L, 33L)
1093 priority = IdHelper.getId(theFlowId)
1094 tableId = 213 as short
1099 protected def etheregressFlowPort2() {
1100 val theFlowId = "ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6"
1102 new FlowEntityBuilder >> [
1104 cookie = 110100480bi
1107 instructionInfoList = #[
1108 new InstructionApplyActions(#[
1109 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1110 new ActionNxResubmit(17 as short)
1114 new MatchEthernetType(2048L),
1115 new MatchEthernetType(2048L),
1116 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1117 new NxMatchCtState(33L, 33L)
1119 priority = IdHelper.getId(theFlowId)
1120 tableId = 213 as short
1125 protected def tcpIngressFlowPort1() {
1126 val theFlowId = "TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
1128 new FlowEntityBuilder >> [
1130 cookie = 110100480bi
1133 instructionInfoList = #[
1134 new InstructionApplyActions(#[
1135 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1136 new ActionNxResubmit(220 as short)
1140 new MatchEthernetType(2048L),
1141 new MatchEthernetType(2048L),
1142 new NxMatchTcpDestinationPort(80, 65535),
1143 new MatchIpProtocol(6 as short),
1144 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1145 new NxMatchCtState(33L, 33L)
1147 priority = IdHelper.getId(theFlowId)
1148 tableId = 243 as short
1153 protected def tcpIngressFlowPort2() {
1154 val theFlowId = "TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
1156 new FlowEntityBuilder >> [
1158 cookie = 110100480bi
1161 instructionInfoList = #[
1162 new InstructionApplyActions(#[
1163 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1164 new ActionNxResubmit(220 as short)
1168 new MatchEthernetType(2048L),
1169 new MatchEthernetType(2048L),
1170 new NxMatchTcpDestinationPort(80, 65535),
1171 new MatchIpProtocol(6 as short),
1172 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1173 new NxMatchCtState(33L, 33L)
1175 priority = IdHelper.getId(theFlowId)
1176 tableId = 243 as short
1181 protected def tcpEgressFlowPort2() {
1182 val theFlowId = "TCP_DESTINATION_80_65535_remoteACL_id_85cc3048-abc3-43cc-89b3-377341426ac5Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1184 new FlowEntityBuilder >> [
1186 cookie = 110100480bi
1189 instructionInfoList = #[
1190 new InstructionApplyActions(#[
1191 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1192 new ActionNxResubmit(17 as short)
1196 new MatchMetadata(4bi, MetaDataUtil.METADATA_MASK_REMOTE_ACL_ID),
1197 new MatchEthernetType(2048L),
1198 new MatchEthernetType(2048L),
1199 new NxMatchTcpDestinationPort(80, 65535),
1200 new MatchIpProtocol(6 as short),
1201 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1202 new NxMatchCtState(33L, 33L)
1204 priority = IdHelper.getId(theFlowId)
1205 tableId = 213 as short
1210 protected def udpEgressFlowsPort1() {
1211 val theFlowId = "UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1213 new FlowEntityBuilder >> [
1215 cookie = 110100480bi
1218 instructionInfoList = #[
1219 new InstructionApplyActions(#[
1220 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1221 new ActionNxResubmit(17 as short)
1225 new MatchEthernetType(2048L),
1226 new MatchEthernetType(2048L),
1227 new NxMatchUdpDestinationPort(80, 65535),
1228 new MatchIpProtocol(17 as short),
1229 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1230 new NxMatchCtState(33L, 33L)
1232 priority = IdHelper.getId(theFlowId)
1233 tableId = 213 as short
1238 protected def udpIngressFlowsPort2() {
1239 val theFlowId = "UDP_DESTINATION_80_65535_remoteACL_id_85cc3048-abc3-43cc-89b3-377341426ac5Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
1241 new FlowEntityBuilder >> [
1243 cookie = 110100480bi
1246 instructionInfoList = #[
1247 new InstructionApplyActions(#[
1248 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1249 new ActionNxResubmit(220 as short)
1253 new MatchMetadata(4bi, MetaDataUtil.METADATA_MASK_REMOTE_ACL_ID),
1254 new MatchEthernetType(2048L),
1255 new MatchEthernetType(2048L),
1256 new NxMatchUdpDestinationPort(80, 65535),
1257 new MatchIpProtocol(17 as short),
1258 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1259 new NxMatchCtState(33L, 33L)
1261 priority = IdHelper.getId(theFlowId)
1262 tableId = 243 as short
1267 protected def udpEgressFlowsPort2() {
1268 val theFlowId = "UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1270 new FlowEntityBuilder >> [
1272 cookie = 110100480bi
1275 instructionInfoList = #[
1276 new InstructionApplyActions(#[
1277 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1278 new ActionNxResubmit(17 as short)
1282 new MatchEthernetType(2048L),
1283 new MatchEthernetType(2048L),
1284 new NxMatchUdpDestinationPort(80, 65535),
1285 new MatchIpProtocol(17 as short),
1286 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1287 new NxMatchCtState(33L, 33L)
1289 priority = IdHelper.getId(theFlowId)
1290 tableId = 213 as short
1295 protected def icmpIngressFlowsPort1() {
1296 val theFlowId = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
1298 new FlowEntityBuilder >> [
1300 cookie = 110100480bi
1303 instructionInfoList = #[
1304 new InstructionApplyActions(#[
1305 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1306 new ActionNxResubmit(220 as short)
1310 new MatchEthernetType(2048L),
1311 new MatchEthernetType(2048L),
1312 new MatchIcmpv4(2 as short, 3 as short),
1313 new MatchIpProtocol(1 as short),
1314 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1315 new NxMatchCtState(33L, 33L)
1317 priority = IdHelper.getId(theFlowId)
1318 tableId = 243 as short
1323 protected def icmpIngressFlowsPort2() {
1324 val theFlowId = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
1326 new FlowEntityBuilder >> [
1328 cookie = 110100480bi
1331 instructionInfoList = #[
1332 new InstructionApplyActions(#[
1333 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1334 new ActionNxResubmit(220 as short)
1338 new MatchEthernetType(2048L),
1339 new MatchEthernetType(2048L),
1340 new MatchIcmpv4(2 as short, 3 as short),
1341 new MatchIpProtocol(1 as short),
1342 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1343 new NxMatchCtState(33L, 33L)
1345 priority = IdHelper.getId(theFlowId)
1346 tableId = 243 as short
1351 protected def icmpEgressFlowsPort2() {
1352 val theFlowId = "ICMP_V4_DESTINATION_23__remoteACL_id_85cc3048-abc3-43cc-89b3-377341426ac5Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1354 new FlowEntityBuilder >> [
1356 cookie = 110100480bi
1359 instructionInfoList = #[
1360 new InstructionApplyActions(#[
1361 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1362 new ActionNxResubmit(17 as short)
1366 new MatchMetadata(4bi, MetaDataUtil.METADATA_MASK_REMOTE_ACL_ID),
1367 new MatchEthernetType(2048L),
1368 new MatchEthernetType(2048L),
1369 new MatchIcmpv4(2 as short, 3 as short),
1370 new MatchIpProtocol(1 as short),
1371 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1372 new NxMatchCtState(33L, 33L)
1374 priority = IdHelper.getId(theFlowId)
1375 tableId = 213 as short
1380 protected def udpIngressPortRangeFlows() {
1381 val theFlowId = "UDP_DESTINATION_2000_65532Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
1383 new FlowEntityBuilder >> [
1385 cookie = 110100480bi
1388 instructionInfoList = #[
1389 new InstructionApplyActions(#[
1390 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1391 new ActionNxResubmit(220 as short)
1395 new MatchEthernetType(2048L),
1396 new MatchEthernetType(2048L),
1397 new NxMatchUdpDestinationPort(2000, 65532),
1398 new MatchIpProtocol(17 as short),
1399 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1400 new NxMatchCtState(33L, 33L)
1402 priority = IdHelper.getId(theFlowId)
1403 tableId = 243 as short
1408 protected def tcpEgressRangeFlows() {
1409 val flowId1 = "TCP_DESTINATION_776_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1410 val flowId2 = "TCP_DESTINATION_512_65280Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1411 val flowId3 = "TCP_DESTINATION_334_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1412 val flowId4 = "TCP_DESTINATION_333_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1413 val flowId5 = "TCP_DESTINATION_336_65520Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1414 val flowId6 = "TCP_DESTINATION_352_65504Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1415 val flowId7 = "TCP_DESTINATION_384_65408Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1416 val flowId8 = "TCP_DESTINATION_768_65528Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1418 new FlowEntityBuilder >> [
1420 cookie = 110100480bi
1423 instructionInfoList = #[
1424 new InstructionApplyActions(#[
1425 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1426 new ActionNxResubmit(17 as short)
1430 new MatchEthernetType(2048L),
1431 new MatchEthernetType(2048L),
1432 new NxMatchTcpDestinationPort(776, 65534),
1433 new MatchIpProtocol(6 as short),
1434 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1435 new NxMatchCtState(33L, 33L)
1437 priority = IdHelper.getId(flowId1)
1438 tableId = 213 as short
1440 new FlowEntityBuilder >> [
1442 cookie = 110100480bi
1445 instructionInfoList = #[
1446 new InstructionApplyActions(#[
1447 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1448 new ActionNxResubmit(17 as short)
1452 new MatchEthernetType(2048L),
1453 new MatchEthernetType(2048L),
1454 new NxMatchTcpDestinationPort(512, 65280),
1455 new MatchIpProtocol(6 as short),
1456 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1457 new NxMatchCtState(33L, 33L)
1459 priority = IdHelper.getId(flowId2)
1460 tableId = 213 as short
1462 new FlowEntityBuilder >> [
1464 cookie = 110100480bi
1467 instructionInfoList = #[
1468 new InstructionApplyActions(#[
1469 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1470 new ActionNxResubmit(17 as short)
1474 new MatchEthernetType(2048L),
1475 new MatchEthernetType(2048L),
1476 new NxMatchTcpDestinationPort(334, 65534),
1477 new MatchIpProtocol(6 as short),
1478 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1479 new NxMatchCtState(33L, 33L)
1481 priority = IdHelper.getId(flowId3)
1482 tableId = 213 as short
1484 new FlowEntityBuilder >> [
1486 cookie = 110100480bi
1489 instructionInfoList = #[
1490 new InstructionApplyActions(#[
1491 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1492 new ActionNxResubmit(17 as short)
1496 new MatchEthernetType(2048L),
1497 new MatchEthernetType(2048L),
1498 new NxMatchTcpDestinationPort(333, 65535),
1499 new MatchIpProtocol(6 as short),
1500 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1501 new NxMatchCtState(33L, 33L)
1503 priority = IdHelper.getId(flowId4)
1504 tableId = 213 as short
1506 new FlowEntityBuilder >> [
1508 cookie = 110100480bi
1511 instructionInfoList = #[
1512 new InstructionApplyActions(#[
1513 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1514 new ActionNxResubmit(17 as short)
1518 new MatchEthernetType(2048L),
1519 new MatchEthernetType(2048L),
1520 new NxMatchTcpDestinationPort(336, 65520),
1521 new MatchIpProtocol(6 as short),
1522 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1523 new NxMatchCtState(33L, 33L)
1525 priority = IdHelper.getId(flowId5)
1526 tableId = 213 as short
1528 new FlowEntityBuilder >> [
1530 cookie = 110100480bi
1533 instructionInfoList = #[
1534 new InstructionApplyActions(#[
1535 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1536 new ActionNxResubmit(17 as short)
1540 new MatchEthernetType(2048L),
1541 new MatchEthernetType(2048L),
1542 new NxMatchTcpDestinationPort(352, 65504),
1543 new MatchIpProtocol(6 as short),
1544 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1545 new NxMatchCtState(33L, 33L)
1547 priority = IdHelper.getId(flowId6)
1548 tableId = 213 as short
1550 new FlowEntityBuilder >> [
1552 cookie = 110100480bi
1555 instructionInfoList = #[
1556 new InstructionApplyActions(#[
1557 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1558 new ActionNxResubmit(17 as short)
1562 new MatchEthernetType(2048L),
1563 new MatchEthernetType(2048L),
1564 new NxMatchTcpDestinationPort(384, 65408),
1565 new MatchIpProtocol(6 as short),
1566 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1567 new NxMatchCtState(33L, 33L)
1569 priority = IdHelper.getId(flowId7)
1570 tableId = 213 as short
1572 new FlowEntityBuilder >> [
1574 cookie = 110100480bi
1577 instructionInfoList = #[
1578 new InstructionApplyActions(#[
1579 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1580 new ActionNxResubmit(17 as short)
1584 new MatchEthernetType(2048L),
1585 new MatchEthernetType(2048L),
1586 new NxMatchTcpDestinationPort(768, 65528),
1587 new MatchIpProtocol(6 as short),
1588 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1589 new NxMatchCtState(33L, 33L)
1591 priority = IdHelper.getId(flowId8)
1592 tableId = 213 as short
1597 protected def udpIngressAllFlows() {
1598 val theFlowId = "UDP_DESTINATION_1_0Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
1600 new FlowEntityBuilder >> [
1602 cookie = 110100480bi
1605 instructionInfoList = #[
1606 new InstructionApplyActions(#[
1607 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1608 new ActionNxResubmit(220 as short)
1612 new MatchEthernetType(2048L),
1613 new MatchEthernetType(2048L),
1614 new MatchIpProtocol(17 as short),
1615 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1616 new NxMatchCtState(33L, 33L)
1618 priority = IdHelper.getId(theFlowId)
1619 tableId = 243 as short
1624 protected def tcpEgressAllFlows() {
1625 val theFlowId = "TCP_DESTINATION_1_0Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1627 new FlowEntityBuilder >> [
1629 cookie = 110100480bi
1632 instructionInfoList = #[
1633 new InstructionApplyActions(#[
1634 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1635 new ActionNxResubmit(17 as short)
1639 new MatchEthernetType(2048L),
1640 new MatchEthernetType(2048L),
1641 new MatchIpProtocol(6 as short),
1642 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1643 new NxMatchCtState(33L, 33L)
1645 priority = IdHelper.getId(theFlowId)
1646 tableId = 213 as short
1652 protected def icmpIngressFlowsPort3() {
1653 val flowId1 = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
1654 val flowId2 = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426a22"
1656 new FlowEntityBuilder >> [
1658 cookie = 110100480bi
1661 instructionInfoList = #[
1662 new InstructionApplyActions(#[
1663 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1664 new ActionNxResubmit(220 as short)
1668 new MatchEthernetType(2048L),
1669 new MatchEthernetType(2048L),
1670 new MatchIcmpv4(2 as short, 3 as short),
1671 new MatchIpProtocol(1 as short),
1672 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1673 new NxMatchCtState(33L, 33L)
1675 priority = IdHelper.getId(flowId1)
1676 tableId = 243 as short
1678 new FlowEntityBuilder >> [
1680 cookie = 110100480bi
1683 instructionInfoList = #[
1684 new InstructionApplyActions(#[
1685 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1686 new ActionNxResubmit(220 as short)
1690 new MatchEthernetType(2048L),
1691 new MatchEthernetType(2048L),
1692 new MatchIcmpv4(2 as short, 3 as short),
1693 new MatchIpProtocol(1 as short),
1694 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
1695 new NxMatchCtState(33L, 33L)
1697 priority = IdHelper.getId(flowId2)
1698 tableId = 243 as short
1703 protected def icmpEgressFlowsPort3() {
1704 val flowId1 = "ICMP_V4_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
1705 val flowId2 = "ICMP_V4_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426a21"
1707 new FlowEntityBuilder >> [
1709 cookie = 110100480bi
1712 instructionInfoList = #[
1713 new InstructionApplyActions(#[
1714 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1715 new ActionNxResubmit(17 as short)
1719 new MatchEthernetType(2048L),
1720 new MatchEthernetType(2048L),
1721 new MatchIcmpv4(2 as short, 3 as short),
1722 new MatchIpProtocol(1 as short),
1723 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1724 new NxMatchCtState(33L, 33L)
1726 priority = IdHelper.getId(flowId1)
1727 tableId = 213 as short
1729 new FlowEntityBuilder >> [
1731 cookie = 110100480bi
1734 instructionInfoList = #[
1735 new InstructionApplyActions(#[
1736 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
1737 new ActionNxResubmit(17 as short)
1741 new MatchEthernetType(2048L),
1742 new MatchEthernetType(2048L),
1743 new MatchIcmpv4(2 as short, 3 as short),
1744 new MatchIpProtocol(1 as short),
1745 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1746 new NxMatchCtState(33L, 33L)
1748 priority = IdHelper.getId(flowId2)
1749 tableId = 213 as short
1754 override def expectedFlows(String mac) {
1755 // Code auto. generated by https://github.com/vorburger/xtendbeans
1757 new FlowEntityBuilder >> [
1759 cookie = 110100480bi
1760 flowId = "Ingress_DHCP_Server_v4123_987__Permit_"
1762 instructionInfoList = #[
1763 new InstructionApplyActions(#[
1764 new ActionNxResubmit(220 as short)
1768 new MatchEthernetType(2048L),
1769 new MatchIpProtocol(17 as short),
1770 new MatchUdpDestinationPort(68 as short),
1771 new MatchUdpSourcePort(67 as short),
1772 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1775 tableId = 241 as short
1777 new FlowEntityBuilder >> [
1779 cookie = 110100480bi
1780 flowId = "Ingress_DHCP_Server_v6_123_987___Permit_"
1782 instructionInfoList = #[
1783 new InstructionApplyActions(#[
1784 new ActionNxResubmit(220 as short)
1788 new MatchEthernetType(34525L),
1789 new MatchIpProtocol(17 as short),
1790 new MatchUdpDestinationPort(546 as short),
1791 new MatchUdpSourcePort(547 as short),
1792 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1795 tableId = 241 as short
1797 new FlowEntityBuilder >> [
1799 cookie = 110100480bi
1800 flowId = "Ingress_ICMPv6_123_987_130_Permit_"
1802 instructionInfoList = #[
1803 new InstructionApplyActions(#[
1804 new ActionNxResubmit(220 as short)
1808 new MatchEthernetType(34525L),
1809 new MatchIpProtocol(58 as short),
1810 new MatchIcmpv6(130 as short, 0 as short),
1811 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1814 tableId = 241 as short
1816 new FlowEntityBuilder >> [
1818 cookie = 110100480bi
1819 flowId = "Ingress_ICMPv6_123_987_135_Permit_"
1821 instructionInfoList = #[
1822 new InstructionApplyActions(#[
1823 new ActionNxResubmit(220 as short)
1827 new MatchEthernetType(34525L),
1828 new MatchIpProtocol(58 as short),
1829 new MatchIcmpv6(135 as short, 0 as short),
1830 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1833 tableId = 241 as short
1835 new FlowEntityBuilder >> [
1837 cookie = 110100480bi
1838 flowId = "Ingress_ICMPv6_123_987_136_Permit_"
1840 instructionInfoList = #[
1841 new InstructionApplyActions(#[
1842 new ActionNxResubmit(220 as short)
1846 new MatchEthernetType(34525L),
1847 new MatchIpProtocol(58 as short),
1848 new MatchIcmpv6(136 as short, 0 as short),
1849 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1852 tableId = 241 as short
1854 new FlowEntityBuilder >> [
1856 cookie = 110100480bi
1857 flowId = "Ingress_ARP_123_987"
1859 instructionInfoList = #[
1860 new InstructionApplyActions(#[
1861 new ActionNxResubmit(220 as short)
1865 new MatchEthernetType(2054L),
1866 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1869 tableId = 241 as short
1871 new FlowEntityBuilder >> [
1873 cookie = 110100481bi
1874 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
1876 instructionInfoList = #[
1877 new InstructionApplyActions(#[
1882 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1883 new NxMatchCtState(33L, 33L)
1886 tableId = 213 as short
1888 new FlowEntityBuilder >> [
1890 cookie = 110100481bi
1891 flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
1893 instructionInfoList = #[
1894 new InstructionApplyActions(#[
1899 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1900 new NxMatchCtState(48L, 48L)
1903 tableId = 213 as short
1905 new FlowEntityBuilder >> [
1907 cookie = 110100480bi
1908 flowId = "Egress_DHCP_Client_v4123_987_" + mac + "_Permit_"
1910 instructionInfoList = #[
1911 new InstructionApplyActions(#[
1912 new ActionNxResubmit(17 as short)
1916 new MatchEthernetType(2048L),
1917 new MatchIpProtocol(17 as short),
1918 new MatchUdpDestinationPort(67 as short),
1919 new MatchUdpSourcePort(68 as short),
1920 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1921 new MatchEthernetSource(new MacAddress(mac))
1924 tableId = 211 as short
1926 new FlowEntityBuilder >> [
1928 cookie = 110100480bi
1929 flowId = "Egress_DHCP_Client_v6_123_987_" + mac + "_Permit_"
1931 instructionInfoList = #[
1932 new InstructionApplyActions(#[
1933 new ActionNxResubmit(17 as short)
1937 new MatchEthernetType(34525L),
1938 new MatchIpProtocol(17 as short),
1939 new MatchUdpDestinationPort(547 as short),
1940 new MatchUdpSourcePort(546 as short),
1941 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
1942 new MatchEthernetSource(new MacAddress(mac))
1945 tableId = 211 as short
1947 new FlowEntityBuilder >> [
1949 cookie = 110100480bi
1950 flowId = "Egress_DHCP_Server_v4123_987__Drop_"
1952 instructionInfoList = #[
1955 new MatchEthernetType(2048L),
1956 new MatchIpProtocol(17 as short),
1957 new MatchUdpDestinationPort(68 as short),
1958 new MatchUdpSourcePort(67 as short),
1959 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1962 tableId = 211 as short
1964 new FlowEntityBuilder >> [
1966 cookie = 110100480bi
1967 flowId = "Egress_DHCP_Server_v6_123_987__Drop_"
1969 instructionInfoList = #[
1972 new MatchEthernetType(34525L),
1973 new MatchIpProtocol(17 as short),
1974 new MatchUdpDestinationPort(546 as short),
1975 new MatchUdpSourcePort(547 as short),
1976 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1979 tableId = 211 as short
1981 new FlowEntityBuilder >> [
1983 cookie = 110100480bi
1984 flowId = "Egress_ICMPv6_123_987_134_Drop_"
1986 instructionInfoList = #[
1989 new MatchEthernetType(34525L),
1990 new MatchIpProtocol(58 as short),
1991 new MatchIcmpv6(134 as short, 0 as short),
1992 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1995 tableId = 211 as short
1997 new FlowEntityBuilder >> [
1999 cookie = 110100480bi
2000 flowId = "Egress_ICMPv6_123_987_133_Permit_"
2002 instructionInfoList = #[
2003 new InstructionApplyActions(#[
2004 new ActionNxResubmit(17 as short)
2008 new MatchEthernetType(34525L),
2009 new MatchIpProtocol(58 as short),
2010 new MatchIcmpv6(133 as short, 0 as short),
2011 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
2014 tableId = 211 as short
2016 new FlowEntityBuilder >> [
2018 cookie = 110100480bi
2019 flowId = "Egress_ICMPv6_123_987_135_Permit_"
2021 instructionInfoList = #[
2022 new InstructionApplyActions(#[
2023 new ActionNxResubmit(17 as short)
2027 new MatchEthernetType(34525L),
2028 new MatchIpProtocol(58 as short),
2029 new MatchIcmpv6(135 as short, 0 as short),
2030 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
2033 tableId = 211 as short
2035 new FlowEntityBuilder >> [
2037 cookie = 110100480bi
2038 flowId = "Egress_ICMPv6_123_987_136_Permit_"
2040 instructionInfoList = #[
2041 new InstructionApplyActions(#[
2042 new ActionNxResubmit(17 as short)
2046 new MatchEthernetType(34525L),
2047 new MatchIpProtocol(58 as short),
2048 new MatchIcmpv6(136 as short, 0 as short),
2049 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
2052 tableId = 211 as short
2054 new FlowEntityBuilder >> [
2056 cookie = 110100481bi
2057 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
2059 instructionInfoList = #[
2060 new InstructionApplyActions(#[
2065 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
2066 new NxMatchCtState(33L, 33L)
2069 tableId = 243 as short
2071 new FlowEntityBuilder >> [
2073 cookie = 110100481bi
2074 flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
2076 instructionInfoList = #[
2077 new InstructionApplyActions(#[
2082 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
2083 new NxMatchCtState(48L, 48L)
2086 tableId = 243 as short
2088 new FlowEntityBuilder >> [
2090 cookie = 110100480bi
2091 flowId = "Ingress_Fixed_Conntrk_123_" + mac + "_10.0.0.1/32_Recirc"
2093 instructionInfoList = #[
2094 new InstructionApplyActions(#[
2095 new ActionNxConntrack(2, 0, 0, 5000, 242 as short)
2099 new MatchEthernetType(2048L),
2100 new MatchEthernetDestination(new MacAddress(mac)),
2101 new MatchEthernetType(2048L),
2102 new MatchIpv4Destination("10.0.0.1", "32")
2105 tableId = 241 as short
2107 new FlowEntityBuilder >> [
2109 cookie = 110100480bi
2110 flowId = "Egress_Fixed_Conntrk_123_" + mac + "_10.0.0.1/32_Recirc"
2112 instructionInfoList = #[
2113 new InstructionApplyActions(#[
2114 new ActionNxConntrack(2, 0, 0, 5000, 212 as short)
2118 new MatchEthernetSource(new MacAddress(mac)),
2119 new MatchEthernetType(2048L),
2120 new MatchIpv4Source("10.0.0.1", "32")
2123 tableId = 211 as short
2125 new FlowEntityBuilder >> [
2127 cookie = 110100480bi
2128 flowId = "Egress_ARP_123_987_" + mac + "10.0.0.1/32"
2130 instructionInfoList = #[
2131 new InstructionApplyActions(#[
2132 new ActionNxResubmit(17 as short)
2136 new MatchEthernetType(2054L),
2137 new MatchArpSha(new MacAddress(mac)),
2138 new MatchEthernetSource(new MacAddress(mac)),
2139 new MatchArpSpa(new Ipv4Prefix("10.0.0.1/32")),
2140 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
2143 tableId = 211 as short