Adds coordination during host movements

This fix assures that only the king will perform the update of the L3UC chain

Change-Id: I38b91beaa56b46b7dcd22b3316815dbb17b255fa
diff --git a/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java b/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
index dc300e9..a118292 100644
--- a/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
+++ b/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
@@ -1317,6 +1317,14 @@
      */
     public void updateMacVlanTreatment(DeviceId deviceId, MacAddress hostMac,
                              VlanId hostVlanId, PortNumber port, int nextId) {
+        // Check if we are the king of this device
+        // just one instance should perform this update
+        if (!defaultRoutingHandler.shouldProgram(deviceId)) {
+            log.debug("This instance is not handling the routing towards the "
+                              + "device {}", deviceId);
+            return;
+        }
+        // Get the handler and perform the update
         DefaultGroupHandler ghdlr = groupHandlerMap.get(deviceId);
         if (ghdlr != null) {
             ghdlr.updateL3UcastGroupBucket(hostMac, hostVlanId, port, nextId);