commit | 0a400ead8ee93724b3825c7898b98963a1c10b4c | [log] [tgz] |
---|---|---|
author | Thomas Vachuska <tom@onlab.us> | Fri Sep 04 11:25:03 2015 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Fri Sep 04 21:24:06 2015 +0000 |
tree | 3e211620a2e97c31e6d5651ccc8e26ed8fb59aaa | |
parent | 1651e985caed4ef66b7e98c6c84b1518d7d7ac08 [diff] [blame] |
Adding ability for Config to be backed by generic JsonNode, i.e. either ObjectNode or ArrayNode. Change-Id: I5f9ec423cd5f23f61c97a57073d9d11071c47997
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/InterfaceConfig.java b/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/InterfaceConfig.java index 600fe3d..acda179 100644 --- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/InterfaceConfig.java +++ b/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/InterfaceConfig.java
@@ -50,7 +50,8 @@ Set<Interface> interfaces = Sets.newHashSet(); try { - for (JsonNode intfNode : node.path(INTERFACES)) { + // TODO: rework this to take advantage of ArrayNode backing + for (JsonNode intfNode : object.path(INTERFACES)) { Set<InterfaceIpAddress> ips = getIps(intfNode); if (ips.isEmpty()) { throw new ConfigException(IP_MISSING_ERROR);