import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import org.opendaylight.controller.remote.rpc.messages.ErrorResponse;
-import org.opendaylight.controller.remote.rpc.messages.InvokeRoutedRpc;
import org.opendaylight.controller.remote.rpc.messages.InvokeRpc;
import org.opendaylight.controller.remote.rpc.messages.RpcResponse;
import org.opendaylight.controller.remote.rpc.utils.ActorUtil;
-import org.opendaylight.controller.remote.rpc.utils.XmlUtils;
+import org.opendaylight.controller.xml.codec.XmlUtils;
import org.opendaylight.controller.sal.core.api.RoutedRpcDefaultImplementation;
import org.opendaylight.controller.sal.core.api.RpcImplementation;
import org.opendaylight.yangtools.yang.common.QName;
@Override
public ListenableFuture<RpcResult<CompositeNode>> invokeRpc(QName rpc, YangInstanceIdentifier identifier, CompositeNode input) {
- InvokeRoutedRpc rpcMsg = new InvokeRoutedRpc(rpc, identifier, input);
+ InvokeRpc rpcMsg = new InvokeRpc(rpc, identifier, input);
return executeMsg(rpcMsg);
}
@Override
public ListenableFuture<RpcResult<CompositeNode>> invokeRpc(QName rpc, CompositeNode input) {
- InvokeRpc rpcMsg = new InvokeRpc(rpc, input);
+ InvokeRpc rpcMsg = new InvokeRpc(rpc, null, input);
return executeMsg(rpcMsg);
}
ListenableFuture<RpcResult<CompositeNode>> listenableFuture = null;
try {
- Object response = ActorUtil.executeLocalOperation(rpcBroker, rpcMsg, ActorUtil.ASK_DURATION, ActorUtil.AWAIT_DURATION);
+ Object response = ActorUtil.executeOperation(rpcBroker, rpcMsg, ActorUtil.ASK_DURATION, ActorUtil.AWAIT_DURATION);
if(response instanceof RpcResponse) {
RpcResponse rpcResponse = (RpcResponse) response;
}
} catch (Exception e) {
- LOG.error("Error occurred while invoking RPC actor {}", e.toString());
+ LOG.error("Error occurred while invoking RPC actor {}", e);
final RpcResultBuilder<CompositeNode> failed = RpcResultBuilder.failed();
failed.withError(null, null, e.getMessage(), null, null, e.getCause());