commit | db358086fd98854314392c3ea81119bd7d946848 | [log] [tgz] |
---|---|---|
author | Ray Milkey <ray@onlab.us> | Tue Jan 13 16:34:38 2015 -0800 |
committer | Ray Milkey <ray@onlab.us> | Fri Jan 16 22:00:10 2015 +0000 |
tree | 7f01a8710ab6aa042e1090f71544f2945ee2eea2 | |
parent | f5df28471bf7456ef3414c65112df240757b2e8f [diff] [blame] |
Unit tets for instruction JSON codecs Fixed several bugs in codecs turned up by unit tests Change-Id: Icddb31aa3d2cb58612a0578772d24ff5f113d073
diff --git a/web/api/src/main/java/org/onosproject/codec/impl/CriterionCodec.java b/web/api/src/main/java/org/onosproject/codec/impl/CriterionCodec.java index 81033f2..e6fbea8 100644 --- a/web/api/src/main/java/org/onosproject/codec/impl/CriterionCodec.java +++ b/web/api/src/main/java/org/onosproject/codec/impl/CriterionCodec.java
@@ -50,6 +50,7 @@ case ETH_SRC: case ETH_DST: final Criteria.EthCriterion ethCriterion = (Criteria.EthCriterion) criterion; + result.put("mac", ethCriterion.mac().toString()); break; case ETH_TYPE: @@ -60,6 +61,8 @@ case IPV4_SRC: case IPV6_SRC: + case IPV4_DST: + case IPV6_DST: final Criteria.IPCriterion iPCriterion = (Criteria.IPCriterion) criterion; result.put("ip", iPCriterion.ip().toString()); break;