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;
10 import org.opendaylight.yangtools.yang.common.QName;
13 * Base Draft for Restconf project
15 * <li>Supported {@link MediaTypes}
16 * <li>Constants for modules
18 * <li>{@link RestconfModule}
19 * <li>{@link MonitoringModule}
23 * We used old revision {@link Draft15.RestconfModule#REVISION} of restconf yang
24 * because the latest restconf draft has to be supported by Yang 1.1 and we are
25 * not. Then, this is only partial implementation of the latest restconf draft.
27 public final class Draft15 {
30 throw new UnsupportedOperationException("Util class");
34 * Set of application specific media types to identify each of the available
37 public static final class MediaTypes {
39 private MediaTypes() {
40 throw new UnsupportedOperationException("Util class");
43 public static final String API = "application/yang.api";
44 public static final String DATASTORE = "application/yang.datastore";
45 public static final String DATA = "application/yang.data";
46 public static final String OPERATION = "application/yang.operation";
47 public static final String PATCH = "application/yang.patch";
48 public static final String PATCH_STATUS = "application/yang.patch-status";
49 public static final String ERRORS = "application/yang.errors";
50 public static final String YIN = "application/yin";
51 public static final String YANG = "application/yang";
55 * Constants for restconf module
58 public static final class RestconfModule {
60 private RestconfModule() {
61 throw new UnsupportedOperationException("Util class");
64 public static final String REVISION = "2013-10-19";
66 public static final String NAME = "ietf-restconf";
68 public static final String NAMESPACE = "urn:ietf:params:xml:ns:yang:ietf-restconf";
70 public static final String RESTCONF_GROUPING_SCHEMA_NODE = "restconf";
72 public static final String RESTCONF_CONTAINER_SCHEMA_NODE = "restconf";
74 public static final String MODULES_CONTAINER_SCHEMA_NODE = "modules";
76 public static final String MODULE_LIST_SCHEMA_NODE = "module";
78 public static final String OPERATIONS_CONTAINER_SCHEMA_NODE = "operations";
80 public static final String ERRORS_GROUPING_SCHEMA_NODE = "errors";
82 public static final String ERRORS_CONTAINER_SCHEMA_NODE = "errors";
84 public static final String ERROR_LIST_SCHEMA_NODE = "error";
86 public static final QName IETF_RESTCONF_QNAME = QName.create(Draft15.RestconfModule.NAMESPACE, Draft15.RestconfModule.REVISION,
87 Draft15.RestconfModule.NAME);
89 public static final QName ERRORS_CONTAINER_QNAME = QName.create(IETF_RESTCONF_QNAME, ERRORS_CONTAINER_SCHEMA_NODE);
91 public static final QName ERROR_LIST_QNAME = QName.create(IETF_RESTCONF_QNAME, ERROR_LIST_SCHEMA_NODE);
93 public static final QName ERROR_TYPE_QNAME = QName.create(IETF_RESTCONF_QNAME, "error-type");
95 public static final QName ERROR_TAG_QNAME = QName.create(IETF_RESTCONF_QNAME, "error-tag");
97 public static final QName ERROR_APP_TAG_QNAME = QName.create(IETF_RESTCONF_QNAME, "error-app-tag");
99 public static final QName ERROR_MESSAGE_QNAME = QName.create(IETF_RESTCONF_QNAME, "error-message");
101 public static final QName ERROR_INFO_QNAME = QName.create(IETF_RESTCONF_QNAME, "error-info");
103 public static final QName ERROR_PATH_QNAME = QName.create(IETF_RESTCONF_QNAME, "error-path");
107 * Constants for restconf module
110 public static final class MonitoringModule {
112 private MonitoringModule() {
113 throw new UnsupportedOperationException("Util class");
116 public static final String STREAMS_CONTAINER_SCHEMA_NODE = "streams";
118 public static final String STREAM_LIST_SCHEMA_NODE = "stream";