Bug 6325 - upgrade draft11 to draft15 - renaming 83/42983/9
authorJakub Toth <jatoth@cisco.com>
Tue, 2 Aug 2016 14:19:48 +0000 (10:19 -0400)
committerJakub Toth <jatoth@cisco.com>
Mon, 15 Aug 2016 15:20:56 +0000 (15:20 +0000)
  *renaming of all occurencies of "draft11" to "draft15"

Change-Id: Ie681c8c511fda87f6d3c862f64667827a9bff1f6
Signed-off-by: Jakub Toth <jatoth@cisco.com>
43 files changed:
restconf/sal-rest-connector/src/main/java/org/opendaylight/RestconfWrapperProviders.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/md/sal/rest/schema/SchemaExportContentYangBodyWriter.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/md/sal/rest/schema/SchemaExportContentYinBodyWriter.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/api/Draft02.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/AbstractIdentifierAwareJaxRsProvider.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/JsonNormalizedNodeBodyReader.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/JsonToPATCHBodyReader.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/NormalizedNodeJsonBodyWriter.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/NormalizedNodeXmlBodyWriter.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/PATCHJsonBodyWriter.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/PATCHXmlBodyWriter.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/XmlNormalizedNodeBodyReader.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/rest/impl/XmlToPATCHBodyReader.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/Draft15.java [moved from restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/Draft11.java with 94% similarity]
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/RestConnectorProvider.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/RestconfApplication.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/common/references/SchemaContextRef.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/common/wrapper/services/Draft15ServicesWrapperImpl.java [moved from restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/common/wrapper/services/Draft11ServicesWrapperImpl.java with 92% similarity]
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/services/api/Draft15BaseServicesWrapper.java [moved from restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/services/api/Draft11BaseServicesWrapper.java with 94% similarity]
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/services/api/RestconfModulesService.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/services/api/RestconfOperationsService.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/services/api/RestconfSchemaService.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/services/api/RestconfStreamsService.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/services/impl/RestconfModulesServiceImpl.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/services/impl/RestconfStreamsServiceImpl.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/restful/services/api/Draft15TransactionServicesWrapper.java [moved from restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/restful/services/api/Draft11TransactionServicesWrapper.java with 92% similarity]
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/restful/services/api/RestconfDataService.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/restful/services/api/RestconfInvokeOperationsService.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/utils/mapping/RestconfMappingNodeUtil.java
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/utils/patch/Draft15AbstractIdentifierAwareJaxRsProvider.java [moved from restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/utils/patch/Draft11AbstractIdentifierAwareJaxRsProvider.java with 95% similarity]
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/utils/patch/Draft15JsonToPATCHBodyReader.java [moved from restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/utils/patch/Draft11JsonToPATCHBodyReader.java with 96% similarity]
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/utils/patch/Draft15StringModuleInstanceIdentifierCodec.java [moved from restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/utils/patch/Draft11StringModuleInstanceIdentifierCodec.java with 91% similarity]
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/utils/patch/Draft15XmlToPATCHBodyReader.java [moved from restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/utils/patch/Draft11XmlToPATCHBodyReader.java with 97% similarity]
restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/utils/schema/context/RestconfSchemaUtil.java
restconf/sal-rest-connector/src/main/resources/WEB-INF/web.xml
restconf/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/rest/impl/test/providers/Draft11AbstractBodyReaderTest.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/rest/impl/test/providers/TestDraft11JsonPATCHBodyReader.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/rest/impl/test/providers/TestDraft11XmlPATCHBodyReader.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/rest/services/impl/RestconfModulesServiceTest.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/rest/services/impl/RestconfModulesServiceTestUtils.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/rest/services/impl/RestconfStreamsServiceTest.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/utils/mapping/RestconfMappingNodeUtilTest.java
restconf/sal-rest-connector/src/test/java/org/opendaylight/restconf/utils/schema/context/RestconfSchemaUtilTest.java

