added HostProvider to SimpleHostManager

Change-Id: I13ff57fcd24ea7bd2c3f2544a3aad7d18ceda107
diff --git a/core/trivial/src/main/java/org/onlab/onos/net/trivial/host/impl/SimpleHostStore.java b/core/trivial/src/main/java/org/onlab/onos/net/trivial/host/impl/SimpleHostStore.java
index 2f9eb29..b7fc5ae 100644
--- a/core/trivial/src/main/java/org/onlab/onos/net/trivial/host/impl/SimpleHostStore.java
+++ b/core/trivial/src/main/java/org/onlab/onos/net/trivial/host/impl/SimpleHostStore.java
@@ -76,20 +76,23 @@
             HostDescription descr) {
         DefaultHost updated;
         HostEvent event;
-        if (host.location().equals(descr.location())) {
-            updated = new DefaultHost(providerId, host.id(),
-                    host.mac(),
-                    host.vlan(),
-                    host.location(),
-                    descr.ipAddresses());
-            event = new HostEvent(HOST_UPDATED, updated);
-        } else {
+        // Consider only actual location (not timestamp) change?
+        if (!(host.location().port().equals(descr.location().port()))) {
             updated = new DefaultHost(providerId, host.id(),
                     host.mac(),
                     host.vlan(),
                     descr.location(),
                     host.ipAddresses());
             event = new HostEvent(HOST_MOVED, updated);
+        } else if (!(host.ipAddresses().equals(descr.ipAddresses()))) {
+            updated = new DefaultHost(providerId, host.id(),
+                    host.mac(),
+                    host.vlan(),
+                    descr.location(),
+                    descr.ipAddresses());
+            event = new HostEvent(HOST_UPDATED, updated);
+        } else {
+            return null;
         }
         synchronized (this) {
             hosts.put(host.id(), updated);