Rework karaf CLI commands to print results on console
[controller.git] / opendaylight / md-sal / samples / clustering-test-app / karaf-cli / src / main / java / org / opendaylight / clustering / it / karaf / cli / AbstractRpcAction.java
index d76dbb5..eb483bf 100644 (file)
@@ -23,8 +23,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();