Commit 7c0e68d0 authored by Spiros Koulouzis's avatar Spiros Koulouzis

added CloudsStorm types

parent 1f2c970c
...@@ -9,6 +9,9 @@ import org.springframework.http.ResponseEntity; ...@@ -9,6 +9,9 @@ import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import nl.uva.sne.drip.service.DRIPService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2019-10-10T17:15:46.465Z") @javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2019-10-10T17:15:46.465Z")
...@@ -21,8 +24,12 @@ public class ProvisionerApiController implements ProvisionerApi { ...@@ -21,8 +24,12 @@ public class ProvisionerApiController implements ProvisionerApi {
private final HttpServletRequest request; private final HttpServletRequest request;
// @Autowired @Value("${message.broker.queue.provisioner}")
// private ProvisionerService provisionerService; private String queueName;
@Autowired
private DRIPService dripService;
@org.springframework.beans.factory.annotation.Autowired @org.springframework.beans.factory.annotation.Autowired
public ProvisionerApiController(ObjectMapper objectMapper, HttpServletRequest request) { public ProvisionerApiController(ObjectMapper objectMapper, HttpServletRequest request) {
this.objectMapper = objectMapper; this.objectMapper = objectMapper;
...@@ -35,8 +42,9 @@ public class ProvisionerApiController implements ProvisionerApi { ...@@ -35,8 +42,9 @@ public class ProvisionerApiController implements ProvisionerApi {
@PathVariable("id") String id) { @PathVariable("id") String id) {
String accept = request.getHeader("Accept"); String accept = request.getHeader("Accept");
if (accept != null && accept.contains("text/plain")) { if (accept != null && accept.contains("text/plain")) {
// String planedYemplateId = provisionerService.provision(id); dripService.setRequestQeueName(queueName);
// return new ResponseEntity<>(planedYemplateId, HttpStatus.OK); String planedYemplateId = dripService.execute(id);
return new ResponseEntity<>(planedYemplateId, HttpStatus.OK);
} }
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="e478ccae-5352-4e8e-9efb-3f5cda44e877" name="Default Changelist" comment=""> <list default="true" id="e478ccae-5352-4e8e-9efb-3f5cda44e877" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/api/ProvisionerApiController.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/api/ProvisionerApiController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/planner/planner.py" beforeDir="false" afterPath="$PROJECT_DIR$/planner/planner.py" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
...@@ -246,22 +246,22 @@ ...@@ -246,22 +246,22 @@
<screen x="67" y="34" width="2493" height="1406" /> <screen x="67" y="34" width="2493" height="1406" />
</state> </state>
<state x="1043" y="437" width="530" height="598" key="FileChooserDialogImpl/67.34.2493.1406@67.34.2493.1406" timestamp="1575885341909" /> <state x="1043" y="437" width="530" height="598" key="FileChooserDialogImpl/67.34.2493.1406@67.34.2493.1406" timestamp="1575885341909" />
<state width="2465" height="471" key="GridCell.Tab.0.bottom" timestamp="1575891470097"> <state width="2465" height="410" key="GridCell.Tab.0.bottom" timestamp="1575891807013">
<screen x="67" y="34" width="2493" height="1406" /> <screen x="67" y="34" width="2493" height="1406" />
</state> </state>
<state width="2465" height="471" key="GridCell.Tab.0.bottom/67.34.2493.1406@67.34.2493.1406" timestamp="1575891470097" /> <state width="2465" height="410" key="GridCell.Tab.0.bottom/67.34.2493.1406@67.34.2493.1406" timestamp="1575891807013" />
<state width="2465" height="471" key="GridCell.Tab.0.center" timestamp="1575891470096"> <state width="2465" height="410" key="GridCell.Tab.0.center" timestamp="1575891807013">
<screen x="67" y="34" width="2493" height="1406" /> <screen x="67" y="34" width="2493" height="1406" />
</state> </state>
<state width="2465" height="471" key="GridCell.Tab.0.center/67.34.2493.1406@67.34.2493.1406" timestamp="1575891470096" /> <state width="2465" height="410" key="GridCell.Tab.0.center/67.34.2493.1406@67.34.2493.1406" timestamp="1575891807013" />
<state width="2465" height="471" key="GridCell.Tab.0.left" timestamp="1575891470096"> <state width="2465" height="410" key="GridCell.Tab.0.left" timestamp="1575891807013">
<screen x="67" y="34" width="2493" height="1406" /> <screen x="67" y="34" width="2493" height="1406" />
</state> </state>
<state width="2465" height="471" key="GridCell.Tab.0.left/67.34.2493.1406@67.34.2493.1406" timestamp="1575891470096" /> <state width="2465" height="410" key="GridCell.Tab.0.left/67.34.2493.1406@67.34.2493.1406" timestamp="1575891807013" />
<state width="2465" height="471" key="GridCell.Tab.0.right" timestamp="1575891470096"> <state width="2465" height="410" key="GridCell.Tab.0.right" timestamp="1575891807013">
<screen x="67" y="34" width="2493" height="1406" /> <screen x="67" y="34" width="2493" height="1406" />
</state> </state>
<state width="2465" height="471" key="GridCell.Tab.0.right/67.34.2493.1406@67.34.2493.1406" timestamp="1575891470096" /> <state width="2465" height="410" key="GridCell.Tab.0.right/67.34.2493.1406@67.34.2493.1406" timestamp="1575891807013" />
<state width="2465" height="471" key="GridCell.Tab.1.bottom" timestamp="1575891470098"> <state width="2465" height="471" key="GridCell.Tab.1.bottom" timestamp="1575891470098">
<screen x="67" y="34" width="2493" height="1406" /> <screen x="67" y="34" width="2493" height="1406" />
</state> </state>
...@@ -282,10 +282,10 @@ ...@@ -282,10 +282,10 @@
<screen x="67" y="34" width="2493" height="1406" /> <screen x="67" y="34" width="2493" height="1406" />
</state> </state>
<state x="679" y="283" key="SettingsEditor/67.34.2493.1406@67.34.2493.1406" timestamp="1575885393075" /> <state x="679" y="283" key="SettingsEditor/67.34.2493.1406@67.34.2493.1406" timestamp="1575885393075" />
<state x="893" y="526" key="com.intellij.ide.util.TipDialog" timestamp="1575885327988"> <state x="893" y="526" key="com.intellij.ide.util.TipDialog" timestamp="1575891786241">
<screen x="67" y="34" width="2493" height="1406" /> <screen x="67" y="34" width="2493" height="1406" />
</state> </state>
<state x="893" y="526" key="com.intellij.ide.util.TipDialog/67.34.2493.1406@67.34.2493.1406" timestamp="1575885327988" /> <state x="893" y="526" key="com.intellij.ide.util.TipDialog/67.34.2493.1406@67.34.2493.1406" timestamp="1575891786241" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>
......
CloudsStormSubTopology:
type: "object"
properties:
VMs:
type: array
items:
$ref: 'https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/openAPI/CloudsStormVM.yml#/CloudsStormVM'
CloudsStormTopTopology:
type: "object"
properties:
userName:
type: "string"
publicKeyPath:
type: "string"
topologies:
type: array
items:
$ref: 'https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/openAPI/CloudsStormSubTopology.yml#/CloudsStormSubTopology'
CloudsStormVM:
type: "object"
properties:
name:
type: "string"
nodeType:
type: "string"
OSType:
type: "string"
script:
type: "string"
publicAddress:
type: "string"
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
template_name: template_name:
type: "string" type: "string"
topology_template: topology_template:
$ref: "https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/openAPI/TOSCA/TopologyTemplate.yml#/TopologyTemplate" $ref: "https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/openAPI/TOSCA/TopologyTemplate.yml#/TopologyTemplate"
template_author: template_author:
type: "string" type: "string"
template_version: template_version:
......
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