index 308b144e97c7b4aa45c8727d295f8ceef2db518f..98ab9a1173b61064b6a9d1b1533ab9835e8e0758 100644 (file)
@@ -16,21 +16,21 @@ import org.opendaylight.restconf.RestConnectorProvider;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber;
 
 /**
- * Wrapping providers from restconf draft02 and draft11.
+ * Wrapping providers from restconf draft02 and draft15.
  *
  */
 public class RestconfWrapperProviders implements AutoCloseable, RestConnector {
 
     // DRAFT02
     private final RestconfProviderImpl providerDraft02;
-    // DRAFT11
-    private final RestConnectorProvider providerDraft11;
+    // DRAFT15
+    private final RestConnectorProvider providerDraft15;
 
     /**
      * Init both providers:
      * <ul>
      * <li>draft02 - {@link RestconfProviderImpl}
-     * <li>draft11 - {@link RestConnectorProvider}
+     * <li>draft15 - {@link RestConnectorProvider}
      * </ul>
      *
      * @param port
@@ -41,15 +41,14 @@ public class RestconfWrapperProviders implements AutoCloseable, RestConnector {
         this.providerDraft02 = new RestconfProviderImpl();
         this.providerDraft02.setWebsocketPort(port);
 
-        // Init draft11 provider
-        this.providerDraft11 = new RestConnectorProvider();
+        this.providerDraft15 = new RestConnectorProvider();
     }
 
     /**
      * Register both providers, which will use the SAL layer:
      * <ul>
      * <li>draft02 - {@link RestconfProviderImpl}
-     * <li>draft11 - {@link RestConnectorProvider}
+     * <li>draft15 - {@link RestConnectorProvider}
      * </ul>
      *
      * @param broker
@@ -59,8 +58,8 @@ public class RestconfWrapperProviders implements AutoCloseable, RestConnector {
         // Register draft02 provider
         broker.registerProvider(this.providerDraft02);
 
-        // Register draft11 provider
-        broker.registerProvider(this.providerDraft11);
+        // Register draft15 provider
+        broker.registerProvider(this.providerDraft15);
     }
 
     /**
@@ -78,7 +77,7 @@ public class RestconfWrapperProviders implements AutoCloseable, RestConnector {
     @Override
     public void close() throws Exception {
         this.providerDraft02.close();
-        this.providerDraft11.close();
+        this.providerDraft15.close();
     }
 
 }
index d6fb46010018a5ca3414410d360a50b13a97698c..699c3a1828374f11e2274c235d1c0c83a23b257b 100644 (file)
@@ -18,10 +18,10 @@ import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 
 @Provider
-@Produces({ SchemaRetrievalService.YANG_MEDIA_TYPE, Draft11.MediaTypes.YANG })
+@Produces({ SchemaRetrievalService.YANG_MEDIA_TYPE, Draft15.MediaTypes.YANG })
 public class SchemaExportContentYangBodyWriter implements MessageBodyWriter<SchemaExportContext> {
 
     @Override
index 2dabce3b718f7d3fbf768ed3b4c104b1a615f5e0..ef6e2cc0cf1e25ee1a60377df9cce2693d560f1f 100644 (file)
@@ -18,12 +18,12 @@ import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 import javax.xml.stream.XMLStreamException;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.yangtools.yang.model.export.YinExportUtils;
 
 @Provider
-@Produces({ SchemaRetrievalService.YIN_MEDIA_TYPE, Draft11.MediaTypes.YIN + RestconfConstants.XML })
+@Produces({ SchemaRetrievalService.YIN_MEDIA_TYPE, Draft15.MediaTypes.YIN + RestconfConstants.XML })
 public class SchemaExportContentYinBodyWriter implements MessageBodyWriter<SchemaExportContext> {
 
     @Override
index 3b3882d3ae27f8ba0ce03975e9065ae6d8ad1dc4..0b2839b3a7a48ce3c51e6a8828997708926f7919 100644 (file)
@@ -7,12 +7,12 @@
  */
 package org.opendaylight.netconf.sal.rest.api;
 
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.yangtools.yang.common.QName;
 
 /**
  * @deprecated Do not use old implementation of restconf draft. It will be
- *             replaced by {@link Draft11}.
+ *             replaced by {@link Draft15}.
  *
  */
 @Deprecated
index 84aea20d74cc15afeb1cc710469ab5b956eb50cf..60997f78420e78d6951adcfd34be767c4ac54346 100644 (file)
@@ -14,11 +14,11 @@ import javax.ws.rs.core.UriInfo;
 import org.opendaylight.netconf.sal.rest.api.RestconfConstants;
 import org.opendaylight.netconf.sal.restconf.impl.ControllerContext;
 import org.opendaylight.netconf.sal.restconf.impl.InstanceIdentifierContext;
-import org.opendaylight.restconf.utils.patch.Draft11AbstractIdentifierAwareJaxRsProvider;
+import org.opendaylight.restconf.utils.patch.Draft15AbstractIdentifierAwareJaxRsProvider;
 
 /**
  * @deprecated This class will be replaced by
- * {@link Draft11AbstractIdentifierAwareJaxRsProvider}
+ * {@link Draft15AbstractIdentifierAwareJaxRsProvider}
  */
 @Deprecated
 public class AbstractIdentifierAwareJaxRsProvider {
index 2195dc21ae3f0fe021b2f457854b938daab7e58e..9e1dcb2ee211003f9511aa9353f54b12a654fefd 100644 (file)
@@ -30,7 +30,7 @@ import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorTag;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode;
@@ -52,8 +52,8 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @Provider
-@Consumes({ Draft02.MediaTypes.DATA + RestconfService.JSON, Draft11.MediaTypes.DATA + RestconfConstants.JSON,
-        Draft02.MediaTypes.OPERATION + RestconfService.JSON, Draft11.MediaTypes.OPERATION + RestconfConstants.JSON,
+@Consumes({ Draft02.MediaTypes.DATA + RestconfService.JSON, Draft15.MediaTypes.DATA + RestconfConstants.JSON,
+        Draft02.MediaTypes.OPERATION + RestconfService.JSON, Draft15.MediaTypes.OPERATION + RestconfConstants.JSON,
         MediaType.APPLICATION_JSON })
 public class JsonNormalizedNodeBodyReader extends AbstractIdentifierAwareJaxRsProvider implements MessageBodyReader<NormalizedNodeContext> {
 
index a9aa44c2c9f8c414af69564d850127e62be406ea..112f1c2b5dc029dad70eef3353ff062353d91004 100644 (file)
@@ -37,7 +37,7 @@ import org.opendaylight.netconf.sal.restconf.impl.PATCHEntity;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorTag;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType;
-import org.opendaylight.restconf.utils.patch.Draft11JsonToPATCHBodyReader;
+import org.opendaylight.restconf.utils.patch.Draft15JsonToPATCHBodyReader;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
@@ -52,7 +52,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * @deprecated This class will be replaced by {@link Draft11JsonToPATCHBodyReader}
+ * @deprecated This class will be replaced by {@link Draft15JsonToPATCHBodyReader}
  */
 @Deprecated
 @Provider
index 09c4b724c2a8f235563cda66d0fd8461a92ff751..ff3f9f42b672f7293760fbba2e1e453773fa295f 100644 (file)
@@ -27,7 +27,7 @@ import org.opendaylight.netconf.sal.rest.api.RestconfNormalizedNodeWriter;
 import org.opendaylight.netconf.sal.rest.api.RestconfService;
 import org.opendaylight.netconf.sal.restconf.impl.InstanceIdentifierContext;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
@@ -48,8 +48,8 @@ import org.opendaylight.yangtools.yang.model.api.SchemaPath;
 @Provider
 @Produces({ Draft02.MediaTypes.API + RestconfService.JSON, Draft02.MediaTypes.DATA + RestconfService.JSON,
         Draft02.MediaTypes.OPERATION + RestconfService.JSON,
-        Draft11.MediaTypes.API + RestconfConstants.JSON, Draft11.MediaTypes.DATA + RestconfConstants.JSON,
-        Draft11.MediaTypes.OPERATION + RestconfConstants.JSON, MediaType.APPLICATION_JSON })
+        Draft15.MediaTypes.API + RestconfConstants.JSON, Draft15.MediaTypes.DATA + RestconfConstants.JSON,
+        Draft15.MediaTypes.OPERATION + RestconfConstants.JSON, MediaType.APPLICATION_JSON })
 public class NormalizedNodeJsonBodyWriter implements MessageBodyWriter<NormalizedNodeContext> {
 
     private static final int DEFAULT_INDENT_SPACES_NUM = 2;
index 41417f93d0697f03bed455303546fd716f9c237b..b1ede154d7b5dadceb082772fd676c5d7ab6630c 100644 (file)
@@ -30,7 +30,7 @@ import org.opendaylight.netconf.sal.rest.api.RestconfNormalizedNodeWriter;
 import org.opendaylight.netconf.sal.rest.api.RestconfService;
 import org.opendaylight.netconf.sal.restconf.impl.InstanceIdentifierContext;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
@@ -46,8 +46,8 @@ import org.opendaylight.yangtools.yang.model.api.SchemaPath;
 @Provider
 @Produces({ Draft02.MediaTypes.API + RestconfService.XML, Draft02.MediaTypes.DATA + RestconfService.XML,
         Draft02.MediaTypes.OPERATION + RestconfService.XML,
-        Draft11.MediaTypes.API + RestconfConstants.XML, Draft11.MediaTypes.DATA + RestconfConstants.XML,
-        Draft11.MediaTypes.OPERATION + RestconfConstants.XML, MediaType.APPLICATION_XML, MediaType.TEXT_XML })
+        Draft15.MediaTypes.API + RestconfConstants.XML, Draft15.MediaTypes.DATA + RestconfConstants.XML,
+        Draft15.MediaTypes.OPERATION + RestconfConstants.XML, MediaType.APPLICATION_XML, MediaType.TEXT_XML })
 public class NormalizedNodeXmlBodyWriter implements MessageBodyWriter<NormalizedNodeContext> {
 
     private static final XMLOutputFactory XML_FACTORY;
index 21e2b870452dbe80f44d6d729bfa4a866d02d839..b5a87966e483e5afc942d9e2b3321bfbefd2f62f 100644 (file)
@@ -27,14 +27,14 @@ import org.opendaylight.netconf.sal.rest.api.RestconfService;
 import org.opendaylight.netconf.sal.restconf.impl.PATCHStatusContext;
 import org.opendaylight.netconf.sal.restconf.impl.PATCHStatusEntity;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.yangtools.yang.data.codec.gson.JsonWriterFactory;
 
 
 @Provider
 @Produces({Draft02.MediaTypes.PATCH_STATUS + RestconfService.JSON,
-        Draft11.MediaTypes.PATCH_STATUS + RestconfConstants.JSON})
+        Draft15.MediaTypes.PATCH_STATUS + RestconfConstants.JSON})
 public class PATCHJsonBodyWriter implements MessageBodyWriter<PATCHStatusContext> {
 
     @Override
index a4ac36178cccca6280977e4b01f6384a6ab7b4b8..d0ae879d69ada24b43aae47afd32c113882b9bfe 100644 (file)
@@ -28,12 +28,12 @@ import org.opendaylight.netconf.sal.rest.api.RestconfService;
 import org.opendaylight.netconf.sal.restconf.impl.PATCHStatusContext;
 import org.opendaylight.netconf.sal.restconf.impl.PATCHStatusEntity;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.restconf.utils.RestconfConstants;
 
 @Provider
 @Produces({Draft02.MediaTypes.PATCH_STATUS + RestconfService.XML,
-        Draft11.MediaTypes.PATCH_STATUS + RestconfConstants.XML})
+        Draft15.MediaTypes.PATCH_STATUS + RestconfConstants.XML})
 public class PATCHXmlBodyWriter implements MessageBodyWriter<PATCHStatusContext> {
 
     private static final XMLOutputFactory XML_FACTORY;
index 72ec47d3b9839b505dec5904c35451608081a3ed..b13832c9b9c7b7d7e7c5e7f8c38fff2ad7a6b302 100644 (file)
@@ -34,7 +34,7 @@ import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorTag;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
@@ -57,8 +57,8 @@ import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
 @Provider
-@Consumes({ Draft02.MediaTypes.DATA + RestconfService.XML, Draft11.MediaTypes.DATA + RestconfConstants.XML,
-        Draft02.MediaTypes.OPERATION + RestconfService.XML, Draft11.MediaTypes.OPERATION + RestconfConstants.XML,
+@Consumes({ Draft02.MediaTypes.DATA + RestconfService.XML, Draft15.MediaTypes.DATA + RestconfConstants.XML,
+        Draft02.MediaTypes.OPERATION + RestconfService.XML, Draft15.MediaTypes.OPERATION + RestconfConstants.XML,
     MediaType.APPLICATION_XML, MediaType.TEXT_XML })
 public class XmlNormalizedNodeBodyReader extends AbstractIdentifierAwareJaxRsProvider implements MessageBodyReader<NormalizedNodeContext> {
 
index eb12029af965d7c11d362c19f24739c7fdab5e4f..dd2bf8b1cf9ae1630ab0c0d5b6ff4a5608a07b65 100644 (file)
@@ -37,7 +37,7 @@ import org.opendaylight.netconf.sal.restconf.impl.PATCHEntity;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorTag;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType;
-import org.opendaylight.restconf.utils.patch.Draft11XmlToPATCHBodyReader;
+import org.opendaylight.restconf.utils.patch.Draft15XmlToPATCHBodyReader;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
@@ -59,7 +59,7 @@ import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
 /**
- * @deprecated This class will be replaced by {@link Draft11XmlToPATCHBodyReader}
+ * @deprecated This class will be replaced by {@link Draft15XmlToPATCHBodyReader}
  */
 @Deprecated
 @Provider
similarity index 94%
rename from restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/Draft11.java
rename to restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/Draft15.java
index dabb74e211b667a92f3d6d2fb05f57240fd19ec1..e6f80b1a74dbe1eddb4adc343033e780ab3c057d 100644 (file)
@@ -20,13 +20,13 @@ import org.opendaylight.yangtools.yang.common.QName;
  * </ul>
  * </ul>
  *
- * We used old revision {@link Draft11.RestconfModule#REVISION} of restconf yang
+ * We used old revision {@link Draft15.RestconfModule#REVISION} of restconf yang
  * because the latest restconf draft has to be supported by Yang 1.1 and we are
  * not. Then, this is only partial implementation of the latest restconf draft.
  */
-public final class Draft11 {
+public final class Draft15 {
 
-    private Draft11() {
+    private Draft15() {
         throw new UnsupportedOperationException("Util class");
     }
 
@@ -83,8 +83,8 @@ public final class Draft11 {
 
         public static final String ERROR_LIST_SCHEMA_NODE = "error";
 
-        public static final QName IETF_RESTCONF_QNAME = QName.create(Draft11.RestconfModule.NAMESPACE, Draft11.RestconfModule.REVISION,
-                Draft11.RestconfModule.NAME);
+        public static final QName IETF_RESTCONF_QNAME = QName.create(Draft15.RestconfModule.NAMESPACE, Draft15.RestconfModule.REVISION,
+                Draft15.RestconfModule.NAME);
 
         public static final QName ERRORS_CONTAINER_QNAME = QName.create(IETF_RESTCONF_QNAME, ERRORS_CONTAINER_SCHEMA_NODE);
 
index 5ce439ca73ccbd97c4f462bc2c6463c32836d5db..dedea9b0a6cd15d3edfdea6e08d9d8462da27f6d 100644 (file)
@@ -22,7 +22,7 @@ import org.opendaylight.controller.sal.core.api.Provider;
 import org.opendaylight.controller.sal.core.api.model.SchemaService;
 import org.opendaylight.netconf.sal.rest.api.RestConnector;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
-import org.opendaylight.restconf.common.wrapper.services.Draft11ServicesWrapperImpl;
+import org.opendaylight.restconf.common.wrapper.services.Draft15ServicesWrapperImpl;
 import org.opendaylight.restconf.handlers.DOMDataBrokerHandler;
 import org.opendaylight.restconf.handlers.DOMMountPointServiceHandler;
 import org.opendaylight.restconf.handlers.RpcServiceHandler;
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Provider for restconf draft11.
+ * Provider for restconf draft15.
  *
  */
 public class RestConnectorProvider implements Provider, RestConnector, AutoCloseable {
@@ -65,7 +65,7 @@ public class RestConnectorProvider implements Provider, RestConnector, AutoClose
     public void onSessionInitiated(final ProviderSession session) {
         final SchemaService schemaService = Preconditions.checkNotNull(session.getService(SchemaService.class));
 
-        final Draft11ServicesWrapperImpl wrapperServices = Draft11ServicesWrapperImpl.getInstance();
+        final Draft15ServicesWrapperImpl wrapperServices = Draft15ServicesWrapperImpl.getInstance();
 
         final SchemaContextHandler schemaCtxHandler = new SchemaContextHandler();
         this.listenerRegistration = schemaService.registerSchemaContextListener(schemaCtxHandler);
index 4a2886915707719a49ca74f23d7e08013a2bb5e0..c00cd4cd08291b260902f73f027ddc259bee99cb 100644 (file)
@@ -20,9 +20,9 @@ import org.opendaylight.netconf.sal.rest.impl.PATCHJsonBodyWriter;
 import org.opendaylight.netconf.sal.rest.impl.PATCHXmlBodyWriter;
 import org.opendaylight.netconf.sal.rest.impl.RestconfDocumentedExceptionMapper;
 import org.opendaylight.netconf.sal.rest.impl.XmlNormalizedNodeBodyReader;
-import org.opendaylight.restconf.common.wrapper.services.Draft11ServicesWrapperImpl;
-import org.opendaylight.restconf.utils.patch.Draft11JsonToPATCHBodyReader;
-import org.opendaylight.restconf.utils.patch.Draft11XmlToPATCHBodyReader;
+import org.opendaylight.restconf.common.wrapper.services.Draft15ServicesWrapperImpl;
+import org.opendaylight.restconf.utils.patch.Draft15JsonToPATCHBodyReader;
+import org.opendaylight.restconf.utils.patch.Draft15XmlToPATCHBodyReader;
 
 public class RestconfApplication extends Application {
 
@@ -31,7 +31,7 @@ public class RestconfApplication extends Application {
         return ImmutableSet.<Class<?>> builder().add(NormalizedNodeJsonBodyWriter.class)
                 .add(NormalizedNodeXmlBodyWriter.class).add(JsonNormalizedNodeBodyReader.class)
                 .add(XmlNormalizedNodeBodyReader.class).add(SchemaExportContentYinBodyWriter.class)
-                .add(Draft11JsonToPATCHBodyReader.class).add(Draft11XmlToPATCHBodyReader.class)
+                .add(Draft15JsonToPATCHBodyReader.class).add(Draft15XmlToPATCHBodyReader.class)
                 .add(PATCHJsonBodyWriter.class).add(PATCHXmlBodyWriter.class)
                 .add(SchemaExportContentYangBodyWriter.class).add(RestconfDocumentedExceptionMapper.class)
                 .build();
@@ -40,7 +40,7 @@ public class RestconfApplication extends Application {
     @Override
     public Set<Object> getSingletons() {
         final Set<Object> singletons = new HashSet<>();
-        singletons.add(Draft11ServicesWrapperImpl.getInstance());
+        singletons.add(Draft15ServicesWrapperImpl.getInstance());
         return singletons;
     }
 }
index c15ffa3865e63d47b3a6e1adf7f6495002d519e2..84fb1bd8246db8bab2608044b14521c7a26af016 100644 (file)
@@ -12,7 +12,7 @@ import java.net.URI;
 import java.util.Date;
 import java.util.Set;
 import org.opendaylight.controller.md.sal.dom.api.DOMMountPoint;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
@@ -73,13 +73,13 @@ public final class SchemaContextRef {
 
     /**
      * Get {@link Module} by ietf-restconf qname from
-     * {@link Draft11.RestconfModule}
+     * {@link Draft15.RestconfModule}
      *
      * @return {@link Module}
      */
     public Module getRestconfModule() {
-        return this.findModuleByNamespaceAndRevision(Draft11.RestconfModule.IETF_RESTCONF_QNAME.getNamespace(),
-                Draft11.RestconfModule.IETF_RESTCONF_QNAME.getRevision());
+        return this.findModuleByNamespaceAndRevision(Draft15.RestconfModule.IETF_RESTCONF_QNAME.getNamespace(),
+                Draft15.RestconfModule.IETF_RESTCONF_QNAME.getRevision());
     }
 
     /**
@@ -19,7 +19,7 @@ import org.opendaylight.restconf.handlers.DOMMountPointServiceHandler;
 import org.opendaylight.restconf.handlers.RpcServiceHandler;
 import org.opendaylight.restconf.handlers.SchemaContextHandler;
 import org.opendaylight.restconf.handlers.TransactionChainHandler;
-import org.opendaylight.restconf.rest.services.api.Draft11BaseServicesWrapper;
+import org.opendaylight.restconf.rest.services.api.Draft15BaseServicesWrapper;
 import org.opendaylight.restconf.rest.services.api.RestconfModulesService;
 import org.opendaylight.restconf.rest.services.api.RestconfOperationsService;
 import org.opendaylight.restconf.rest.services.api.RestconfSchemaService;
@@ -28,7 +28,7 @@ import org.opendaylight.restconf.rest.services.impl.RestconfModulesServiceImpl;
 import org.opendaylight.restconf.rest.services.impl.RestconfOperationsServiceImpl;
 import org.opendaylight.restconf.rest.services.impl.RestconfSchemaServiceImpl;
 import org.opendaylight.restconf.rest.services.impl.RestconfStreamsServiceImpl;
-import org.opendaylight.restconf.restful.services.api.Draft11TransactionServicesWrapper;
+import org.opendaylight.restconf.restful.services.api.Draft15TransactionServicesWrapper;
 import org.opendaylight.restconf.restful.services.api.RestconfDataService;
 import org.opendaylight.restconf.restful.services.api.RestconfInvokeOperationsService;
 import org.opendaylight.restconf.restful.services.api.RestconfStreamsSubscriptionService;
@@ -39,13 +39,13 @@ import org.opendaylight.restconf.restful.services.impl.RestconfStreamsSubscripti
 /**
  * Wrapper for services:
  * <ul>
- * <li>{@link Draft11BaseServicesWrapper}
- * <li>{@link Draft11TransactionServicesWrapper}
+ * <li>{@link Draft15BaseServicesWrapper}
+ * <li>{@link Draft15TransactionServicesWrapper}
  * </ul>
  *
  */
 @Path("/")
-public class Draft11ServicesWrapperImpl implements Draft11BaseServicesWrapper, Draft11TransactionServicesWrapper {
+public class Draft15ServicesWrapperImpl implements Draft15BaseServicesWrapper, Draft15TransactionServicesWrapper {
 
     private RestconfDataService delegRestconfDataService;
     private RestconfInvokeOperationsService delegRestconfInvokeOpsService;
@@ -55,14 +55,14 @@ public class Draft11ServicesWrapperImpl implements Draft11BaseServicesWrapper, D
     private RestconfStreamsService delegRestStrsService;
     private RestconfSchemaService delegRestSchService;
 
-    private Draft11ServicesWrapperImpl() {
+    private Draft15ServicesWrapperImpl() {
     }
 
     private static class InstanceHolder {
-        public static final Draft11ServicesWrapperImpl INSTANCE = new Draft11ServicesWrapperImpl();
+        public static final Draft15ServicesWrapperImpl INSTANCE = new Draft15ServicesWrapperImpl();
     }
 
-    public static Draft11ServicesWrapperImpl getInstance() {
+    public static Draft15ServicesWrapperImpl getInstance() {
         return InstanceHolder.INSTANCE;
     }
 
@@ -17,6 +17,6 @@ package org.opendaylight.restconf.rest.services.api;
  * </ul>
  *
  */
-public interface Draft11BaseServicesWrapper
+public interface Draft15BaseServicesWrapper
         extends RestconfModulesService, RestconfOperationsService, RestconfStreamsService, RestconfSchemaService {
 }
index efc41ab2d9b0e0c4eb2df82279ff84931a9904a5..e4478445c4f4d16b1cca25d0ac1c6ddb4fdcb992 100644 (file)
@@ -15,7 +15,7 @@ import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.UriInfo;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.restconf.utils.RestconfConstants;
 
 /**
@@ -32,7 +32,7 @@ public interface RestconfModulesService {
      */
     @GET
     @Path("data/ietf-yang-library:modules")
-    @Produces({ Draft11.MediaTypes.API + RestconfConstants.JSON, Draft11.MediaTypes.API + RestconfConstants.XML,
+    @Produces({ Draft15.MediaTypes.API + RestconfConstants.JSON, Draft15.MediaTypes.API + RestconfConstants.XML,
             MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     public NormalizedNodeContext getModules(@Context UriInfo uriInfo);
 
@@ -48,7 +48,7 @@ public interface RestconfModulesService {
      */
     @GET
     @Path("data/ietf-yang-library:modules/{identifier:.+}")
-    @Produces({ Draft11.MediaTypes.API + RestconfConstants.JSON, Draft11.MediaTypes.API + RestconfConstants.XML,
+    @Produces({ Draft15.MediaTypes.API + RestconfConstants.JSON, Draft15.MediaTypes.API + RestconfConstants.XML,
             MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     public NormalizedNodeContext getModules(@PathParam("identifier") String identifier, @Context UriInfo uriInfo);
 
@@ -65,7 +65,7 @@ public interface RestconfModulesService {
      */
     @GET
     @Path("data/ietf-yang-library:modules/module/{identifier:.+}")
-    @Produces({ Draft11.MediaTypes.API + RestconfConstants.JSON, Draft11.MediaTypes.API + RestconfConstants.XML,
+    @Produces({ Draft15.MediaTypes.API + RestconfConstants.JSON, Draft15.MediaTypes.API + RestconfConstants.XML,
             MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     public NormalizedNodeContext getModule(@PathParam("identifier") String identifier, @Context UriInfo uriInfo);
 }
\ No newline at end of file
index b6c065dfa63c4b48208f5def4d5dc3823b20083c..f64b58bed9f3efdc6b202dd04c22600cd71ce739 100644 (file)
@@ -15,7 +15,7 @@ import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.UriInfo;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.restconf.utils.RestconfConstants;
 
 /**
@@ -34,7 +34,7 @@ public interface RestconfOperationsService {
      */
     @GET
     @Path("/operations")
-    @Produces({ Draft11.MediaTypes.API + RestconfConstants.JSON, Draft11.MediaTypes.API + RestconfConstants.XML,
+    @Produces({ Draft15.MediaTypes.API + RestconfConstants.JSON, Draft15.MediaTypes.API + RestconfConstants.XML,
             MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     public NormalizedNodeContext getOperations(@Context UriInfo uriInfo);
 
@@ -49,7 +49,7 @@ public interface RestconfOperationsService {
      */
     @GET
     @Path("/operations/{identifier:.+}")
-    @Produces({ Draft11.MediaTypes.API + RestconfConstants.JSON, Draft11.MediaTypes.API + RestconfConstants.XML,
+    @Produces({ Draft15.MediaTypes.API + RestconfConstants.JSON, Draft15.MediaTypes.API + RestconfConstants.XML,
             MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     public NormalizedNodeContext getOperations(@PathParam("identifier") String identifier, @Context UriInfo uriInfo);
 }
\ No newline at end of file
index f23411e04d770f666bdc600c93eff9bfa26b1f1c..071cb9123f12f4bb8853027477c1d01c78156419 100644 (file)
@@ -12,7 +12,7 @@ import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import org.opendaylight.netconf.md.sal.rest.schema.SchemaExportContext;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.restconf.utils.RestconfConstants;
 
 /**
@@ -30,7 +30,7 @@ public interface RestconfSchemaService {
      * @return {@link SchemaExportContext}
      */
     @GET
-    @Produces({ Draft11.MediaTypes.YANG, Draft11.MediaTypes.YIN + RestconfConstants.XML })
+    @Produces({ Draft15.MediaTypes.YANG, Draft15.MediaTypes.YIN + RestconfConstants.XML })
     @Path("data/ietf-yang-library:modules/module/{identifier:.+}/schema")
     SchemaExportContext getSchema(@PathParam("identifier") String identifier);
 }
index 268d420b9af487809ec3db49139dd3309b10e757..d649d3af6efa292d6b937daf5e19b46335087da6 100644 (file)
@@ -14,7 +14,7 @@ import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.UriInfo;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.restconf.utils.RestconfConstants;
 
 /**
@@ -33,7 +33,7 @@ public interface RestconfStreamsService {
      */
     @GET
     @Path("data/ietf-restconf-monitoring:restconf-state/streams")
-    @Produces({ Draft11.MediaTypes.API + RestconfConstants.JSON, Draft11.MediaTypes.API + RestconfConstants.XML,
+    @Produces({ Draft15.MediaTypes.API + RestconfConstants.JSON, Draft15.MediaTypes.API + RestconfConstants.XML,
             MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     public NormalizedNodeContext getAvailableStreams(@Context UriInfo uriInfo);
 }
\ No newline at end of file
index afefd6d45722b1bc80f855e53ee360c6a40a770a..4709f624ebe41eef0e9338a6b7fede07acd9f6bd 100644 (file)
@@ -18,7 +18,7 @@ import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorTag;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.restconf.common.references.SchemaContextRef;
 import org.opendaylight.restconf.handlers.DOMMountPointServiceHandler;
 import org.opendaylight.restconf.handlers.SchemaContextHandler;
@@ -117,7 +117,7 @@ public class RestconfModulesServiceImpl implements RestconfModulesService {
         final MapNode moduleMap = RestconfMappingNodeUtil
                 .restconfMappingNode(schemaContextRef.getRestconfModule(), modules);
         final DataSchemaNode moduleSchemaNode = RestconfSchemaUtil.getRestconfSchemaNode(
-                schemaContextRef.getRestconfModule(), Draft11.RestconfModule.MODULE_LIST_SCHEMA_NODE);
+                schemaContextRef.getRestconfModule(), Draft15.RestconfModule.MODULE_LIST_SCHEMA_NODE);
         Preconditions.checkState(moduleSchemaNode instanceof ListSchemaNode);
         if (mountPoint == null) {
             return new NormalizedNodeContext(
@@ -148,7 +148,7 @@ public class RestconfModulesServiceImpl implements RestconfModulesService {
 
         final MapNode mapNodes = RestconfMappingNodeUtil.restconfMappingNode(restconfModule, modules);
         final DataSchemaNode schemaNode = RestconfSchemaUtil.getRestconfSchemaNode(restconfModule,
-                Draft11.RestconfModule.MODULES_CONTAINER_SCHEMA_NODE);
+                Draft15.RestconfModule.MODULES_CONTAINER_SCHEMA_NODE);
         Preconditions.checkState(schemaNode instanceof ContainerSchemaNode);
         final DataContainerNodeAttrBuilder<NodeIdentifier, ContainerNode> modulContainerSchemaNodeBuilder = Builders
                 .containerBuilder((ContainerSchemaNode) schemaNode);
index 1346e50142d14f1bf56d10223fab39041a49eaa2..9188bd8d6dd5a72356c44ace08adcd26570079a8 100644 (file)
@@ -13,7 +13,7 @@ import javax.ws.rs.core.UriInfo;
 import org.opendaylight.netconf.sal.restconf.impl.InstanceIdentifierContext;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
 import org.opendaylight.netconf.sal.streams.listeners.Notificator;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.restconf.common.references.SchemaContextRef;
 import org.opendaylight.restconf.handlers.SchemaContextHandler;
 import org.opendaylight.restconf.rest.services.api.RestconfStreamsService;
@@ -56,7 +56,7 @@ public class RestconfStreamsServiceImpl implements RestconfStreamsService {
         final Set<String> availableStreams = Notificator.getStreamNames();
 
         final DataSchemaNode streamListSchemaNode = RestconfSchemaUtil.getRestconfSchemaNode(
-                schemaContextRef.getRestconfModule(), Draft11.MonitoringModule.STREAM_LIST_SCHEMA_NODE);
+                schemaContextRef.getRestconfModule(), Draft15.MonitoringModule.STREAM_LIST_SCHEMA_NODE);
         Preconditions.checkState(streamListSchemaNode instanceof ListSchemaNode);
         final CollectionNodeBuilder<MapEntryNode, MapNode> listStreamBuilder = Builders
                 .mapBuilder((ListSchemaNode) streamListSchemaNode);
@@ -66,7 +66,7 @@ public class RestconfStreamsServiceImpl implements RestconfStreamsService {
         }
 
         final DataSchemaNode streamContSchemaNode = RestconfSchemaUtil.getRestconfSchemaNode(
-                schemaContextRef.getRestconfModule(), Draft11.MonitoringModule.STREAMS_CONTAINER_SCHEMA_NODE);
+                schemaContextRef.getRestconfModule(), Draft15.MonitoringModule.STREAMS_CONTAINER_SCHEMA_NODE);
         Preconditions.checkState(streamContSchemaNode instanceof ContainerSchemaNode);
         final DataContainerNodeAttrBuilder<NodeIdentifier, ContainerNode> streamsContainerBuilder = Builders
                 .containerBuilder((ContainerSchemaNode) streamContSchemaNode);
index d7ae1f65df41e80c647504a2280072b18021d4e2..bd800311d7f6f0fc8a21c822499372eba012a68f 100644 (file)
@@ -24,7 +24,7 @@ import org.opendaylight.netconf.sal.rest.impl.PATCH;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
 import org.opendaylight.netconf.sal.restconf.impl.PATCHContext;
 import org.opendaylight.netconf.sal.restconf.impl.PATCHStatusContext;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.restconf.utils.RestconfConstants;
 
 /**
@@ -45,7 +45,7 @@ public interface RestconfDataService {
      */
     @GET
     @Path("/data/{identifier:.+}")
-    @Produces({ Draft11.MediaTypes.DATA + RestconfConstants.JSON, Draft11.MediaTypes.DATA + RestconfConstants.XML,
+    @Produces({ Draft15.MediaTypes.DATA + RestconfConstants.JSON, Draft15.MediaTypes.DATA + RestconfConstants.XML,
             MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     NormalizedNodeContext readData(@Encoded @PathParam("identifier") String identifier,
             @Context UriInfo uriInfo);
@@ -61,7 +61,7 @@ public interface RestconfDataService {
      */
     @PUT
     @Path("/data/{identifier:.+}")
-    @Consumes({ Draft11.MediaTypes.DATA + RestconfConstants.JSON, Draft11.MediaTypes.DATA + RestconfConstants.XML,
+    @Consumes({ Draft15.MediaTypes.DATA + RestconfConstants.JSON, Draft15.MediaTypes.DATA + RestconfConstants.XML,
             MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     Response putData(@Encoded @PathParam("identifier") String identifier, NormalizedNodeContext payload);
 
@@ -78,7 +78,7 @@ public interface RestconfDataService {
      */
     @POST
     @Path("/data/{identifier:.+}")
-    @Consumes({ Draft11.MediaTypes.DATA + RestconfConstants.JSON, Draft11.MediaTypes.DATA + RestconfConstants.XML,
+    @Consumes({ Draft15.MediaTypes.DATA + RestconfConstants.JSON, Draft15.MediaTypes.DATA + RestconfConstants.XML,
             MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     Response postData(@Encoded @PathParam("identifier") String identifier, NormalizedNodeContext payload,
             @Context UriInfo uriInfo);
@@ -94,7 +94,7 @@ public interface RestconfDataService {
      */
     @POST
     @Path("/data")
-    @Consumes({ Draft11.MediaTypes.DATA + RestconfConstants.JSON, Draft11.MediaTypes.DATA + RestconfConstants.XML,
+    @Consumes({ Draft15.MediaTypes.DATA + RestconfConstants.JSON, Draft15.MediaTypes.DATA + RestconfConstants.XML,
             MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML })
     Response postData(NormalizedNodeContext payload, @Context UriInfo uriInfo);
 
@@ -123,9 +123,9 @@ public interface RestconfDataService {
      */
     @PATCH
     @Path("/data/{identifier:.+}")
-    @Consumes({ Draft11.MediaTypes.PATCH + RestconfConstants.JSON, Draft11.MediaTypes.PATCH + RestconfConstants.XML })
-    @Produces({ Draft11.MediaTypes.PATCH_STATUS + RestconfConstants.JSON,
-            Draft11.MediaTypes.PATCH_STATUS + RestconfConstants.XML })
+    @Consumes({ Draft15.MediaTypes.PATCH + RestconfConstants.JSON, Draft15.MediaTypes.PATCH + RestconfConstants.XML })
+    @Produces({ Draft15.MediaTypes.PATCH_STATUS + RestconfConstants.JSON,
+            Draft15.MediaTypes.PATCH_STATUS + RestconfConstants.XML })
     PATCHStatusContext patchData(@Encoded @PathParam("identifier") String identifier, PATCHContext context,
             @Context UriInfo uriInfo);
 
@@ -140,8 +140,8 @@ public interface RestconfDataService {
      */
     @PATCH
     @Path("/data")
-    @Consumes({ Draft11.MediaTypes.PATCH + RestconfConstants.JSON, Draft11.MediaTypes.PATCH + RestconfConstants.XML })
-    @Produces({ Draft11.MediaTypes.PATCH_STATUS + RestconfConstants.JSON,
-            Draft11.MediaTypes.PATCH_STATUS + RestconfConstants.XML })
+    @Consumes({ Draft15.MediaTypes.PATCH + RestconfConstants.JSON, Draft15.MediaTypes.PATCH + RestconfConstants.XML })
+    @Produces({ Draft15.MediaTypes.PATCH_STATUS + RestconfConstants.JSON,
+            Draft15.MediaTypes.PATCH_STATUS + RestconfConstants.XML })
     PATCHStatusContext patchData(PATCHContext context, @Context UriInfo uriInfo);
 }
index 91a45556b9c3fe96bea83185f0fbc1164a174fbd..c37cd1311b13e3844954b067c3e0fa8623603fad 100644 (file)
@@ -17,7 +17,7 @@ import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.UriInfo;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.restconf.utils.RestconfConstants;
 
 /**
@@ -41,13 +41,13 @@ public interface RestconfInvokeOperationsService {
      */
     @POST
     @Path("/operations/{identifier:.+}")
-    @Produces({ Draft11.MediaTypes.OPERATION + RestconfConstants.JSON,
-            Draft11.MediaTypes.OPERATION + RestconfConstants.XML, Draft11.MediaTypes.DATA + RestconfConstants.JSON,
-            Draft11.MediaTypes.DATA + RestconfConstants.XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML,
+    @Produces({ Draft15.MediaTypes.OPERATION + RestconfConstants.JSON,
+            Draft15.MediaTypes.OPERATION + RestconfConstants.XML, Draft15.MediaTypes.DATA + RestconfConstants.JSON,
+            Draft15.MediaTypes.DATA + RestconfConstants.XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML,
             MediaType.TEXT_XML })
-    @Consumes({ Draft11.MediaTypes.OPERATION + RestconfConstants.JSON,
-            Draft11.MediaTypes.OPERATION + RestconfConstants.XML, Draft11.MediaTypes.DATA + RestconfConstants.JSON,
-            Draft11.MediaTypes.DATA + RestconfConstants.XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML,
+    @Consumes({ Draft15.MediaTypes.OPERATION + RestconfConstants.JSON,
+            Draft15.MediaTypes.OPERATION + RestconfConstants.XML, Draft15.MediaTypes.DATA + RestconfConstants.JSON,
+            Draft15.MediaTypes.DATA + RestconfConstants.XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML,
             MediaType.TEXT_XML })
     NormalizedNodeContext invokeRpc(@Encoded @PathParam("identifier") String identifier,
             NormalizedNodeContext payload, @Context UriInfo uriInfo);
index 939f3ac7550ec3c6b7fb96a87c8ecc4b01cd979f..71997144c7e10f4cf49a41376934b13130ca4c77 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.restconf.utils.mapping;
 import com.google.common.base.Preconditions;
 import java.util.Collection;
 import java.util.Set;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.restconf.utils.schema.context.RestconfSchemaUtil;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
@@ -50,7 +50,7 @@ public final class RestconfMappingNodeUtil {
      */
     public static MapNode restconfMappingNode(final Module restconfModule, final Set<Module> modules) {
         final DataSchemaNode modulListSchemaNode = RestconfSchemaUtil.getRestconfSchemaNode(restconfModule,
-                Draft11.RestconfModule.MODULE_LIST_SCHEMA_NODE);
+                Draft15.RestconfModule.MODULE_LIST_SCHEMA_NODE);
         Preconditions.checkState(modulListSchemaNode instanceof ListSchemaNode);
 
         final CollectionNodeBuilder<MapEntryNode, MapNode> listModuleBuilder = Builders
@@ -16,7 +16,7 @@ import org.opendaylight.netconf.sal.restconf.impl.ControllerContext;
 import org.opendaylight.netconf.sal.restconf.impl.InstanceIdentifierContext;
 import org.opendaylight.restconf.utils.parser.ParserIdentifier;
 
-public class Draft11AbstractIdentifierAwareJaxRsProvider {
+public class Draft15AbstractIdentifierAwareJaxRsProvider {
 
     private static final String POST = "POST";
 
@@ -35,7 +35,7 @@ import org.opendaylight.netconf.sal.restconf.impl.PATCHEntity;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorTag;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
@@ -51,11 +51,11 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 @Provider
-@Consumes({Draft11.MediaTypes.PATCH + RestconfConstants.JSON})
-public class Draft11JsonToPATCHBodyReader extends Draft11AbstractIdentifierAwareJaxRsProvider
+@Consumes({Draft15.MediaTypes.PATCH + RestconfConstants.JSON})
+public class Draft15JsonToPATCHBodyReader extends Draft15AbstractIdentifierAwareJaxRsProvider
         implements MessageBodyReader<PATCHContext> {
 
-    private final static Logger LOG = LoggerFactory.getLogger(Draft11JsonToPATCHBodyReader.class);
+    private final static Logger LOG = LoggerFactory.getLogger(Draft15JsonToPATCHBodyReader.class);
     private String patchId;
 
     @Override
@@ -115,9 +115,9 @@ public class Draft11JsonToPATCHBodyReader extends Draft11AbstractIdentifierAware
 
     private List<PATCHEntity> read(final JsonReader in, final InstanceIdentifierContext path) throws IOException {
         final List<PATCHEntity> resultCollection = new ArrayList<>();
-        final Draft11StringModuleInstanceIdentifierCodec codec = new Draft11StringModuleInstanceIdentifierCodec(
+        final Draft15StringModuleInstanceIdentifierCodec codec = new Draft15StringModuleInstanceIdentifierCodec(
                 path.getSchemaContext());
-        final Draft11JsonToPATCHBodyReader.PatchEdit edit = new Draft11JsonToPATCHBodyReader.PatchEdit();
+        final Draft15JsonToPATCHBodyReader.PatchEdit edit = new Draft15JsonToPATCHBodyReader.PatchEdit();
 
         while (in.hasNext()) {
             switch (in.peek()) {
@@ -169,7 +169,7 @@ public class Draft11JsonToPATCHBodyReader extends Draft11AbstractIdentifierAware
      */
     private void parseByName(@Nonnull final String name, @Nonnull final PatchEdit edit,
                              @Nonnull final JsonReader in, @Nonnull final InstanceIdentifierContext path,
-                             @Nonnull final Draft11StringModuleInstanceIdentifierCodec codec,
+                             @Nonnull final Draft15StringModuleInstanceIdentifierCodec codec,
                              @Nonnull final List<PATCHEntity> resultCollection) throws IOException {
         switch (name) {
             case "edit" :
@@ -208,7 +208,7 @@ public class Draft11JsonToPATCHBodyReader extends Draft11AbstractIdentifierAware
      */
     private void readEditDefinition(@Nonnull final PatchEdit edit, @Nonnull final JsonReader in,
                                     @Nonnull final InstanceIdentifierContext path,
-                                    @Nonnull final Draft11StringModuleInstanceIdentifierCodec codec) throws IOException {
+                                    @Nonnull final Draft15StringModuleInstanceIdentifierCodec codec) throws IOException {
         final StringBuffer value = new StringBuffer();
         in.beginObject();
 
@@ -17,19 +17,19 @@ import org.opendaylight.yangtools.yang.data.util.DataSchemaContextTree;
 import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
-final class Draft11StringModuleInstanceIdentifierCodec extends AbstractModuleStringInstanceIdentifierCodec {
+final class Draft15StringModuleInstanceIdentifierCodec extends AbstractModuleStringInstanceIdentifierCodec {
 
     private final DataSchemaContextTree dataContextTree;
     private final SchemaContext context;
     private final String defaultPrefix;
 
-    Draft11StringModuleInstanceIdentifierCodec(SchemaContext context) {
+    Draft15StringModuleInstanceIdentifierCodec(SchemaContext context) {
         this.context = Preconditions.checkNotNull(context);
         this.dataContextTree = DataSchemaContextTree.from(context);
         this.defaultPrefix = "";
     }
 
-    Draft11StringModuleInstanceIdentifierCodec(SchemaContext context, @Nonnull String defaultPrefix) {
+    Draft15StringModuleInstanceIdentifierCodec(SchemaContext context, @Nonnull String defaultPrefix) {
         this.context = Preconditions.checkNotNull(context);
         this.dataContextTree = DataSchemaContextTree.from(context);
         this.defaultPrefix = defaultPrefix;
@@ -35,7 +35,7 @@ import org.opendaylight.netconf.sal.restconf.impl.PATCHEntity;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorTag;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.restconf.utils.RestconfConstants;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
@@ -58,11 +58,11 @@ import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
 @Provider
-@Consumes({Draft11.MediaTypes.PATCH + RestconfConstants.XML})
-public class Draft11XmlToPATCHBodyReader extends Draft11AbstractIdentifierAwareJaxRsProvider implements
+@Consumes({Draft15.MediaTypes.PATCH + RestconfConstants.XML})
+public class Draft15XmlToPATCHBodyReader extends Draft15AbstractIdentifierAwareJaxRsProvider implements
         MessageBodyReader<PATCHContext> {
 
-    private final static Logger LOG = LoggerFactory.getLogger(Draft11XmlToPATCHBodyReader.class);
+    private final static Logger LOG = LoggerFactory.getLogger(Draft15XmlToPATCHBodyReader.class);
     private static final DocumentBuilderFactory BUILDERFACTORY;
 
     static {
@@ -148,7 +148,7 @@ public class Draft11XmlToPATCHBodyReader extends Draft11AbstractIdentifierAwareJ
                     URI.create(namespace)).iterator().next();
 
             // initialize codec + set default prefix derived from module name
-            final Draft11StringModuleInstanceIdentifierCodec codec = new Draft11StringModuleInstanceIdentifierCodec(
+            final Draft15StringModuleInstanceIdentifierCodec codec = new Draft15StringModuleInstanceIdentifierCodec(
                     pathContext.getSchemaContext(), module.getName());
 
             // find complete path to target and target schema node
@@ -235,7 +235,7 @@ public class Draft11XmlToPATCHBodyReader extends Draft11AbstractIdentifierAwareJ
 
     /**
      * Prepare non-conditional XPath suitable for deserialization
-     * with {@link Draft11StringModuleInstanceIdentifierCodec}
+     * with {@link Draft15StringModuleInstanceIdentifierCodec}
      * @param schemaNode Top schema node
      * @param target Edit operation target
      * @param value Element with value
index fbeb7d938345e31a7469e79d13e7e9fa04bfb9a6..151811bb0b69789493b8e6d2bfe0cd52302b397c 100644 (file)
@@ -13,7 +13,7 @@ import java.util.Set;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorTag;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.GroupingDefinition;
@@ -44,7 +44,7 @@ public final class RestconfSchemaUtil {
 
         final Set<GroupingDefinition> groupings = restconfModule.getGroupings();
         final GroupingDefinition restGroup = findSchemaNodeInCollection(groupings,
-                Draft11.RestconfModule.RESTCONF_GROUPING_SCHEMA_NODE);
+                Draft15.RestconfModule.RESTCONF_GROUPING_SCHEMA_NODE);
         final Collection<DataSchemaNode> childNodes = restGroup.getChildNodes();
         final DataSchemaNode restCont = childNodes.iterator().next();
 
@@ -64,31 +64,31 @@ public final class RestconfSchemaUtil {
     private static DataSchemaNode findSchemaNode(final DataSchemaNode restCont, final String schemaNodeName) {
         switch (schemaNodeName) {
             //MODULES
-            case Draft11.RestconfModule.MODULE_LIST_SCHEMA_NODE:
+            case Draft15.RestconfModule.MODULE_LIST_SCHEMA_NODE:
                 final DataSchemaNode moduleListSchNode = findSchemaNodeInCollection(
                         ((DataNodeContainer) findSchemaNode(restCont,
-                                Draft11.RestconfModule.MODULES_CONTAINER_SCHEMA_NODE)).getChildNodes(),
-                        Draft11.RestconfModule.MODULE_LIST_SCHEMA_NODE);
+                                Draft15.RestconfModule.MODULES_CONTAINER_SCHEMA_NODE)).getChildNodes(),
+                        Draft15.RestconfModule.MODULE_LIST_SCHEMA_NODE);
                 Preconditions.checkNotNull(moduleListSchNode);
                 return moduleListSchNode;
-            case Draft11.RestconfModule.MODULES_CONTAINER_SCHEMA_NODE:
+            case Draft15.RestconfModule.MODULES_CONTAINER_SCHEMA_NODE:
                 final DataSchemaNode modulesContSchNode = findSchemaNodeInCollection(((DataNodeContainer) restCont).getChildNodes(),
-                        Draft11.RestconfModule.MODULES_CONTAINER_SCHEMA_NODE);
+                        Draft15.RestconfModule.MODULES_CONTAINER_SCHEMA_NODE);
                 Preconditions.checkNotNull(modulesContSchNode);
                 return modulesContSchNode;
 
             //STREAMS
-            case Draft11.MonitoringModule.STREAM_LIST_SCHEMA_NODE:
+            case Draft15.MonitoringModule.STREAM_LIST_SCHEMA_NODE:
                 final DataSchemaNode streamListSchNode = findSchemaNodeInCollection(
                         ((DataNodeContainer) findSchemaNode(restCont,
-                                Draft11.MonitoringModule.STREAMS_CONTAINER_SCHEMA_NODE)).getChildNodes(),
-                        Draft11.MonitoringModule.STREAM_LIST_SCHEMA_NODE);
+                                Draft15.MonitoringModule.STREAMS_CONTAINER_SCHEMA_NODE)).getChildNodes(),
+                        Draft15.MonitoringModule.STREAM_LIST_SCHEMA_NODE);
                 Preconditions.checkNotNull(streamListSchNode);
                 return streamListSchNode;
-            case Draft11.MonitoringModule.STREAMS_CONTAINER_SCHEMA_NODE:
+            case Draft15.MonitoringModule.STREAMS_CONTAINER_SCHEMA_NODE:
                 final DataSchemaNode streamsContSchNode = findSchemaNodeInCollection(
                         ((DataNodeContainer) restCont).getChildNodes(),
-                        Draft11.MonitoringModule.STREAMS_CONTAINER_SCHEMA_NODE);
+                        Draft15.MonitoringModule.STREAMS_CONTAINER_SCHEMA_NODE);
                 Preconditions.checkNotNull(streamsContSchNode);
                 return streamsContSchNode;
             default:
index bdb149f14f8074143533ec63033869b8c7880742..509fcdefab26549f89cf99e8516df6c596df8078 100644 (file)
@@ -60,7 +60,7 @@
 
     <servlet-mapping>
         <servlet-name>Restconf</servlet-name>
-        <url-pattern>/11/*</url-pattern>
+        <url-pattern>/15/*</url-pattern>
     </servlet-mapping>
 
     <filter>
index ff7b770fbb9376355ee72d349d6abfec9d2fc736..d70c119bd412b3b6bde7ce3f619b42f7357e88af 100644 (file)
@@ -24,7 +24,7 @@ import org.opendaylight.netconf.sal.rest.api.RestconfConstants;
 import org.opendaylight.netconf.sal.restconf.impl.ControllerContext;
 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
 import org.opendaylight.netconf.sal.restconf.impl.PATCHContext;
-import org.opendaylight.restconf.utils.patch.Draft11AbstractIdentifierAwareJaxRsProvider;
+import org.opendaylight.restconf.utils.patch.Draft15AbstractIdentifierAwareJaxRsProvider;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
 public abstract class Draft11AbstractBodyReaderTest {
@@ -36,10 +36,10 @@ public abstract class Draft11AbstractBodyReaderTest {
 
     public Draft11AbstractBodyReaderTest() throws NoSuchFieldException,
             SecurityException {
-        uriField = Draft11AbstractIdentifierAwareJaxRsProvider.class
+        uriField = Draft15AbstractIdentifierAwareJaxRsProvider.class
                 .getDeclaredField("uriInfo");
         uriField.setAccessible(true);
-        requestField = Draft11AbstractIdentifierAwareJaxRsProvider.class
+        requestField = Draft15AbstractIdentifierAwareJaxRsProvider.class
                 .getDeclaredField("request");
         requestField.setAccessible(true);
         mediaType = getMediaType();
@@ -52,7 +52,7 @@ public abstract class Draft11AbstractBodyReaderTest {
         return TestRestconfUtils.loadSchemaContext(yangPath, schemaContext);
     }
 
-    protected static <T extends Draft11AbstractIdentifierAwareJaxRsProvider> void mockBodyReader(
+    protected static <T extends Draft15AbstractIdentifierAwareJaxRsProvider> void mockBodyReader(
             final String identifier, final T normalizedNodeProvider,
             final boolean isPost) throws NoSuchFieldException,
             SecurityException, IllegalArgumentException, IllegalAccessException {
index 02acc09b932f726a297d3efc268e977a654c832b..fd6353200f59acb99869e6c31f842c2c2c1946c8 100644 (file)
@@ -18,17 +18,17 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 import org.opendaylight.netconf.sal.restconf.impl.PATCHContext;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
-import org.opendaylight.restconf.utils.patch.Draft11JsonToPATCHBodyReader;
+import org.opendaylight.restconf.utils.patch.Draft15JsonToPATCHBodyReader;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
 public class TestDraft11JsonPATCHBodyReader extends Draft11AbstractBodyReaderTest {
 
-    private final Draft11JsonToPATCHBodyReader jsonPATCHBodyReader;
+    private final Draft15JsonToPATCHBodyReader jsonPATCHBodyReader;
     private static SchemaContext schemaContext;
 
     public TestDraft11JsonPATCHBodyReader() throws NoSuchFieldException, SecurityException {
         super();
-        jsonPATCHBodyReader = new Draft11JsonToPATCHBodyReader();
+        jsonPATCHBodyReader = new Draft15JsonToPATCHBodyReader();
     }
 
     @Override
index a8955fa5ee9a399e006dd03f8d6fe677d5ce5829..2d957ece36846814129d13d11258191827bbf3f9 100644 (file)
@@ -17,17 +17,17 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 import org.opendaylight.netconf.sal.restconf.impl.PATCHContext;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
-import org.opendaylight.restconf.utils.patch.Draft11XmlToPATCHBodyReader;
+import org.opendaylight.restconf.utils.patch.Draft15XmlToPATCHBodyReader;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
 public class TestDraft11XmlPATCHBodyReader extends Draft11AbstractBodyReaderTest {
 
-    private final Draft11XmlToPATCHBodyReader xmlPATCHBodyReader;
+    private final Draft15XmlToPATCHBodyReader xmlPATCHBodyReader;
     private static SchemaContext schemaContext;
 
     public TestDraft11XmlPATCHBodyReader() throws NoSuchFieldException, SecurityException {
         super();
-        xmlPATCHBodyReader = new Draft11XmlToPATCHBodyReader();
+        xmlPATCHBodyReader = new Draft15XmlToPATCHBodyReader();
     }
 
     @Override
index ff100dbdf496047c22eab110d92416d8ece8ee9f..f2811b1df59de646c7362ad06801f911479ac25c 100644 (file)
@@ -47,7 +47,7 @@ import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorTag;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType;
-import org.opendaylight.restconf.Draft11.RestconfModule;
+import org.opendaylight.restconf.Draft15.RestconfModule;
 import org.opendaylight.restconf.handlers.DOMMountPointServiceHandler;
 import org.opendaylight.restconf.handlers.SchemaContextHandler;
 import org.opendaylight.restconf.rest.services.api.RestconfModulesService;
index 4f221b0ae1663bab8c1fd673c515ec1bb80c631a..2d9d4a33d076fc3edc228d8faab69d76dc2dfa7c 100644 (file)
@@ -30,7 +30,7 @@ import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
 import org.opendaylight.controller.md.sal.dom.broker.impl.mount.DOMMountPointServiceImpl;
 import org.opendaylight.controller.md.sal.dom.broker.spi.mount.SimpleDOMMountPoint;
 import org.opendaylight.controller.md.sal.rest.common.TestRestconfUtils;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.restconf.handlers.DOMMountPointServiceHandler;
 import org.opendaylight.restconf.handlers.SchemaContextHandler;
 import org.opendaylight.restconf.utils.RestconfConstants;
@@ -194,8 +194,8 @@ class RestconfModulesServiceTestUtils {
 
         when(schemaContext.findModuleByNamespaceAndRevision(any(URI.class), any(Date.class))).thenAnswer(invocation -> {
             final Object[] args = invocation.getArguments();
-            if (args[0] == Draft11.RestconfModule.IETF_RESTCONF_QNAME.getNamespace()
-                    && args[1] == Draft11.RestconfModule.IETF_RESTCONF_QNAME.getRevision()) {
+            if (args[0] == Draft15.RestconfModule.IETF_RESTCONF_QNAME.getNamespace()
+                    && args[1] == Draft15.RestconfModule.IETF_RESTCONF_QNAME.getRevision()) {
                 return parseCustomRestconfSource(restconfModuleName).findModuleByName(
                         restconfModuleName, (Date) args[1]);
             } else {
index acd5ae6dfbc8cc32935ccf885906a247e98d96cc..c0c306f8e069078732a96fd3f3654849dab45630 100644 (file)
@@ -37,7 +37,7 @@ import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError;
 import org.opendaylight.netconf.sal.streams.listeners.Notificator;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.restconf.handlers.SchemaContextHandler;
 import org.opendaylight.restconf.rest.services.api.RestconfStreamsService;
 import org.opendaylight.restconf.utils.mapping.RestconfMappingNodeConstants;
@@ -108,8 +108,8 @@ public class RestconfStreamsServiceTest {
     public void getAvailableStreamsTest() throws Exception {
         // prepare conditions - get correct Restconf module
         when(this.contextHandler.get()).thenReturn(this.mockSchemaContext);
-        when(this.mockSchemaContext.findModuleByNamespaceAndRevision(Draft11.RestconfModule.IETF_RESTCONF_QNAME
-                .getNamespace(), Draft11.RestconfModule.IETF_RESTCONF_QNAME.getRevision()))
+        when(this.mockSchemaContext.findModuleByNamespaceAndRevision(Draft15.RestconfModule.IETF_RESTCONF_QNAME
+                .getNamespace(), Draft15.RestconfModule.IETF_RESTCONF_QNAME.getRevision()))
                 .thenReturn(getTestingRestconfModule("ietf-restconf"));
 
         // make test
@@ -142,8 +142,8 @@ public class RestconfStreamsServiceTest {
     public void getAvailableStreamsMissingRestconfModuleNegativeTest() {
         // prepare conditions - get null Restconf module
         when(this.contextHandler.get()).thenReturn(this.mockSchemaContext);
-        when(this.mockSchemaContext.findModuleByNamespaceAndRevision(Draft11.RestconfModule.IETF_RESTCONF_QNAME
-                .getNamespace(), Draft11.RestconfModule.IETF_RESTCONF_QNAME.getRevision())).thenReturn(null);
+        when(this.mockSchemaContext.findModuleByNamespaceAndRevision(Draft15.RestconfModule.IETF_RESTCONF_QNAME
+                .getNamespace(), Draft15.RestconfModule.IETF_RESTCONF_QNAME.getRevision())).thenReturn(null);
 
         // make test
         this.thrown.expect(NullPointerException.class);
@@ -159,8 +159,8 @@ public class RestconfStreamsServiceTest {
     public void getAvailableStreamsMissingListStreamNegativeTest() {
         // prepare conditions - get Restconf module with missing list stream
         when(this.contextHandler.get()).thenReturn(this.mockSchemaContext);
-        when(this.mockSchemaContext.findModuleByNamespaceAndRevision(Draft11.RestconfModule.IETF_RESTCONF_QNAME
-                .getNamespace(), Draft11.RestconfModule.IETF_RESTCONF_QNAME.getRevision()))
+        when(this.mockSchemaContext.findModuleByNamespaceAndRevision(Draft15.RestconfModule.IETF_RESTCONF_QNAME
+                .getNamespace(), Draft15.RestconfModule.IETF_RESTCONF_QNAME.getRevision()))
                 .thenReturn(getTestingRestconfModule("restconf-module-with-missing-list-stream"));
 
         // make test and verify
@@ -186,8 +186,8 @@ public class RestconfStreamsServiceTest {
     public void getAvailableStreamsMissingContainerStreamsNegativeTest() {
         // prepare conditions - get Restconf module with missing container streams
         when(this.contextHandler.get()).thenReturn(this.mockSchemaContext);
-        when(this.mockSchemaContext.findModuleByNamespaceAndRevision(Draft11.RestconfModule.IETF_RESTCONF_QNAME
-                .getNamespace(), Draft11.RestconfModule.IETF_RESTCONF_QNAME.getRevision()))
+        when(this.mockSchemaContext.findModuleByNamespaceAndRevision(Draft15.RestconfModule.IETF_RESTCONF_QNAME
+                .getNamespace(), Draft15.RestconfModule.IETF_RESTCONF_QNAME.getRevision()))
                 .thenReturn(getTestingRestconfModule("restconf-module-with-missing-container-streams"));
 
         // make test and verify
@@ -212,8 +212,8 @@ public class RestconfStreamsServiceTest {
     public void getAvailableStreamsIllegalListStreamNegativeTest() {
         // prepare conditions - get Restconf module with illegal list stream
         when(this.contextHandler.get()).thenReturn(this.mockSchemaContext);
-        when(this.mockSchemaContext.findModuleByNamespaceAndRevision(Draft11.RestconfModule.IETF_RESTCONF_QNAME
-                .getNamespace(), Draft11.RestconfModule.IETF_RESTCONF_QNAME.getRevision()))
+        when(this.mockSchemaContext.findModuleByNamespaceAndRevision(Draft15.RestconfModule.IETF_RESTCONF_QNAME
+                .getNamespace(), Draft15.RestconfModule.IETF_RESTCONF_QNAME.getRevision()))
                 .thenReturn(getTestingRestconfModule("restconf-module-with-illegal-list-stream"));
 
         // make test
@@ -229,8 +229,8 @@ public class RestconfStreamsServiceTest {
     public void getAvailableStreamsIllegalContainerStreamsNegativeTest() {
         // prepare conditions - get Restconf module with illegal container streams
         when(this.contextHandler.get()).thenReturn(this.mockSchemaContext);
-        when(this.mockSchemaContext.findModuleByNamespaceAndRevision(Draft11.RestconfModule.IETF_RESTCONF_QNAME
-                .getNamespace(), Draft11.RestconfModule.IETF_RESTCONF_QNAME.getRevision()))
+        when(this.mockSchemaContext.findModuleByNamespaceAndRevision(Draft15.RestconfModule.IETF_RESTCONF_QNAME
+                .getNamespace(), Draft15.RestconfModule.IETF_RESTCONF_QNAME.getRevision()))
                 .thenReturn(getTestingRestconfModule("restconf-module-with-illegal-container-streams"));
 
         // make test
@@ -246,8 +246,8 @@ public class RestconfStreamsServiceTest {
     public void getAvailableStreamsIllegalLeafDescriptionNegativeTest() {
         // prepare conditions - get Restconf module with illegal leaf description in list stream
         when(this.contextHandler.get()).thenReturn(this.mockSchemaContext);
-        when(this.mockSchemaContext.findModuleByNamespaceAndRevision(Draft11.RestconfModule.IETF_RESTCONF_QNAME
-                .getNamespace(), Draft11.RestconfModule.IETF_RESTCONF_QNAME.getRevision()))
+        when(this.mockSchemaContext.findModuleByNamespaceAndRevision(Draft15.RestconfModule.IETF_RESTCONF_QNAME
+                .getNamespace(), Draft15.RestconfModule.IETF_RESTCONF_QNAME.getRevision()))
                 .thenReturn(getTestingRestconfModule("restconf-module-with-illegal-leaf-description"));
 
         // make test
@@ -262,7 +262,7 @@ public class RestconfStreamsServiceTest {
      * @return Restconf module
      */
     private Module getTestingRestconfModule(final String s) {
-        return this.schemaContext.findModuleByName(s, Draft11.RestconfModule.IETF_RESTCONF_QNAME.getRevision());
+        return this.schemaContext.findModuleByName(s, Draft15.RestconfModule.IETF_RESTCONF_QNAME.getRevision());
     }
 
     /**
index 9590d3eea06589cafdbd61285be3afc2773095a0..21d21a1e3c3ffdcf87ca1599d1780b53bfb5d9e5 100644 (file)
@@ -35,9 +35,9 @@ import org.opendaylight.controller.md.sal.rest.common.TestRestconfUtils;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorTag;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError.ErrorType;
-import org.opendaylight.restconf.Draft11;
-import org.opendaylight.restconf.Draft11.MonitoringModule;
-import org.opendaylight.restconf.Draft11.RestconfModule;
+import org.opendaylight.restconf.Draft15;
+import org.opendaylight.restconf.Draft15.MonitoringModule;
+import org.opendaylight.restconf.Draft15.RestconfModule;
 import org.opendaylight.restconf.utils.schema.context.RestconfSchemaUtil;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.SimpleDateFormatUtil;
@@ -756,7 +756,7 @@ public class RestconfMappingNodeUtilTest {
      */
     private Module getTestingRestconfModule(final String s) {
         return RestconfMappingNodeUtilTest.schemaContext.findModuleByName(
-                s, Draft11.RestconfModule.IETF_RESTCONF_QNAME.getRevision());
+                s, Draft15.RestconfModule.IETF_RESTCONF_QNAME.getRevision());
     }
 
     /**
index 7fd781ad0134e3f64ce2d2659096493f1c416136..314cbe66a09a0f2804718acedb34047bb34cafa4 100644 (file)
@@ -11,8 +11,8 @@ package org.opendaylight.restconf.utils.schema.context;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.fail;
-import static org.opendaylight.restconf.Draft11.MonitoringModule;
-import static org.opendaylight.restconf.Draft11.RestconfModule;
+import static org.opendaylight.restconf.Draft15.MonitoringModule;
+import static org.opendaylight.restconf.Draft15.RestconfModule;
 
 import com.google.common.collect.Sets;
 import java.util.NoSuchElementException;
@@ -23,7 +23,7 @@ import org.junit.rules.ExpectedException;
 import org.opendaylight.controller.md.sal.rest.common.TestRestconfUtils;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfDocumentedException;
 import org.opendaylight.netconf.sal.restconf.impl.RestconfError;
-import org.opendaylight.restconf.Draft11;
+import org.opendaylight.restconf.Draft15;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
@@ -389,6 +389,6 @@ public class RestconfSchemaUtilTest {
      * @return Restconf module
      */
     private Module getTestingRestconfModule(final String s) {
-        return schemaContext.findModuleByName(s, Draft11.RestconfModule.IETF_RESTCONF_QNAME.getRevision());
+        return schemaContext.findModuleByName(s, Draft15.RestconfModule.IETF_RESTCONF_QNAME.getRevision());
     }
 }