@Test public void testFlowAllowFromTunnel_vxLanGpe() { final int VXLAN_PORT = 1; MatchBuilder matchBuilder = new MatchBuilder(); matchBuilder.setInPort(new NodeConnectorId(String.valueOf(VXLAN_PORT))); Match match = matchBuilder.build(); Flow testFlow = buildFlow(FlowIdUtils.newFlowId(tableId, ALLOW, match), tableId, 300, match, FlowUtils.gotoTableInstructions((short) 2)).build(); flows.allowFromTunnelFlow((short) 2, 300, new NodeConnectorId(CONNECTOR_1), ofWriter); verify(ofWriter, times(1)).writeFlow(NODE_ID, tableId, testFlow); }
void allowFromTunnelFlow(short goToTable, int priority, NodeConnectorId tunnelTypePort, OfWriter ofWriter) { Preconditions.checkNotNull(tunnelTypePort); Match match = new MatchBuilder() .setInPort(tunnelTypePort) .build(); FlowId flowId = FlowIdUtils.newFlowId(tableId, "allow", match); FlowBuilder flowBuilder = FlowUtils.base(tableId) .setId(flowId) .setPriority(priority) .setMatch(match) .setInstructions(FlowUtils.gotoTableInstructions(goToTable)); flowBuilder.build(); ofWriter.writeFlow(nodeId, tableId, flowBuilder.build()); }
PortSecurityFlows { void allowFromTunnelFlow(short goToTable, int priority, NodeConnectorId tunnelTypePort, OfWriter ofWriter) { Preconditions.checkNotNull(tunnelTypePort); Match match = new MatchBuilder() .setInPort(tunnelTypePort) .build(); FlowId flowId = FlowIdUtils.newFlowId(tableId, "allow", match); FlowBuilder flowBuilder = FlowUtils.base(tableId) .setId(flowId) .setPriority(priority) .setMatch(match) .setInstructions(FlowUtils.gotoTableInstructions(goToTable)); flowBuilder.build(); ofWriter.writeFlow(nodeId, tableId, flowBuilder.build()); } }
PortSecurityFlows { void allowFromTunnelFlow(short goToTable, int priority, NodeConnectorId tunnelTypePort, OfWriter ofWriter) { Preconditions.checkNotNull(tunnelTypePort); Match match = new MatchBuilder() .setInPort(tunnelTypePort) .build(); FlowId flowId = FlowIdUtils.newFlowId(tableId, "allow", match); FlowBuilder flowBuilder = FlowUtils.base(tableId) .setId(flowId) .setPriority(priority) .setMatch(match) .setInstructions(FlowUtils.gotoTableInstructions(goToTable)); flowBuilder.build(); ofWriter.writeFlow(nodeId, tableId, flowBuilder.build()); } PortSecurityFlows(NodeId nodeId, Short tableId); }
PortSecurityFlows { void allowFromTunnelFlow(short goToTable, int priority, NodeConnectorId tunnelTypePort, OfWriter ofWriter) { Preconditions.checkNotNull(tunnelTypePort); Match match = new MatchBuilder() .setInPort(tunnelTypePort) .build(); FlowId flowId = FlowIdUtils.newFlowId(tableId, "allow", match); FlowBuilder flowBuilder = FlowUtils.base(tableId) .setId(flowId) .setPriority(priority) .setMatch(match) .setInstructions(FlowUtils.gotoTableInstructions(goToTable)); flowBuilder.build(); ofWriter.writeFlow(nodeId, tableId, flowBuilder.build()); } PortSecurityFlows(NodeId nodeId, Short tableId);  }
PortSecurityFlows { void allowFromTunnelFlow(short goToTable, int priority, NodeConnectorId tunnelTypePort, OfWriter ofWriter) { Preconditions.checkNotNull(tunnelTypePort); Match match = new MatchBuilder() .setInPort(tunnelTypePort) .build(); FlowId flowId = FlowIdUtils.newFlowId(tableId, "allow", match); FlowBuilder flowBuilder = FlowUtils.base(tableId) .setId(flowId) .setPriority(priority) .setMatch(match) .setInstructions(FlowUtils.gotoTableInstructions(goToTable)); flowBuilder.build(); ofWriter.writeFlow(nodeId, tableId, flowBuilder.build()); } PortSecurityFlows(NodeId nodeId, Short tableId);   }