From 4af47bd7f1e068ded1a141e9539845fad026aee4 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Sun, 9 May 2021 07:47:39 +0200 Subject: [PATCH] Bump MRI upstreams Adopt following versions: - odlparent-8.1.2 - infrautils-1.9.8 - yangtools-6.0.6 - mdsal-7.0.7 - controller-3.0.8 - aaa-0.13.3 Change-Id: Ib48792875c6c54a1f328e466a5de47d7d2af8850 Signed-off-by: Robert Varga --- artifacts/pom.xml | 2 +- .../features-netconf-connector/pom.xml | 2 +- features/netconf-connector/pom.xml | 2 +- .../netconf/features-netconf-testing/pom.xml | 2 +- features/netconf/features-netconf/pom.xml | 2 +- features/netconf/pom.xml | 2 +- features/parent/pom.xml | 2 +- features/pom.xml | 2 +- features/restconf/features-restconf/pom.xml | 2 +- features/restconf/pom.xml | 2 +- features/yanglib/features-yanglib/pom.xml | 2 +- features/yanglib/pom.xml | 2 +- karaf/pom.xml | 2 +- netconf/models/pom.xml | 2 +- netconf/netconf-config/pom.xml | 2 +- netconf/pom.xml | 2 +- netconf/shaded-exificient-jar/pom.xml | 2 +- netconf/shaded-exificient/pom.xml | 2 +- netconf/shaded-sshd-jar/pom.xml | 2 +- netconf/shaded-sshd/pom.xml | 2 +- .../client/http/perf/RequestMessageUtils.java | 4 +- .../test/tool/monitoring/package-info.java | 14 +- netconf/tools/pom.xml | 2 +- parent/pom.xml | 6 +- pom.xml | 2 +- restconf/pom.xml | 2 +- restconf/restconf-models/pom.xml | 2 +- .../netconf/sal/rest/api/RestconfService.java | 143 ++++++++++++++---- .../impl/JsonNormalizedNodeBodyReader.java | 7 +- .../impl/NormalizedNodeJsonBodyWriter.java | 8 +- .../impl/NormalizedNodeXmlBodyWriter.java | 9 +- .../impl/XmlNormalizedNodeBodyReader.java | 8 +- .../restconf/nb/rfc8040/codecs/RestCodec.java | 6 +- .../services/api/RestconfDataService.java | 84 +++++++--- .../api/RestconfInvokeOperationsService.java | 20 ++- .../simple/api/RestconfOperationsService.java | 25 +-- .../services/simple/api/RestconfService.java | 11 +- restconf/sal-rest-connector-config/pom.xml | 2 +- 38 files changed, 277 insertions(+), 118 deletions(-) diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 877c73486f..edcf8ed499 100644 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent odlparent-lite - 8.1.1 + 8.1.2 diff --git a/features/netconf-connector/features-netconf-connector/pom.xml b/features/netconf-connector/features-netconf-connector/pom.xml index 91372a2976..35bf97028c 100644 --- a/features/netconf-connector/features-netconf-connector/pom.xml +++ b/features/netconf-connector/features-netconf-connector/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent feature-repo-parent - 8.1.1 + 8.1.2 diff --git a/features/netconf-connector/pom.xml b/features/netconf-connector/pom.xml index 76ffd3e256..41d47b8346 100644 --- a/features/netconf-connector/pom.xml +++ b/features/netconf-connector/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent-lite - 8.1.1 + 8.1.2 diff --git a/features/netconf/features-netconf-testing/pom.xml b/features/netconf/features-netconf-testing/pom.xml index e7c6bda003..9ce8b70218 100644 --- a/features/netconf/features-netconf-testing/pom.xml +++ b/features/netconf/features-netconf-testing/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent feature-repo-parent - 8.1.1 + 8.1.2 diff --git a/features/netconf/features-netconf/pom.xml b/features/netconf/features-netconf/pom.xml index d92fd85ae6..1df5a416a9 100644 --- a/features/netconf/features-netconf/pom.xml +++ b/features/netconf/features-netconf/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent feature-repo-parent - 8.1.1 + 8.1.2 diff --git a/features/netconf/pom.xml b/features/netconf/pom.xml index 5a47ebe113..d5e1e35da2 100644 --- a/features/netconf/pom.xml +++ b/features/netconf/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent-lite - 8.1.1 + 8.1.2 diff --git a/features/parent/pom.xml b/features/parent/pom.xml index 96bdad0f05..9fe87dc5c5 100644 --- a/features/parent/pom.xml +++ b/features/parent/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 8.1.1 + 8.1.2 diff --git a/features/pom.xml b/features/pom.xml index 98e225c0a7..3497d43c30 100644 --- a/features/pom.xml +++ b/features/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent-lite - 8.1.1 + 8.1.2 diff --git a/features/restconf/features-restconf/pom.xml b/features/restconf/features-restconf/pom.xml index b2b94869fb..45f909f7c9 100644 --- a/features/restconf/features-restconf/pom.xml +++ b/features/restconf/features-restconf/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent feature-repo-parent - 8.1.1 + 8.1.2 diff --git a/features/restconf/pom.xml b/features/restconf/pom.xml index 8d7f4b4705..9d09b0a848 100644 --- a/features/restconf/pom.xml +++ b/features/restconf/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent-lite - 8.1.1 + 8.1.2 diff --git a/features/yanglib/features-yanglib/pom.xml b/features/yanglib/features-yanglib/pom.xml index 43ab99fae8..bd6e87e386 100644 --- a/features/yanglib/features-yanglib/pom.xml +++ b/features/yanglib/features-yanglib/pom.xml @@ -13,7 +13,7 @@ org.opendaylight.odlparent feature-repo-parent - 8.1.1 + 8.1.2 diff --git a/features/yanglib/pom.xml b/features/yanglib/pom.xml index 82784486a3..249231bca0 100644 --- a/features/yanglib/pom.xml +++ b/features/yanglib/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent-lite - 8.1.1 + 8.1.2 diff --git a/karaf/pom.xml b/karaf/pom.xml index f94dc652ba..06b33a5c08 100644 --- a/karaf/pom.xml +++ b/karaf/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent karaf4-parent - 8.1.1 + 8.1.2 org.opendaylight.netconf diff --git a/netconf/models/pom.xml b/netconf/models/pom.xml index 57a263bea1..4f47bb023c 100644 --- a/netconf/models/pom.xml +++ b/netconf/models/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent-lite - 8.1.1 + 8.1.2 diff --git a/netconf/netconf-config/pom.xml b/netconf/netconf-config/pom.xml index ddf61f199a..4da19c7b16 100644 --- a/netconf/netconf-config/pom.xml +++ b/netconf/netconf-config/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent bundle-parent - 8.1.1 + 8.1.2 diff --git a/netconf/pom.xml b/netconf/pom.xml index 1e516b3eab..6da7e33476 100644 --- a/netconf/pom.xml +++ b/netconf/pom.xml @@ -13,7 +13,7 @@ org.opendaylight.odlparent odlparent-lite - 8.1.1 + 8.1.2 diff --git a/netconf/shaded-exificient-jar/pom.xml b/netconf/shaded-exificient-jar/pom.xml index 916b61cd09..a2e8fa5734 100644 --- a/netconf/shaded-exificient-jar/pom.xml +++ b/netconf/shaded-exificient-jar/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent - 8.1.1 + 8.1.2 diff --git a/netconf/shaded-exificient/pom.xml b/netconf/shaded-exificient/pom.xml index ff92c4c341..3b7f791d6b 100644 --- a/netconf/shaded-exificient/pom.xml +++ b/netconf/shaded-exificient/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent bundle-parent - 8.1.1 + 8.1.2 diff --git a/netconf/shaded-sshd-jar/pom.xml b/netconf/shaded-sshd-jar/pom.xml index a8abfd4d99..40a456fa27 100644 --- a/netconf/shaded-sshd-jar/pom.xml +++ b/netconf/shaded-sshd-jar/pom.xml @@ -13,7 +13,7 @@ org.opendaylight.odlparent odlparent - 8.1.1 + 8.1.2 diff --git a/netconf/shaded-sshd/pom.xml b/netconf/shaded-sshd/pom.xml index be985c767f..f740a1b06a 100644 --- a/netconf/shaded-sshd/pom.xml +++ b/netconf/shaded-sshd/pom.xml @@ -13,7 +13,7 @@ org.opendaylight.odlparent bundle-parent - 8.1.1 + 8.1.2 diff --git a/netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/client/http/perf/RequestMessageUtils.java b/netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/client/http/perf/RequestMessageUtils.java index 6267d05827..0b83cce0b5 100644 --- a/netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/client/http/perf/RequestMessageUtils.java +++ b/netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/client/http/perf/RequestMessageUtils.java @@ -5,7 +5,6 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.netconf.test.tool.client.http.perf; import com.ning.http.client.AsyncHttpClient; @@ -29,7 +28,8 @@ public final class RequestMessageUtils { private static long macStart = 0xAABBCCDD0000L; - private RequestMessageUtils(){ + private RequestMessageUtils() { + // Hidden on purpose } public static String prepareMessage(final int idi, final int idj, final String editContentString, diff --git a/netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/monitoring/package-info.java b/netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/monitoring/package-info.java index e65ec07387..53ca976977 100644 --- a/netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/monitoring/package-info.java +++ b/netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/monitoring/package-info.java @@ -6,13 +6,13 @@ * and is available at http://www.eclipse.org/legal/epl-v10.html */ @XmlSchema( - elementFormDefault = XmlNsForm.QUALIFIED, - xmlns = { - @XmlNs(namespaceURI = MonitoringConstants.EXTENSION_NAMESPACE, prefix = - MonitoringConstants.EXTENSION_NAMESPACE_PREFIX), - @XmlNs(namespaceURI = MonitoringConstants.NAMESPACE, prefix = "") - }, - namespace = MonitoringConstants.NAMESPACE + elementFormDefault = XmlNsForm.QUALIFIED, + xmlns = { + @XmlNs(namespaceURI = MonitoringConstants.EXTENSION_NAMESPACE, + prefix = MonitoringConstants.EXTENSION_NAMESPACE_PREFIX), + @XmlNs(namespaceURI = MonitoringConstants.NAMESPACE, prefix = "") + }, + namespace = MonitoringConstants.NAMESPACE ) package org.opendaylight.netconf.test.tool.monitoring; diff --git a/netconf/tools/pom.xml b/netconf/tools/pom.xml index e4b26048f1..4b9f8b1d07 100644 --- a/netconf/tools/pom.xml +++ b/netconf/tools/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent-lite - 8.1.1 + 8.1.2 diff --git a/parent/pom.xml b/parent/pom.xml index d17cf8471f..63da8bb5e2 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.mdsal binding-parent - 7.0.6 + 7.0.7 @@ -25,14 +25,14 @@ org.opendaylight.aaa aaa-artifacts - 0.13.2 + 0.13.3 pom import org.opendaylight.controller bundle-parent - 3.0.7 + 3.0.8 pom import diff --git a/pom.xml b/pom.xml index 3b2fcff93b..a06c268c1c 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ org.opendaylight.odlparent odlparent-lite - 8.1.1 + 8.1.2 diff --git a/restconf/pom.xml b/restconf/pom.xml index d4871d1fa8..c8ea155fb3 100644 --- a/restconf/pom.xml +++ b/restconf/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent-lite - 8.1.1 + 8.1.2 diff --git a/restconf/restconf-models/pom.xml b/restconf/restconf-models/pom.xml index 14f2752f20..ed6cbc7eb4 100644 --- a/restconf/restconf-models/pom.xml +++ b/restconf/restconf-models/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent-lite - 8.1.1 + 8.1.2 diff --git a/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/api/RestconfService.java b/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/api/RestconfService.java index d110de8fdf..f29fa26fe1 100644 --- a/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/api/RestconfService.java +++ b/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/api/RestconfService.java @@ -69,8 +69,13 @@ public interface RestconfService { @Deprecated @GET @Path("/modules") - @Produces({ Draft02.MediaTypes.API + JSON, Draft02.MediaTypes.API + XML, MediaType.APPLICATION_JSON, - MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Produces({ + Draft02.MediaTypes.API + JSON, + Draft02.MediaTypes.API + XML, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) NormalizedNodeContext getModules(@Context UriInfo uriInfo); /** @@ -87,8 +92,13 @@ public interface RestconfService { @Deprecated @GET @Path("/modules/{identifier:.+}") - @Produces({ Draft02.MediaTypes.API + JSON, Draft02.MediaTypes.API + XML, MediaType.APPLICATION_JSON, - MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Produces({ + Draft02.MediaTypes.API + JSON, + Draft02.MediaTypes.API + XML, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) NormalizedNodeContext getModules(@PathParam("identifier") String identifier, @Context UriInfo uriInfo); /** @@ -105,8 +115,13 @@ public interface RestconfService { @Deprecated @GET @Path("/modules/module/{identifier:.+}") - @Produces({ Draft02.MediaTypes.API + JSON, Draft02.MediaTypes.API + XML, MediaType.APPLICATION_JSON, - MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Produces({ + Draft02.MediaTypes.API + JSON, + Draft02.MediaTypes.API + XML, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) NormalizedNodeContext getModule(@PathParam("identifier") String identifier, @Context UriInfo uriInfo); /** @@ -121,8 +136,13 @@ public interface RestconfService { @Deprecated @GET @Path("/operations") - @Produces({ Draft02.MediaTypes.API + JSON, Draft02.MediaTypes.API + XML, MediaType.APPLICATION_JSON, - MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Produces({ + Draft02.MediaTypes.API + JSON, + Draft02.MediaTypes.API + XML, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) NormalizedNodeContext getOperations(@Context UriInfo uriInfo); /** @@ -139,8 +159,13 @@ public interface RestconfService { @Deprecated @GET @Path("/operations/{identifier:.+}") - @Produces({ Draft02.MediaTypes.API + JSON, Draft02.MediaTypes.API + XML, MediaType.APPLICATION_JSON, - MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Produces({ + Draft02.MediaTypes.API + JSON, + Draft02.MediaTypes.API + XML, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) NormalizedNodeContext getOperations(@PathParam("identifier") String identifier, @Context UriInfo uriInfo); /** @@ -159,12 +184,24 @@ public interface RestconfService { @Deprecated @POST @Path("/operations/{identifier:.+}") - @Produces({ Draft02.MediaTypes.OPERATION + JSON, Draft02.MediaTypes.OPERATION + XML, - Draft02.MediaTypes.DATA + JSON, Draft02.MediaTypes.DATA + XML, MediaType.APPLICATION_JSON, - MediaType.APPLICATION_XML, MediaType.TEXT_XML }) - @Consumes({ Draft02.MediaTypes.OPERATION + JSON, Draft02.MediaTypes.OPERATION + XML, - Draft02.MediaTypes.DATA + JSON, Draft02.MediaTypes.DATA + XML, MediaType.APPLICATION_JSON, - MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Produces({ + Draft02.MediaTypes.OPERATION + JSON, + Draft02.MediaTypes.OPERATION + XML, + Draft02.MediaTypes.DATA + JSON, + Draft02.MediaTypes.DATA + XML, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) + @Consumes({ + Draft02.MediaTypes.OPERATION + JSON, + Draft02.MediaTypes.OPERATION + XML, + Draft02.MediaTypes.DATA + JSON, + Draft02.MediaTypes.DATA + XML, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) NormalizedNodeContext invokeRpc(@Encoded @PathParam("identifier") String identifier, NormalizedNodeContext payload, @Context UriInfo uriInfo); @@ -182,8 +219,13 @@ public interface RestconfService { @Deprecated @GET @Path("/config/{identifier:.+}") - @Produces({ Draft02.MediaTypes.DATA + JSON, Draft02.MediaTypes.DATA + XML, MediaType.APPLICATION_JSON, - MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Produces({ + Draft02.MediaTypes.DATA + JSON, + Draft02.MediaTypes.DATA + XML, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) NormalizedNodeContext readConfigurationData(@Encoded @PathParam("identifier") String identifier, @Context UriInfo uriInfo); @@ -201,8 +243,13 @@ public interface RestconfService { @Deprecated @GET @Path("/operational/{identifier:.+}") - @Produces({ Draft02.MediaTypes.DATA + JSON, Draft02.MediaTypes.DATA + XML, MediaType.APPLICATION_JSON, - MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Produces({ + Draft02.MediaTypes.DATA + JSON, + Draft02.MediaTypes.DATA + XML, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) NormalizedNodeContext readOperationalData(@Encoded @PathParam("identifier") String identifier, @Context UriInfo uriInfo); @@ -220,8 +267,13 @@ public interface RestconfService { @Deprecated @PUT @Path("/config/{identifier:.+}") - @Consumes({ Draft02.MediaTypes.DATA + JSON, Draft02.MediaTypes.DATA + XML, MediaType.APPLICATION_JSON, - MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Consumes({ + Draft02.MediaTypes.DATA + JSON, + Draft02.MediaTypes.DATA + XML, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) Response updateConfigurationData(@Encoded @PathParam("identifier") String identifier, NormalizedNodeContext payload, @Context UriInfo uriInfo); @@ -241,8 +293,13 @@ public interface RestconfService { @Deprecated @POST @Path("/config/{identifier:.+}") - @Consumes({ Draft02.MediaTypes.DATA + JSON, Draft02.MediaTypes.DATA + XML, MediaType.APPLICATION_JSON, - MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Consumes({ + Draft02.MediaTypes.DATA + JSON, + Draft02.MediaTypes.DATA + XML, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) Response createConfigurationData(@Encoded @PathParam("identifier") String identifier, NormalizedNodeContext payload, @Context UriInfo uriInfo); @@ -260,8 +317,13 @@ public interface RestconfService { @Deprecated @POST @Path("/config") - @Consumes({ Draft02.MediaTypes.DATA + JSON, Draft02.MediaTypes.DATA + XML, MediaType.APPLICATION_JSON, - MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Consumes({ + Draft02.MediaTypes.DATA + JSON, + Draft02.MediaTypes.DATA + XML, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) Response createConfigurationData(NormalizedNodeContext payload, @Context UriInfo uriInfo); /** @@ -306,8 +368,13 @@ public interface RestconfService { @Deprecated @GET @Path("/streams") - @Produces({ Draft02.MediaTypes.API + JSON, Draft02.MediaTypes.API + XML, MediaType.APPLICATION_JSON, - MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Produces({ + Draft02.MediaTypes.API + JSON, + Draft02.MediaTypes.API + XML, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) NormalizedNodeContext getAvailableStreams(@Context UriInfo uriInfo); /** @@ -326,8 +393,14 @@ public interface RestconfService { @Deprecated @Patch @Path("/config/{identifier:.+}") - @Consumes({MediaTypes.PATCH + JSON, MediaTypes.PATCH + XML}) - @Produces({MediaTypes.PATCH_STATUS + JSON, MediaTypes.PATCH_STATUS + XML}) + @Consumes({ + MediaTypes.PATCH + JSON, + MediaTypes.PATCH + XML + }) + @Produces({ + MediaTypes.PATCH_STATUS + JSON, + MediaTypes.PATCH_STATUS + XML + }) PatchStatusContext patchConfigurationData(@Encoded @PathParam("identifier") String identifier, PatchContext context, @Context UriInfo uriInfo); @@ -345,7 +418,13 @@ public interface RestconfService { @Deprecated @Patch @Path("/config") - @Consumes({MediaTypes.PATCH + JSON, MediaTypes.PATCH + XML}) - @Produces({MediaTypes.PATCH_STATUS + JSON, MediaTypes.PATCH_STATUS + XML}) + @Consumes({ + MediaTypes.PATCH + JSON, + MediaTypes.PATCH + XML + }) + @Produces({ + MediaTypes.PATCH_STATUS + JSON, + MediaTypes.PATCH_STATUS + XML + }) PatchStatusContext patchConfigurationData(PatchContext context, @Context UriInfo uriInfo); } diff --git a/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/JsonNormalizedNodeBodyReader.java b/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/JsonNormalizedNodeBodyReader.java index 8507871483..3b125cdf40 100644 --- a/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/JsonNormalizedNodeBodyReader.java +++ b/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/JsonNormalizedNodeBodyReader.java @@ -54,8 +54,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; @Provider -@Consumes({ Draft02.MediaTypes.DATA + RestconfService.JSON, Draft02.MediaTypes.OPERATION + RestconfService.JSON, - MediaType.APPLICATION_JSON }) +@Consumes({ + Draft02.MediaTypes.DATA + RestconfService.JSON, + Draft02.MediaTypes.OPERATION + RestconfService.JSON, + MediaType.APPLICATION_JSON +}) public class JsonNormalizedNodeBodyReader extends AbstractIdentifierAwareJaxRsProvider implements MessageBodyReader { diff --git a/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/NormalizedNodeJsonBodyWriter.java b/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/NormalizedNodeJsonBodyWriter.java index 9445b164d9..b671833c25 100644 --- a/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/NormalizedNodeJsonBodyWriter.java +++ b/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/NormalizedNodeJsonBodyWriter.java @@ -57,8 +57,12 @@ import org.xml.sax.SAXException; */ @Deprecated @Provider -@Produces({ Draft02.MediaTypes.API + RestconfService.JSON, Draft02.MediaTypes.DATA + RestconfService.JSON, - Draft02.MediaTypes.OPERATION + RestconfService.JSON, MediaType.APPLICATION_JSON }) +@Produces({ + Draft02.MediaTypes.API + RestconfService.JSON, + Draft02.MediaTypes.DATA + RestconfService.JSON, + Draft02.MediaTypes.OPERATION + RestconfService.JSON, + MediaType.APPLICATION_JSON +}) public class NormalizedNodeJsonBodyWriter implements MessageBodyWriter { private static final int DEFAULT_INDENT_SPACES_NUM = 2; diff --git a/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/NormalizedNodeXmlBodyWriter.java b/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/NormalizedNodeXmlBodyWriter.java index 48f4aa0806..862f4039ab 100644 --- a/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/NormalizedNodeXmlBodyWriter.java +++ b/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/NormalizedNodeXmlBodyWriter.java @@ -53,8 +53,13 @@ import org.xml.sax.SAXException; */ @Deprecated @Provider -@Produces({ Draft02.MediaTypes.API + RestconfService.XML, Draft02.MediaTypes.DATA + RestconfService.XML, - Draft02.MediaTypes.OPERATION + RestconfService.XML, MediaType.APPLICATION_XML, MediaType.TEXT_XML }) +@Produces({ + Draft02.MediaTypes.API + RestconfService.XML, + Draft02.MediaTypes.DATA + RestconfService.XML, + Draft02.MediaTypes.OPERATION + RestconfService.XML, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML +}) public class NormalizedNodeXmlBodyWriter implements MessageBodyWriter { private static final XMLOutputFactory XML_FACTORY; diff --git a/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/XmlNormalizedNodeBodyReader.java b/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/XmlNormalizedNodeBodyReader.java index 1b8435b38e..215c1b4d78 100644 --- a/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/XmlNormalizedNodeBodyReader.java +++ b/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/XmlNormalizedNodeBodyReader.java @@ -64,8 +64,12 @@ import org.w3c.dom.Document; import org.xml.sax.SAXException; @Provider -@Consumes({ Draft02.MediaTypes.DATA + RestconfService.XML, Draft02.MediaTypes.OPERATION + RestconfService.XML, - MediaType.APPLICATION_XML, MediaType.TEXT_XML }) +@Consumes({ + Draft02.MediaTypes.DATA + RestconfService.XML, + Draft02.MediaTypes.OPERATION + RestconfService.XML, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML +}) public class XmlNormalizedNodeBodyReader extends AbstractIdentifierAwareJaxRsProvider implements MessageBodyReader { diff --git a/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/codecs/RestCodec.java b/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/codecs/RestCodec.java index 75e859410f..2e08e4e069 100644 --- a/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/codecs/RestCodec.java +++ b/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/codecs/RestCodec.java @@ -248,8 +248,10 @@ public final class RestCodec { return identityValuesDTO; } - @SuppressFBWarnings(value = {"NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE", - "RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"}, justification = "Unrecognised NullableDecl") + @SuppressFBWarnings(value = { + "NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE", + "RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE" + }, justification = "Unrecognised NullableDecl") @Override public YangInstanceIdentifier deserialize(final IdentityValuesDTO data) { final List result = new ArrayList<>(); diff --git a/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/api/RestconfDataService.java b/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/api/RestconfDataService.java index f655a58f1b..dbad05a6ca 100644 --- a/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/api/RestconfDataService.java +++ b/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/api/RestconfDataService.java @@ -46,8 +46,14 @@ public interface RestconfDataService extends UpdateHandlers { */ @GET @Path("/data/{identifier:.+}") - @Produces({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA + RestconfConstants.XML, - Rfc8040.MediaTypes.DATA, MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Produces({ + Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, + Rfc8040.MediaTypes.DATA + RestconfConstants.XML, + Rfc8040.MediaTypes.DATA, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) Response readData(@Encoded @PathParam("identifier") String identifier, @Context UriInfo uriInfo); /** @@ -59,8 +65,14 @@ public interface RestconfDataService extends UpdateHandlers { */ @GET @Path("/data") - @Produces({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA + RestconfConstants.XML, - Rfc8040.MediaTypes.DATA, MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Produces({ + Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, + Rfc8040.MediaTypes.DATA + RestconfConstants.XML, + Rfc8040.MediaTypes.DATA, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) Response readData(@Context UriInfo uriInfo); /** @@ -74,8 +86,14 @@ public interface RestconfDataService extends UpdateHandlers { */ @PUT @Path("/data/{identifier:.+}") - @Consumes({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA + RestconfConstants.XML, - Rfc8040.MediaTypes.DATA, MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Consumes({ + Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, + Rfc8040.MediaTypes.DATA + RestconfConstants.XML, + Rfc8040.MediaTypes.DATA, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) Response putData(@Encoded @PathParam("identifier") String identifier, NormalizedNodeContext payload, @Context UriInfo uriInfo); @@ -92,8 +110,14 @@ public interface RestconfDataService extends UpdateHandlers { */ @POST @Path("/data/{identifier:.+}") - @Consumes({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA + RestconfConstants.XML, - Rfc8040.MediaTypes.DATA, MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Consumes({ + Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, + Rfc8040.MediaTypes.DATA + RestconfConstants.XML, + Rfc8040.MediaTypes.DATA, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) Response postData(@Encoded @PathParam("identifier") String identifier, NormalizedNodeContext payload, @Context UriInfo uriInfo); @@ -108,8 +132,14 @@ public interface RestconfDataService extends UpdateHandlers { */ @POST @Path("/data") - @Consumes({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA + RestconfConstants.XML, - Rfc8040.MediaTypes.DATA, MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Consumes({ + Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, + Rfc8040.MediaTypes.DATA + RestconfConstants.XML, + Rfc8040.MediaTypes.DATA, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) Response postData(NormalizedNodeContext payload, @Context UriInfo uriInfo); /** @@ -137,10 +167,14 @@ public interface RestconfDataService extends UpdateHandlers { */ @Patch @Path("/data/{identifier:.+}") - @Consumes({ Rfc8040.MediaTypes.YANG_PATCH + RestconfConstants.JSON, - Rfc8040.MediaTypes.YANG_PATCH + RestconfConstants.XML }) - @Produces({ Rfc8040.MediaTypes.YANG_PATCH_STATUS + RestconfConstants.JSON, - Rfc8040.MediaTypes.YANG_PATCH_STATUS + RestconfConstants.XML }) + @Consumes({ + Rfc8040.MediaTypes.YANG_PATCH + RestconfConstants.JSON, + Rfc8040.MediaTypes.YANG_PATCH + RestconfConstants.XML + }) + @Produces({ + Rfc8040.MediaTypes.YANG_PATCH_STATUS + RestconfConstants.JSON, + Rfc8040.MediaTypes.YANG_PATCH_STATUS + RestconfConstants.XML + }) PatchStatusContext patchData(@Encoded @PathParam("identifier") String identifier, PatchContext context, @Context UriInfo uriInfo); @@ -155,10 +189,14 @@ public interface RestconfDataService extends UpdateHandlers { */ @Patch @Path("/data") - @Consumes({ Rfc8040.MediaTypes.YANG_PATCH + RestconfConstants.JSON, - Rfc8040.MediaTypes.YANG_PATCH + RestconfConstants.XML }) - @Produces({ Rfc8040.MediaTypes.YANG_PATCH_STATUS + RestconfConstants.JSON, - Rfc8040.MediaTypes.YANG_PATCH_STATUS + RestconfConstants.XML }) + @Consumes({ + Rfc8040.MediaTypes.YANG_PATCH + RestconfConstants.JSON, + Rfc8040.MediaTypes.YANG_PATCH + RestconfConstants.XML + }) + @Produces({ + Rfc8040.MediaTypes.YANG_PATCH_STATUS + RestconfConstants.JSON, + Rfc8040.MediaTypes.YANG_PATCH_STATUS + RestconfConstants.XML + }) PatchStatusContext patchData(PatchContext context, @Context UriInfo uriInfo); @@ -173,8 +211,14 @@ public interface RestconfDataService extends UpdateHandlers { */ @Patch @Path("/data/{identifier:.+}") - @Consumes({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA + RestconfConstants.XML, - Rfc8040.MediaTypes.DATA, MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Consumes({ + Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, + Rfc8040.MediaTypes.DATA + RestconfConstants.XML, + Rfc8040.MediaTypes.DATA, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) Response patchData(@Encoded @PathParam("identifier") String identifier, NormalizedNodeContext payload, @Context UriInfo uriInfo); } diff --git a/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/api/RestconfInvokeOperationsService.java b/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/api/RestconfInvokeOperationsService.java index dd9f2f515e..924e90ecc3 100644 --- a/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/api/RestconfInvokeOperationsService.java +++ b/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/api/RestconfInvokeOperationsService.java @@ -24,10 +24,8 @@ import org.opendaylight.restconf.nb.rfc8040.utils.RestconfConstants; /** * An operation resource represents a protocol operation defined with the YANG * "rpc" statement. It is invoked using a POST method on the operation resource. - * */ public interface RestconfInvokeOperationsService extends UpdateHandlers { - /** * Invoke RPC operation. * @@ -42,10 +40,20 @@ public interface RestconfInvokeOperationsService extends UpdateHandlers { */ @POST @Path("/operations/{identifier:.+}") - @Produces({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA + RestconfConstants.XML, - MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML }) - @Consumes({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA + RestconfConstants.XML, - MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Produces({ + Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, + Rfc8040.MediaTypes.DATA + RestconfConstants.XML, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) + @Consumes({ + Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, + Rfc8040.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); } diff --git a/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/services/simple/api/RestconfOperationsService.java b/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/services/simple/api/RestconfOperationsService.java index 3027def8e0..a1f8103c1f 100644 --- a/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/services/simple/api/RestconfOperationsService.java +++ b/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/services/simple/api/RestconfOperationsService.java @@ -19,12 +19,9 @@ import org.opendaylight.restconf.nb.rfc8040.Rfc8040; import org.opendaylight.restconf.nb.rfc8040.utils.RestconfConstants; /** - * Container that provides access to the data-model specific operations - * supported by the server. - * + * Container that provides access to the data-model specific operations supported by the server. */ public interface RestconfOperationsService extends UpdateHandlers { - /** * List of rpc or action operations supported by the server. * @@ -34,8 +31,13 @@ public interface RestconfOperationsService extends UpdateHandlers { */ @GET @Path("/operations") - @Produces({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA, MediaType.APPLICATION_JSON, - MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Produces({ + Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, + Rfc8040.MediaTypes.DATA, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) NormalizedNodeContext getOperations(@Context UriInfo uriInfo); /** @@ -49,7 +51,12 @@ public interface RestconfOperationsService extends UpdateHandlers { */ @GET @Path("/operations/{identifier:.+}") - @Produces({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA, MediaType.APPLICATION_JSON, - MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Produces({ + Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, + Rfc8040.MediaTypes.DATA, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) NormalizedNodeContext getOperations(@PathParam("identifier") String identifier, @Context UriInfo uriInfo); -} \ No newline at end of file +} diff --git a/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/services/simple/api/RestconfService.java b/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/services/simple/api/RestconfService.java index 844669eb89..de7e2aaa05 100644 --- a/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/services/simple/api/RestconfService.java +++ b/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/services/simple/api/RestconfService.java @@ -17,10 +17,8 @@ import org.opendaylight.restconf.nb.rfc8040.utils.RestconfConstants; /** * Service for getting yang library version. - * */ public interface RestconfService extends UpdateHandlers { - /** * Get yang library version. * @@ -28,7 +26,12 @@ public interface RestconfService extends UpdateHandlers { */ @GET @Path("/yang-library-version") - @Produces({ Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, Rfc8040.MediaTypes.DATA, MediaType.APPLICATION_JSON, - MediaType.APPLICATION_XML, MediaType.TEXT_XML }) + @Produces({ + Rfc8040.MediaTypes.DATA + RestconfConstants.JSON, + Rfc8040.MediaTypes.DATA, + MediaType.APPLICATION_JSON, + MediaType.APPLICATION_XML, + MediaType.TEXT_XML + }) NormalizedNodeContext getLibraryVersion(); } diff --git a/restconf/sal-rest-connector-config/pom.xml b/restconf/sal-rest-connector-config/pom.xml index 1ce161044a..dcbbbf8d87 100644 --- a/restconf/sal-rest-connector-config/pom.xml +++ b/restconf/sal-rest-connector-config/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent-lite - 8.1.1 + 8.1.2 -- 2.36.6