2 * Copyright (c) 2023 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.restconf.server.api;
11 import org.eclipse.jdt.annotation.NonNullByDefault;
12 import org.opendaylight.restconf.common.errors.RestconfFuture;
13 import org.opendaylight.restconf.nb.rfc8040.databind.OperationInputBody;
14 import org.opendaylight.restconf.nb.rfc8040.legacy.NormalizedNodePayload;
15 import org.opendaylight.restconf.server.spi.OperationOutput;
18 * An implementation of a RESTCONF server, implementing the
19 * <a href="https://www.rfc-editor.org/rfc/rfc8040#section-3.3">RESTCONF API Resource</a>.
22 public interface RestconfServer {
24 * Return the revision of {@code ietf-yang-library} module implemented by this server, as defined in
25 * <a href="https://www.rfc-editor.org/rfc/rfc8040#section-3.3.3">RFC8040 {+restconf}/yang-library-version</a>.
27 * @return A {@code yang-library-version} element
29 // FIXME: this is a simple coning-variadic return, similar to how OperationsContent is handled use a common
30 // construct for both cases
31 // FIXME: RestconfFuture if we transition to being used by restconf-client implementation
32 NormalizedNodePayload yangLibraryVersionGET();
34 // FIXME: use ApiPath instead of String
35 RestconfFuture<OperationOutput> invokeRpc(URI restconfURI, String apiPath, OperationInputBody body);