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 Draft17.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 Draft17 {
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 DATA = "application/yang-data";
44 public static final String PATCH = "application/yang.patch";
45 public static final String PATCH_STATUS = "application/yang.patch-status";
46 public static final String YIN = "application/yin";
47 public static final String YANG = "application/yang";
51 * Constants for restconf module
54 public static final class RestconfModule {
56 private RestconfModule() {
57 throw new UnsupportedOperationException("Util class");
60 public static final String REVISION = "2013-10-19";
62 public static final String NAME = "ietf-restconf";
64 public static final String NAMESPACE = "urn:ietf:params:xml:ns:yang:ietf-restconf";
66 public static final String RESTCONF_GROUPING_SCHEMA_NODE = "restconf";
68 public static final String RESTCONF_CONTAINER_SCHEMA_NODE = "restconf";
70 public static final String MODULES_CONTAINER_SCHEMA_NODE = "modules";
72 public static final String MODULE_LIST_SCHEMA_NODE = "module";
74 public static final String OPERATIONS_CONTAINER_SCHEMA_NODE = "operations";
76 public static final String ERRORS_GROUPING_SCHEMA_NODE = "errors";
78 public static final String ERRORS_CONTAINER_SCHEMA_NODE = "errors";
80 public static final String ERROR_LIST_SCHEMA_NODE = "error";
82 public static final QName IETF_RESTCONF_QNAME = QName.create(Draft17.RestconfModule.NAMESPACE, Draft17.RestconfModule.REVISION,
83 Draft17.RestconfModule.NAME);
85 public static final QName ERRORS_CONTAINER_QNAME = QName.create(IETF_RESTCONF_QNAME, ERRORS_CONTAINER_SCHEMA_NODE);
87 public static final QName ERROR_LIST_QNAME = QName.create(IETF_RESTCONF_QNAME, ERROR_LIST_SCHEMA_NODE);
89 public static final QName ERROR_TYPE_QNAME = QName.create(IETF_RESTCONF_QNAME, "error-type");
91 public static final QName ERROR_TAG_QNAME = QName.create(IETF_RESTCONF_QNAME, "error-tag");
93 public static final QName ERROR_APP_TAG_QNAME = QName.create(IETF_RESTCONF_QNAME, "error-app-tag");
95 public static final QName ERROR_MESSAGE_QNAME = QName.create(IETF_RESTCONF_QNAME, "error-message");
97 public static final QName ERROR_INFO_QNAME = QName.create(IETF_RESTCONF_QNAME, "error-info");
99 public static final QName ERROR_PATH_QNAME = QName.create(IETF_RESTCONF_QNAME, "error-path");
103 * Constants for restconf module
106 public static final class MonitoringModule {
108 private MonitoringModule() {
109 throw new UnsupportedOperationException("Util class");
112 public static final String STREAMS_CONTAINER_SCHEMA_NODE = "streams";
114 public static final String STREAM_LIST_SCHEMA_NODE = "stream";