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.actions.ActionNxConntrack
11 import org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit
12 import org.opendaylight.genius.mdsalutil.FlowEntity
13 import org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions
14 import org.opendaylight.genius.mdsalutil.instructions.InstructionWriteMetadata
15 import org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable
16 import org.opendaylight.genius.mdsalutil.matches.MatchArpSha
17 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetType
18 import org.opendaylight.genius.mdsalutil.matches.MatchIcmpv4
19 import org.opendaylight.genius.mdsalutil.matches.MatchIcmpv6
20 import org.opendaylight.genius.mdsalutil.matches.MatchIpProtocol
21 import org.opendaylight.genius.mdsalutil.matches.MatchIpv4Destination
22 import org.opendaylight.genius.mdsalutil.matches.MatchIpv4Source
23 import org.opendaylight.genius.mdsalutil.matches.MatchTcpFlags
24 import org.opendaylight.genius.mdsalutil.matches.MatchUdpDestinationPort
25 import org.opendaylight.genius.mdsalutil.matches.MatchUdpSourcePort
26 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchCtState
27 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchTcpDestinationPort
28 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchUdpDestinationPort
29 import org.opendaylight.genius.mdsalutil.MetaDataUtil
30 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress
32 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchRegister
33 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg6
34 import org.opendaylight.genius.mdsalutil.matches.MatchMetadata
36 class FlowEntryObjectsStateless extends FlowEntryObjectsBase {
38 protected def etherFlows() {
39 fixedIngressFlowsPort1
40 + etherFlowIngressPort1
41 + fixedEgressFlowsPort1
42 + etherFlowEgressPort1
43 + fixedIngressFlowsPort2
44 + etherIngressFlowsPort2
45 + fixedEgressFlowsPort2
46 + etheregressFlowPort2
50 protected def tcpFlows() {
51 fixedIngressFlowsPort1
53 + fixedEgressFlowsPort1
55 + fixedIngressFlowsPort2
57 + fixedEgressFlowsPort2
62 protected def udpFlows() {
63 fixedIngressFlowsPort1
64 + fixedEgressFlowsPort1
65 + fixedIngressFlowsPort2
66 + fixedEgressFlowsPort2
70 protected def icmpFlows() {
71 fixedIngressFlowsPort1
72 + fixedEgressFlowsPort1
73 + fixedIngressFlowsPort2
74 + fixedEgressFlowsPort2
78 protected def dstRangeFlows() {
79 fixedIngressFlowsPort1
80 + fixedEgressFlowsPort1
84 protected def dstAllFlows() {
85 fixedIngressFlowsPort1
86 + fixedEgressFlowsPort1
89 protected def icmpFlowsForTwoAclsHavingSameRules() {
90 fixedIngressFlowsPort3
91 + fixedEgressFlowsPort3
94 protected def etherFlowIngressPort1() {
96 new FlowEntity(123bi) => [
98 flowId = "SYN_ETHERnullIngress98785cc3048-abc3-43cc-89b3-377341426ac7"
100 instructionInfoList = #[
101 new InstructionApplyActions(#[
102 new ActionNxResubmit(220 as short)
106 new MatchEthernetType(2048L),
107 new MatchEthernetType(2048L),
108 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
111 tableId = 241 as short
115 protected def etherFlowEgressPort1() {
117 new FlowEntity(123bi) => [
119 flowId = "SYN_ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6"
120 flowName = "ACL_SYN_"
121 instructionInfoList = #[
122 new InstructionApplyActions(#[
123 new ActionNxResubmit(17 as short)
127 new MatchEthernetType(2048L),
128 new MatchEthernetType(2048L),
129 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
132 tableId = 211 as short
136 protected def etherIngressFlowsPort2() {
138 new FlowEntity(123bi) => [
140 flowId = "SYN_ETHERnullIngress98785cc3048-abc3-43cc-89b3-377341426ac7"
141 flowName = "ACL_SYN_"
142 instructionInfoList = #[
143 new InstructionApplyActions(#[
144 new ActionNxResubmit(220 as short)
148 new MatchEthernetType(2048L),
149 new MatchEthernetType(2048L),
150 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
153 tableId = 241 as short
155 new FlowEntity(123bi) => [
157 flowId = "SYN_ETHERnullIngress98785cc3048-abc3-43cc-89b3-377341426ac7"
158 flowName = "ACL_SYN_"
159 instructionInfoList = #[
160 new InstructionApplyActions(#[
161 new ActionNxResubmit(220 as short)
165 new MatchEthernetType(2048L),
166 new MatchEthernetType(2048L),
167 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
170 tableId = 241 as short
175 protected def etherEgressFlowsPort1() {
177 new FlowEntity(123bi) => [
179 flowId = "[SYN_ETHERnullIngress98785cc3048-abc3-43cc-89b3-377341426ac7"
180 flowName = "ACL_SYN_"
181 instructionInfoList = #[
182 new InstructionApplyActions(#[
183 new ActionNxResubmit(220 as short)
187 new MatchEthernetType(2048L),
188 new MatchEthernetType(2048L),
189 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
192 tableId = 241 as short
197 protected def etheregressFlowPort2() {
199 new FlowEntity(123bi) => [
201 flowId = "SYN_ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6"
202 flowName = "ACL_SYN_"
203 instructionInfoList = #[
204 new InstructionApplyActions(#[
205 new ActionNxResubmit(17 as short)
209 new MatchEthernetType(2048L),
210 new MatchEthernetType(2048L),
211 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
214 tableId = 211 as short
219 protected def tcpIngressFlowPort1() {
221 new FlowEntity(123bi) => [
223 flowId = "SYN_TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
224 flowName = "ACL_SYN_"
225 instructionInfoList = #[
226 new InstructionApplyActions(#[
227 new ActionNxResubmit(220 as short)
231 new MatchEthernetType(2048L),
232 new MatchEthernetType(2048L),
233 new NxMatchTcpDestinationPort(80, 65535),
234 new MatchIpProtocol(6 as short),
235 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
239 tableId = 241 as short
244 protected def tcpIngressFlowPort2() {
246 new FlowEntity(123bi) => [
248 flowId = "SYN_TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
249 flowName = "ACL_SYN_"
250 instructionInfoList = #[
251 new InstructionApplyActions(#[
252 new ActionNxResubmit(220 as short)
256 new MatchEthernetType(2048L),
257 new MatchEthernetType(2048L),
258 new NxMatchTcpDestinationPort(80, 65535),
259 new MatchIpProtocol(6 as short),
260 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
264 tableId = 241 as short
269 protected def tcpEgressFlowPort1() {
271 new FlowEntity(123bi) => [
273 flowId = "SYN_TCP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
274 flowName = "ACL_SYN_"
275 instructionInfoList = #[
276 new InstructionApplyActions(#[
277 new ActionNxResubmit(17 as short)
281 new MatchEthernetType(2048L),
282 new MatchEthernetType(2048L),
283 new NxMatchTcpDestinationPort(80, 65535),
284 new MatchIpProtocol(6 as short),
285 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
289 tableId = 211 as short
294 protected def tcpEgressFlowPort2() {
296 new FlowEntity(123bi) => [
298 flowId = "SYN_TCP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
299 flowName = "ACL_SYN_"
300 instructionInfoList = #[
301 new InstructionApplyActions(#[
302 new ActionNxResubmit(17 as short)
306 new MatchEthernetType(2048L),
307 new MatchEthernetType(2048L),
308 new NxMatchTcpDestinationPort(80, 65535),
309 new MatchIpProtocol(6 as short),
310 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
314 tableId = 211 as short
316 new FlowEntity(123bi) => [
318 flowId = "SYN_TCP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
319 flowName = "ACL_SYN_"
320 instructionInfoList = #[
321 new InstructionApplyActions(#[
322 new ActionNxResubmit(17 as short)
326 new MatchEthernetType(2048L),
327 new MatchEthernetType(2048L),
328 new NxMatchTcpDestinationPort(80, 65535),
329 new MatchIpProtocol(6 as short),
330 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
334 tableId = 211 as short
339 protected def udpEgressFlowsPort1() {
341 new FlowEntity(123bi) => [
343 flowId = "UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
345 instructionInfoList = #[
346 new InstructionApplyActions(#[
347 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
348 new ActionNxResubmit(17 as short)
352 new MatchEthernetType(2048L),
353 new MatchEthernetType(2048L),
354 new NxMatchUdpDestinationPort(80, 65535),
355 new MatchIpProtocol(17 as short),
356 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
357 new NxMatchCtState(33L, 33L)
360 tableId = 213 as short
365 protected def udpIngressFlowsPort2() {
367 new FlowEntity(123bi) => [
369 flowId = "UDP_DESTINATION_80_65535_ipv4_remoteACL_interface_aap_AllowedAddressPairsKey "
370 +"[_macAddress=MacAddress [_value=0D:AA:D8:42:30:F3], _ipAddress=IpPrefixOrAddress "
371 +"[_ipPrefix=IpPrefix [_ipv4Prefix=Ipv4Prefix [_value=10.0.0.1/24]]]]"
372 +"Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
374 instructionInfoList = #[
375 new InstructionApplyActions(#[
376 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
377 new ActionNxResubmit(220 as short)
381 new MatchEthernetType(2048L),
382 new MatchIpv4Source("10.0.0.1", "24"),
383 new MatchEthernetType(2048L),
384 new MatchEthernetType(2048L),
385 new NxMatchUdpDestinationPort(80, 65535),
386 new MatchIpProtocol(17 as short),
387 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
388 new NxMatchCtState(33L, 33L)
391 tableId = 243 as short
393 new FlowEntity(123bi) => [
395 flowId = "UDP_DESTINATION_80_65535_ipv4_remoteACL_interface_aap_AllowedAddressPairsKey [_macAddress=MacAddress [_value=0D:AA:D8:42:30:F4], _ipAddress=IpPrefixOrAddress [_ipPrefix=IpPrefix [_ipv4Prefix=Ipv4Prefix [_value=10.0.0.2/24]]]]Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
397 instructionInfoList = #[
398 new InstructionApplyActions(#[
399 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
400 new ActionNxResubmit(220 as short)
404 new MatchEthernetType(2048L),
405 new MatchIpv4Source("10.0.0.2", "24"),
406 new MatchEthernetType(2048L),
407 new MatchEthernetType(2048L),
408 new NxMatchUdpDestinationPort(80, 65535),
409 new MatchIpProtocol(17 as short),
410 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
411 new NxMatchCtState(33L, 33L)
414 tableId = 243 as short
419 protected def udpEgressFlowsPort2() {
421 new FlowEntity(123bi) => [
423 flowId = "UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
425 instructionInfoList = #[
426 new InstructionApplyActions(#[
427 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
428 new ActionNxResubmit(17 as short)
432 new MatchEthernetType(2048L),
433 new MatchEthernetType(2048L),
434 new NxMatchUdpDestinationPort(80, 65535),
435 new MatchIpProtocol(17 as short),
436 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
437 new NxMatchCtState(33L, 33L)
440 tableId = 213 as short
445 protected def icmpIngressFlowsPort1() {
447 new FlowEntity(123bi) => [
449 flowId = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
451 instructionInfoList = #[
452 new InstructionApplyActions(#[
453 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
454 new ActionNxResubmit(220 as short)
458 new MatchEthernetType(2048L),
459 new MatchEthernetType(2048L),
460 new MatchIcmpv4(2 as short, 3 as short),
461 new MatchIpProtocol(1 as short),
462 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
463 new NxMatchCtState(33L, 33L)
466 tableId = 243 as short
471 protected def icmpIngressFlowsPort2() {
473 new FlowEntity(123bi) => [
475 flowId = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
477 instructionInfoList = #[
478 new InstructionApplyActions(#[
479 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
480 new ActionNxResubmit(220 as short)
484 new MatchEthernetType(2048L),
485 new MatchEthernetType(2048L),
486 new MatchIcmpv4(2 as short, 3 as short),
487 new MatchIpProtocol(1 as short),
488 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
489 new NxMatchCtState(33L, 33L)
492 tableId = 243 as short
497 protected def icmpEgressFlowsPort2() {
499 new FlowEntity(123bi) => [
501 flowId = "ICMP_V4_DESTINATION_23__ipv4_remoteACL_interface_aap_AllowedAddressPairsKey "
502 +"[_macAddress=MacAddress [_value=0D:AA:D8:42:30:F3], _ipAddress=IpPrefixOrAddress "
503 +"[_ipPrefix=IpPrefix [_ipv4Prefix=Ipv4Prefix [_value=10.0.0.1/24]]]]"
504 +"Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
506 instructionInfoList = #[
507 new InstructionApplyActions(#[
508 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
509 new ActionNxResubmit(17 as short)
513 new MatchEthernetType(2048L),
514 new MatchIpv4Destination("10.0.0.1", "24"),
515 new MatchEthernetType(2048L),
516 new MatchEthernetType(2048L),
517 new MatchIcmpv4(2 as short, 3 as short),
518 new MatchIpProtocol(1 as short),
519 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
520 new NxMatchCtState(33L, 33L)
523 tableId = 213 as short
525 new FlowEntity(123bi) => [
527 flowId = "ICMP_V4_DESTINATION_23__ipv4_remoteACL_interface_aap_AllowedAddressPairsKey "
528 +"[_macAddress=MacAddress [_value=0D:AA:D8:42:30:F4], _ipAddress=IpPrefixOrAddress "
529 +"[_ipPrefix=IpPrefix [_ipv4Prefix=Ipv4Prefix [_value=10.0.0.2/24]]]]"
530 +"Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
532 instructionInfoList = #[
533 new InstructionApplyActions(#[
534 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
535 new ActionNxResubmit(17 as short)
539 new MatchEthernetType(2048L),
540 new MatchIpv4Destination("10.0.0.2", "24"),
541 new MatchEthernetType(2048L),
542 new MatchEthernetType(2048L),
543 new MatchIcmpv4(2 as short, 3 as short),
544 new MatchIpProtocol(1 as short),
545 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
546 new NxMatchCtState(33L, 33L)
549 tableId = 213 as short
554 protected def udpIngressPortRangeFlows() {
556 new FlowEntity(123bi) => [
558 flowId = "UDP_DESTINATION_2000_65532Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
560 instructionInfoList = #[
561 new InstructionApplyActions(#[
562 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
563 new ActionNxResubmit(220 as short)
567 new MatchEthernetType(2048L),
568 new MatchEthernetType(2048L),
569 new NxMatchUdpDestinationPort(2000, 65532),
570 new MatchIpProtocol(17 as short),
571 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
572 new NxMatchCtState(33L, 33L)
575 tableId = 243 as short
580 protected def tcpEgressRangeFlows() {
582 new FlowEntity(123bi) => [
584 flowId = "SYN_TCP_DESTINATION_776_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
585 flowName = "ACL_SYN_"
586 instructionInfoList = #[
587 new InstructionApplyActions(#[
588 new ActionNxResubmit(17 as short)
592 new MatchEthernetType(2048L),
593 new MatchEthernetType(2048L),
594 new NxMatchTcpDestinationPort(776, 65534),
595 new MatchIpProtocol(6 as short),
596 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
600 tableId = 211 as short
602 new FlowEntity(123bi) => [
604 flowId = "SYN_TCP_DESTINATION_512_65280Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
605 flowName = "ACL_SYN_"
606 instructionInfoList = #[
607 new InstructionApplyActions(#[
608 new ActionNxResubmit(17 as short)
612 new MatchEthernetType(2048L),
613 new MatchEthernetType(2048L),
614 new NxMatchTcpDestinationPort(512, 65280),
615 new MatchIpProtocol(6 as short),
616 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
620 tableId = 211 as short
622 new FlowEntity(123bi) => [
624 flowId = "SYN_TCP_DESTINATION_334_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
625 flowName = "ACL_SYN_"
626 instructionInfoList = #[
627 new InstructionApplyActions(#[
628 new ActionNxResubmit(17 as short)
632 new MatchEthernetType(2048L),
633 new MatchEthernetType(2048L),
634 new NxMatchTcpDestinationPort(334, 65534),
635 new MatchIpProtocol(6 as short),
636 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
640 tableId = 211 as short
642 new FlowEntity(123bi) => [
644 flowId = "SYN_TCP_DESTINATION_333_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
645 flowName = "ACL_SYN_"
646 instructionInfoList = #[
647 new InstructionApplyActions(#[
648 new ActionNxResubmit(17 as short)
652 new MatchEthernetType(2048L),
653 new MatchEthernetType(2048L),
654 new NxMatchTcpDestinationPort(333, 65535),
655 new MatchIpProtocol(6 as short),
656 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
660 tableId = 211 as short
662 new FlowEntity(123bi) => [
664 flowId = "SYN_TCP_DESTINATION_336_65520Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
665 flowName = "ACL_SYN_"
666 instructionInfoList = #[
667 new InstructionApplyActions(#[
668 new ActionNxResubmit(17 as short)
672 new MatchEthernetType(2048L),
673 new MatchEthernetType(2048L),
674 new NxMatchTcpDestinationPort(336, 65520),
675 new MatchIpProtocol(6 as short),
676 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
680 tableId = 211 as short
682 new FlowEntity(123bi) => [
684 flowId = "SYN_TCP_DESTINATION_352_65504Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
685 flowName = "ACL_SYN_"
686 instructionInfoList = #[
687 new InstructionApplyActions(#[
688 new ActionNxResubmit(17 as short)
692 new MatchEthernetType(2048L),
693 new MatchEthernetType(2048L),
694 new NxMatchTcpDestinationPort(352, 65504),
695 new MatchIpProtocol(6 as short),
696 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
700 tableId = 211 as short
702 new FlowEntity(123bi) => [
704 flowId = "SYN_TCP_DESTINATION_384_65408Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
705 flowName = "ACL_SYN_"
706 instructionInfoList = #[
707 new InstructionApplyActions(#[
708 new ActionNxResubmit(17 as short)
712 new MatchEthernetType(2048L),
713 new MatchEthernetType(2048L),
714 new NxMatchTcpDestinationPort(384, 65408),
715 new MatchIpProtocol(6 as short),
716 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
720 tableId = 211 as short
722 new FlowEntity(123bi) => [
724 flowId = "SYN_TCP_DESTINATION_768_65528Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
725 flowName = "ACL_SYN_"
726 instructionInfoList = #[
727 new InstructionApplyActions(#[
728 new ActionNxResubmit(17 as short)
732 new MatchEthernetType(2048L),
733 new MatchEthernetType(2048L),
734 new NxMatchTcpDestinationPort(768, 65528),
735 new MatchIpProtocol(6 as short),
736 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
740 tableId = 211 as short
745 protected def icmpIngressFlowsPort3() {
747 new FlowEntity(123bi) => [
749 flowId = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
751 instructionInfoList = #[
752 new InstructionApplyActions(#[
753 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
754 new ActionNxResubmit(220 as short)
758 new MatchEthernetType(2048L),
759 new MatchEthernetType(2048L),
760 new MatchIcmpv4(2 as short, 3 as short),
761 new MatchIpProtocol(1 as short),
762 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
763 new NxMatchCtState(33L, 33L)
765 priority = IdHelper.getId(flowId)
766 tableId = 243 as short
768 new FlowEntity(123bi) => [
770 flowId = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426a22"
772 instructionInfoList = #[
773 new InstructionApplyActions(#[
774 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
775 new ActionNxResubmit(220 as short)
779 new MatchEthernetType(2048L),
780 new MatchEthernetType(2048L),
781 new MatchIcmpv4(2 as short, 3 as short),
782 new MatchIpProtocol(1 as short),
783 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
784 new NxMatchCtState(33L, 33L)
786 priority = IdHelper.getId(flowId)
787 tableId = 243 as short
792 protected def icmpEgressFlowsPort3() {
794 new FlowEntity(123bi) => [
796 flowId = "ICMP_V4_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
798 instructionInfoList = #[
799 new InstructionApplyActions(#[
800 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
801 new ActionNxResubmit(17 as short)
805 new MatchEthernetType(2048L),
806 new MatchEthernetType(2048L),
807 new MatchIcmpv4(2 as short, 3 as short),
808 new MatchIpProtocol(1 as short),
809 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
810 new NxMatchCtState(33L, 33L)
812 priority = IdHelper.getId(flowId)
813 tableId = 213 as short
815 new FlowEntity(123bi) => [
817 flowId = "ICMP_V4_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426a21"
819 instructionInfoList = #[
820 new InstructionApplyActions(#[
821 new ActionNxConntrack(2, 1, 0, 5000, 255 as short),
822 new ActionNxResubmit(17 as short)
826 new MatchEthernetType(2048L),
827 new MatchEthernetType(2048L),
828 new MatchIcmpv4(2 as short, 3 as short),
829 new MatchIpProtocol(1 as short),
830 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
831 new NxMatchCtState(33L, 33L)
833 priority = IdHelper.getId(flowId)
834 tableId = 213 as short
839 override def expectedFlows(String mac) {
840 // Code auto. generated by https://github.com/vorburger/xtendbeans
842 new FlowEntity(123bi) => [
844 flowId = "Ingress_DHCP_Server_v4123_987__Permit_"
846 instructionInfoList = #[
847 new InstructionApplyActions(#[
848 new ActionNxResubmit(220 as short)
852 new MatchEthernetType(2048L),
853 new MatchIpProtocol(17 as short),
854 new MatchUdpDestinationPort(68 as short),
855 new MatchUdpSourcePort(67 as short),
856 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
859 tableId = 241 as short
861 new FlowEntity(123bi) => [
863 flowId = "Ingress_DHCP_Server_v6_123_987___Permit_"
865 instructionInfoList = #[
866 new InstructionApplyActions(#[
867 new ActionNxResubmit(220 as short)
871 new MatchEthernetType(34525L),
872 new MatchIpProtocol(17 as short),
873 new MatchUdpDestinationPort(546 as short),
874 new MatchUdpSourcePort(547 as short),
875 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
878 tableId = 241 as short
880 new FlowEntity(123bi) => [
882 flowId = "Ingress_ICMPv6_123_987_130_Permit_"
884 instructionInfoList = #[
885 new InstructionApplyActions(#[
886 new ActionNxResubmit(220 as short)
890 new MatchEthernetType(34525L),
891 new MatchIpProtocol(58 as short),
892 new MatchIcmpv6(130 as short, 0 as short),
893 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
896 tableId = 241 as short
898 new FlowEntity(123bi) => [
900 flowId = "Ingress_ICMPv6_123_987_135_Permit_"
902 instructionInfoList = #[
903 new InstructionApplyActions(#[
904 new ActionNxResubmit(220 as short)
908 new MatchEthernetType(34525L),
909 new MatchIpProtocol(58 as short),
910 new MatchIcmpv6(135 as short, 0 as short),
911 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
914 tableId = 241 as short
916 new FlowEntity(123bi) => [
918 flowId = "Ingress_ICMPv6_123_987_136_Permit_"
920 instructionInfoList = #[
921 new InstructionApplyActions(#[
922 new ActionNxResubmit(220 as short)
926 new MatchEthernetType(34525L),
927 new MatchIpProtocol(58 as short),
928 new MatchIcmpv6(136 as short, 0 as short),
929 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
932 tableId = 241 as short
934 new FlowEntity(123bi) => [
936 flowId = "Ingress_ARP_123_987"
938 instructionInfoList = #[
939 new InstructionApplyActions(#[
940 new ActionNxResubmit(220 as short)
944 new MatchEthernetType(2054L),
945 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
948 tableId = 241 as short
950 new FlowEntity(123bi) => [
952 flowId = "Egress_DHCP_Client_v4123_987__Permit_"
954 instructionInfoList = #[
955 new InstructionApplyActions(#[
956 new ActionNxResubmit(17 as short)
960 new MatchEthernetType(2048L),
961 new MatchIpProtocol(17 as short),
962 new MatchUdpDestinationPort(67 as short),
963 new MatchUdpSourcePort(68 as short),
964 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
967 tableId = 211 as short
969 new FlowEntity(123bi) => [
971 flowId = "Egress_DHCP_Client_v6_123_987__Permit_"
973 instructionInfoList = #[
974 new InstructionApplyActions(#[
975 new ActionNxResubmit(17 as short)
979 new MatchEthernetType(34525L),
980 new MatchIpProtocol(17 as short),
981 new MatchUdpDestinationPort(547 as short),
982 new MatchUdpSourcePort(546 as short),
983 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
986 tableId = 211 as short
988 new FlowEntity(123bi) => [
990 flowId = "Egress_DHCP_Server_v4123_987__Drop_"
992 instructionInfoList = #[
995 new MatchEthernetType(2048L),
996 new MatchIpProtocol(17 as short),
997 new MatchUdpDestinationPort(68 as short),
998 new MatchUdpSourcePort(67 as short),
999 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1002 tableId = 211 as short
1004 new FlowEntity(123bi) => [
1005 cookie = 110100480bi
1006 flowId = "Egress_DHCP_Server_v6_123_987__Drop_"
1008 instructionInfoList = #[
1011 new MatchEthernetType(34525L),
1012 new MatchIpProtocol(17 as short),
1013 new MatchUdpDestinationPort(546 as short),
1014 new MatchUdpSourcePort(547 as short),
1015 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1018 tableId = 211 as short
1020 new FlowEntity(123bi) => [
1021 cookie = 110100480bi
1022 flowId = "Egress_ICMPv6_123_987_134_Drop_"
1024 instructionInfoList = #[
1027 new MatchEthernetType(34525L),
1028 new MatchIpProtocol(58 as short),
1029 new MatchIcmpv6(134 as short, 0 as short),
1030 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1033 tableId = 211 as short
1035 new FlowEntity(123bi) => [
1036 cookie = 110100480bi
1037 flowId = "Egress_ICMPv6_123_987_133_Permit_"
1039 instructionInfoList = #[
1040 new InstructionApplyActions(#[
1041 new ActionNxResubmit(17 as short)
1045 new MatchEthernetType(34525L),
1046 new MatchIpProtocol(58 as short),
1047 new MatchIcmpv6(133 as short, 0 as short),
1048 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1051 tableId = 211 as short
1053 new FlowEntity(123bi) => [
1054 cookie = 110100480bi
1055 flowId = "Egress_ICMPv6_123_987_135_Permit_"
1057 instructionInfoList = #[
1058 new InstructionApplyActions(#[
1059 new ActionNxResubmit(17 as short)
1063 new MatchEthernetType(34525L),
1064 new MatchIpProtocol(58 as short),
1065 new MatchIcmpv6(135 as short, 0 as short),
1066 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1069 tableId = 211 as short
1071 new FlowEntity(123bi) => [
1072 cookie = 110100480bi
1073 flowId = "Egress_ICMPv6_123_987_136_Permit_"
1075 instructionInfoList = #[
1076 new InstructionApplyActions(#[
1077 new ActionNxResubmit(17 as short)
1081 new MatchEthernetType(34525L),
1082 new MatchIpProtocol(58 as short),
1083 new MatchIcmpv6(136 as short, 0 as short),
1084 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1087 tableId = 211 as short
1089 new FlowEntity(123bi) => [
1090 cookie = 110100480bi
1091 flowId = "Egress_ARP_123_987_" + mac
1093 instructionInfoList = #[
1094 new InstructionApplyActions(#[
1095 new ActionNxResubmit
1099 new MatchEthernetType(2054L),
1100 new MatchArpSha(new MacAddress(mac)),
1101 new MatchMetadata(1085217976614912bi, 1152920405095219200bi)
1104 tableId = 211 as short