diff options
author | Ashlee Young <ashlee@wildernessvoice.com> | 2015-11-11 14:39:51 -0800 |
---|---|---|
committer | Ashlee Young <ashlee@wildernessvoice.com> | 2015-11-11 14:40:00 -0800 |
commit | baac58c7c50e6f89eb0520e3f5b0e83a69839bd3 (patch) | |
tree | 9c5a149ee6cdf345fed7dfe8c97fcaac8959a70d /framework/src/onos/core/common | |
parent | 8f92448e4f2f5d9c98036097bdabd1c40166908a (diff) |
Updating onos src to commit id ec0425c18cbe49d368c600160f033acf9fe344ca
Change-Id: Iec2815bf7771080f25272842b852bd9d33f908ff
Signed-off-by: Ashlee Young <ashlee@wildernessvoice.com>
Diffstat (limited to 'framework/src/onos/core/common')
-rw-r--r-- | framework/src/onos/core/common/src/test/java/org/onosproject/store/trivial/SimpleHostStore.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/framework/src/onos/core/common/src/test/java/org/onosproject/store/trivial/SimpleHostStore.java b/framework/src/onos/core/common/src/test/java/org/onosproject/store/trivial/SimpleHostStore.java index 72ec98ca..a56daab1 100644 --- a/framework/src/onos/core/common/src/test/java/org/onosproject/store/trivial/SimpleHostStore.java +++ b/framework/src/onos/core/common/src/test/java/org/onosproject/store/trivial/SimpleHostStore.java @@ -88,10 +88,14 @@ public class SimpleHostStore boolean replaceIps) { //TODO We need a way to detect conflicting changes and abort update. StoredHost host = hosts.get(hostId); + HostEvent hostEvent; if (host == null) { - return createHost(providerId, hostId, hostDescription); + hostEvent = createHost(providerId, hostId, hostDescription); + } else { + hostEvent = updateHost(providerId, host, hostDescription, replaceIps); } - return updateHost(providerId, host, hostDescription, replaceIps); + notifyDelegate(hostEvent); + return hostEvent; } // creates a new host and sends HOST_ADDED @@ -153,7 +157,9 @@ public class SimpleHostStore Host host = hosts.remove(hostId); if (host != null) { locations.remove((host.location()), host); - return new HostEvent(HOST_REMOVED, host); + HostEvent hostEvent = new HostEvent(HOST_REMOVED, host); + notifyDelegate(hostEvent); + return hostEvent; } return null; } |