Commit af541c99 authored by Spiros Koulouzis's avatar Spiros Koulouzis

added missing properties

parent 8da728d5
......@@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.springframework.validation.annotation.Validated;
import javax.validation.Valid;
......@@ -16,10 +17,46 @@ import javax.validation.Valid;
public class CloudsStormVMs {
/**
* @return the extraInfo
*/
public Map<String, Object> getExtraInfo() {
return extraInfo;
}
/**
* @param extraInfo the extraInfo to set
*/
public void setExtraInfo(Map<String, Object> extraInfo) {
this.extraInfo = extraInfo;
}
/**
* @return the sEngineClass
*/
public String getsEngineClass() {
return sEngineClass;
}
@JsonProperty("extraInfo")
@Valid
private Map<String, Object> extraInfo = null;
/**
* @param sEngineClass the sEngineClass to set
*/
public void setsEngineClass(String sEngineClass) {
this.sEngineClass = sEngineClass;
}
@JsonProperty("VMs")
@Valid
private List<CloudsStormVM> vms = null;
@JsonProperty("SEngineClass")
@Valid
private String sEngineClass = null;
public CloudsStormVMs vms(List<CloudsStormVM> vms) {
this.vms = vms;
return this;
......@@ -37,7 +74,7 @@ public class CloudsStormVMs {
* Get vms
*
* @return vms
*
*
*/
@ApiModelProperty(value = "")
......
......@@ -284,8 +284,8 @@ class CloudStormService {
private ToscaTemplate runCloudStorm(String tempInputDirPath) throws IOException, ApiException {
String[] args = new String[]{"run", tempInputDirPath};
standalone.MainAsTool.main(args);
// tempInputDirPath = "/tmp/Input-87672007429577";
// standalone.MainAsTool.main(args);
tempInputDirPath = "/tmp/Input-166590762352547";
CloudsStormTopTopology _top = objectMapper.readValue(new File(tempInputDirPath + TOPOLOGY_RELATIVE_PATH
+ TOP_TOPOLOGY_FILE_NAME),
......@@ -304,7 +304,7 @@ class CloudStormService {
att.put("status", subTopology.getStatus().toString());
String rootKeyPairFolder = tempInputDirPath + TOPOLOGY_RELATIVE_PATH
+ TOP_TOPOLOGY_FILE_NAME + File.separator + subTopology.getSshKeyPairId();
+ File.separator + subTopology.getSshKeyPairId();
Credential rootKeyPairCredential = new Credential();
rootKeyPairCredential.setProtocol("ssh");
Map<String, String> keys = new HashMap<>();
......@@ -312,8 +312,7 @@ class CloudStormService {
keys.put("public_key", Converter.encodeFileToBase64Binary(rootKeyPairFolder + File.separator + "id_rsa.pub"));
rootKeyPairCredential.setKeys(keys);
String userKyePairFolder = tempInputDirPath + TOPOLOGY_RELATIVE_PATH
+ TOP_TOPOLOGY_FILE_NAME;
String userKyePairFolder = tempInputDirPath + TOPOLOGY_RELATIVE_PATH;
Credential userKeyPairCredential = new Credential();
userKeyPairCredential.setProtocol("ssh");
keys = new HashMap<>();
......@@ -321,7 +320,7 @@ class CloudStormService {
keys.put("public_key", Converter.encodeFileToBase64Binary(userKyePairFolder + File.separator + "id_rsa.pub"));
userKeyPairCredential.setKeys(keys);
CloudsStormVMs cloudsStormVMs = objectMapper.readValue(new File(tempInputDirPath + TOPOLOGY_RELATIVE_PATH + File.separator + subTopology.getTopology()),
CloudsStormVMs cloudsStormVMs = objectMapper.readValue(new File(tempInputDirPath + TOPOLOGY_RELATIVE_PATH + File.separator + subTopology.getTopology()+".yml"),
CloudsStormVMs.class);
List<CloudsStormVM> vms = cloudsStormVMs.getVms();
List<NodeTemplateMap> vmTemplatesMap = helper.getTemplateVMsForVMTopology(nodeTemplateMap);
......
......@@ -11,14 +11,10 @@
type: "string"
publicAddress:
type: "string"
type:
type: "string"
extraInfo:
type: object
additionalProperties:
type: object
os:
type: "string"
CPU:
type: "string"
MEM:
......@@ -33,7 +29,4 @@
type: "string"
selfEthAddresses:
type: "string"
CloudsStormVMs:
type: "object"
properties:
SEngineClass:
type: "string"
extraInfo:
type: object
additionalProperties:
type: object
VMs:
type: "array"
items:
......
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