Remove all the mastership roles when a Node leaves the cluster

- Fix for ONOS-1189

Change-Id: I695ccd6bf2ff12da3702d1a982e377b7082c9341
diff --git a/core/api/src/main/java/org/onosproject/mastership/MastershipStore.java b/core/api/src/main/java/org/onosproject/mastership/MastershipStore.java
index 2112029..16d6d39 100644
--- a/core/api/src/main/java/org/onosproject/mastership/MastershipStore.java
+++ b/core/api/src/main/java/org/onosproject/mastership/MastershipStore.java
@@ -113,4 +113,12 @@
      */
     MastershipEvent relinquishRole(NodeId nodeId, DeviceId deviceId);
 
+    /**
+     * Removes all the roles for the specified controller instance.
+     * If the role was MASTER, another controller instance will be selected
+     * as a candidate master.
+     *
+     * @param nodeId the controller instance identifier
+     */
+    void relinquishAllRole(NodeId nodeId);
 }