+ protected def remoteFlows() {
+ remoteIngressFlowsPort1
+ + remoteEgressFlowsPort1
+ + remoteIngressFlowsPort2
+ + remoteEgressFlowsPort2
+ }
+
+ protected def remoteIngressFlowsPort1() {
+ #[
+ remoteIngressFlowsPort("10.0.0.1")
+ ]
+ }
+
+ protected def remoteIngressFlowsPort2() {
+ #[
+ remoteIngressFlowsPort("10.0.0.2")
+ ]
+ }
+
+ protected def remoteEgressFlowsPort1() {
+ #[
+ remoteEgressFlowsPort("10.0.0.1")
+ ]
+ }
+
+ protected def remoteEgressFlowsPort2() {
+ #[
+ remoteEgressFlowsPort("10.0.0.2")
+ ]
+ }
+
+ protected def remoteIngressFlowsPort(String ip) {
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
+ cookie = 110100480bi
+ flowId = "Acl_Filter_Egress_" + ip + "/32_5000"
+ flowName = "ACL"
+ instructionInfoList = #[
+ new InstructionWriteMetadata(4bi, 16777214bi),
+ new InstructionGotoTable(213 as short)
+ ]
+ matchInfoList = #[
+ new MatchMetadata(83886080000bi, 1099494850560bi),
+ new MatchEthernetType(2048L),
+ new MatchIpv4Destination(ip, "32")
+ ]
+ priority = 50
+ tableId = 212 as short
+ ]
+ }
+
+ protected def remoteEgressFlowsPort(String ip) {
+ new FlowEntityBuilder >> [
+ dpnId = 123bi
+ cookie = 110100480bi
+ flowId = "Acl_Filter_Ingress_" + ip + "/32_5000"
+ flowName = "ACL"
+ instructionInfoList = #[
+ new InstructionWriteMetadata(4bi, 16777214bi),
+ new InstructionGotoTable(243 as short)
+ ]
+ matchInfoList = #[
+ new MatchMetadata(83886080000bi, 1099494850560bi),
+ new MatchEthernetType(2048L),
+ new MatchIpv4Source(ip, "32")
+ ]
+ priority = 50
+ tableId = 242 as short
+ ]
+ }
+