From f66f38af43d46a62473161da53a4e0fa05bbd8a5 Mon Sep 17 00:00:00 2001 From: Madhu Venugopal Date: Wed, 20 Aug 2014 18:41:19 -0700 Subject: [PATCH] GET API uses @Consumes annotation incorrectly, while it should be @Produces. Change-Id: I6c05abf0af436db0bdaceb9a94db17345e980353 Signed-off-by: Madhu Venugopal --- .../opendaylight/ovsdb/northbound/OvsdbNorthboundV2.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/northbound/src/main/java/org/opendaylight/ovsdb/northbound/OvsdbNorthboundV2.java b/northbound/src/main/java/org/opendaylight/ovsdb/northbound/OvsdbNorthboundV2.java index 4005a151c..fd023f047 100644 --- a/northbound/src/main/java/org/opendaylight/ovsdb/northbound/OvsdbNorthboundV2.java +++ b/northbound/src/main/java/org/opendaylight/ovsdb/northbound/OvsdbNorthboundV2.java @@ -20,6 +20,7 @@ import javax.ws.rs.POST; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; @@ -47,7 +48,6 @@ import org.opendaylight.ovsdb.plugin.api.OvsVswitchdSchemaConstants; import org.opendaylight.ovsdb.plugin.api.OvsdbConfigurationService; import org.opendaylight.ovsdb.plugin.api.OvsdbConnectionService; import org.opendaylight.ovsdb.plugin.api.StatusWithUuid; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -408,7 +408,7 @@ public class OvsdbNorthboundV2 { @StatusCodes({ @ResponseCode(code = 200, condition = "Row Updated successfully"), @ResponseCode(code = 400, condition = "Invalid data passed"), @ResponseCode(code = 401, condition = "User not authorized to perform this operation")}) - @Consumes({ MediaType.APPLICATION_JSON}) + @Produces({ MediaType.APPLICATION_JSON}) @TypeHint(Row.class) public Row getRow(@PathParam("nodeType") String nodeType, @PathParam("nodeId") String nodeId, @PathParam("tableName") String tableName, @PathParam("rowUuid") String rowUuid) { @@ -492,7 +492,7 @@ public class OvsdbNorthboundV2 { @StatusCodes({ @ResponseCode(code = 200, condition = "Row Updated successfully"), @ResponseCode(code = 400, condition = "Invalid data passed"), @ResponseCode(code = 401, condition = "User not authorized to perform this operation")}) - @Consumes({ MediaType.APPLICATION_JSON}) + @Produces({ MediaType.APPLICATION_JSON}) @TypeHint(OvsdbRows.class) public OvsdbRows getAllRows(@PathParam("nodeType") String nodeType, @PathParam("nodeId") String nodeId, @PathParam("tableName") String tableName) { -- 2.36.6