Rework karaf CLI commands to print results on console
[controller.git] / opendaylight / md-sal / sal-cluster-admin-karaf-cli / src / main / java / org / opendaylight / controller / cluster / datastore / admin / command / AbstractRpcAction.java
index 0a85b56..f16ac25 100644 (file)
@@ -25,8 +25,10 @@ public abstract class AbstractRpcAction implements Action {
         if (!result.isSuccessful()) {
             // FIXME: is there a better way to report errors?
             System.out.println("Invocation failed: " + result.getErrors());
+            return null;
+        } else {
+            return result.getResult();
         }
-        return null;
     }
 
     protected abstract ListenableFuture<? extends RpcResult<?>> invokeRpc();