chengfan
Committed by Gerrit Code Review

ONOS-3010 implement flow with meter

Change-Id: Ib629b74441480c6902a492ed3ddd21adb452af87
......@@ -250,6 +250,7 @@ public final class DefaultTrafficTreatment implements TrafficTreatment {
break;
case METER:
meter = (Instructions.MeterInstruction) instruction;
break;
default:
throw new IllegalArgumentException("Unknown instruction type: " +
instruction.type());
......
......@@ -123,6 +123,9 @@ public class FlowModBuilderVer13 extends FlowModBuilder {
if (treatment.writeMetadata() != null) {
instructions.add(buildMetadata(treatment.writeMetadata()));
}
if (treatment.metered() != null) {
instructions.add(buildMeter(treatment.metered()));
}
long cookie = flowRule().id().value();
......