Commit 2cf859b7 authored by Spiros Koulouzis's avatar Spiros Koulouzis

added accept 'text/plain'

parent 08858c35
...@@ -29,15 +29,15 @@ topology_template: ...@@ -29,15 +29,15 @@ topology_template:
repository: docker_hub repository: docker_hub
topology: #topology:
type: tosca.nodes.ARTICONF.VM.topology #type: tosca.nodes.ARTICONF.VM.topology
interfaces: #interfaces:
CloudsStorm: #CloudsStorm:
provision: #provision:
inputs: #inputs:
code_type: SEQ #code_type: SEQ
object_type: SubTopology #object_type: SubTopology
properties: #properties:
domain: UvA (Amsterdam, The Netherlands) XO Rack #domain: UvA (Amsterdam, The Netherlands) XO Rack
provider: ExoGENI #provider: ExoGENI
...@@ -185,7 +185,7 @@ node_types: ...@@ -185,7 +185,7 @@ node_types:
mem_size: mem_size:
type: scalar-unit.size type: scalar-unit.size
required: true required: true
default: 3000 MB default: 1000 MB
constraints: constraints:
- greater_or_equal: 500 MB - greater_or_equal: 500 MB
os: os:
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
*/ */
package nl.uva.sne.drip.model; package nl.uva.sne.drip.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import nl.uva.sne.drip.model.tosca.ToscaTemplate; import nl.uva.sne.drip.model.tosca.ToscaTemplate;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import java.io.Serializable; import java.io.Serializable;
...@@ -28,6 +29,7 @@ import javax.validation.constraints.NotNull; ...@@ -28,6 +29,7 @@ import javax.validation.constraints.NotNull;
* @author S. Koulouzis. * @author S. Koulouzis.
*/ */
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class Message implements Serializable { public class Message implements Serializable {
/** /**
......
...@@ -47,7 +47,7 @@ public class ToscaTemplateApiController implements ToscaTemplateApi { ...@@ -47,7 +47,7 @@ public class ToscaTemplateApiController implements ToscaTemplateApi {
@Override @Override
public ResponseEntity<String> deleteToscaTemplateByID(@ApiParam(value = "ID of topolog template to return", required = true) @PathVariable("id") String id) { public ResponseEntity<String> deleteToscaTemplateByID(@ApiParam(value = "ID of topolog template to return", required = true) @PathVariable("id") String id) {
String accept = request.getHeader("Accept"); String accept = request.getHeader("Accept");
if (accept != null && accept.contains("*/*")) { if (accept != null && accept.contains("text/plain")) {
try { try {
String deleteedYemplateId = dripService.delete(id); String deleteedYemplateId = dripService.delete(id);
return new ResponseEntity<>(deleteedYemplateId, HttpStatus.OK); return new ResponseEntity<>(deleteedYemplateId, HttpStatus.OK);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment