import com.google.common.base.Function;
import com.google.common.util.concurrent.Futures;
+
import java.util.Collections;
import java.util.Set;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Executor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
import javax.annotation.Nullable;
+
import org.opendaylight.controller.netconf.api.NetconfMessage;
-import org.opendaylight.controller.sal.common.util.Rpcs;
import org.opendaylight.controller.sal.connect.api.MessageTransformer;
import org.opendaylight.controller.sal.connect.api.RemoteDeviceCommunicator;
import org.opendaylight.controller.sal.core.api.RpcImplementation;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.common.RpcResult;
+import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
import org.opendaylight.yangtools.yang.data.api.CompositeNode;
import com.google.common.util.concurrent.ListenableFuture;
if (netconfMessageRpcResult.isSuccessful()) {
return transformer.toRpcResult(netconfMessageRpcResult.getResult(), rpc);
} else {
- return Rpcs.getRpcResult(false, netconfMessageRpcResult.getErrors());
+ return RpcResultBuilder.<CompositeNode> failed()
+ .withRpcErrors(netconfMessageRpcResult.getErrors()).build();
}
}