2 * Copyright (c) 2022 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.netconf.sal.connect.api;
10 import com.google.common.util.concurrent.ListenableFuture;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.mdsal.dom.api.DOMRpcException;
13 import org.opendaylight.mdsal.dom.api.DOMRpcResult;
14 import org.opendaylight.mdsal.dom.api.DOMService;
15 import org.opendaylight.yangtools.yang.common.QName;
16 import org.opendaylight.yangtools.yang.common.YangConstants;
17 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
20 * A {@link DOMService} capturing the ability to invoke RPCs which are defined in RFC4741 and in RFC6241.
22 public interface NetconfRpcService extends DOMService {
24 * Invoke a base RFC4741/RFC6241 RPC, e.g. those in {@link YangConstants#NETCONF_NAMESPACE}.
26 * @param type QName of the RPC to be invoked
27 * @param input Input arguments, null if the RPC does not take any.
28 * @return A {@link ListenableFuture} which will return either a result structure, or report a subclass
29 * of {@link DOMRpcException} reporting a transport error.
31 @NonNull ListenableFuture<? extends DOMRpcResult> invokeNetconf(@NonNull QName type, @NonNull ContainerNode input);