Remove method Lambda.indexedLambda() deprecated in Emu
Change-Id: Ie5a50d9d3df7b4af7af2d42edef3a63d622a721c
Showing
9 changed files
with
2 additions
and
88 deletions
... | @@ -29,8 +29,6 @@ public class IndexedLambda implements Lambda { | ... | @@ -29,8 +29,6 @@ public class IndexedLambda implements Lambda { |
29 | 29 | ||
30 | /** | 30 | /** |
31 | * Creates an instance representing the wavelength specified by the given index number. | 31 | * Creates an instance representing the wavelength specified by the given index number. |
32 | - * It is recommended to use {@link Lambda#indexedLambda(long)} unless you want to use the | ||
33 | - * concrete type, IndexedLambda, directly. | ||
34 | * | 32 | * |
35 | * @param index index number of wavelength | 33 | * @param index index number of wavelength |
36 | */ | 34 | */ | ... | ... |
... | @@ -20,19 +20,6 @@ package org.onosproject.net; | ... | @@ -20,19 +20,6 @@ package org.onosproject.net; |
20 | */ | 20 | */ |
21 | public interface Lambda { | 21 | public interface Lambda { |
22 | /** | 22 | /** |
23 | - * Create an Lambda instance with the specified wavelength index number. | ||
24 | - * | ||
25 | - * @param lambda index number | ||
26 | - * @return an instance | ||
27 | - * | ||
28 | - * @deprecated in Emu (1.4.0) | ||
29 | - */ | ||
30 | - @Deprecated | ||
31 | - static Lambda indexedLambda(long lambda) { | ||
32 | - return new IndexedLambda(lambda); | ||
33 | - } | ||
34 | - | ||
35 | - /** | ||
36 | * Creates a Lambda instance with the specified arguments. | 23 | * Creates a Lambda instance with the specified arguments. |
37 | * | 24 | * |
38 | * @param gridType grid type | 25 | * @param gridType grid type | ... | ... |
1 | -/* | ||
2 | - * Copyright 2015 Open Networking Laboratory | ||
3 | - * | ||
4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | - * you may not use this file except in compliance with the License. | ||
6 | - * You may obtain a copy of the License at | ||
7 | - * | ||
8 | - * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | - * | ||
10 | - * Unless required by applicable law or agreed to in writing, software | ||
11 | - * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | - * See the License for the specific language governing permissions and | ||
14 | - * limitations under the License. | ||
15 | - */ | ||
16 | -package org.onosproject.net; | ||
17 | - | ||
18 | -import com.google.common.testing.EqualsTester; | ||
19 | -import org.junit.Test; | ||
20 | - | ||
21 | -/** | ||
22 | - * Test for IndexedLambda. | ||
23 | - */ | ||
24 | -public class IndexedLambdaTest { | ||
25 | - /** | ||
26 | - * Tests equality of IndexedLambda instances. | ||
27 | - */ | ||
28 | - @Test | ||
29 | - public void testEquality() { | ||
30 | - new EqualsTester() | ||
31 | - .addEqualityGroup(Lambda.indexedLambda(10), Lambda.indexedLambda(10)) | ||
32 | - .addEqualityGroup(Lambda.indexedLambda(11), Lambda.indexedLambda(11), Lambda.indexedLambda(11)) | ||
33 | - .testEquals(); | ||
34 | - } | ||
35 | -} |
... | @@ -422,11 +422,6 @@ public final class DecodeCriterionCodecHelper { | ... | @@ -422,11 +422,6 @@ public final class DecodeCriterionCodecHelper { |
422 | private class OchSigIdDecoder implements CriterionDecoder { | 422 | private class OchSigIdDecoder implements CriterionDecoder { |
423 | @Override | 423 | @Override |
424 | public Criterion decodeCriterion(ObjectNode json) { | 424 | public Criterion decodeCriterion(ObjectNode json) { |
425 | - if (json.get(CriterionCodec.LAMBDA) != null) { | ||
426 | - Lambda lambda = Lambda.indexedLambda(nullIsIllegal(json.get(CriterionCodec.LAMBDA), | ||
427 | - CriterionCodec.LAMBDA + MISSING_MEMBER_MESSAGE).asInt()); | ||
428 | - return Criteria.matchLambda(lambda); | ||
429 | - } else { | ||
430 | JsonNode ochSignalId = nullIsIllegal(json.get(CriterionCodec.OCH_SIGNAL_ID), | 425 | JsonNode ochSignalId = nullIsIllegal(json.get(CriterionCodec.OCH_SIGNAL_ID), |
431 | CriterionCodec.GRID_TYPE + MISSING_MEMBER_MESSAGE); | 426 | CriterionCodec.GRID_TYPE + MISSING_MEMBER_MESSAGE); |
432 | GridType gridType = | 427 | GridType gridType = |
... | @@ -446,7 +441,6 @@ public final class DecodeCriterionCodecHelper { | ... | @@ -446,7 +441,6 @@ public final class DecodeCriterionCodecHelper { |
446 | spacingMultiplier, slotGranularity)); | 441 | spacingMultiplier, slotGranularity)); |
447 | } | 442 | } |
448 | } | 443 | } |
449 | - } | ||
450 | 444 | ||
451 | private class OchSigTypeDecoder implements CriterionDecoder { | 445 | private class OchSigTypeDecoder implements CriterionDecoder { |
452 | @Override | 446 | @Override | ... | ... |
... | @@ -26,7 +26,6 @@ import org.onosproject.core.DefaultGroupId; | ... | @@ -26,7 +26,6 @@ import org.onosproject.core.DefaultGroupId; |
26 | import org.onosproject.core.GroupId; | 26 | import org.onosproject.core.GroupId; |
27 | import org.onosproject.net.ChannelSpacing; | 27 | import org.onosproject.net.ChannelSpacing; |
28 | import org.onosproject.net.GridType; | 28 | import org.onosproject.net.GridType; |
29 | -import org.onosproject.net.Lambda; | ||
30 | import org.onosproject.net.OchSignal; | 29 | import org.onosproject.net.OchSignal; |
31 | import org.onosproject.net.OduSignalId; | 30 | import org.onosproject.net.OduSignalId; |
32 | import org.onosproject.net.PortNumber; | 31 | import org.onosproject.net.PortNumber; |
... | @@ -147,12 +146,7 @@ public final class DecodeInstructionCodecHelper { | ... | @@ -147,12 +146,7 @@ public final class DecodeInstructionCodecHelper { |
147 | private Instruction decodeL0() { | 146 | private Instruction decodeL0() { |
148 | String subType = json.get(InstructionCodec.SUBTYPE).asText(); | 147 | String subType = json.get(InstructionCodec.SUBTYPE).asText(); |
149 | 148 | ||
150 | - | 149 | + if (subType.equals(L0ModificationInstruction.L0SubType.OCH.name())) { |
151 | - if (subType.equals(L0ModificationInstruction.L0SubType.LAMBDA.name())) { | ||
152 | - int lambda = nullIsIllegal(json.get(InstructionCodec.LAMBDA), | ||
153 | - InstructionCodec.LAMBDA + InstructionCodec.MISSING_MEMBER_MESSAGE).asInt(); | ||
154 | - return Instructions.modL0Lambda(Lambda.indexedLambda(lambda)); | ||
155 | - } else if (subType.equals(L0ModificationInstruction.L0SubType.OCH.name())) { | ||
156 | String gridTypeString = nullIsIllegal(json.get(InstructionCodec.GRID_TYPE), | 150 | String gridTypeString = nullIsIllegal(json.get(InstructionCodec.GRID_TYPE), |
157 | InstructionCodec.GRID_TYPE + InstructionCodec.MISSING_MEMBER_MESSAGE).asText(); | 151 | InstructionCodec.GRID_TYPE + InstructionCodec.MISSING_MEMBER_MESSAGE).asText(); |
158 | GridType gridType = GridType.valueOf(gridTypeString); | 152 | GridType gridType = GridType.valueOf(gridTypeString); | ... | ... |
... | @@ -214,7 +214,7 @@ public class FlowRuleCodecTest { | ... | @@ -214,7 +214,7 @@ public class FlowRuleCodecTest { |
214 | instruction.type().name() + "/" + subType, instruction); | 214 | instruction.type().name() + "/" + subType, instruction); |
215 | }); | 215 | }); |
216 | 216 | ||
217 | - assertThat(rule.treatment().allInstructions().size(), is(24)); | 217 | + assertThat(rule.treatment().allInstructions().size(), is(23)); |
218 | 218 | ||
219 | Instruction instruction; | 219 | Instruction instruction; |
220 | 220 | ||
... | @@ -320,13 +320,6 @@ public class FlowRuleCodecTest { | ... | @@ -320,13 +320,6 @@ public class FlowRuleCodecTest { |
320 | is(8)); | 320 | is(8)); |
321 | 321 | ||
322 | instruction = getInstruction(Instruction.Type.L0MODIFICATION, | 322 | instruction = getInstruction(Instruction.Type.L0MODIFICATION, |
323 | - L0ModificationInstruction.L0SubType.LAMBDA.name()); | ||
324 | - assertThat(instruction.type(), is(Instruction.Type.L0MODIFICATION)); | ||
325 | - assertThat(((L0ModificationInstruction.ModLambdaInstruction) instruction) | ||
326 | - .lambda(), | ||
327 | - is((short) 7)); | ||
328 | - | ||
329 | - instruction = getInstruction(Instruction.Type.L0MODIFICATION, | ||
330 | L0ModificationInstruction.L0SubType.OCH.name()); | 323 | L0ModificationInstruction.L0SubType.OCH.name()); |
331 | assertThat(instruction.type(), is(Instruction.Type.L0MODIFICATION)); | 324 | assertThat(instruction.type(), is(Instruction.Type.L0MODIFICATION)); |
332 | L0ModificationInstruction.ModOchSignalInstruction och = | 325 | L0ModificationInstruction.ModOchSignalInstruction och = | ... | ... |
... | @@ -26,7 +26,6 @@ | ... | @@ -26,7 +26,6 @@ |
26 | {"type":"L3MODIFICATION","subtype":"IPV6_SRC", "ip":"1.2.3.2"}, | 26 | {"type":"L3MODIFICATION","subtype":"IPV6_SRC", "ip":"1.2.3.2"}, |
27 | {"type":"L3MODIFICATION","subtype":"IPV6_DST", "ip":"1.2.3.1"}, | 27 | {"type":"L3MODIFICATION","subtype":"IPV6_DST", "ip":"1.2.3.1"}, |
28 | {"type":"L3MODIFICATION","subtype":"IPV6_FLABEL", "flowLabel":8}, | 28 | {"type":"L3MODIFICATION","subtype":"IPV6_FLABEL", "flowLabel":8}, |
29 | - {"type":"L0MODIFICATION","subtype":"LAMBDA","lambda":7}, | ||
30 | {"type":"L0MODIFICATION","subtype":"OCH","gridType":"DWDM", | 29 | {"type":"L0MODIFICATION","subtype":"OCH","gridType":"DWDM", |
31 | "channelSpacing":"CHL_100GHZ","spacingMultiplier":4,"slotGranularity":8}, | 30 | "channelSpacing":"CHL_100GHZ","spacingMultiplier":4,"slotGranularity":8}, |
32 | {"type":"L4MODIFICATION","subtype":"TCP_DST","tcpPort":40001}, | 31 | {"type":"L4MODIFICATION","subtype":"TCP_DST","tcpPort":40001}, | ... | ... |
... | @@ -344,11 +344,6 @@ public class KryoSerializerTest { | ... | @@ -344,11 +344,6 @@ public class KryoSerializerTest { |
344 | } | 344 | } |
345 | 345 | ||
346 | @Test | 346 | @Test |
347 | - public void testIndexedLambda() { | ||
348 | - testSerializedEquals(org.onosproject.net.Lambda.indexedLambda(10L)); | ||
349 | - } | ||
350 | - | ||
351 | - @Test | ||
352 | public void testOchSignal() { | 347 | public void testOchSignal() { |
353 | testSerializedEquals(org.onosproject.net.Lambda.ochSignal( | 348 | testSerializedEquals(org.onosproject.net.Lambda.ochSignal( |
354 | GridType.DWDM, ChannelSpacing.CHL_100GHZ, 1, 1 | 349 | GridType.DWDM, ChannelSpacing.CHL_100GHZ, 1, 1 | ... | ... |
... | @@ -25,7 +25,6 @@ import org.onlab.packet.VlanId; | ... | @@ -25,7 +25,6 @@ import org.onlab.packet.VlanId; |
25 | import org.onosproject.core.DefaultGroupId; | 25 | import org.onosproject.core.DefaultGroupId; |
26 | import org.onosproject.core.GroupId; | 26 | import org.onosproject.core.GroupId; |
27 | import org.onosproject.net.DeviceId; | 27 | import org.onosproject.net.DeviceId; |
28 | -import org.onosproject.net.Lambda; | ||
29 | import org.onosproject.net.PortNumber; | 28 | import org.onosproject.net.PortNumber; |
30 | import org.onosproject.net.driver.DefaultDriverData; | 29 | import org.onosproject.net.driver.DefaultDriverData; |
31 | import org.onosproject.net.driver.DefaultDriverHandler; | 30 | import org.onosproject.net.driver.DefaultDriverHandler; |
... | @@ -34,7 +33,6 @@ import org.onosproject.net.driver.DriverHandler; | ... | @@ -34,7 +33,6 @@ import org.onosproject.net.driver.DriverHandler; |
34 | import org.onosproject.net.driver.DriverService; | 33 | import org.onosproject.net.driver.DriverService; |
35 | import org.onosproject.net.flow.DefaultTrafficTreatment; | 34 | import org.onosproject.net.flow.DefaultTrafficTreatment; |
36 | import org.onosproject.net.flow.TrafficTreatment; | 35 | import org.onosproject.net.flow.TrafficTreatment; |
37 | -import org.onosproject.net.flow.instructions.Instructions; | ||
38 | import org.onosproject.net.group.DefaultGroupBucket; | 36 | import org.onosproject.net.group.DefaultGroupBucket; |
39 | import org.onosproject.net.group.GroupBucket; | 37 | import org.onosproject.net.group.GroupBucket; |
40 | import org.onosproject.net.group.GroupBuckets; | 38 | import org.onosproject.net.group.GroupBuckets; |
... | @@ -43,7 +41,6 @@ import org.onosproject.openflow.controller.ExtensionTreatmentInterpreter; | ... | @@ -43,7 +41,6 @@ import org.onosproject.openflow.controller.ExtensionTreatmentInterpreter; |
43 | import org.projectfloodlight.openflow.protocol.OFBucket; | 41 | import org.projectfloodlight.openflow.protocol.OFBucket; |
44 | import org.projectfloodlight.openflow.protocol.OFGroupType; | 42 | import org.projectfloodlight.openflow.protocol.OFGroupType; |
45 | import org.projectfloodlight.openflow.protocol.action.OFAction; | 43 | import org.projectfloodlight.openflow.protocol.action.OFAction; |
46 | -import org.projectfloodlight.openflow.protocol.action.OFActionCircuit; | ||
47 | import org.projectfloodlight.openflow.protocol.action.OFActionCopyTtlIn; | 44 | import org.projectfloodlight.openflow.protocol.action.OFActionCopyTtlIn; |
48 | import org.projectfloodlight.openflow.protocol.action.OFActionCopyTtlOut; | 45 | import org.projectfloodlight.openflow.protocol.action.OFActionCopyTtlOut; |
49 | import org.projectfloodlight.openflow.protocol.action.OFActionDecMplsTtl; | 46 | import org.projectfloodlight.openflow.protocol.action.OFActionDecMplsTtl; |
... | @@ -61,7 +58,6 @@ import org.projectfloodlight.openflow.protocol.action.OFActionSetNwSrc; | ... | @@ -61,7 +58,6 @@ import org.projectfloodlight.openflow.protocol.action.OFActionSetNwSrc; |
61 | import org.projectfloodlight.openflow.protocol.action.OFActionSetVlanPcp; | 58 | import org.projectfloodlight.openflow.protocol.action.OFActionSetVlanPcp; |
62 | import org.projectfloodlight.openflow.protocol.action.OFActionSetVlanVid; | 59 | import org.projectfloodlight.openflow.protocol.action.OFActionSetVlanVid; |
63 | import org.projectfloodlight.openflow.protocol.oxm.OFOxm; | 60 | import org.projectfloodlight.openflow.protocol.oxm.OFOxm; |
64 | -import org.projectfloodlight.openflow.protocol.oxm.OFOxmOchSigidBasic; | ||
65 | import org.projectfloodlight.openflow.types.IPv4Address; | 61 | import org.projectfloodlight.openflow.types.IPv4Address; |
66 | import org.projectfloodlight.openflow.types.OFVlanVidMatch; | 62 | import org.projectfloodlight.openflow.types.OFVlanVidMatch; |
67 | import org.projectfloodlight.openflow.types.U32; | 63 | import org.projectfloodlight.openflow.types.U32; |
... | @@ -199,14 +195,7 @@ public class GroupBucketEntryBuilder { | ... | @@ -199,14 +195,7 @@ public class GroupBucketEntryBuilder { |
199 | break; | 195 | break; |
200 | case EXPERIMENTER: | 196 | case EXPERIMENTER: |
201 | OFActionExperimenter exp = (OFActionExperimenter) act; | 197 | OFActionExperimenter exp = (OFActionExperimenter) act; |
202 | - if (exp.getExperimenter() == 0x80005A06 || | ||
203 | - exp.getExperimenter() == 0x748771) { | ||
204 | - OFActionCircuit ct = (OFActionCircuit) exp; | ||
205 | - short lambda = ((OFOxmOchSigidBasic) ct.getField()).getValue().getChannelNumber(); | ||
206 | - builder.add(Instructions.modL0Lambda(Lambda.indexedLambda(lambda))); | ||
207 | - } else { | ||
208 | log.warn("Unsupported OFActionExperimenter {}", exp.getExperimenter()); | 198 | log.warn("Unsupported OFActionExperimenter {}", exp.getExperimenter()); |
209 | - } | ||
210 | break; | 199 | break; |
211 | case SET_FIELD: | 200 | case SET_FIELD: |
212 | OFActionSetField setField = (OFActionSetField) act; | 201 | OFActionSetField setField = (OFActionSetField) act; | ... | ... |
-
Please register or login to post a comment