Remove method Lambda.indexedLambda() deprecated in Emu

Change-Id: Ie5a50d9d3df7b4af7af2d42edef3a63d622a721c
diff --git a/core/common/src/main/java/org/onosproject/codec/impl/DecodeCriterionCodecHelper.java b/core/common/src/main/java/org/onosproject/codec/impl/DecodeCriterionCodecHelper.java
index f82bd0d..cdb29e1 100644
--- a/core/common/src/main/java/org/onosproject/codec/impl/DecodeCriterionCodecHelper.java
+++ b/core/common/src/main/java/org/onosproject/codec/impl/DecodeCriterionCodecHelper.java
@@ -422,29 +422,23 @@
     private class OchSigIdDecoder implements CriterionDecoder {
         @Override
         public Criterion decodeCriterion(ObjectNode json) {
-            if (json.get(CriterionCodec.LAMBDA) != null) {
-                Lambda lambda = Lambda.indexedLambda(nullIsIllegal(json.get(CriterionCodec.LAMBDA),
-                        CriterionCodec.LAMBDA + MISSING_MEMBER_MESSAGE).asInt());
-                return Criteria.matchLambda(lambda);
-            } else {
-                JsonNode ochSignalId = nullIsIllegal(json.get(CriterionCodec.OCH_SIGNAL_ID),
-                        CriterionCodec.GRID_TYPE + MISSING_MEMBER_MESSAGE);
-                GridType gridType =
-                        GridType.valueOf(
-                                nullIsIllegal(ochSignalId.get(CriterionCodec.GRID_TYPE),
-                                CriterionCodec.GRID_TYPE + MISSING_MEMBER_MESSAGE).asText());
-                ChannelSpacing channelSpacing =
-                        ChannelSpacing.valueOf(
-                                nullIsIllegal(ochSignalId.get(CriterionCodec.CHANNEL_SPACING),
-                                CriterionCodec.CHANNEL_SPACING + MISSING_MEMBER_MESSAGE).asText());
-                int spacingMultiplier = nullIsIllegal(ochSignalId.get(CriterionCodec.SPACING_MULIPLIER),
-                        CriterionCodec.SPACING_MULIPLIER + MISSING_MEMBER_MESSAGE).asInt();
-                int slotGranularity = nullIsIllegal(ochSignalId.get(CriterionCodec.SLOT_GRANULARITY),
-                        CriterionCodec.SLOT_GRANULARITY + MISSING_MEMBER_MESSAGE).asInt();
-                return Criteria.matchLambda(
-                        Lambda.ochSignal(gridType, channelSpacing,
-                                spacingMultiplier, slotGranularity));
-            }
+            JsonNode ochSignalId = nullIsIllegal(json.get(CriterionCodec.OCH_SIGNAL_ID),
+                    CriterionCodec.GRID_TYPE + MISSING_MEMBER_MESSAGE);
+            GridType gridType =
+                    GridType.valueOf(
+                            nullIsIllegal(ochSignalId.get(CriterionCodec.GRID_TYPE),
+                            CriterionCodec.GRID_TYPE + MISSING_MEMBER_MESSAGE).asText());
+            ChannelSpacing channelSpacing =
+                    ChannelSpacing.valueOf(
+                            nullIsIllegal(ochSignalId.get(CriterionCodec.CHANNEL_SPACING),
+                            CriterionCodec.CHANNEL_SPACING + MISSING_MEMBER_MESSAGE).asText());
+            int spacingMultiplier = nullIsIllegal(ochSignalId.get(CriterionCodec.SPACING_MULIPLIER),
+                    CriterionCodec.SPACING_MULIPLIER + MISSING_MEMBER_MESSAGE).asInt();
+            int slotGranularity = nullIsIllegal(ochSignalId.get(CriterionCodec.SLOT_GRANULARITY),
+                    CriterionCodec.SLOT_GRANULARITY + MISSING_MEMBER_MESSAGE).asInt();
+            return Criteria.matchLambda(
+                    Lambda.ochSignal(gridType, channelSpacing,
+                            spacingMultiplier, slotGranularity));
         }
     }
 
