Remove method Lambda.indexedLambda() deprecated in Emu

Change-Id: Ie5a50d9d3df7b4af7af2d42edef3a63d622a721c
diff --git a/core/api/src/main/java/org/onosproject/net/IndexedLambda.java b/core/api/src/main/java/org/onosproject/net/IndexedLambda.java
index 84aa370..4dc5a79 100644
--- a/core/api/src/main/java/org/onosproject/net/IndexedLambda.java
+++ b/core/api/src/main/java/org/onosproject/net/IndexedLambda.java
@@ -29,8 +29,6 @@
 
     /**
      * Creates an instance representing the wavelength specified by the given index number.
-     * It is recommended to use {@link Lambda#indexedLambda(long)} unless you want to use the
-     * concrete type, IndexedLambda, directly.
      *
      * @param index index number of wavelength
      */
diff --git a/core/api/src/main/java/org/onosproject/net/Lambda.java b/core/api/src/main/java/org/onosproject/net/Lambda.java
index 3a1e137..01fd3e0 100644
--- a/core/api/src/main/java/org/onosproject/net/Lambda.java
+++ b/core/api/src/main/java/org/onosproject/net/Lambda.java
@@ -20,19 +20,6 @@
  */
 public interface Lambda {
     /**
-     * Create an Lambda instance with the specified wavelength index number.
-     *
-     * @param lambda index number
-     * @return an instance
-     *
-     * @deprecated in Emu (1.4.0)
-     */
-    @Deprecated
-    static Lambda indexedLambda(long lambda) {
-        return new IndexedLambda(lambda);
-    }
-
-    /**
      * Creates a Lambda instance with the specified arguments.
      *
      * @param gridType          grid type
diff --git a/core/api/src/test/java/org/onosproject/net/IndexedLambdaTest.java b/core/api/src/test/java/org/onosproject/net/IndexedLambdaTest.java
deleted file mode 100644
index 8cbe823..0000000
--- a/core/api/src/test/java/org/onosproject/net/IndexedLambdaTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2015 Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onosproject.net;
-
-import com.google.common.testing.EqualsTester;
-import org.junit.Test;
-
-/**
- * Test for IndexedLambda.
- */
-public class IndexedLambdaTest {
-    /**
-     * Tests equality of IndexedLambda instances.
-     */
-    @Test
-    public void testEquality() {
-        new EqualsTester()
-                .addEqualityGroup(Lambda.indexedLambda(10), Lambda.indexedLambda(10))
-                .addEqualityGroup(Lambda.indexedLambda(11), Lambda.indexedLambda(11), Lambda.indexedLambda(11))
-                .testEquals();
-    }
-}
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},
diff --git a/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java b/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java
index 766e0ce..81d49b2 100644
--- a/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java
+++ b/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java
@@ -344,11 +344,6 @@
     }
 
     @Test
-    public void testIndexedLambda() {
-        testSerializedEquals(org.onosproject.net.Lambda.indexedLambda(10L));
-    }
-
-    @Test
     public void testOchSignal() {
         testSerializedEquals(org.onosproject.net.Lambda.ochSignal(
                 GridType.DWDM, ChannelSpacing.CHL_100GHZ, 1, 1
diff --git a/providers/openflow/group/src/main/java/org/onosproject/provider/of/group/impl/GroupBucketEntryBuilder.java b/providers/openflow/group/src/main/java/org/onosproject/provider/of/group/impl/GroupBucketEntryBuilder.java
index 67cbaa7..add20be 100644
--- a/providers/openflow/group/src/main/java/org/onosproject/provider/of/group/impl/GroupBucketEntryBuilder.java
+++ b/providers/openflow/group/src/main/java/org/onosproject/provider/of/group/impl/GroupBucketEntryBuilder.java
@@ -25,7 +25,6 @@
 import org.onosproject.core.DefaultGroupId;
 import org.onosproject.core.GroupId;
 import org.onosproject.net.DeviceId;
-import org.onosproject.net.Lambda;
 import org.onosproject.net.PortNumber;
 import org.onosproject.net.driver.DefaultDriverData;
 import org.onosproject.net.driver.DefaultDriverHandler;
@@ -34,7 +33,6 @@
 import org.onosproject.net.driver.DriverService;
 import org.onosproject.net.flow.DefaultTrafficTreatment;
 import org.onosproject.net.flow.TrafficTreatment;
-import org.onosproject.net.flow.instructions.Instructions;
 import org.onosproject.net.group.DefaultGroupBucket;
 import org.onosproject.net.group.GroupBucket;
 import org.onosproject.net.group.GroupBuckets;
@@ -43,7 +41,6 @@
 import org.projectfloodlight.openflow.protocol.OFBucket;
 import org.projectfloodlight.openflow.protocol.OFGroupType;
 import org.projectfloodlight.openflow.protocol.action.OFAction;
-import org.projectfloodlight.openflow.protocol.action.OFActionCircuit;
 import org.projectfloodlight.openflow.protocol.action.OFActionCopyTtlIn;
 import org.projectfloodlight.openflow.protocol.action.OFActionCopyTtlOut;
 import org.projectfloodlight.openflow.protocol.action.OFActionDecMplsTtl;
@@ -61,7 +58,6 @@
 import org.projectfloodlight.openflow.protocol.action.OFActionSetVlanPcp;
 import org.projectfloodlight.openflow.protocol.action.OFActionSetVlanVid;
 import org.projectfloodlight.openflow.protocol.oxm.OFOxm;
-import org.projectfloodlight.openflow.protocol.oxm.OFOxmOchSigidBasic;
 import org.projectfloodlight.openflow.types.IPv4Address;
 import org.projectfloodlight.openflow.types.OFVlanVidMatch;
 import org.projectfloodlight.openflow.types.U32;
@@ -199,14 +195,7 @@
                     break;
                 case EXPERIMENTER:
                     OFActionExperimenter exp = (OFActionExperimenter) act;
-                    if (exp.getExperimenter() == 0x80005A06 ||
-                            exp.getExperimenter() == 0x748771) {
-                        OFActionCircuit ct = (OFActionCircuit) exp;
-                        short lambda = ((OFOxmOchSigidBasic) ct.getField()).getValue().getChannelNumber();
-                        builder.add(Instructions.modL0Lambda(Lambda.indexedLambda(lambda)));
-                    } else {
-                        log.warn("Unsupported OFActionExperimenter {}", exp.getExperimenter());
-                    }
+                    log.warn("Unsupported OFActionExperimenter {}", exp.getExperimenter());
                     break;
                 case SET_FIELD:
                     OFActionSetField setField = (OFActionSetField) act;