*/
package org.opendaylight.netvirt.aclservice.tests
+import org.opendaylight.genius.mdsalutil.FlowEntityBuilder
+import org.opendaylight.genius.mdsalutil.MetaDataUtil
import org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit
-import org.opendaylight.genius.mdsalutil.FlowEntity
import org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions
-import org.opendaylight.genius.mdsalutil.instructions.InstructionWriteMetadata
import org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable
+import org.opendaylight.genius.mdsalutil.instructions.InstructionWriteMetadata
import org.opendaylight.genius.mdsalutil.matches.MatchArpSha
import org.opendaylight.genius.mdsalutil.matches.MatchEthernetType
import org.opendaylight.genius.mdsalutil.matches.MatchIcmpv6
import org.opendaylight.genius.mdsalutil.matches.MatchIpProtocol
import org.opendaylight.genius.mdsalutil.matches.MatchIpv4Destination
import org.opendaylight.genius.mdsalutil.matches.MatchIpv4Source
+import org.opendaylight.genius.mdsalutil.matches.MatchMetadata
import org.opendaylight.genius.mdsalutil.matches.MatchUdpDestinationPort
import org.opendaylight.genius.mdsalutil.matches.MatchUdpSourcePort
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress
import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchRegister
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg6
-import org.opendaylight.genius.mdsalutil.MetaDataUtil
-import org.opendaylight.genius.mdsalutil.matches.MatchMetadata
+
+import static extension org.opendaylight.mdsal.binding.testutils.XtendBuilderExtensions.operator_doubleGreaterThan
class FlowEntryObjectsBase {
protected def fixedIngressFlowsPort1() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_DHCP_Server_v4123_987__Permit_"
- flowName = "ACL"
- instructionInfoList = #[
- new InstructionApplyActions(#[
- new ActionNxResubmit(220 as short)
- ])
- ]
+ flowName = "ACL"
+ instructionInfoList = #[
+ new InstructionApplyActions(#[
+ new ActionNxResubmit(220 as short)
+ ])
+ ]
matchInfoList = #[
new MatchEthernetType(2048L),
new MatchIpProtocol(17 as short),
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_DHCP_Server_v6_123_987___Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_130_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_135_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_136_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ARP_123_987"
flowName = "ACL"
protected def fixedEgressFlowsPort1() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Client_v4123_987__Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Client_v6_123_987__Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Server_v4123_987__Drop_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Server_v6_123_987__Drop_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_134_Drop_"
flowName = "ACL"
priority = 63020
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_133_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_135_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_136_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F3"
flowName = "ACL"
protected def fixedIngressFlowsPort2() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_DHCP_Server_v4123_987__Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_DHCP_Server_v6_123_987___Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_130_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_135_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_136_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ARP_123_987"
flowName = "ACL"
protected def fixedEgressFlowsPort2 () {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Client_v4123_987__Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Client_v6_123_987__Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Server_v4123_987__Drop_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Server_v6_123_987__Drop_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_134_Drop_"
flowName = "ACL"
priority = 63020
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_133_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_135_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_136_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F4"
flowName = "ACL"
protected def fixedIngressFlowsPort3() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_DHCP_Server_v4123_987__Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_DHCP_Server_v6_123_987___Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_130_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_135_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_136_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ARP_123_987"
flowName = "ACL"
protected def fixedEgressFlowsPort3 () {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Client_v4123_987__Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Client_v6_123_987__Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Server_v4123_987__Drop_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Server_v6_123_987__Drop_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_134_Drop_"
flowName = "ACL"
priority = 63020
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_133_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_135_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_136_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F5"
flowName = "ACL"
static def fixedIngressFlowsPort4() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_DHCP_Server_v4123_987__Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_DHCP_Server_v6_123_987___Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_130_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_135_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_136_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ARP_123_987"
flowName = "ACL"
static def fixedEgressFlowsPort4 () {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Client_v4123_987__Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Client_v6_123_987__Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Server_v4123_987__Drop_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Server_v6_123_987__Drop_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_134_Drop_"
flowName = "ACL"
priority = 63020
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_133_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_135_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_136_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F6"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F6"
flowName = "ACL"
}
protected def remoteIngressFlowsPort(String ip) {
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Acl_Filter_Ingress_" + ip + "/32_5000"
flowName = "ACL"
}
protected def remoteEgressFlowsPort(String ip) {
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Acl_Filter_Egress_" + ip + "/32_5000"
flowName = "ACL"
protected def expectedFlows(String mac) {
// Code auto. generated by https://github.com/vorburger/xtendbeans
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_DHCP_Server_v4123_987__Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_DHCP_Server_v6_123_987___Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_130_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_135_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_136_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ARP_123_987"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Client_v4123_987__Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Client_v6_123_987__Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Server_v4123_987__Drop_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Server_v6_123_987__Drop_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_134_Drop_"
flowName = "ACL"
priority = 63020
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_133_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_135_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_136_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ARP_123_987_" + mac
flowName = "ACL"
*/
package org.opendaylight.netvirt.aclservice.tests
-import org.opendaylight.genius.mdsalutil.FlowEntity
import org.opendaylight.genius.mdsalutil.MetaDataUtil
import org.opendaylight.genius.mdsalutil.NwConstants
import org.opendaylight.genius.mdsalutil.actions.ActionDrop
import org.opendaylight.genius.mdsalutil.actions.ActionNxConntrack
import org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit
+import org.opendaylight.genius.mdsalutil.actions.ActionDrop
import org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions
import org.opendaylight.genius.mdsalutil.matches.MatchArpSha
import org.opendaylight.genius.mdsalutil.matches.MatchEthernetDestination
import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchRegister
import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchTcpDestinationPort
import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchUdpDestinationPort
+import org.opendaylight.genius.mdsalutil.FlowEntityBuilder
+import org.opendaylight.genius.mdsalutil.MetaDataUtil
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress
+import org.opendaylight.genius.mdsalutil.NwConstants
+import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchRegister
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg6
+import org.opendaylight.genius.mdsalutil.matches.MatchMetadata
+
+import static extension org.opendaylight.mdsal.binding.testutils.XtendBuilderExtensions.operator_doubleGreaterThan
class FlowEntryObjectsStateful extends FlowEntryObjectsBase {
protected def aapIpv4AllFlowsPort2() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F4_0.0.0.0/0_Recirc"
flowName = "ACL"
priority = 61010
tableId = NwConstants.INGRESS_ACL_TABLE
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F4_0.0.0.0/0_Recirc"
flowName = "ACL"
priority = 61010
tableId = NwConstants.EGRESS_ACL_TABLE
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:F4"
flowName = "ACL"
protected def aapFlowsPort2() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F4_10.0.0.100/32_Recirc"
flowName = "ACL"
priority = 61010
tableId = NwConstants.INGRESS_ACL_TABLE
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F4_10.0.0.100/32_Recirc"
flowName = "ACL"
priority = 61010
tableId = NwConstants.EGRESS_ACL_TABLE
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:A4_10.0.0.101/32_Recirc"
flowName = "ACL"
priority = 61010
tableId = NwConstants.INGRESS_ACL_TABLE
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:A4_10.0.0.101/32_Recirc"
flowName = "ACL"
priority = 61010
tableId = NwConstants.EGRESS_ACL_TABLE
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ARP_123_987_0D:AA:D8:42:30:A4"
flowName = "ACL"
protected def fixedConntrackIngressFlowsPort1() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F3_10.0.0.1/32_Recirc"
flowName = "ACL"
priority = 61010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
flowName = "ACL"
priority = 50
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
flowName = "ACL"
}
protected def etherIngressFlowsPort2() {
+ val theFlowId = "ETHERnull_remoteACL_id_85cc3048-abc3-43cc-89b3-377341426ac5Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ETHERnull_remoteACL_id_85cc3048-abc3-43cc-89b3-377341426ac5"
- +"Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 243 as short
]
]
protected def fixedConntrackEgressFlowsPort1() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F3_10.0.0.1/32_Recirc"
flowName = "ACL"
priority = 61010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
flowName = "ACL"
priority = 50
tableId = 243 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
flowName = "ACL"
protected def fixedConntrackIngressFlowsPort2() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F4_10.0.0.2/32_Recirc"
flowName = "ACL"
priority = 61010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
flowName = "ACL"
priority = 50
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
flowName = "ACL"
protected def fixedConntrackEgressFlowsPort2() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F4_10.0.0.2/32_Recirc"
flowName = "ACL"
priority = 61010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
flowName = "ACL"
priority = 50
tableId = 243 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
flowName = "ACL"
protected def fixedConntrackIngressFlowsPort3() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F5_10.0.0.3/32_Recirc"
flowName = "ACL"
priority = 61010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
flowName = "ACL"
priority = 50
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
flowName = "ACL"
protected def fixedConntrackEgressFlowsPort3() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F5_10.0.0.3/32_Recirc"
flowName = "ACL"
priority = 61010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
flowName = "ACL"
priority = 50
tableId = 243 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
flowName = "ACL"
static def fixedConntrackIngressFlowsPort4() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F6_10.0.0.4/32_Recirc"
flowName = "ACL"
priority = 61010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F6_0.0.0.0/0_Recirc"
flowName = "ACL"
priority = 61010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
flowName = "ACL"
priority = 50
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
flowName = "ACL"
static def fixedConntrackEgressFlowsPort4() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F6_10.0.0.4/32_Recirc"
flowName = "ACL"
priority = 61010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F6_0.0.0.0/0_Recirc"
flowName = "ACL"
priority = 61010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
flowName = "ACL"
priority = 50
tableId = 243 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
flowName = "ACL"
}
protected def etherEgressFlowsPort1() {
+ val theFlowId = "ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 213 as short
]
]
}
protected def etheregressFlowPort2() {
+ val theFlowId = "ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 213 as short
]
]
}
protected def tcpIngressFlowPort1() {
+ val theFlowId = "TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 243 as short
]
]
}
protected def tcpIngressFlowPort2() {
+ val theFlowId = "TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 243 as short
]
]
}
protected def tcpEgressFlowPort2() {
+ val theFlowId = "TCP_DESTINATION_80_65535_remoteACL_id_85cc3048-abc3-43cc-89b3-377341426ac5Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_80_65535_remoteACL_id_85cc3048-abc3-43cc-89b3-377341426ac5"
- +"Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 213 as short
]
]
}
protected def udpEgressFlowsPort1() {
+ val theFlowId = "UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 213 as short
]
]
}
protected def udpIngressFlowsPort2() {
+ val theFlowId = "UDP_DESTINATION_80_65535_remoteACL_id_85cc3048-abc3-43cc-89b3-377341426ac5Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "UDP_DESTINATION_80_65535_remoteACL_id_85cc3048-abc3-43cc-89b3-377341426ac5"
- +"Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 243 as short
]
]
}
protected def udpEgressFlowsPort2() {
+ val theFlowId = "UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 213 as short
]
]
}
protected def icmpIngressFlowsPort1() {
+ val theFlowId = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 243 as short
]
]
}
protected def icmpIngressFlowsPort2() {
+ val theFlowId = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 243 as short
]
]
}
protected def icmpEgressFlowsPort2() {
+ val theFlowId = "ICMP_V4_DESTINATION_23__remoteACL_id_85cc3048-abc3-43cc-89b3-377341426ac5Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ICMP_V4_DESTINATION_23__remoteACL_id_85cc3048-abc3-43cc-89b3-377341426ac5"
- +"Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 213 as short
]
]
}
protected def udpIngressPortRangeFlows() {
+ val theFlowId = "UDP_DESTINATION_2000_65532Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "UDP_DESTINATION_2000_65532Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 243 as short
]
]
}
protected def tcpEgressRangeFlows() {
+ val flowId1 = "TCP_DESTINATION_776_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ val flowId2 = "TCP_DESTINATION_512_65280Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ val flowId3 = "TCP_DESTINATION_334_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ val flowId4 = "TCP_DESTINATION_333_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ val flowId5 = "TCP_DESTINATION_336_65520Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ val flowId6 = "TCP_DESTINATION_352_65504Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ val flowId7 = "TCP_DESTINATION_384_65408Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ val flowId8 = "TCP_DESTINATION_768_65528Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_776_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId1
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId1)
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_512_65280Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId2
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId2)
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_334_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId3
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId3)
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_333_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId4
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId4)
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_336_65520Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId5
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId5)
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_352_65504Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId6
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId6)
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_384_65408Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId7
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId7)
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_768_65528Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId8
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId8)
tableId = 213 as short
]
]
}
protected def udpIngressAllFlows() {
+ val theFlowId = "UDP_DESTINATION_1_0Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "UDP_DESTINATION_1_0Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 243 as short
]
]
}
protected def tcpEgressAllFlows() {
+ val theFlowId = "TCP_DESTINATION_1_0Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_1_0Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 213 as short
]
]
}
protected def icmpIngressFlowsPort3() {
+ val flowId1 = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ val flowId2 = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426a22"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = flowId1
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId1)
tableId = 243 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426a22"
+ flowId = flowId2
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId2)
tableId = 243 as short
]
]
}
protected def icmpEgressFlowsPort3() {
+ val flowId1 = "ICMP_V4_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ val flowId2 = "ICMP_V4_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426a21"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ICMP_V4_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId1
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId1)
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ICMP_V4_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426a21"
+ flowId = flowId2
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId2)
tableId = 213 as short
]
]
override def expectedFlows(String mac) {
// Code auto. generated by https://github.com/vorburger/xtendbeans
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_DHCP_Server_v4123_987__Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_DHCP_Server_v6_123_987___Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_130_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_135_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_136_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ARP_123_987"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
flowName = "ACL"
priority = 50
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
flowName = "ACL"
priority = 62015
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Client_v4123_987__Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Client_v6_123_987__Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Server_v4123_987__Drop_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Server_v6_123_987__Drop_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_134_Drop_"
flowName = "ACL"
priority = 63020
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_133_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_135_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_136_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
flowName = "ACL"
priority = 50
tableId = 243 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
flowName = "ACL"
priority = 62015
tableId = 243 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_Fixed_Conntrk_123_" + mac + "_10.0.0.1/32_Recirc"
flowName = "ACL"
priority = 61010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_Fixed_Conntrk_123_" + mac + "_10.0.0.1/32_Recirc"
flowName = "ACL"
priority = 61010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ARP_123_987_" + mac
flowName = "ACL"
*/
package org.opendaylight.netvirt.aclservice.tests
-import org.opendaylight.genius.mdsalutil.FlowEntity
import org.opendaylight.genius.mdsalutil.MetaDataUtil
import org.opendaylight.genius.mdsalutil.actions.ActionDrop
import org.opendaylight.genius.mdsalutil.actions.ActionNxConntrack
import org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit
+import org.opendaylight.genius.mdsalutil.FlowEntityBuilder
import org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions
import org.opendaylight.genius.mdsalutil.matches.MatchEthernetDestination
import org.opendaylight.genius.mdsalutil.matches.MatchEthernetSource
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg6
+import static extension org.opendaylight.mdsal.binding.testutils.XtendBuilderExtensions.operator_doubleGreaterThan
+
class FlowEntryObjectsStatefulIPv6 extends FlowEntryObjectsStateful {
override fixedConntrackIngressFlowsPort1() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F3_2001:db8:1::/64_Recirc"
flowName = "ACL"
priority = 61010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
flowName = "ACL"
priority = 50
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
flowName = "ACL"
}
override etherIngressFlowsPort2() {
+ val flowId1 = "ETHERnull_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F3_2001:db8:1::/64Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ val flowId2 = "ETHERnull_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F4_2001:db8:2::/64Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ETHERnull_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F3_2001:db8:1::/64"
- +"Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = flowId1
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId1)
tableId = 243 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ETHERnull_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F4_2001:db8:2::/64"
- +"Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = flowId2
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId2)
tableId = 243 as short
]
]
override fixedConntrackEgressFlowsPort1() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F3_2001:db8:1::/64_Recirc"
flowName = "ACL"
priority = 61010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
flowName = "ACL"
priority = 50
tableId = 243 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
flowName = "ACL"
override fixedConntrackIngressFlowsPort2() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F4_2001:db8:2::/64_Recirc"
flowName = "ACL"
priority = 61010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
flowName = "ACL"
priority = 50
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
flowName = "ACL"
override fixedConntrackEgressFlowsPort2() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F4_2001:db8:2::/64_Recirc"
flowName = "ACL"
priority = 61010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
flowName = "ACL"
priority = 50
tableId = 243 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
flowName = "ACL"
override fixedConntrackIngressFlowsPort3() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_Fixed_Conntrk_123_0D:AA:D8:42:30:F5_2001:db8:3::/64_Recirc"
flowName = "ACL"
priority = 61010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_New"
flowName = "ACL"
priority = 50
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Ingress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
flowName = "ACL"
override fixedConntrackEgressFlowsPort3() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_Fixed_Conntrk_123_0D:AA:D8:42:30:F5_2001:db8:3::/64_Recirc"
flowName = "ACL"
priority = 61010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_New"
flowName = "ACL"
priority = 50
tableId = 243 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100481bi
flowId = "Egress_Fixed_Conntrk_Drop123_987_Tracked_Invalid"
flowName = "ACL"
}
override etherEgressFlowsPort1() {
+ val theFlowId = "ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 213 as short
]
]
}
override etheregressFlowPort2() {
+ val theFlowId = "ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 213 as short
]
]
}
override tcpIngressFlowPort1() {
+ val theFlowId = "TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 243 as short
]
]
}
override tcpIngressFlowPort2() {
+ val theFlowId = "TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 243 as short
]
]
}
override tcpEgressFlowPort2() {
+ val flowId1 = "TCP_DESTINATION_80_65535_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F3_2001:db8:1::/64Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ val flowId2 = "TCP_DESTINATION_80_65535_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F4_2001:db8:2::/64Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_80_65535_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F3_2001:db8:1::/64"
- +"Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId1
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId1)
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_80_65535_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F4_2001:db8:2::/64Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId1
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId2)
tableId = 213 as short
]
]
}
override udpEgressFlowsPort1() {
+ val theFlowId = "UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 213 as short
]
]
}
override udpIngressFlowsPort2() {
+ val flowId1 = "UDP_DESTINATION_80_65535_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F3_2001:db8:1::/64Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ val flowId2 = "UDP_DESTINATION_80_65535_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F4_2001:db8:2::/64Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "UDP_DESTINATION_80_65535_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F3_2001:db8:1::/64"
- +"Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = flowId1
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId1)
tableId = 243 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "UDP_DESTINATION_80_65535_ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F4_2001:db8:2::/64Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = flowId2
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId2)
tableId = 243 as short
]
]
}
override udpEgressFlowsPort2() {
+ val theFlowId = "UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 213 as short
]
]
}
override icmpIngressFlowsPort1() {
+ val theFlowId = "ICMP_V6_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ICMP_V6_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 243 as short
]
]
}
override icmpIngressFlowsPort2() {
+ val theFlowId = "ICMP_V6_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ICMP_V6_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 243 as short
]
]
}
override icmpEgressFlowsPort2() {
+ val flowId1 = "ICMP_V6_DESTINATION_23__ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F3_2001:db8:1::/64Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ val flowId2 = "ICMP_V6_DESTINATION_23__ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F4_2001:db8:2::/64Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ICMP_V6_DESTINATION_23__ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F3_2001:db8:1::/64"
- +"Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId1
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId1)
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ICMP_V6_DESTINATION_23__ipv6_remoteACL_interface_aap_0D:AA:D8:42:30:F4_2001:db8:2::/64"
- +"Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId2
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId2)
tableId = 213 as short
]
]
}
override udpIngressPortRangeFlows() {
+ val theFlowId = "UDP_DESTINATION_2000_65532Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "UDP_DESTINATION_2000_65532Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 243 as short
]
]
}
override tcpEgressRangeFlows() {
+ val flowId1 = "TCP_DESTINATION_776_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ val flowId2 = "TCP_DESTINATION_512_65280Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ val flowId3 = "TCP_DESTINATION_334_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ val flowId4 = "TCP_DESTINATION_333_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ val flowId5 = "TCP_DESTINATION_336_65520Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ val flowId6 = "TCP_DESTINATION_352_65504Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ val flowId7 = "TCP_DESTINATION_384_65408Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ val flowId8 = "TCP_DESTINATION_768_65528Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_776_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId1
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId1)
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_512_65280Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId2
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId2)
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_334_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId3
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId3)
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_333_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId4
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId4)
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_336_65520Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId5
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId5)
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_352_65504Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId6
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId6)
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_384_65408Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId7
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId7)
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_768_65528Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId8
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId8)
tableId = 213 as short
]
]
}
override udpIngressAllFlows() {
+ val theFlowId = "UDP_DESTINATION_1_0Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "UDP_DESTINATION_1_0Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 243 as short
]
]
}
override tcpEgressAllFlows() {
+ val theFlowId = "TCP_DESTINATION_1_0Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "TCP_DESTINATION_1_0Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = theFlowId
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(theFlowId)
tableId = 213 as short
]
]
}
override icmpIngressFlowsPort3() {
+ val flowId1 = "ICMP_V6_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ val flowId2 = "ICMP_V6_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426a22"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ICMP_V6_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = flowId1
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId1)
tableId = 243 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ICMP_V6_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426a22"
+ flowId = flowId2
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId2)
tableId = 243 as short
]
]
}
override icmpEgressFlowsPort3() {
+ val flowId1 = "ICMP_V6_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ val flowId2 = "ICMP_V6_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426a21"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ICMP_V6_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId1
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId1)
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ICMP_V6_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426a21"
+ flowId = flowId2
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33, 33)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId2)
tableId = 213 as short
]
]
*/
package org.opendaylight.netvirt.aclservice.tests
-import org.opendaylight.genius.mdsalutil.FlowEntity
import org.opendaylight.genius.mdsalutil.MetaDataUtil
import org.opendaylight.genius.mdsalutil.actions.ActionNxConntrack
import org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit
+import org.opendaylight.genius.mdsalutil.FlowEntityBuilder
import org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions
import org.opendaylight.genius.mdsalutil.matches.MatchArpSha
import org.opendaylight.genius.mdsalutil.matches.MatchEthernetType
import org.opendaylight.genius.mdsalutil.nxmatches.NxMatchUdpDestinationPort
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg6
+import org.opendaylight.genius.mdsalutil.matches.MatchMetadata
+
+import static extension org.opendaylight.mdsal.binding.testutils.XtendBuilderExtensions.operator_doubleGreaterThan
class FlowEntryObjectsStateless extends FlowEntryObjectsBase {
protected def etherFlowIngressPort1() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "SYN_ETHERnullIngress98785cc3048-abc3-43cc-89b3-377341426ac7"
flowName = "ACL_SYN_"
}
protected def etherFlowEgressPort1() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "SYN_ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6"
flowName = "ACL_SYN_"
}
protected def etherIngressFlowsPort2() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "SYN_ETHERnullIngress98785cc3048-abc3-43cc-89b3-377341426ac7"
flowName = "ACL_SYN_"
priority = 61005
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "SYN_ETHERnullIngress98785cc3048-abc3-43cc-89b3-377341426ac7"
flowName = "ACL_SYN_"
protected def etherEgressFlowsPort1() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "[SYN_ETHERnullIngress98785cc3048-abc3-43cc-89b3-377341426ac7"
flowName = "ACL_SYN_"
protected def etheregressFlowPort2() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "SYN_ETHERnullEgress98785cc3048-abc3-43cc-89b3-377341426ac6"
flowName = "ACL_SYN_"
protected def tcpIngressFlowPort1() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "SYN_TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
flowName = "ACL_SYN_"
protected def tcpIngressFlowPort2() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "SYN_TCP_DESTINATION_80_65535Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
flowName = "ACL_SYN_"
protected def tcpEgressFlowPort1() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "SYN_TCP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
flowName = "ACL_SYN_"
protected def tcpEgressFlowPort2() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "SYN_TCP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
flowName = "ACL_SYN_"
priority = 61005
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "SYN_TCP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
flowName = "ACL_SYN_"
protected def udpEgressFlowsPort1() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
flowName = "ACL"
protected def udpIngressFlowsPort2() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "UDP_DESTINATION_80_65535_ipv4_remoteACL_interface_aap_AllowedAddressPairsKey "
+"[_macAddress=MacAddress [_value=0D:AA:D8:42:30:F3], _ipAddress=IpPrefixOrAddress "
priority = 61010
tableId = 243 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
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"
flowName = "ACL"
protected def udpEgressFlowsPort2() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "UDP_DESTINATION_80_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
flowName = "ACL"
protected def icmpIngressFlowsPort1() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
flowName = "ACL"
protected def icmpIngressFlowsPort2() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
flowName = "ACL"
protected def icmpEgressFlowsPort2() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "ICMP_V4_DESTINATION_23__ipv4_remoteACL_interface_aap_AllowedAddressPairsKey "
+"[_macAddress=MacAddress [_value=0D:AA:D8:42:30:F3], _ipAddress=IpPrefixOrAddress "
priority = 61010
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "ICMP_V4_DESTINATION_23__ipv4_remoteACL_interface_aap_AllowedAddressPairsKey "
+"[_macAddress=MacAddress [_value=0D:AA:D8:42:30:F4], _ipAddress=IpPrefixOrAddress "
protected def udpIngressPortRangeFlows() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "UDP_DESTINATION_2000_65532Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
flowName = "ACL"
protected def tcpEgressRangeFlows() {
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "SYN_TCP_DESTINATION_776_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
flowName = "ACL_SYN_"
priority = 61005
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "SYN_TCP_DESTINATION_512_65280Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
flowName = "ACL_SYN_"
priority = 61005
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "SYN_TCP_DESTINATION_334_65534Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
flowName = "ACL_SYN_"
priority = 61005
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "SYN_TCP_DESTINATION_333_65535Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
flowName = "ACL_SYN_"
priority = 61005
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "SYN_TCP_DESTINATION_336_65520Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
flowName = "ACL_SYN_"
priority = 61005
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "SYN_TCP_DESTINATION_352_65504Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
flowName = "ACL_SYN_"
priority = 61005
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "SYN_TCP_DESTINATION_384_65408Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
flowName = "ACL_SYN_"
priority = 61005
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "SYN_TCP_DESTINATION_768_65528Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
flowName = "ACL_SYN_"
}
protected def icmpIngressFlowsPort3() {
+ val flowId1 = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ val flowId2 = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426a22"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426ac7"
+ flowId = flowId1
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId1)
tableId = 243 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ICMP_V4_DESTINATION_23_Ingress98785cc3048-abc3-43cc-89b3-377341426a22"
+ flowId = flowId2
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new NxMatchRegister(NxmNxReg6, 252672L, 268435200L),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId2)
tableId = 243 as short
]
]
}
protected def icmpEgressFlowsPort3() {
+ val flowId1 = "ICMP_V4_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ val flowId2 = "ICMP_V4_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426a21"
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ICMP_V4_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426ac6"
+ flowId = flowId1
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId1)
tableId = 213 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
- flowId = "ICMP_V4_DESTINATION_23_Egress98785cc3048-abc3-43cc-89b3-377341426a21"
+ flowId = flowId2
flowName = "ACL"
instructionInfoList = #[
new InstructionApplyActions(#[
new MatchMetadata(1085217976614912bi, MetaDataUtil.METADATA_MASK_LPORT_TAG),
new NxMatchCtState(33L, 33L)
]
- priority = IdHelper.getId(flowId)
+ priority = IdHelper.getId(flowId2)
tableId = 213 as short
]
]
override def expectedFlows(String mac) {
// Code auto. generated by https://github.com/vorburger/xtendbeans
#[
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_DHCP_Server_v4123_987__Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_DHCP_Server_v6_123_987___Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_130_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_135_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ICMPv6_123_987_136_Permit_"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Ingress_ARP_123_987"
flowName = "ACL"
priority = 63010
tableId = 241 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Client_v4123_987__Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Client_v6_123_987__Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Server_v4123_987__Drop_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_DHCP_Server_v6_123_987__Drop_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_134_Drop_"
flowName = "ACL"
priority = 63020
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_133_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_135_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ICMPv6_123_987_136_Permit_"
flowName = "ACL"
priority = 63010
tableId = 211 as short
],
- new FlowEntity(123bi) => [
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
cookie = 110100480bi
flowId = "Egress_ARP_123_987_" + mac
flowName = "ACL"
import java.util.Map;
/**
- * The Id Helper class.
- * <p>
- * Disabling checkstyle:linelength for readability purpose.
- * </p>
+ * Id Helper.
*/
+// Disabling checkstyle:linelength for readability purpose.
@SuppressWarnings("checkstyle:linelength")
public class IdHelper {
private static Map<String, Integer> idCacheMap = new HashMap<>();
import org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager;
import org.opendaylight.genius.itm.globals.ITMConstants;
import org.opendaylight.genius.mdsalutil.FlowEntity;
+import org.opendaylight.genius.mdsalutil.FlowEntityBuilder;
import org.opendaylight.genius.mdsalutil.InstructionInfo;
import org.opendaylight.genius.mdsalutil.MDSALUtil;
import org.opendaylight.genius.mdsalutil.MatchInfo;
// exact order
String flowId = getFlowRef(NwConstants.EXTERNAL_TUNNEL_TABLE, elanInfo.getElanTag());
- FlowEntity flowEntity = new FlowEntity(dpnId);
- flowEntity.setTableId(NwConstants.EXTERNAL_TUNNEL_TABLE);
- flowEntity.setFlowId(flowId);
+ FlowEntity flowEntity = new FlowEntityBuilder()
+ .setDpnId(dpnId)
+ .setTableId(NwConstants.EXTERNAL_TUNNEL_TABLE)
+ .setFlowId(flowId)
+ .build();
mdsalManager.removeFlow(flowEntity);
}
import org.opendaylight.genius.itm.globals.ITMConstants;
import org.opendaylight.genius.mdsalutil.ActionInfo;
import org.opendaylight.genius.mdsalutil.FlowEntity;
+import org.opendaylight.genius.mdsalutil.FlowEntityBuilder;
import org.opendaylight.genius.mdsalutil.InstructionInfo;
import org.opendaylight.genius.mdsalutil.MDSALUtil;
import org.opendaylight.genius.mdsalutil.MDSALUtil.MdsalOp;
mkInstructions.add(new InstructionGotoTable(NwConstants.ELAN_DMAC_TABLE));
BigInteger dpId = interfaceInfo.getDpId();
long elanTag = getElanTag(broker, elanInfo, interfaceInfo);
- FlowEntity flowEntity = MDSALUtil.buildFlowEntity(dpId, NwConstants.ELAN_SMAC_TABLE,
- getKnownDynamicmacFlowRef(NwConstants.ELAN_SMAC_TABLE, dpId, lportTag, macAddress, elanTag), 20,
- elanInfo.getDescription(), (int) macTimeout, 0,
- ElanConstants.COOKIE_ELAN_KNOWN_SMAC.add(BigInteger.valueOf(elanTag)), mkMatches, mkInstructions);
- flowEntity.setStrictFlag(true);
- flowEntity.setSendFlowRemFlag(macTimeout != 0); // If Mac timeout is 0,
- // the flow wont be
- // deleted
- // automatically, so no
- // need to get notified
- return flowEntity;
+ return new FlowEntityBuilder()
+ .setDpnId(dpId)
+ .setTableId(NwConstants.ELAN_SMAC_TABLE)
+ .setFlowId(getKnownDynamicmacFlowRef(NwConstants.ELAN_SMAC_TABLE, dpId, lportTag, macAddress, elanTag))
+ .setPriority(20)
+ .setFlowName(elanInfo.getDescription())
+ .setIdleTimeOut((int) macTimeout)
+ .setHardTimeOut(0)
+ .setCookie(ElanConstants.COOKIE_ELAN_KNOWN_SMAC.add(BigInteger.valueOf(elanTag)))
+ .setMatchInfoList(mkMatches)
+ .setInstructionInfoList(mkInstructions)
+ .setStrictFlag(true)
+ // If Mac timeout is 0, the flow won't be deleted automatically, so no need to get notified
+ .setSendFlowRemFlag(macTimeout != 0)
+ .build();
}
private static Long getElanTag(DataBroker broker, ElanInstance elanInfo, InterfaceInfo interfaceInfo) {
List<ElanSegments> elanSegments = elanInstance.getElanSegments();
if (elanSegments != null) {
for (ElanSegments segment : elanSegments) {
- if (segment != null && (segment.getSegmentType().isAssignableFrom(SegmentTypeVxlan.class)
+ if (segment != null && segment.getSegmentType().isAssignableFrom(SegmentTypeVxlan.class)
&& segment.getSegmentationId() != null
- && segment.getSegmentationId().longValue() != 0)) {
+ && segment.getSegmentationId().longValue() != 0) {
return true;
}
}
}
public static boolean isNotEmpty(Collection collection) {
- return (!isEmpty(collection));
+ return !isEmpty(collection);
}
public static void setElanInstancToDpnsCache(Map<String, Set<DpnInterfaces>> elanInstancToDpnsCache) {
}
public static void removeDPNInterfaceFromElanInCache(String elanName, DpnInterfaces dpnInterfaces) {
- elanInstancToDpnsCache.computeIfAbsent(elanName, key -> new HashSet<DpnInterfaces>()).remove(dpnInterfaces);
+ elanInstancToDpnsCache.computeIfAbsent(elanName, key -> new HashSet<>()).remove(dpnInterfaces);
}
public Optional<IpAddress> getSourceIpAddress(Ethernet ethernet) {
import org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager;
import org.opendaylight.genius.mdsalutil.ActionInfo;
import org.opendaylight.genius.mdsalutil.FlowEntity;
+import org.opendaylight.genius.mdsalutil.FlowEntityBuilder;
import org.opendaylight.genius.mdsalutil.InstructionInfo;
import org.opendaylight.genius.mdsalutil.MDSALUtil;
import org.opendaylight.genius.mdsalutil.MatchInfo;
private final NaptManager naptManager;
private final IElanService elanManager;
private final IdManagerService idManager;
- private IInterfaceManager interfaceManager;
+ private final IInterfaceManager interfaceManager;
@Inject
public NaptEventHandler(final DataBroker dataBroker, final IMdsalApiManager mdsalManager,
List<ActionInfo> actionInfos = new ArrayList<>();
if (ethPkt.getPayload() instanceof IPv4) {
IPv4 ipPkt = (IPv4) ethPkt.getPayload();
- if ((ipPkt.getPayload() instanceof TCP) || (ipPkt.getPayload() instanceof UDP)) {
+ if (ipPkt.getPayload() instanceof TCP || ipPkt.getPayload() instanceof UDP) {
if (ethPkt.getEtherType() != (short) NwConstants.ETHTYPE_802_1Q) {
// VLAN Access port
if (infInfo != null) {
int actualPort = actualSourceAddress.getPortNumber();
String switchFlowRef =
NatUtil.getNaptFlowRef(dpnId, tableId, String.valueOf(routerId), actualIp, actualPort);
- FlowEntity snatFlowEntity = MDSALUtil.buildFlowEntity(dpnId, tableId, switchFlowRef,
- NatConstants.DEFAULT_NAPT_FLOW_PRIORITY, NatConstants.NAPT_FLOW_NAME, idleTimeout, 0,
- NatUtil.getCookieNaptFlow(routerId),
- buildAndGetMatchInfo(actualIp, actualPort, tableId, protocol, intranetVpnId),
- buildAndGetSetActionInstructionInfo(translatedIp, translatedPort, intranetVpnId, vpnId, tableId,
- protocol, extGwMacAddress));
- snatFlowEntity.setSendFlowRemFlag(true);
+
+ FlowEntity snatFlowEntity = new FlowEntityBuilder()
+ .setDpnId(dpnId)
+ .setTableId(tableId)
+ .setFlowId(switchFlowRef)
+ .setPriority(NatConstants.DEFAULT_NAPT_FLOW_PRIORITY)
+ .setFlowName(NatConstants.NAPT_FLOW_NAME)
+ .setIdleTimeOut(idleTimeout)
+ .setHardTimeOut(0)
+ .setCookie(NatUtil.getCookieNaptFlow(routerId))
+ .setMatchInfoList(buildAndGetMatchInfo(actualIp, actualPort, tableId, protocol, intranetVpnId))
+ .setInstructionInfoList(buildAndGetSetActionInstructionInfo(translatedIp, translatedPort,
+ intranetVpnId, vpnId, tableId, protocol, extGwMacAddress))
+ .setSendFlowRemFlag(true)
+ .build();
LOG.debug("NAT Service : Installing the NAPT flow in the table {} for the switch with the DPN ID {} ",
tableId, dpnId);
if (etherPkt.getPayload() instanceof IPv4) {
byte[] rawPkt;
IPv4 ipPkt = (IPv4) etherPkt.getPayload();
- if ((ipPkt.getPayload() instanceof TCP) || (ipPkt.getPayload() instanceof UDP)) {
+ if (ipPkt.getPayload() instanceof TCP || ipPkt.getPayload() instanceof UDP) {
try {
rawPkt = etherPkt.serialize();
return rawPkt;
import org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker;
import org.opendaylight.genius.mdsalutil.ActionInfo;
import org.opendaylight.genius.mdsalutil.FlowEntity;
+import org.opendaylight.genius.mdsalutil.FlowEntityBuilder;
import org.opendaylight.genius.mdsalutil.InstructionInfo;
import org.opendaylight.genius.mdsalutil.MDSALUtil;
import org.opendaylight.genius.mdsalutil.MatchInfo;
public static ProviderTypes getProviderTypefromNetworkId(DataBroker broker, Uuid networkId) {
InstanceIdentifier<Networks> id = buildNetworkIdentifier(networkId);
Optional<Networks> networkData = read(broker, LogicalDatastoreType.CONFIGURATION, id);
- if ((networkData.isPresent()) && (networkData.get() != null)) {
+ if (networkData.isPresent() && networkData.get() != null) {
return networkData.get().getProviderNetworkType();
}
return null;
return vpnId;
}
- public static FlowEntity buildFlowEntity(BigInteger dpnId, short tableId, BigInteger cookie) {
- FlowEntity flowEntity = new FlowEntity(dpnId);
- flowEntity.setTableId(tableId);
- flowEntity.setCookie(cookie);
- return flowEntity;
- }
-
- public static FlowEntity buildFlowEntity(BigInteger dpnId, short tableId, String flowId,
- int priority, String flowName,
- BigInteger cookie, List<MatchInfo> listMatchInfo) {
-
- FlowEntity flowEntity = new FlowEntity(dpnId);
- flowEntity.setTableId(tableId);
- flowEntity.setFlowId(flowId);
- flowEntity.setPriority(priority);
- flowEntity.setFlowName(flowName);
- flowEntity.setCookie(cookie);
- flowEntity.setMatchInfoList(listMatchInfo);
- return flowEntity;
- }
-
public static FlowEntity buildFlowEntity(BigInteger dpnId, short tableId, BigInteger cookie, String flowId) {
- FlowEntity flowEntity = new FlowEntity(dpnId);
- flowEntity.setTableId(tableId);
- flowEntity.setCookie(cookie);
- flowEntity.setFlowId(flowId);
- return flowEntity;
+ return new FlowEntityBuilder()
+ .setDpnId(dpnId)
+ .setTableId(tableId)
+ .setCookie(cookie)
+ .setFlowId(flowId)
+ .build();
}
public static FlowEntity buildFlowEntity(BigInteger dpnId, short tableId, String flowId) {
- FlowEntity flowEntity = new FlowEntity(dpnId);
- flowEntity.setTableId(tableId);
- flowEntity.setFlowId(flowId);
- return flowEntity;
+ return new FlowEntityBuilder()
+ .setDpnId(dpnId)
+ .setTableId(tableId)
+ .setFlowId(flowId)
+ .build();
}
public static long getIpAddress(byte[] rawIpAddress) {
- return (((rawIpAddress[0] & 0xFF) << (3 * 8)) + ((rawIpAddress[1] & 0xFF) << (2 * 8))
- + ((rawIpAddress[2] & 0xFF) << (1 * 8)) + (rawIpAddress[3] & 0xFF)) & 0xffffffffL;
+ return ((rawIpAddress[0] & 0xFF) << 3 * 8) + ((rawIpAddress[1] & 0xFF) << 2 * 8)
+ + ((rawIpAddress[2] & 0xFF) << 1 * 8) + (rawIpAddress[3] & 0xFF) & 0xffffffffL;
}
public static String getEndpointIpAddressForDPN(DataBroker broker, BigInteger dpnId) {
fibManager.addOrUpdateFibEntry(broker, rd, macAddress, prefix,
Collections.singletonList(nextHopIp), VrfEntry.EncapType.Mplsgre, (int)label, l3vni /*l3vni*/,
null /*gatewayMacAddress*/, parentVpnRd, origin, null /*writeTxn*/);
- if ((rd != null) && (!rd.equalsIgnoreCase(vpnName))) {
+ if (rd != null && !rd.equalsIgnoreCase(vpnName)) {
/* Publish to Bgp only if its an INTERNET VPN */
bgpManager.advertisePrefix(rd, null /*macAddress*/, prefix, Collections.singletonList(nextHopIp),
VrfEntry.EncapType.Mplsgre, (int) label, 0 /*l3vni*/, 0 /*l2vni*/, null /*gatewayMac*/);
long ipLo = ipToLong(InetAddress.getByName(start));
long ipHi = ipToLong(InetAddress.getByName(end));
long ipToTest = ipToLong(InetAddress.getByName(ipAddress));
- return (ipToTest >= ipLo && ipToTest <= ipHi);
+ return ipToTest >= ipLo && ipToTest <= ipHi;
} catch (UnknownHostException e) {
LOG.error("NAT Service : isIpInSubnet failed for IP {}. Exception {}", ipAddress, e.getMessage());
return false;
Set<Uuid> subnetsSet = externalIps.stream().map(externalIp -> externalIp.getSubnetId())
.collect(Collectors.toSet());
- return new ArrayList<Uuid>(subnetsSet);
+ return new ArrayList<>(subnetsSet);
}
public static List<Uuid> getExternalSubnetIdsForRouter(DataBroker dataBroker, String routerName) {
Routers router) {
List<ExternalIps> externalIps = router.getExternalIps();
for (ExternalIps extIp : externalIps) {
- String extIpString = extIp.getIpAddress().contains("/32") ? (extIp.getIpAddress() + "/32") :
+ String extIpString = extIp.getIpAddress().contains("/32") ? extIp.getIpAddress() + "/32" :
extIp.getIpAddress();
if (extIpString.equals(externalIpAddress)) {
return extIp.getSubnetId();
--- /dev/null
+/*
+ * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.netvirt.natservice.internal.test;
+
+import java.math.BigInteger;
+import org.junit.Test;
+import org.opendaylight.genius.mdsalutil.FlowEntityBuilder;
+import org.opendaylight.netvirt.natservice.internal.NatUtil;
+
+public class NatUtilTest {
+
+ @Test
+ public void testFlowEntityBuilder() {
+ new FlowEntityBuilder()
+ .setDpnId(new BigInteger("123"))
+ .setTableId((short) 0)
+ .setFlowId("ID")
+ .build();
+ }
+
+ @Test
+ public void testBuildFlowEntity1() {
+ NatUtil.buildFlowEntity(new BigInteger("123"), (short) 0, "ID");
+ }
+
+ @Test
+ public void testBuildFlowEntity2() {
+ NatUtil.buildFlowEntity(new BigInteger("123"), (short) 0, new BigInteger("789"), "ID");
+ }
+
+}
import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
import org.opendaylight.genius.datastoreutils.DataStoreJobCoordinator;
import org.opendaylight.genius.mdsalutil.FlowEntity;
+import org.opendaylight.genius.mdsalutil.FlowEntityBuilder;
import org.opendaylight.genius.mdsalutil.InstructionInfo;
import org.opendaylight.genius.mdsalutil.MDSALUtil;
import org.opendaylight.genius.mdsalutil.MatchInfo;
static VpnInterface getVpnInterface(DataBroker broker, String vpnInterfaceName) {
InstanceIdentifier<VpnInterface> id = getVpnInterfaceIdentifier(vpnInterfaceName);
Optional<VpnInterface> vpnInterface = read(broker, LogicalDatastoreType.CONFIGURATION, id);
- return (vpnInterface.isPresent()) ? vpnInterface.get() : null;
+ return vpnInterface.isPresent() ? vpnInterface.get() : null;
}
static VpnInterface getVpnInterface(String intfName, String vpnName, Adjacencies aug, BigInteger dpnId,
*/
public static List<VrfEntry> getAllVrfEntries(DataBroker broker, String rd) {
VrfTables vrfTables = VpnUtil.getVrfTable(broker, rd);
- return (vrfTables != null) ? vrfTables.getVrfEntry() : new ArrayList<>();
+ return vrfTables != null ? vrfTables.getVrfEntry() : new ArrayList<>();
}
//FIXME: Implement caches for DS reads
InstanceIdentifier<VpnInstance> id = InstanceIdentifier.builder(VpnInstances.class).child(VpnInstance.class,
new VpnInstanceKey(vpnInstanceName)).build();
Optional<VpnInstance> vpnInstance = read(broker, LogicalDatastoreType.CONFIGURATION, id);
- return (vpnInstance.isPresent()) ? vpnInstance.get() : null;
+ return vpnInstance.isPresent() ? vpnInstance.get() : null;
}
static List<VpnInstance> getAllVpnInstances(DataBroker broker) {
*/
public static String getVpnNameFromRd(DataBroker broker, String rd) {
VpnInstanceOpDataEntry vpnInstanceOpData = getVpnInstanceOpData(broker, rd);
- return (vpnInstanceOpData != null) ? vpnInstanceOpData.getVpnInstanceName() : null;
+ return vpnInstanceOpData != null ? vpnInstanceOpData.getVpnInstanceName() : null;
}
/**
if (optConfiguredVpnInterface.isPresent()) {
String configuredVpnName = optConfiguredVpnInterface.get().getVpnInstanceName();
- if ((configuredVpnName != null) && (configuredVpnName.equalsIgnoreCase(vpnName))) {
+ if (configuredVpnName != null && configuredVpnName.equalsIgnoreCase(vpnName)) {
return true;
}
}
}
public static long getRemoteBCGroup(long elanTag) {
- return VpnConstants.ELAN_GID_MIN + ((elanTag % VpnConstants.ELAN_GID_MIN) * 2);
+ return VpnConstants.ELAN_GID_MIN + elanTag % VpnConstants.ELAN_GID_MIN * 2;
}
// interface-index-tag operational container
InstanceIdentifier id = buildVpnPortipToPortIdentifier(vpnName, fixedIp);
Optional<VpnPortipToPort> vpnPortipToPortData = read(broker, LogicalDatastoreType.CONFIGURATION, id);
if (vpnPortipToPortData.isPresent()) {
- return (vpnPortipToPortData.get());
+ return vpnPortipToPortData.get();
}
return null;
}
InstanceIdentifier id = buildLearntVpnVipToPortIdentifier(vpnName, fixedIp);
Optional<LearntVpnVipToPort> learntVpnVipToPort = read(broker, LogicalDatastoreType.OPERATIONAL, id);
if (learntVpnVipToPort.isPresent()) {
- return (learntVpnVipToPort.get());
+ return learntVpnVipToPort.get();
}
return null;
}
Future<RpcResult<Void>> result = lockManager.tryLock(input);
String errMsg = "Unable to getLock for subnet " + subnetId;
try {
- if ((result != null) && (result.get().isSuccessful())) {
+ if (result != null && result.get().isSuccessful()) {
LOG.debug("Acquired lock for {}", subnetId);
} else {
throw new RuntimeException(errMsg);
UnlockInput input = new UnlockInputBuilder().setLockName(subnetId).build();
Future<RpcResult<Void>> result = lockManager.unlock(input);
try {
- if ((result != null) && (result.get().isSuccessful())) {
+ if (result != null && result.get().isSuccessful()) {
LOG.debug("Unlocked {}", subnetId);
} else {
LOG.debug("Unable to unlock subnet {}", subnetId);
}
static InstanceIdentifier<Subnetmap> buildSubnetmapIdentifier(Uuid subnetId) {
- return (InstanceIdentifier<Subnetmap>) InstanceIdentifier.builder(Subnetmaps.class)
+ return InstanceIdentifier.builder(Subnetmaps.class)
.child(Subnetmap.class, new SubnetmapKey(subnetId)).build();
}
}
static boolean isL3VpnOverVxLan(Long l3Vni) {
- return (l3Vni != null && l3Vni != 0);
+ return l3Vni != null && l3Vni != 0;
}
static boolean isEvpnOverVxLan(Long l2Vni) { //To be used by RT2
- return (l2Vni != null && l2Vni != 0);
+ return l2Vni != null && l2Vni != 0;
}
/**
.map(usedRd -> {
Optional<Routes> vpnExtraRoutes = VpnExtraRouteHelper.getVpnExtraroutes(dataBroker,
vpnName, usedRd, prefix);
- return vpnExtraRoutes.isPresent() ? new ImmutablePair<String, String>(
+ return vpnExtraRoutes.isPresent() ? new ImmutablePair<>(
vpnExtraRoutes.get().getNexthopIpList().get(0),
usedRd) : new ImmutablePair<>("", "");
})
}
static FlowEntity buildFlowEntity(BigInteger dpnId, short tableId, String flowId) {
- FlowEntity flowEntity = new FlowEntity(dpnId);
- flowEntity.setTableId(tableId);
- flowEntity.setFlowId(flowId);
- return flowEntity;
+ return new FlowEntityBuilder()
+ .setDpnId(dpnId)
+ .setTableId(tableId)
+ .setFlowId(flowId)
+ .build();
}
static VrfEntryBase.EncapType getEncapType(boolean isVxLan) {