commit | c5d93e64fc63569164035dcd89b0a4b9a705b2b1 | [log] [tgz] |
---|---|---|
author | Konstantinos Kanonakis <kanonakisk@gmail.com> | Tue Apr 12 18:51:20 2016 -0500 |
committer | Gerrit Code Review <gerrit@onlab.us> | Wed Apr 13 17:04:32 2016 +0000 |
tree | 4f2887bf30a0e596ce4ea12942b01c5b8b10ef78 | |
parent | 7715e897d8432000efd06320cec27478ec3a8a19 [diff] [blame] |
Added meter and table transition instructions to flows REST API. Change-Id: If9d3f61020fab3a91009e3f067b04bd19bbc52d1
diff --git a/core/common/src/main/java/org/onosproject/codec/impl/TrafficTreatmentCodec.java b/core/common/src/main/java/org/onosproject/codec/impl/TrafficTreatmentCodec.java index da74121..6ec5a67 100644 --- a/core/common/src/main/java/org/onosproject/codec/impl/TrafficTreatmentCodec.java +++ b/core/common/src/main/java/org/onosproject/codec/impl/TrafficTreatmentCodec.java
@@ -49,6 +49,13 @@ jsonInstructions.add(instructionCodec.encode(instruction, context)); } + if (treatment.metered() != null) { + jsonInstructions.add(instructionCodec.encode(treatment.metered(), context)); + } + if (treatment.tableTransition() != null) { + jsonInstructions.add(instructionCodec.encode(treatment.tableTransition(), context)); + } + final ArrayNode jsonDeferred = result.putArray("deferred"); for (final Instruction instruction : treatment.deferred()) {