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.ActionNxResubmit
11 import org.opendaylight.genius.mdsalutil.FlowEntity
12 import org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions
13 import org.opendaylight.genius.mdsalutil.instructions.InstructionWriteMetadata
14 import org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable
15 import org.opendaylight.genius.mdsalutil.matches.MatchArpSha
16 import org.opendaylight.genius.mdsalutil.matches.MatchEthernetType
17 import org.opendaylight.genius.mdsalutil.matches.MatchIcmpv6
18 import org.opendaylight.genius.mdsalutil.matches.MatchIpProtocol
19 import org.opendaylight.genius.mdsalutil.matches.MatchIpv4Destination
20 import org.opendaylight.genius.mdsalutil.matches.MatchIpv4Source
21 import org.opendaylight.genius.mdsalutil.matches.MatchUdpDestinationPort
22 import org.opendaylight.genius.mdsalutil.matches.MatchUdpSourcePort
23 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress
24 import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchRegister
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg6
26 import org.opendaylight.genius.mdsalutil.MetaDataUtil
27 import org.opendaylight.genius.mdsalutil.matches.MatchMetadata
29 class FlowEntryObjectsBase {
31 protected def fixedFlowsPort1() {
32 #[ fixedIngressFlowsPort1, fixedEgressFlowsPort1 ]
35 protected def fixedIngressFlowsPort1() {
37 new FlowEntity(123bi) => [
39 flowId = "Ingress_DHCP_Server_v4123_987__Permit_"
41 instructionInfoList = #[
42 new InstructionApplyActions(#[
43 new ActionNxResubmit(220 as short)
47 new MatchEthernetType(2048L),
48 new MatchIpProtocol(17 as short),
49 new MatchUdpDestinationPort(68),
50 new MatchUdpSourcePort(67),
51 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
54 tableId = 241 as short
56 new FlowEntity(123bi) => [
58 flowId = "Ingress_DHCP_Server_v6_123_987___Permit_"
60 instructionInfoList = #[
61 new InstructionApplyActions(#[
62 new ActionNxResubmit(220 as short)
66 new MatchEthernetType(34525L),
67 new MatchIpProtocol(17 as short),
68 new MatchUdpDestinationPort(546),
69 new MatchUdpSourcePort(547),
70 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
73 tableId = 241 as short
75 new FlowEntity(123bi) => [
77 flowId = "Ingress_ICMPv6_123_987_130_Permit_"
79 instructionInfoList = #[
80 new InstructionApplyActions(#[
81 new ActionNxResubmit(220 as short)
85 new MatchEthernetType(34525L),
86 new MatchIpProtocol(58 as short),
87 new MatchIcmpv6(130 as short, 0 as short),
88 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
91 tableId = 241 as short
93 new FlowEntity(123bi) => [
95 flowId = "Ingress_ICMPv6_123_987_135_Permit_"
97 instructionInfoList = #[
98 new InstructionApplyActions(#[
99 new ActionNxResubmit(220 as short)
103 new MatchEthernetType(34525L),
104 new MatchIpProtocol(58 as short),
105 new MatchIcmpv6(135 as short, 0 as short),
106 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
109 tableId = 241 as short
111 new FlowEntity(123bi) => [
113 flowId = "Ingress_ICMPv6_123_987_136_Permit_"
115 instructionInfoList = #[
116 new InstructionApplyActions(#[
117 new ActionNxResubmit(220 as short)
121 new MatchEthernetType(34525L),
122 new MatchIpProtocol(58 as short),
123 new MatchIcmpv6(136 as short, 0 as short),
124 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
127 tableId = 241 as short
129 new FlowEntity(123bi) => [
131 flowId = "Ingress_ARP_123_987"
133 instructionInfoList = #[
134 new InstructionApplyActions(#[
135 new ActionNxResubmit(220 as short)
139 new MatchEthernetType(2054L),
140 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
143 tableId = 241 as short
149 protected def fixedEgressFlowsPort1() {
152 new FlowEntity(123bi) => [
154 flowId = "Egress_DHCP_Client_v4123_987__Permit_"
156 instructionInfoList = #[
157 new InstructionApplyActions(#[
158 new ActionNxResubmit(17 as short)
162 new MatchEthernetType(2048L),
163 new MatchIpProtocol(17 as short),
164 new MatchUdpDestinationPort(67),
165 new MatchUdpSourcePort(68),
166 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
169 tableId = 211 as short
171 new FlowEntity(123bi) => [
173 flowId = "Egress_DHCP_Client_v6_123_987__Permit_"
175 instructionInfoList = #[
176 new InstructionApplyActions(#[
177 new ActionNxResubmit(17 as short)
181 new MatchEthernetType(34525L),
182 new MatchIpProtocol(17 as short),
183 new MatchUdpDestinationPort(547),
184 new MatchUdpSourcePort(546),
185 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
188 tableId = 211 as short
190 new FlowEntity(123bi) => [
192 flowId = "Egress_DHCP_Server_v4123_987__Drop_"
194 instructionInfoList = #[
197 new MatchEthernetType(2048L),
198 new MatchIpProtocol(17 as short),
199 new MatchUdpDestinationPort(68),
200 new MatchUdpSourcePort(67),
201 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
204 tableId = 211 as short
206 new FlowEntity(123bi) => [
208 flowId = "Egress_DHCP_Server_v6_123_987__Drop_"
210 instructionInfoList = #[
213 new MatchEthernetType(34525L),
214 new MatchIpProtocol(17 as short),
215 new MatchUdpDestinationPort(546),
216 new MatchUdpSourcePort(547),
217 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
220 tableId = 211 as short
222 new FlowEntity(123bi) => [
224 flowId = "Egress_ICMPv6_123_987_134_Drop_"
226 instructionInfoList = #[
229 new MatchEthernetType(34525L),
230 new MatchIpProtocol(58 as short),
231 new MatchIcmpv6(134 as short, 0 as short),
232 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
235 tableId = 211 as short
237 new FlowEntity(123bi) => [
239 flowId = "Egress_ICMPv6_123_987_133_Permit_"
241 instructionInfoList = #[
242 new InstructionApplyActions(#[
243 new ActionNxResubmit(17 as short)
247 new MatchEthernetType(34525L),
248 new MatchIpProtocol(58 as short),
249 new MatchIcmpv6(133 as short, 0 as short),
250 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
253 tableId = 211 as short
255 new FlowEntity(123bi) => [
257 flowId = "Egress_ICMPv6_123_987_135_Permit_"
259 instructionInfoList = #[
260 new InstructionApplyActions(#[
261 new ActionNxResubmit(17 as short)
265 new MatchEthernetType(34525L),
266 new MatchIpProtocol(58 as short),
267 new MatchIcmpv6(135 as short, 0 as short),
268 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
271 tableId = 211 as short
273 new FlowEntity(123bi) => [
275 flowId = "Egress_ICMPv6_123_987_136_Permit_"
277 instructionInfoList = #[
278 new InstructionApplyActions(#[
279 new ActionNxResubmit(17 as short)
283 new MatchEthernetType(34525L),
284 new MatchIpProtocol(58 as short),
285 new MatchIcmpv6(136 as short, 0 as short),
286 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
289 tableId = 211 as short
291 new FlowEntity(123bi) => [
293 flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F3"
295 instructionInfoList = #[
296 new InstructionApplyActions(#[
297 new ActionNxResubmit(17 as short)
301 new MatchEthernetType(2054L),
302 new MatchArpSha(new MacAddress("0D:AA:D8:42:30:F3")),
303 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
306 tableId = 211 as short
312 protected def fixedIngressFlowsPort2() {
314 new FlowEntity(123bi) => [
316 flowId = "Ingress_DHCP_Server_v4123_987__Permit_"
318 instructionInfoList = #[
319 new InstructionApplyActions(#[
320 new ActionNxResubmit(220 as short)
324 new MatchEthernetType(2048L),
325 new MatchIpProtocol(17 as short),
326 new MatchUdpDestinationPort(68),
327 new MatchUdpSourcePort(67),
328 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
331 tableId = 241 as short
333 new FlowEntity(123bi) => [
335 flowId = "Ingress_DHCP_Server_v6_123_987___Permit_"
337 instructionInfoList = #[
338 new InstructionApplyActions(#[
339 new ActionNxResubmit(220 as short)
343 new MatchEthernetType(34525L),
344 new MatchIpProtocol(17 as short),
345 new MatchUdpDestinationPort(546),
346 new MatchUdpSourcePort(547),
347 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
350 tableId = 241 as short
352 new FlowEntity(123bi) => [
354 flowId = "Ingress_ICMPv6_123_987_130_Permit_"
356 instructionInfoList = #[
357 new InstructionApplyActions(#[
358 new ActionNxResubmit(220 as short)
362 new MatchEthernetType(34525L),
363 new MatchIpProtocol(58 as short),
364 new MatchIcmpv6(130 as short, 0 as short),
365 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
368 tableId = 241 as short
370 new FlowEntity(123bi) => [
372 flowId = "Ingress_ICMPv6_123_987_135_Permit_"
374 instructionInfoList = #[
375 new InstructionApplyActions(#[
376 new ActionNxResubmit(220 as short)
380 new MatchEthernetType(34525L),
381 new MatchIpProtocol(58 as short),
382 new MatchIcmpv6(135 as short, 0 as short),
383 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
386 tableId = 241 as short
388 new FlowEntity(123bi) => [
390 flowId = "Ingress_ICMPv6_123_987_136_Permit_"
392 instructionInfoList = #[
393 new InstructionApplyActions(#[
394 new ActionNxResubmit(220 as short)
398 new MatchEthernetType(34525L),
399 new MatchIpProtocol(58 as short),
400 new MatchIcmpv6(136 as short, 0 as short),
401 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
404 tableId = 241 as short
406 new FlowEntity(123bi) => [
408 flowId = "Ingress_ARP_123_987"
410 instructionInfoList = #[
411 new InstructionApplyActions(#[
412 new ActionNxResubmit(220 as short)
416 new MatchEthernetType(2054L),
417 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
420 tableId = 241 as short
425 protected def fixedEgressFlowsPort2 () {
427 new FlowEntity(123bi) => [
429 flowId = "Egress_DHCP_Client_v4123_987__Permit_"
431 instructionInfoList = #[
432 new InstructionApplyActions(#[
433 new ActionNxResubmit(17 as short)
437 new MatchEthernetType(2048L),
438 new MatchIpProtocol(17 as short),
439 new MatchUdpDestinationPort(67 as short),
440 new MatchUdpSourcePort(68 as short),
441 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
444 tableId = 211 as short
446 new FlowEntity(123bi) => [
448 flowId = "Egress_DHCP_Client_v6_123_987__Permit_"
450 instructionInfoList = #[
451 new InstructionApplyActions(#[
452 new ActionNxResubmit(17 as short)
456 new MatchEthernetType(34525L),
457 new MatchIpProtocol(17 as short),
458 new MatchUdpDestinationPort(547 as short),
459 new MatchUdpSourcePort(546 as short),
460 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
463 tableId = 211 as short
465 new FlowEntity(123bi) => [
467 flowId = "Egress_DHCP_Server_v4123_987__Drop_"
469 instructionInfoList = #[
472 new MatchEthernetType(2048L),
473 new MatchIpProtocol(17 as short),
474 new MatchUdpDestinationPort(68 as short),
475 new MatchUdpSourcePort(67 as short),
476 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
479 tableId = 211 as short
481 new FlowEntity(123bi) => [
483 flowId = "Egress_DHCP_Server_v6_123_987__Drop_"
485 instructionInfoList = #[
488 new MatchEthernetType(34525L),
489 new MatchIpProtocol(17 as short),
490 new MatchUdpDestinationPort(546 as short),
491 new MatchUdpSourcePort(547 as short),
492 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
495 tableId = 211 as short
497 new FlowEntity(123bi) => [
499 flowId = "Egress_ICMPv6_123_987_134_Drop_"
501 instructionInfoList = #[
504 new MatchEthernetType(34525L),
505 new MatchIpProtocol(58 as short),
506 new MatchIcmpv6(134 as short, 0 as short),
507 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
510 tableId = 211 as short
512 new FlowEntity(123bi) => [
514 flowId = "Egress_ICMPv6_123_987_133_Permit_"
516 instructionInfoList = #[
517 new InstructionApplyActions(#[
518 new ActionNxResubmit(17 as short)
522 new MatchEthernetType(34525L),
523 new MatchIpProtocol(58 as short),
524 new MatchIcmpv6(133 as short, 0 as short),
525 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
528 tableId = 211 as short
530 new FlowEntity(123bi) => [
532 flowId = "Egress_ICMPv6_123_987_135_Permit_"
534 instructionInfoList = #[
535 new InstructionApplyActions(#[
536 new ActionNxResubmit(17 as short)
540 new MatchEthernetType(34525L),
541 new MatchIpProtocol(58 as short),
542 new MatchIcmpv6(135 as short, 0 as short),
543 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
546 tableId = 211 as short
548 new FlowEntity(123bi) => [
550 flowId = "Egress_ICMPv6_123_987_136_Permit_"
552 instructionInfoList = #[
553 new InstructionApplyActions(#[
554 new ActionNxResubmit(17 as short)
558 new MatchEthernetType(34525L),
559 new MatchIpProtocol(58 as short),
560 new MatchIcmpv6(136 as short, 0 as short),
561 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
564 tableId = 211 as short
566 new FlowEntity(123bi) => [
568 flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F4"
570 instructionInfoList = #[
571 new InstructionApplyActions(#[
572 new ActionNxResubmit(17 as short)
576 new MatchEthernetType(2054L),
577 new MatchArpSha(new MacAddress("0D:AA:D8:42:30:F4")),
578 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
581 tableId = 211 as short
587 protected def fixedIngressFlowsPort3() {
589 new FlowEntity(123bi) => [
591 flowId = "Ingress_DHCP_Server_v4123_987__Permit_"
593 instructionInfoList = #[
594 new InstructionApplyActions(#[
595 new ActionNxResubmit(220 as short)
599 new MatchEthernetType(2048L),
600 new MatchIpProtocol(17 as short),
601 new MatchUdpDestinationPort(68),
602 new MatchUdpSourcePort(67),
603 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
606 tableId = 241 as short
608 new FlowEntity(123bi) => [
610 flowId = "Ingress_DHCP_Server_v6_123_987___Permit_"
612 instructionInfoList = #[
613 new InstructionApplyActions(#[
614 new ActionNxResubmit(220 as short)
618 new MatchEthernetType(34525L),
619 new MatchIpProtocol(17 as short),
620 new MatchUdpDestinationPort(546),
621 new MatchUdpSourcePort(547),
622 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
625 tableId = 241 as short
627 new FlowEntity(123bi) => [
629 flowId = "Ingress_ICMPv6_123_987_130_Permit_"
631 instructionInfoList = #[
632 new InstructionApplyActions(#[
633 new ActionNxResubmit(220 as short)
637 new MatchEthernetType(34525L),
638 new MatchIpProtocol(58 as short),
639 new MatchIcmpv6(130 as short, 0 as short),
640 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
643 tableId = 241 as short
645 new FlowEntity(123bi) => [
647 flowId = "Ingress_ICMPv6_123_987_135_Permit_"
649 instructionInfoList = #[
650 new InstructionApplyActions(#[
651 new ActionNxResubmit(220 as short)
655 new MatchEthernetType(34525L),
656 new MatchIpProtocol(58 as short),
657 new MatchIcmpv6(135 as short, 0 as short),
658 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
661 tableId = 241 as short
663 new FlowEntity(123bi) => [
665 flowId = "Ingress_ICMPv6_123_987_136_Permit_"
667 instructionInfoList = #[
668 new InstructionApplyActions(#[
669 new ActionNxResubmit(220 as short)
673 new MatchEthernetType(34525L),
674 new MatchIpProtocol(58 as short),
675 new MatchIcmpv6(136 as short, 0 as short),
676 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
679 tableId = 241 as short
681 new FlowEntity(123bi) => [
683 flowId = "Ingress_ARP_123_987"
685 instructionInfoList = #[
686 new InstructionApplyActions(#[
687 new ActionNxResubmit(220 as short)
691 new MatchEthernetType(2054L),
692 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
695 tableId = 241 as short
700 protected def fixedEgressFlowsPort3 () {
702 new FlowEntity(123bi) => [
704 flowId = "Egress_DHCP_Client_v4123_987__Permit_"
706 instructionInfoList = #[
707 new InstructionApplyActions(#[
708 new ActionNxResubmit(17 as short)
712 new MatchEthernetType(2048L),
713 new MatchIpProtocol(17 as short),
714 new MatchUdpDestinationPort(67),
715 new MatchUdpSourcePort(68),
716 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
719 tableId = 211 as short
721 new FlowEntity(123bi) => [
723 flowId = "Egress_DHCP_Client_v6_123_987__Permit_"
725 instructionInfoList = #[
726 new InstructionApplyActions(#[
727 new ActionNxResubmit(17 as short)
731 new MatchEthernetType(34525L),
732 new MatchIpProtocol(17 as short),
733 new MatchUdpDestinationPort(547),
734 new MatchUdpSourcePort(546),
735 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
738 tableId = 211 as short
740 new FlowEntity(123bi) => [
742 flowId = "Egress_DHCP_Server_v4123_987__Drop_"
744 instructionInfoList = #[
747 new MatchEthernetType(2048L),
748 new MatchIpProtocol(17 as short),
749 new MatchUdpDestinationPort(68),
750 new MatchUdpSourcePort(67),
751 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
754 tableId = 211 as short
756 new FlowEntity(123bi) => [
758 flowId = "Egress_DHCP_Server_v6_123_987__Drop_"
760 instructionInfoList = #[
763 new MatchEthernetType(34525L),
764 new MatchIpProtocol(17 as short),
765 new MatchUdpDestinationPort(546),
766 new MatchUdpSourcePort(547),
767 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
770 tableId = 211 as short
772 new FlowEntity(123bi) => [
774 flowId = "Egress_ICMPv6_123_987_134_Drop_"
776 instructionInfoList = #[
779 new MatchEthernetType(34525L),
780 new MatchIpProtocol(58 as short),
781 new MatchIcmpv6(134 as short, 0 as short),
782 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
785 tableId = 211 as short
787 new FlowEntity(123bi) => [
789 flowId = "Egress_ICMPv6_123_987_133_Permit_"
791 instructionInfoList = #[
792 new InstructionApplyActions(#[
793 new ActionNxResubmit(17 as short)
797 new MatchEthernetType(34525L),
798 new MatchIpProtocol(58 as short),
799 new MatchIcmpv6(133 as short, 0 as short),
800 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
803 tableId = 211 as short
805 new FlowEntity(123bi) => [
807 flowId = "Egress_ICMPv6_123_987_135_Permit_"
809 instructionInfoList = #[
810 new InstructionApplyActions(#[
811 new ActionNxResubmit(17 as short)
815 new MatchEthernetType(34525L),
816 new MatchIpProtocol(58 as short),
817 new MatchIcmpv6(135 as short, 0 as short),
818 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
821 tableId = 211 as short
823 new FlowEntity(123bi) => [
825 flowId = "Egress_ICMPv6_123_987_136_Permit_"
827 instructionInfoList = #[
828 new InstructionApplyActions(#[
829 new ActionNxResubmit(17 as short)
833 new MatchEthernetType(34525L),
834 new MatchIpProtocol(58 as short),
835 new MatchIcmpv6(136 as short, 0 as short),
836 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
839 tableId = 211 as short
841 new FlowEntity(123bi) => [
843 flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F5"
845 instructionInfoList = #[
846 new InstructionApplyActions(#[
847 new ActionNxResubmit(17 as short)
851 new MatchEthernetType(2054L),
852 new MatchArpSha(new MacAddress("0D:AA:D8:42:30:F5")),
853 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
856 tableId = 211 as short
861 static def fixedIngressFlowsPort4() {
863 new FlowEntity(123bi) => [
865 flowId = "Ingress_DHCP_Server_v4123_987__Permit_"
867 instructionInfoList = #[
868 new InstructionApplyActions(#[
869 new ActionNxResubmit(220 as short)
873 new MatchEthernetType(2048L),
874 new MatchIpProtocol(17 as short),
875 new MatchUdpDestinationPort(68),
876 new MatchUdpSourcePort(67),
877 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
880 tableId = 241 as short
882 new FlowEntity(123bi) => [
884 flowId = "Ingress_DHCP_Server_v6_123_987___Permit_"
886 instructionInfoList = #[
887 new InstructionApplyActions(#[
888 new ActionNxResubmit(220 as short)
892 new MatchEthernetType(34525L),
893 new MatchIpProtocol(17 as short),
894 new MatchUdpDestinationPort(546),
895 new MatchUdpSourcePort(547),
896 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
899 tableId = 241 as short
901 new FlowEntity(123bi) => [
903 flowId = "Ingress_ICMPv6_123_987_130_Permit_"
905 instructionInfoList = #[
906 new InstructionApplyActions(#[
907 new ActionNxResubmit(220 as short)
911 new MatchEthernetType(34525L),
912 new MatchIpProtocol(58 as short),
913 new MatchIcmpv6(130 as short, 0 as short),
914 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
917 tableId = 241 as short
919 new FlowEntity(123bi) => [
921 flowId = "Ingress_ICMPv6_123_987_135_Permit_"
923 instructionInfoList = #[
924 new InstructionApplyActions(#[
925 new ActionNxResubmit(220 as short)
929 new MatchEthernetType(34525L),
930 new MatchIpProtocol(58 as short),
931 new MatchIcmpv6(135 as short, 0 as short),
932 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
935 tableId = 241 as short
937 new FlowEntity(123bi) => [
939 flowId = "Ingress_ICMPv6_123_987_136_Permit_"
941 instructionInfoList = #[
942 new InstructionApplyActions(#[
943 new ActionNxResubmit(220 as short)
947 new MatchEthernetType(34525L),
948 new MatchIpProtocol(58 as short),
949 new MatchIcmpv6(136 as short, 0 as short),
950 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
953 tableId = 241 as short
955 new FlowEntity(123bi) => [
957 flowId = "Ingress_ARP_123_987"
959 instructionInfoList = #[
960 new InstructionApplyActions(#[
961 new ActionNxResubmit(220 as short)
965 new MatchEthernetType(2054L),
966 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
969 tableId = 241 as short
974 static def fixedEgressFlowsPort4 () {
976 new FlowEntity(123bi) => [
978 flowId = "Egress_DHCP_Client_v4123_987__Permit_"
980 instructionInfoList = #[
981 new InstructionApplyActions(#[
982 new ActionNxResubmit(17 as short)
986 new MatchEthernetType(2048L),
987 new MatchIpProtocol(17 as short),
988 new MatchUdpDestinationPort(67),
989 new MatchUdpSourcePort(68),
990 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
993 tableId = 211 as short
995 new FlowEntity(123bi) => [
997 flowId = "Egress_DHCP_Client_v6_123_987__Permit_"
999 instructionInfoList = #[
1000 new InstructionApplyActions(#[
1001 new ActionNxResubmit(17 as short)
1005 new MatchEthernetType(34525L),
1006 new MatchIpProtocol(17 as short),
1007 new MatchUdpDestinationPort(547),
1008 new MatchUdpSourcePort(546),
1009 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1012 tableId = 211 as short
1014 new FlowEntity(123bi) => [
1015 cookie = 110100480bi
1016 flowId = "Egress_DHCP_Server_v4123_987__Drop_"
1018 instructionInfoList = #[
1021 new MatchEthernetType(2048L),
1022 new MatchIpProtocol(17 as short),
1023 new MatchUdpDestinationPort(68),
1024 new MatchUdpSourcePort(67),
1025 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1028 tableId = 211 as short
1030 new FlowEntity(123bi) => [
1031 cookie = 110100480bi
1032 flowId = "Egress_DHCP_Server_v6_123_987__Drop_"
1034 instructionInfoList = #[
1037 new MatchEthernetType(34525L),
1038 new MatchIpProtocol(17 as short),
1039 new MatchUdpDestinationPort(546),
1040 new MatchUdpSourcePort(547),
1041 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1044 tableId = 211 as short
1046 new FlowEntity(123bi) => [
1047 cookie = 110100480bi
1048 flowId = "Egress_ICMPv6_123_987_134_Drop_"
1050 instructionInfoList = #[
1053 new MatchEthernetType(34525L),
1054 new MatchIpProtocol(58 as short),
1055 new MatchIcmpv6(134 as short, 0 as short),
1056 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1059 tableId = 211 as short
1061 new FlowEntity(123bi) => [
1062 cookie = 110100480bi
1063 flowId = "Egress_ICMPv6_123_987_133_Permit_"
1065 instructionInfoList = #[
1066 new InstructionApplyActions(#[
1067 new ActionNxResubmit(17 as short)
1071 new MatchEthernetType(34525L),
1072 new MatchIpProtocol(58 as short),
1073 new MatchIcmpv6(133 as short, 0 as short),
1074 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1077 tableId = 211 as short
1079 new FlowEntity(123bi) => [
1080 cookie = 110100480bi
1081 flowId = "Egress_ICMPv6_123_987_135_Permit_"
1083 instructionInfoList = #[
1084 new InstructionApplyActions(#[
1085 new ActionNxResubmit(17 as short)
1089 new MatchEthernetType(34525L),
1090 new MatchIpProtocol(58 as short),
1091 new MatchIcmpv6(135 as short, 0 as short),
1092 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1095 tableId = 211 as short
1097 new FlowEntity(123bi) => [
1098 cookie = 110100480bi
1099 flowId = "Egress_ICMPv6_123_987_136_Permit_"
1101 instructionInfoList = #[
1102 new InstructionApplyActions(#[
1103 new ActionNxResubmit(17 as short)
1107 new MatchEthernetType(34525L),
1108 new MatchIpProtocol(58 as short),
1109 new MatchIcmpv6(136 as short, 0 as short),
1110 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1113 tableId = 211 as short
1115 new FlowEntity(123bi) => [
1116 cookie = 110100480bi
1117 flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F6"
1119 instructionInfoList = #[
1120 new InstructionApplyActions(#[
1121 new ActionNxResubmit(17 as short)
1125 new MatchEthernetType(2054L),
1126 new MatchArpSha(new MacAddress("0D:AA:D8:42:30:F6")),
1127 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1130 tableId = 211 as short
1132 new FlowEntity(123bi) => [
1133 cookie = 110100480bi
1134 flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F6"
1136 instructionInfoList = #[
1137 new InstructionApplyActions(#[
1138 new ActionNxResubmit(17 as short)
1142 new MatchEthernetType(2054L),
1143 new MatchArpSha(new MacAddress("0D:AA:D8:42:30:F6")),
1144 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1147 tableId = 211 as short
1152 protected def remoteFlows() {
1153 remoteIngressFlowsPort1
1154 + remoteIngressFlowsPort1
1155 + remoteIngressFlowsPort1
1156 + remoteEgressFlowsPort1
1157 + remoteEgressFlowsPort1
1158 + remoteEgressFlowsPort1
1159 + remoteIngressFlowsPort2
1160 + remoteIngressFlowsPort2
1161 + remoteEgressFlowsPort2
1162 + remoteEgressFlowsPort2
1165 protected def remoteIngressFlowsPort1() {
1167 remoteIngressFlowsPort("10.0.0.1")
1171 protected def remoteIngressFlowsPort2() {
1173 remoteIngressFlowsPort("10.0.0.2")
1177 protected def remoteEgressFlowsPort1() {
1179 remoteEgressFlowsPort("10.0.0.1")
1183 protected def remoteEgressFlowsPort2() {
1185 remoteEgressFlowsPort("10.0.0.2")
1189 protected def remoteIngressFlowsPort(String ip) {
1190 new FlowEntity(123bi) => [
1191 cookie = 110100480bi
1192 flowId = "Acl_Filter_Ingress_" + ip + "/32_5000"
1194 instructionInfoList = #[
1195 new InstructionWriteMetadata(4bi, 16777214bi),
1196 new InstructionGotoTable(213 as short)
1199 new MatchMetadata(83886080000bi, 1099494850560bi),
1200 new MatchEthernetType(2048L),
1201 new MatchIpv4Destination(ip, "32")
1204 tableId = 212 as short
1208 protected def remoteEgressFlowsPort(String ip) {
1209 new FlowEntity(123bi) => [
1210 cookie = 110100480bi
1211 flowId = "Acl_Filter_Egress_" + ip + "/32_5000"
1213 instructionInfoList = #[
1214 new InstructionWriteMetadata(4bi, 16777214bi),
1215 new InstructionGotoTable(243 as short)
1218 new MatchMetadata(83886080000bi, 1099494850560bi),
1219 new MatchEthernetType(2048L),
1220 new MatchIpv4Source(ip, "32")
1223 tableId = 242 as short
1227 protected def expectedFlows(String mac) {
1228 // Code auto. generated by https://github.com/vorburger/xtendbeans
1230 new FlowEntity(123bi) => [
1231 cookie = 110100480bi
1232 flowId = "Ingress_DHCP_Server_v4123_987__Permit_"
1234 instructionInfoList = #[
1235 new InstructionApplyActions(#[
1236 new ActionNxResubmit(220 as short)
1240 new MatchEthernetType(2048L),
1241 new MatchIpProtocol(17 as short),
1242 new MatchUdpDestinationPort(68),
1243 new MatchUdpSourcePort(67),
1244 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1247 tableId = 241 as short
1249 new FlowEntity(123bi) => [
1250 cookie = 110100480bi
1251 flowId = "Ingress_DHCP_Server_v6_123_987___Permit_"
1253 instructionInfoList = #[
1254 new InstructionApplyActions(#[
1255 new ActionNxResubmit(220 as short)
1259 new MatchEthernetType(34525L),
1260 new MatchIpProtocol(17 as short),
1261 new MatchUdpDestinationPort(546),
1262 new MatchUdpSourcePort(547),
1263 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1266 tableId = 241 as short
1268 new FlowEntity(123bi) => [
1269 cookie = 110100480bi
1270 flowId = "Ingress_ICMPv6_123_987_130_Permit_"
1272 instructionInfoList = #[
1273 new InstructionApplyActions(#[
1274 new ActionNxResubmit(220 as short)
1278 new MatchEthernetType(34525L),
1279 new MatchIpProtocol(58 as short),
1280 new MatchIcmpv6(130 as short, 0 as short),
1281 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1284 tableId = 241 as short
1286 new FlowEntity(123bi) => [
1287 cookie = 110100480bi
1288 flowId = "Ingress_ICMPv6_123_987_135_Permit_"
1290 instructionInfoList = #[
1291 new InstructionApplyActions(#[
1292 new ActionNxResubmit(220 as short)
1296 new MatchEthernetType(34525L),
1297 new MatchIpProtocol(58 as short),
1298 new MatchIcmpv6(135 as short, 0 as short),
1299 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1302 tableId = 241 as short
1304 new FlowEntity(123bi) => [
1305 cookie = 110100480bi
1306 flowId = "Ingress_ICMPv6_123_987_136_Permit_"
1308 instructionInfoList = #[
1309 new InstructionApplyActions(#[
1310 new ActionNxResubmit(220 as short)
1314 new MatchEthernetType(34525L),
1315 new MatchIpProtocol(58 as short),
1316 new MatchIcmpv6(136 as short, 0 as short),
1317 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1320 tableId = 241 as short
1322 new FlowEntity(123bi) => [
1323 cookie = 110100480bi
1324 flowId = "Ingress_ARP_123_987"
1326 instructionInfoList = #[
1327 new InstructionApplyActions(#[
1328 new ActionNxResubmit(220 as short)
1332 new MatchEthernetType(2054L),
1333 new NxMatchRegister(NxmNxReg6, 252672L, 268435200L)
1336 tableId = 241 as short
1338 new FlowEntity(123bi) => [
1339 cookie = 110100480bi
1340 flowId = "Egress_DHCP_Client_v4123_987__Permit_"
1342 instructionInfoList = #[
1343 new InstructionApplyActions(#[
1344 new ActionNxResubmit(17 as short)
1348 new MatchEthernetType(2048L),
1349 new MatchIpProtocol(17 as short),
1350 new MatchUdpDestinationPort(67),
1351 new MatchUdpSourcePort(68),
1352 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1355 tableId = 211 as short
1357 new FlowEntity(123bi) => [
1358 cookie = 110100480bi
1359 flowId = "Egress_DHCP_Client_v6_123_987__Permit_"
1361 instructionInfoList = #[
1362 new InstructionApplyActions(#[
1363 new ActionNxResubmit(17 as short)
1367 new MatchEthernetType(34525L),
1368 new MatchIpProtocol(17 as short),
1369 new MatchUdpDestinationPort(547),
1370 new MatchUdpSourcePort(546),
1371 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1374 tableId = 211 as short
1376 new FlowEntity(123bi) => [
1377 cookie = 110100480bi
1378 flowId = "Egress_DHCP_Server_v4123_987__Drop_"
1380 instructionInfoList = #[
1383 new MatchEthernetType(2048L),
1384 new MatchIpProtocol(17 as short),
1385 new MatchUdpDestinationPort(68),
1386 new MatchUdpSourcePort(67),
1387 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1390 tableId = 211 as short
1392 new FlowEntity(123bi) => [
1393 cookie = 110100480bi
1394 flowId = "Egress_DHCP_Server_v6_123_987__Drop_"
1396 instructionInfoList = #[
1399 new MatchEthernetType(34525L),
1400 new MatchIpProtocol(17 as short),
1401 new MatchUdpDestinationPort(546),
1402 new MatchUdpSourcePort(547),
1403 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1406 tableId = 211 as short
1408 new FlowEntity(123bi) => [
1409 cookie = 110100480bi
1410 flowId = "Egress_ICMPv6_123_987_134_Drop_"
1412 instructionInfoList = #[
1415 new MatchEthernetType(34525L),
1416 new MatchIpProtocol(58 as short),
1417 new MatchIcmpv6(134 as short, 0 as short),
1418 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1421 tableId = 211 as short
1423 new FlowEntity(123bi) => [
1424 cookie = 110100480bi
1425 flowId = "Egress_ICMPv6_123_987_133_Permit_"
1427 instructionInfoList = #[
1428 new InstructionApplyActions(#[
1429 new ActionNxResubmit(17 as short)
1433 new MatchEthernetType(34525L),
1434 new MatchIpProtocol(58 as short),
1435 new MatchIcmpv6(133 as short, 0 as short),
1436 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1439 tableId = 211 as short
1441 new FlowEntity(123bi) => [
1442 cookie = 110100480bi
1443 flowId = "Egress_ICMPv6_123_987_135_Permit_"
1445 instructionInfoList = #[
1446 new InstructionApplyActions(#[
1447 new ActionNxResubmit(17 as short)
1451 new MatchEthernetType(34525L),
1452 new MatchIpProtocol(58 as short),
1453 new MatchIcmpv6(135 as short, 0 as short),
1454 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1457 tableId = 211 as short
1459 new FlowEntity(123bi) => [
1460 cookie = 110100480bi
1461 flowId = "Egress_ICMPv6_123_987_136_Permit_"
1463 instructionInfoList = #[
1464 new InstructionApplyActions(#[
1465 new ActionNxResubmit(17 as short)
1469 new MatchEthernetType(34525L),
1470 new MatchIpProtocol(58 as short),
1471 new MatchIcmpv6(136 as short, 0 as short),
1472 new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG)
1475 tableId = 211 as short
1477 new FlowEntity(123bi) => [
1478 cookie = 110100480bi
1479 flowId = "Egress_ARP_123_987_" + mac
1481 instructionInfoList = #[
1482 new InstructionApplyActions(#[
1483 new ActionNxResubmit
1487 new MatchEthernetType(2054L),
1488 new MatchArpSha(new MacAddress(mac)),
1489 new MatchMetadata(1085217976614912bi, 1152920405095219200bi)
1492 tableId = 211 as short