commit | c2a542bcab4512812a2ef18b07a08c93ac0ebec0 | [log] [tgz] |
---|---|---|
author | Jian Li <pyguni@gmail.com> | Tue May 10 11:48:19 2016 -0700 |
committer | Jian Li <pyguni@gmail.com> | Tue May 10 22:24:39 2016 +0000 |
tree | 5e97323d8dbef836ac79f48c3f0f54532caf454e | |
parent | 419c8bd1b0eb1aca803065e18614a722aa6bb6be [diff] [blame] |
Explicitly return NO CONTENT type response for http DELETE request Change-Id: I920084b92197bb1687e7d978ad350b2e1290ecbc
diff --git a/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/resources/PortPairWebResource.java b/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/resources/PortPairWebResource.java index 5b4945c..34bea37 100644 --- a/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/resources/PortPairWebResource.java +++ b/apps/vtn/vtnweb/src/main/java/org/onosproject/vtnweb/resources/PortPairWebResource.java
@@ -145,15 +145,17 @@ * Delete details of a specified port pair id. * * @param id port pair id + * @return 204 NO CONTENT */ @Path("{pair_id}") @DELETE - public void deletePortPair(@PathParam("pair_id") String id) { + public Response deletePortPair(@PathParam("pair_id") String id) { PortPairId portPairId = PortPairId.of(id); Boolean isSuccess = nullIsNotFound(get(PortPairService.class).removePortPair(portPairId), PORT_PAIR_NOT_FOUND); if (!isSuccess) { log.debug("Port pair identifier {} does not exist", id); } + return Response.noContent().build(); } }