Bug 1010: Implement restconf error responses
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / main / java / org / opendaylight / controller / sal / rest / api / Draft02.java
index d0eaa36dde23bd118a47a38b519139ccaed31a7a..af763cce0d20e0b03a76a1321580dcd71571446c 100644 (file)
@@ -7,18 +7,67 @@
  */
 package org.opendaylight.controller.sal.rest.api;
 
+import org.opendaylight.yangtools.yang.common.QName;
+
 public class Draft02 {
-    public static class MediaTypes {
-        public static final String API = "application/yang.api";
-        public static final String DATASTORE = "application/yang.datastore";
-        public static final String DATA = "application/yang.data";
-        public static final String OPERATION = "application/yang.operation";
-        public static final String PATCH = "application/yang.patch";
-        public static final String PATCH_STATUS = "application/yang.patch-status";
-        public static final String STREAM = "application/yang.stream";
+    public static interface MediaTypes {
+        String API = "application/yang.api";
+        String DATASTORE = "application/yang.datastore";
+        String DATA = "application/yang.data";
+        String OPERATION = "application/yang.operation";
+        String PATCH = "application/yang.patch";
+        String PATCH_STATUS = "application/yang.patch-status";
+        String STREAM = "application/yang.stream";
+    }
+
+    public static interface RestConfModule {
+        String REVISION = "2013-10-19";
+
+        String NAME = "ietf-restconf";
+
+        String NAMESPACE = "urn:ietf:params:xml:ns:yang:ietf-restconf";
+
+        String RESTCONF_GROUPING_SCHEMA_NODE = "restconf";
+
+        String RESTCONF_CONTAINER_SCHEMA_NODE = "restconf";
+
+        String MODULES_CONTAINER_SCHEMA_NODE = "modules";
+
+        String MODULE_LIST_SCHEMA_NODE = "module";
+
+        String STREAMS_CONTAINER_SCHEMA_NODE = "streams";
+
+        String STREAM_LIST_SCHEMA_NODE = "stream";
+
+        String OPERATIONS_CONTAINER_SCHEMA_NODE = "operations";
+
+        String ERRORS_GROUPING_SCHEMA_NODE = "errors";
+
+        String ERRORS_CONTAINER_SCHEMA_NODE = "errors";
+
+        String ERROR_LIST_SCHEMA_NODE = "error";
+
+        QName IETF_RESTCONF_QNAME = QName.create( Draft02.RestConfModule.NAMESPACE,
+                                                  Draft02.RestConfModule.REVISION,
+                                                  Draft02.RestConfModule.NAME );
+
+        QName ERRORS_CONTAINER_QNAME = QName.create( IETF_RESTCONF_QNAME, ERRORS_CONTAINER_SCHEMA_NODE );
+
+        QName ERROR_LIST_QNAME = QName.create( IETF_RESTCONF_QNAME, ERROR_LIST_SCHEMA_NODE );
+
+        QName ERROR_TYPE_QNAME = QName.create( IETF_RESTCONF_QNAME, "error-type" );
+
+        QName ERROR_TAG_QNAME = QName.create( IETF_RESTCONF_QNAME, "error-tag" );
+
+        QName ERROR_APP_TAG_QNAME = QName.create( IETF_RESTCONF_QNAME, "error-app-tag" );
+
+        QName ERROR_MESSAGE_QNAME = QName.create( IETF_RESTCONF_QNAME, "error-message" );
+
+        QName ERROR_INFO_QNAME = QName.create( IETF_RESTCONF_QNAME, "error-info" );
     }
-    
-    public static class Paths {
-        
+
+
+    public static interface Paths {
+
     }
 }