Sho SHIMIZU
Committed by Gerrit Code Review

Remove L0SubType.LAMBDA which now gets unnecessary

It's because IndexedLambda the type heavily depends on is removed

Change-Id: Ie549255353a2d605f528decfefd0c11f9728d7d8
......@@ -28,10 +28,6 @@ public abstract class L0ModificationInstruction implements Instruction {
*/
public enum L0SubType {
/**
* Lambda modification.
*/
LAMBDA,
/**
* OCh (Optical Channel) modification.
*/
OCH,
......
......@@ -60,12 +60,6 @@ public final class EncodeInstructionCodecHelper {
result.put(InstructionCodec.SUBTYPE, l0Instruction.subtype().name());
switch (l0Instruction.subtype()) {
case LAMBDA:
final L0ModificationInstruction.ModLambdaInstruction modLambdaInstruction =
(L0ModificationInstruction.ModLambdaInstruction) l0Instruction;
result.put(InstructionCodec.LAMBDA, modLambdaInstruction.lambda());
break;
case OCH:
L0ModificationInstruction.ModOchSignalInstruction ochSignalInstruction =
(L0ModificationInstruction.ModOchSignalInstruction) l0Instruction;
......
......@@ -21,7 +21,6 @@ import org.onosproject.net.flow.DefaultTrafficTreatment;
import org.onosproject.net.flow.TrafficSelector;
import org.onosproject.net.flow.TrafficTreatment;
import org.onosproject.net.flow.criteria.Criterion;
import org.onosproject.net.flow.criteria.LambdaCriterion;
import org.onosproject.net.flow.criteria.OchSignalCriterion;
import org.onosproject.net.flow.criteria.EthCriterion;
import org.onosproject.net.flow.criteria.VlanIdCriterion;
......@@ -177,17 +176,6 @@ public final class FlowObjectiveCompositionUtil {
case L0MODIFICATION: {
L0ModificationInstruction l0 = (L0ModificationInstruction) instruction;
switch (l0.subtype()) {
case LAMBDA:
if (criterionMap.containsKey(Criterion.Type.OCH_SIGID)) {
if (((LambdaCriterion) criterionMap.get((Criterion.Type.OCH_SIGID))).lambda()
== ((L0ModificationInstruction.ModLambdaInstruction) l0).lambda()) {
criterionMap.remove(Criterion.Type.OCH_SIGID);
} else {
return null;
}
} else {
break;
}
case OCH:
if (criterionMap.containsKey(Criterion.Type.OCH_SIGID)) {
if (((OchSignalCriterion) criterionMap.get((Criterion.Type.OCH_SIGID))).lambda()
......
......@@ -34,7 +34,6 @@ import org.onosproject.net.flow.instructions.Instructions.GroupInstruction;
import org.onosproject.net.flow.instructions.Instructions.OutputInstruction;
import org.onosproject.net.flow.instructions.Instructions.SetQueueInstruction;
import org.onosproject.net.flow.instructions.L0ModificationInstruction;
import org.onosproject.net.flow.instructions.L0ModificationInstruction.ModLambdaInstruction;
import org.onosproject.net.flow.instructions.L0ModificationInstruction.ModOchSignalInstruction;
import org.onosproject.net.flow.instructions.L1ModificationInstruction;
import org.onosproject.net.flow.instructions.L1ModificationInstruction.ModOduSignalIdInstruction;
......@@ -311,8 +310,6 @@ public class FlowModBuilderVer13 extends FlowModBuilder {
L0ModificationInstruction l0m = (L0ModificationInstruction) i;
OFOxm<?> oxm = null;
switch (l0m.subtype()) {
case LAMBDA:
return buildModLambdaInstruction((ModLambdaInstruction) i);
case OCH:
try {
ModOchSignalInstruction modOchSignalInstruction = (ModOchSignalInstruction) l0m;
......@@ -337,11 +334,6 @@ public class FlowModBuilderVer13 extends FlowModBuilder {
return null;
}
private OFAction buildModLambdaInstruction(ModLambdaInstruction instruction) {
return factory().actions().circuit(factory().oxms().expOchSigId(
new CircuitSignalID((byte) 1, (byte) 2, instruction.lambda(), (short) 1)));
}
private OFAction buildModOchSignalInstruction(ModOchSignalInstruction instruction) {
OchSignal signal = instruction.lambda();
byte gridType = OpenFlowValueMapper.lookupGridType(signal.gridType());
......
......@@ -53,7 +53,6 @@ import org.projectfloodlight.openflow.protocol.action.OFAction;
import org.projectfloodlight.openflow.protocol.action.OFActionGroup;
import org.projectfloodlight.openflow.protocol.action.OFActionOutput;
import org.projectfloodlight.openflow.protocol.oxm.OFOxm;
import org.projectfloodlight.openflow.types.CircuitSignalID;
import org.projectfloodlight.openflow.types.EthType;
import org.projectfloodlight.openflow.types.IPv4Address;
import org.projectfloodlight.openflow.types.IPv6Address;
......@@ -278,11 +277,6 @@ public final class GroupModBuilder {
private OFAction buildL0Modification(Instruction i) {
L0ModificationInstruction l0m = (L0ModificationInstruction) i;
switch (l0m.subtype()) {
case LAMBDA:
L0ModificationInstruction.ModLambdaInstruction ml =
(L0ModificationInstruction.ModLambdaInstruction) i;
return factory.actions().circuit(factory.oxms().ochSigidBasic(
new CircuitSignalID((byte) 1, (byte) 2, ml.lambda(), (short) 1)));
default:
log.warn("Unimplemented action type {}.", l0m.subtype());
break;
......