}
@Override
- public RestconfFuture<OperationOutput> invokeRpc(final URI restconfURI, final String apiPath,
+ public RestconfFuture<OperationOutput> operationsPOST(final URI restconfURI, final String apiPath,
final OperationInputBody body) {
final var currentContext = databindProvider.currentContext();
final var reqPath = bindRequestPath(currentContext, apiPath);
private void invokeRpc(final String identifier, final UriInfo uriInfo, final AsyncResponse ar,
final OperationInputBody body) {
- server.invokeRpc(uriInfo.getBaseUri(), identifier, body)
+ server.operationsPOST(uriInfo.getBaseUri(), identifier, body)
.addCallback(new JaxRsRestconfCallback<OperationOutput>(ar) {
@Override
Response transform(final OperationOutput result) {
import java.net.URI;
import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.opendaylight.restconf.api.ApiPath;
import org.opendaylight.restconf.common.errors.RestconfFuture;
import org.opendaylight.restconf.nb.rfc8040.databind.OperationInputBody;
import org.opendaylight.restconf.nb.rfc8040.legacy.NormalizedNodePayload;
// FIXME: RestconfFuture if we transition to being used by restconf-client implementation
NormalizedNodePayload yangLibraryVersionGET();
+ /**
+ * Invoke an RPC operation, as defined in
+ * <a href="https://www.rfc-editor.org/rfc/rfc8040#section-3.6">RFC8040 Operation Resource</a>.
+ *
+ * @param restconfURI Base URI of the request
+ * @param operation {@code <operation>} path, really an {@link ApiPath} to an {@code rpc}
+ * @param body RPC operation
+ * @return A {@link RestconfFuture} of the {@link OperationOutput operation result}
+ */
+ // FIXME: 'operation' should really be an ApiIdentifier with non-null module, but we also support ang-ext:mount,
+ // and hence it is a path right now
// FIXME: use ApiPath instead of String
- RestconfFuture<OperationOutput> invokeRpc(URI restconfURI, String apiPath, OperationInputBody body);
+ RestconfFuture<OperationOutput> operationsPOST(URI restconfURI, String operation, OperationInputBody body);
}