2 * Copyright (c) 2016 Cisco Systems, Inc. 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.rest.services.api;
10 import javax.ws.rs.GET;
11 import javax.ws.rs.Path;
12 import javax.ws.rs.PathParam;
13 import javax.ws.rs.Produces;
14 import javax.ws.rs.core.Context;
15 import javax.ws.rs.core.MediaType;
16 import javax.ws.rs.core.UriInfo;
17 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
18 import org.opendaylight.restconf.Draft15;
19 import org.opendaylight.restconf.utils.RestconfConstants;
22 * Service provides information about the YANG modules and submodules.
24 public interface RestconfModulesService {
27 * Get identifiers for the YANG data model modules supported by the server.
31 * @return {@link NormalizedNodeContext}
34 @Path("data/ietf-yang-library:modules-state")
35 @Produces({ Draft15.MediaTypes.DATA + RestconfConstants.JSON, Draft15.MediaTypes.DATA, MediaType.APPLICATION_JSON,
36 MediaType.APPLICATION_XML, MediaType.TEXT_XML })
37 public NormalizedNodeContext getModules(@Context UriInfo uriInfo);
40 * Valid only for mount points. Get identifiers for the YANG data model
41 * modules supported by the specific mount point.
47 * @return {@link NormalizedNodeContext}
50 @Path("data/ietf-yang-library:modules-state/{identifier:.+}")
51 @Produces({ Draft15.MediaTypes.DATA + RestconfConstants.JSON, Draft15.MediaTypes.DATA, MediaType.APPLICATION_JSON,
52 MediaType.APPLICATION_XML, MediaType.TEXT_XML })
53 public NormalizedNodeContext getModules(@PathParam("identifier") String identifier, @Context UriInfo uriInfo);
56 * Get entry for each YANG data model module supported by the server. There
57 * must be an instance of this list for every YANG module that is used by
64 * @return {@link NormalizedNodeContext}
67 @Path("data/ietf-yang-library:modules-state/module/{identifier:.+}")
68 @Produces({ Draft15.MediaTypes.DATA + RestconfConstants.JSON, Draft15.MediaTypes.DATA, MediaType.APPLICATION_JSON,
69 MediaType.APPLICATION_XML, MediaType.TEXT_XML })
70 public NormalizedNodeContext getModule(@PathParam("identifier") String identifier, @Context UriInfo uriInfo);