diff --git a/apps/openstacknode/src/main/java/org/onosproject/openstacknode/OpenstackNodeManager.java b/apps/openstacknode/src/main/java/org/onosproject/openstacknode/OpenstackNodeManager.java
index d435833..4f3e5e7 100644
--- a/apps/openstacknode/src/main/java/org/onosproject/openstacknode/OpenstackNodeManager.java
+++ b/apps/openstacknode/src/main/java/org/onosproject/openstacknode/OpenstackNodeManager.java
@@ -17,6 +17,7 @@
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
 import org.apache.felix.scr.annotations.Activate;
 import org.apache.felix.scr.annotations.Component;
@@ -82,7 +83,6 @@
 import org.slf4j.Logger;
 
 import java.util.Dictionary;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
@@ -98,6 +98,7 @@
 import static org.onosproject.net.Device.Type.SWITCH;
 import static org.onosproject.net.behaviour.TunnelDescription.Type.VXLAN;
 import static org.onosproject.openstacknode.Constants.*;
+import static org.onosproject.openstacknode.OpenstackNode.getUpdatedNode;
 import static org.onosproject.openstacknode.OpenstackNodeEvent.NodeState.*;
 import static org.slf4j.LoggerFactory.getLogger;
 
@@ -236,8 +237,10 @@
 
     @Override
     public void addOrUpdateNode(OpenstackNode node) {
-        nodeStore.put(node.hostname(),
-                OpenstackNode.getUpdatedNode(node, nodeState(node)));
+        nodeStore.computeIf(node.hostname(),
+                v -> v == null || (!v.equals(node) || v.state() != COMPLETE),
+                (k, v) -> getUpdatedNode(node, nodeState(node))
+        );
     }
 
     @Override
@@ -438,7 +441,7 @@
     }
 
     private void setNodeState(OpenstackNode node, NodeState newState) {
-        nodeStore.put(node.hostname(), OpenstackNode.getUpdatedNode(node, newState));
+        nodeStore.put(node.hostname(), getUpdatedNode(node, newState));
     }
 
     private NodeState nodeState(OpenstackNode node) {
@@ -478,9 +481,7 @@
 
         BridgeConfig bridgeConfig =  device.as(BridgeConfig.class);
         return bridgeConfig.getPorts().stream()
-                .filter(port -> port.annotations().value(PORT_NAME).equals(ifaceName))
-                .findAny()
-                .isPresent();
+                .anyMatch(port -> port.annotations().value(PORT_NAME).equals(ifaceName));
     }
 
     private boolean isBridgeCreated(DeviceId deviceId, String bridgeName) {
@@ -491,9 +492,7 @@
 
         BridgeConfig bridgeConfig =  device.as(BridgeConfig.class);
         return bridgeConfig.getBridges().stream()
-                .filter(bridge -> bridge.name().equals(bridgeName))
-                .findAny()
-                .isPresent();
+                .anyMatch(bridge -> bridge.name().equals(bridgeName));
     }
 
     private void createBridge(OpenstackNode node, String bridgeName, DeviceId deviceId) {
@@ -631,7 +630,7 @@
     private Set<String> systemIfaces(OpenstackNode node) {
         Set<String> ifaces = Sets.newHashSet();
         node.dataIp().ifPresent(ip -> ifaces.add(DEFAULT_TUNNEL));
-        node.vlanPort().ifPresent(p -> ifaces.add(p));
+        node.vlanPort().ifPresent(ifaces::add);
         if (node.type().equals(NodeType.GATEWAY)) {
             ifaces.add(PATCH_INTG_BRIDGE);
             ifaces.add(PATCH_ROUT_BRIDGE);
@@ -788,7 +787,7 @@
             return;
         }
 
-        Map<String, OpenstackNode> prevNodeMap = new HashMap(nodeStore.asJavaMap());
+        Map<String, OpenstackNode> prevNodeMap = Maps.newHashMap(nodeStore.asJavaMap());
         config.openstackNodes().forEach(node -> {
             prevNodeMap.remove(node.hostname());
             addOrUpdateNode(node);
