}
private static void salToOFFlowCommand(Flow flow, FlowModInputBuilder flowMod) {
- if (flow instanceof AddFlowInput) {
+ if (flow instanceof AddFlowInput || flow instanceof UpdatedFlow) {
flowMod.setCommand(FlowModCommand.OFPFCADD);
} else if (flow instanceof RemoveFlowInput) {
if (MoreObjects.firstNonNull(flow.isStrict(), Boolean.FALSE)) {
} else {
flowMod.setCommand(FlowModCommand.OFPFCDELETE);
}
- } else if (flow instanceof UpdatedFlow) {
- if (MoreObjects.firstNonNull(flow.isStrict(), Boolean.FALSE)) {
- flowMod.setCommand(FlowModCommand.OFPFCMODIFYSTRICT);
- } else {
- flowMod.setCommand(FlowModCommand.OFPFCMODIFY);
- }
}
}
.toFlowModInputs(flow, EncodeConstants.OF10_VERSION_ID, new BigInteger("42"));\r
\r
Assert.assertEquals("Wrong version", 1, flowMod.get(0).getVersion().intValue());\r
- Assert.assertEquals("Wrong command", FlowModCommand.OFPFCMODIFYSTRICT, flowMod.get(0).getCommand());\r
+ Assert.assertEquals("Wrong command", FlowModCommand.OFPFCADD, flowMod.get(0).getCommand());\r
}\r
\r
/**\r