Wu wenbin
Committed by Gerrit Code Review

ONOS-4512 vtn-web can't delete router/net/floating/port

Change-Id: I6860aed0c719d4c8f62f21055e650f9f7b29a6f8
...@@ -151,8 +151,10 @@ public class FloatingIpWebResource extends AbstractWebResource { ...@@ -151,8 +151,10 @@ public class FloatingIpWebResource extends AbstractWebResource {
151 } 151 }
152 } 152 }
153 153
154 - @Path("{floatingIpUUID}")
155 @DELETE 154 @DELETE
155 + @Path("{floatingIpUUID}")
156 + @Consumes(MediaType.APPLICATION_JSON)
157 + @Produces(MediaType.APPLICATION_JSON)
156 public Response deleteSingleFloatingIp(@PathParam("floatingIpUUID") String id) 158 public Response deleteSingleFloatingIp(@PathParam("floatingIpUUID") String id)
157 throws IOException { 159 throws IOException {
158 try { 160 try {
......
...@@ -158,8 +158,10 @@ public class RouterWebResource extends AbstractWebResource { ...@@ -158,8 +158,10 @@ public class RouterWebResource extends AbstractWebResource {
158 } 158 }
159 } 159 }
160 160
161 - @Path("{routerUUID}")
162 @DELETE 161 @DELETE
162 + @Path("{routerUUID}")
163 + @Consumes(MediaType.APPLICATION_JSON)
164 + @Produces(MediaType.APPLICATION_JSON)
163 public Response deleteSingleRouter(@PathParam("routerUUID") String id) 165 public Response deleteSingleRouter(@PathParam("routerUUID") String id)
164 throws IOException { 166 throws IOException {
165 try { 167 try {
......
...@@ -147,8 +147,10 @@ public class SubnetWebResource extends AbstractWebResource { ...@@ -147,8 +147,10 @@ public class SubnetWebResource extends AbstractWebResource {
147 } 147 }
148 } 148 }
149 149
150 - @Path("{subnetUUID}")
151 @DELETE 150 @DELETE
151 + @Path("{subnetUUID}")
152 + @Consumes(MediaType.APPLICATION_JSON)
153 + @Produces(MediaType.APPLICATION_JSON)
152 public Response deleteSingleSubnet(@PathParam("subnetUUID") String id) 154 public Response deleteSingleSubnet(@PathParam("subnetUUID") String id)
153 throws IOException { 155 throws IOException {
154 try { 156 try {
......
...@@ -240,6 +240,8 @@ public class TenantNetworkWebResource extends AbstractWebResource { ...@@ -240,6 +240,8 @@ public class TenantNetworkWebResource extends AbstractWebResource {
240 240
241 @DELETE 241 @DELETE
242 @Path("{id}") 242 @Path("{id}")
243 + @Consumes(MediaType.APPLICATION_JSON)
244 + @Produces(MediaType.APPLICATION_JSON)
243 public Response deleteNetworks(@PathParam("id") String id) { 245 public Response deleteNetworks(@PathParam("id") String id) {
244 log.debug("Deletes network by identifier {}.", id); 246 log.debug("Deletes network by identifier {}.", id);
245 Set<TenantNetworkId> networkSet = new HashSet<>(); 247 Set<TenantNetworkId> networkSet = new HashSet<>();
......
...@@ -130,8 +130,10 @@ public class VirtualPortWebResource extends AbstractWebResource { ...@@ -130,8 +130,10 @@ public class VirtualPortWebResource extends AbstractWebResource {
130 } 130 }
131 } 131 }
132 132
133 - @Path("{portUUID}")
134 @DELETE 133 @DELETE
134 + @Path("{portUUID}")
135 + @Consumes(MediaType.APPLICATION_JSON)
136 + @Produces(MediaType.APPLICATION_JSON)
135 public Response deletePorts(@PathParam("portUUID") String id) { 137 public Response deletePorts(@PathParam("portUUID") String id) {
136 Set<VirtualPortId> vPortIds = new HashSet<>(); 138 Set<VirtualPortId> vPortIds = new HashSet<>();
137 try { 139 try {
......