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 0a85b562eb2cef8720c4177da7f974034dec0794..f16ac25fe6a8fb023cbad5188561fe0bb04f9790 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();