@Test public void testDropFlow_arpEthertype() { MatchBuilder matchBuilder = new MatchBuilder(); matchBuilder.setEthernetMatch(FlowUtils.ethernetMatch(null, null, FlowUtils.ARP)); Match match = matchBuilder.build(); Flow testFlow = buildFlow(FlowIdUtils.newFlowId(tableId, DROP, match), tableId, 100, match, FlowUtils.dropInstructions()).build(); flows.dropFlow(100, FlowUtils.ARP, ofWriter); verify(ofWriter, times(1)).writeFlow(NODE_ID, tableId, testFlow); }
void dropFlow(int priority, Long etherType, OfWriter ofWriter) { FlowId flowId; FlowBuilder flowBuilder = FlowUtils.base(tableId) .setPriority(priority) .setInstructions(FlowUtils.dropInstructions()); if (etherType != null) { MatchBuilder matchBuilder = new MatchBuilder() .setEthernetMatch(FlowUtils.ethernetMatch(null, null, etherType)); Match match = matchBuilder.build(); flowId = FlowIdUtils.newFlowId(tableId, "drop", match); flowBuilder.setMatch(match); } else { flowId = FlowIdUtils.newFlowId("dropAll"); } flowBuilder.setId(flowId); ofWriter.writeFlow(nodeId, tableId, flowBuilder.build()); }
DestinationMapperFlows { void dropFlow(int priority, Long etherType, OfWriter ofWriter) { FlowId flowId; FlowBuilder flowBuilder = FlowUtils.base(tableId) .setPriority(priority) .setInstructions(FlowUtils.dropInstructions()); if (etherType != null) { MatchBuilder matchBuilder = new MatchBuilder() .setEthernetMatch(FlowUtils.ethernetMatch(null, null, etherType)); Match match = matchBuilder.build(); flowId = FlowIdUtils.newFlowId(tableId, "drop", match); flowBuilder.setMatch(match); } else { flowId = FlowIdUtils.newFlowId("dropAll"); } flowBuilder.setId(flowId); ofWriter.writeFlow(nodeId, tableId, flowBuilder.build()); } }
DestinationMapperFlows { void dropFlow(int priority, Long etherType, OfWriter ofWriter) { FlowId flowId; FlowBuilder flowBuilder = FlowUtils.base(tableId) .setPriority(priority) .setInstructions(FlowUtils.dropInstructions()); if (etherType != null) { MatchBuilder matchBuilder = new MatchBuilder() .setEthernetMatch(FlowUtils.ethernetMatch(null, null, etherType)); Match match = matchBuilder.build(); flowId = FlowIdUtils.newFlowId(tableId, "drop", match); flowBuilder.setMatch(match); } else { flowId = FlowIdUtils.newFlowId("dropAll"); } flowBuilder.setId(flowId); ofWriter.writeFlow(nodeId, tableId, flowBuilder.build()); } DestinationMapperFlows(DestinationMapperUtils utils, NodeId nodeId, short tableId); }
DestinationMapperFlows { void dropFlow(int priority, Long etherType, OfWriter ofWriter) { FlowId flowId; FlowBuilder flowBuilder = FlowUtils.base(tableId) .setPriority(priority) .setInstructions(FlowUtils.dropInstructions()); if (etherType != null) { MatchBuilder matchBuilder = new MatchBuilder() .setEthernetMatch(FlowUtils.ethernetMatch(null, null, etherType)); Match match = matchBuilder.build(); flowId = FlowIdUtils.newFlowId(tableId, "drop", match); flowBuilder.setMatch(match); } else { flowId = FlowIdUtils.newFlowId("dropAll"); } flowBuilder.setId(flowId); ofWriter.writeFlow(nodeId, tableId, flowBuilder.build()); } DestinationMapperFlows(DestinationMapperUtils utils, NodeId nodeId, short tableId);  }
DestinationMapperFlows { void dropFlow(int priority, Long etherType, OfWriter ofWriter) { FlowId flowId; FlowBuilder flowBuilder = FlowUtils.base(tableId) .setPriority(priority) .setInstructions(FlowUtils.dropInstructions()); if (etherType != null) { MatchBuilder matchBuilder = new MatchBuilder() .setEthernetMatch(FlowUtils.ethernetMatch(null, null, etherType)); Match match = matchBuilder.build(); flowId = FlowIdUtils.newFlowId(tableId, "drop", match); flowBuilder.setMatch(match); } else { flowId = FlowIdUtils.newFlowId("dropAll"); } flowBuilder.setId(flowId); ofWriter.writeFlow(nodeId, tableId, flowBuilder.build()); } DestinationMapperFlows(DestinationMapperUtils utils, NodeId nodeId, short tableId);   }