commit | 7080a0d1266526e0fb1de15ab032e76ad3885837 | [log] [tgz] |
---|---|---|
author | Hyunsun Moon <hyunsun.moon@gmail.com> | Fri Aug 14 19:18:48 2015 -0700 |
committer | Hyunsun Moon <hyunsun.moon@gmail.com> | Fri Aug 14 19:19:33 2015 -0700 |
tree | da7364e7483875710fc9fc1e63863c06cefdd6f3 | |
parent | 01e05fbed2eccb734ade964b8db78a05cc40ad24 [diff] [blame] |
ONOS-2581 Add codec for tunnel id Change-Id: I6ff456b0419b427945cc53fb74fd0a91cdfa758e
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 21968c2..568fa76 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
@@ -88,6 +88,10 @@ return Instructions.popVlan(); } else if (subType.equals(L2ModificationInstruction.L2SubType.VLAN_PUSH.name())) { return Instructions.pushVlan(); + } else if (subType.equals(L2ModificationInstruction.L2SubType.TUNNEL_ID.name())) { + long tunnelId = nullIsIllegal(json.get(InstructionCodec.TUNNEL_ID), + InstructionCodec.TUNNEL_ID + InstructionCodec.MISSING_MEMBER_MESSAGE).asLong(); + return Instructions.modTunnelId(tunnelId); } throw new IllegalArgumentException("L2 Instruction subtype " + subType + " is not supported");