commit | 42d109d1e968a694020ad582c213b07157394690 | [log] [tgz] |
---|---|---|
author | Charles Chan <rascov@gmail.com> | Wed Dec 18 15:49:39 2019 -0800 |
committer | Charles Chan <charles@opennetworking.org> | Thu Jan 09 23:35:40 2020 +0000 |
tree | 34e85fd84df7e46c619a24a43a2f84f728d936e2 | |
parent | 2126f4a0d038f2ca4aa73675a5d39c590b0060f0 [diff] [blame] |
Added CLI and REST support for auxLocations Change-Id: I04e78f766dcbb18bce4a2f9160d3740ec2fbd846 (cherry picked from commit eb5bd4998289bf78862db927d58b76cb12979459)
diff --git a/core/common/src/main/java/org/onosproject/codec/impl/HostCodec.java b/core/common/src/main/java/org/onosproject/codec/impl/HostCodec.java index 5f8ca9d..d2890a4 100644 --- a/core/common/src/main/java/org/onosproject/codec/impl/HostCodec.java +++ b/core/common/src/main/java/org/onosproject/codec/impl/HostCodec.java
@@ -56,6 +56,14 @@ } result.set("locations", jsonLocations); + if (host.auxLocations() != null) { + final ArrayNode jsonAuxLocations = result.putArray("auxLocations"); + for (final HostLocation auxLocation : host.auxLocations()) { + jsonAuxLocations.add(locationCodec.encode(auxLocation, context)); + } + result.set("auxLocations", jsonAuxLocations); + } + return annotate(result, host, context); }