delete uni command
[unimgr.git] / impl / src / main / java / org / opendaylight / unimgr / impl / UnimgrUtils.java
index 5195eddaca6a6c4476e82759183865f11a4db527..6b0ee47421dd5f348c02f1e6c5552bacb1fb965c 100644 (file)
@@ -491,17 +491,20 @@ public class UnimgrUtils {
      * @param genericNode The instance identifier of a generic node
      * @param store The dataStore where to send and submit the delete call.
      */
-    public static void deleteNode(DataBroker dataBroker,
+    public static boolean deleteNode(DataBroker dataBroker,
                                   InstanceIdentifier<?> genericNode,
                                   LogicalDatastoreType store) {
         LOG.info("Received a request to delete node {}", genericNode);
+        boolean result = false;
         WriteTransaction transaction = dataBroker.newWriteOnlyTransaction();
         transaction.delete(store, genericNode);
         try {
             transaction.submit().checkedGet();
+            return !result;
         } catch (TransactionCommitFailedException e) {
             LOG.error("Unable to remove node with Iid {} from store {}.", genericNode, store);
         }
+        return result;
     }
 
     /**