diff --git a/core/common/src/main/java/org/onosproject/codec/impl/DecodeInstructionCodecHelper.java b/core/common/src/main/java/org/onosproject/codec/impl/DecodeInstructionCodecHelper.java
index c8b6f26..d7a23b8 100644
--- a/core/common/src/main/java/org/onosproject/codec/impl/DecodeInstructionCodecHelper.java
+++ b/core/common/src/main/java/org/onosproject/codec/impl/DecodeInstructionCodecHelper.java
@@ -26,7 +26,6 @@
 import org.onosproject.core.GroupId;
 import org.onosproject.net.ChannelSpacing;
 import org.onosproject.net.GridType;
-import org.onosproject.net.Lambda;
 import org.onosproject.net.OchSignal;
 import org.onosproject.net.OduSignalId;
 import org.onosproject.net.PortNumber;
@@ -147,12 +146,7 @@
     private Instruction decodeL0() {
         String subType = json.get(InstructionCodec.SUBTYPE).asText();
 
-
-        if (subType.equals(L0ModificationInstruction.L0SubType.LAMBDA.name())) {
-            int lambda = nullIsIllegal(json.get(InstructionCodec.LAMBDA),
-                    InstructionCodec.LAMBDA + InstructionCodec.MISSING_MEMBER_MESSAGE).asInt();
-            return Instructions.modL0Lambda(Lambda.indexedLambda(lambda));
-        } else if (subType.equals(L0ModificationInstruction.L0SubType.OCH.name())) {
+        if (subType.equals(L0ModificationInstruction.L0SubType.OCH.name())) {
             String gridTypeString = nullIsIllegal(json.get(InstructionCodec.GRID_TYPE),
                     InstructionCodec.GRID_TYPE + InstructionCodec.MISSING_MEMBER_MESSAGE).asText();
             GridType gridType = GridType.valueOf(gridTypeString);
diff --git a/core/common/src/test/java/org/onosproject/codec/impl/FlowRuleCodecTest.java b/core/common/src/test/java/org/onosproject/codec/impl/FlowRuleCodecTest.java
index 515a69e..3a9ce2c 100644
--- a/core/common/src/test/java/org/onosproject/codec/impl/FlowRuleCodecTest.java
+++ b/core/common/src/test/java/org/onosproject/codec/impl/FlowRuleCodecTest.java
@@ -214,7 +214,7 @@
                             instruction.type().name() + "/" + subType, instruction);
                 });
 
-        assertThat(rule.treatment().allInstructions().size(), is(24));
+        assertThat(rule.treatment().allInstructions().size(), is(23));
 
         Instruction instruction;
 
@@ -320,13 +320,6 @@
                 is(8));
 
         instruction = getInstruction(Instruction.Type.L0MODIFICATION,
-                L0ModificationInstruction.L0SubType.LAMBDA.name());
-        assertThat(instruction.type(), is(Instruction.Type.L0MODIFICATION));
-        assertThat(((L0ModificationInstruction.ModLambdaInstruction) instruction)
-                        .lambda(),
-                is((short) 7));
-
-        instruction = getInstruction(Instruction.Type.L0MODIFICATION,
                 L0ModificationInstruction.L0SubType.OCH.name());
         assertThat(instruction.type(), is(Instruction.Type.L0MODIFICATION));
         L0ModificationInstruction.ModOchSignalInstruction och =
diff --git a/core/common/src/test/resources/org/onosproject/codec/impl/instructions-flow.json b/core/common/src/test/resources/org/onosproject/codec/impl/instructions-flow.json
index 14ef6f3..b8cab81 100644
--- a/core/common/src/test/resources/org/onosproject/codec/impl/instructions-flow.json
+++ b/core/common/src/test/resources/org/onosproject/codec/impl/instructions-flow.json
@@ -26,7 +26,6 @@
         {"type":"L3MODIFICATION","subtype":"IPV6_SRC", "ip":"1.2.3.2"},
         {"type":"L3MODIFICATION","subtype":"IPV6_DST", "ip":"1.2.3.1"},
         {"type":"L3MODIFICATION","subtype":"IPV6_FLABEL", "flowLabel":8},
-        {"type":"L0MODIFICATION","subtype":"LAMBDA","lambda":7},
         {"type":"L0MODIFICATION","subtype":"OCH","gridType":"DWDM",
           "channelSpacing":"CHL_100GHZ","spacingMultiplier":4,"slotGranularity":8},
         {"type":"L4MODIFICATION","subtype":"TCP_DST","tcpPort":40001},