Commit 3f8bb477 authored by Spiros Koulouzis's avatar Spiros Koulouzis

change names

parent 7f0cb089
...@@ -6,12 +6,12 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -6,12 +6,12 @@ import io.swagger.annotations.ApiModelProperty;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
/** /**
* CloudCredential * CloudCred
*/ */
@Validated @Validated
@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2019-12-24T17:07:10.081Z") @javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2019-12-24T17:07:10.081Z")
public class CloudCredential { public class CloudCred {
@JsonProperty("cloudProvider") @JsonProperty("cloudProvider")
private String cloudProvider = null; private String cloudProvider = null;
...@@ -19,7 +19,7 @@ public class CloudCredential { ...@@ -19,7 +19,7 @@ public class CloudCredential {
@JsonProperty("credInfoFile") @JsonProperty("credInfoFile")
private String credInfoFile = null; private String credInfoFile = null;
public CloudCredential cloudProvider(String cloudProvider) { public CloudCred cloudProvider(String cloudProvider) {
this.cloudProvider = cloudProvider; this.cloudProvider = cloudProvider;
return this; return this;
} }
...@@ -40,7 +40,7 @@ public class CloudCredential { ...@@ -40,7 +40,7 @@ public class CloudCredential {
this.cloudProvider = cloudProvider; this.cloudProvider = cloudProvider;
} }
public CloudCredential credInfoFile(String credInfoFile) { public CloudCred credInfoFile(String credInfoFile) {
this.credInfoFile = credInfoFile; this.credInfoFile = credInfoFile;
return this; return this;
} }
...@@ -69,9 +69,9 @@ public class CloudCredential { ...@@ -69,9 +69,9 @@ public class CloudCredential {
if (o == null || getClass() != o.getClass()) { if (o == null || getClass() != o.getClass()) {
return false; return false;
} }
CloudCredential cloudCredential = (CloudCredential) o; CloudCred cloudCred = (CloudCred) o;
return Objects.equals(this.cloudProvider, cloudCredential.cloudProvider) return Objects.equals(this.cloudProvider, cloudCred.cloudProvider)
&& Objects.equals(this.credInfoFile, cloudCredential.credInfoFile); && Objects.equals(this.credInfoFile, cloudCred.credInfoFile);
} }
@Override @Override
...@@ -82,7 +82,7 @@ public class CloudCredential { ...@@ -82,7 +82,7 @@ public class CloudCredential {
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class CloudCredential {\n"); sb.append("class cloudCred {\n");
sb.append(" cloudProvider: ").append(toIndentedString(cloudProvider)).append("\n"); sb.append(" cloudProvider: ").append(toIndentedString(cloudProvider)).append("\n");
sb.append(" credInfoFile: ").append(toIndentedString(credInfoFile)).append("\n"); sb.append(" credInfoFile: ").append(toIndentedString(credInfoFile)).append("\n");
......
...@@ -18,16 +18,16 @@ public class CloudCredentials { ...@@ -18,16 +18,16 @@ public class CloudCredentials {
@JsonProperty("cloudCreds") @JsonProperty("cloudCreds")
@Valid @Valid
private List<CloudCredential> cloudCreds = null; private List<CloudCred> cloudCreds = null;
public CloudCredentials cloudCreds(List<CloudCredential> cloudCreds) { public CloudCredentials cloudCreds(List<CloudCred> cloudCreds) {
this.cloudCreds = cloudCreds; this.cloudCreds = cloudCreds;
return this; return this;
} }
public CloudCredentials addCloudCredentialItem(CloudCredential cloudCredsItem) { public CloudCredentials addCloudCredentialItem(CloudCred cloudCredsItem) {
if (this.cloudCreds == null) { if (this.cloudCreds == null) {
this.cloudCreds = new ArrayList<CloudCredential>(); this.cloudCreds = new ArrayList<>();
} }
this.cloudCreds.add(cloudCredsItem); this.cloudCreds.add(cloudCredsItem);
return this; return this;
...@@ -43,11 +43,11 @@ public class CloudCredentials { ...@@ -43,11 +43,11 @@ public class CloudCredentials {
@Valid @Valid
public List<CloudCredential> getCloudCredential() { public List<CloudCred> getCloudCredential() {
return cloudCreds; return cloudCreds;
} }
public void setCloudCredential(List<CloudCredential> cloudCreds) { public void setCloudCreds(List<CloudCred> cloudCreds) {
this.cloudCreds = cloudCreds; this.cloudCreds = cloudCreds;
} }
......
...@@ -27,7 +27,7 @@ import java.util.Properties; ...@@ -27,7 +27,7 @@ import java.util.Properties;
import nl.uva.sne.drip.commons.utils.ToscaHelper; import nl.uva.sne.drip.commons.utils.ToscaHelper;
import nl.uva.sne.drip.model.cloud.storm.CloudsStormVM; import nl.uva.sne.drip.model.cloud.storm.CloudsStormVM;
import nl.uva.sne.drip.model.NodeTemplateMap; import nl.uva.sne.drip.model.NodeTemplateMap;
import nl.uva.sne.drip.model.cloud.storm.CloudCredential; import nl.uva.sne.drip.model.cloud.storm.CloudCred;
import nl.uva.sne.drip.model.cloud.storm.CloudCredentials; import nl.uva.sne.drip.model.cloud.storm.CloudCredentials;
import nl.uva.sne.drip.model.cloud.storm.CloudsStormSubTopology; import nl.uva.sne.drip.model.cloud.storm.CloudsStormSubTopology;
import nl.uva.sne.drip.model.cloud.storm.CloudsStormTopTopology; import nl.uva.sne.drip.model.cloud.storm.CloudsStormTopTopology;
...@@ -180,12 +180,12 @@ class CloudStormService { ...@@ -180,12 +180,12 @@ class CloudStormService {
private void writeCloudStormCredentialsFiles(String credentialsTempInputDirPath) throws ApiException, Exception { private void writeCloudStormCredentialsFiles(String credentialsTempInputDirPath) throws ApiException, Exception {
List<NodeTemplateMap> vmTopologiesMaps = helper.getVMTopologyTemplates(); List<NodeTemplateMap> vmTopologiesMaps = helper.getVMTopologyTemplates();
List<CloudCredential> cloudStormCredentialList = new ArrayList<>(); List<CloudCred> cloudStormCredentialList = new ArrayList<>();
int i = 0; int i = 0;
for (NodeTemplateMap vmTopologyMap : vmTopologiesMaps) { for (NodeTemplateMap vmTopologyMap : vmTopologiesMaps) {
Credential toscaCredentials = helper.getCredentialsFromVMTopology(vmTopologyMap); Credential toscaCredentials = helper.getCredentialsFromVMTopology(vmTopologyMap);
CloudCredential cloudStormCredential = new CloudCredential(); CloudCred cloudStormCredential = new CloudCred();
cloudStormCredential.setCloudProvider(toscaCredentials.getCloudProviderName()); cloudStormCredential.setCloudProvider(toscaCredentials.getCloudProviderName());
String credInfoFile = credentialsTempInputDirPath + File.separator + toscaCredentials.getCloudProviderName() + i + ".yml"; String credInfoFile = credentialsTempInputDirPath + File.separator + toscaCredentials.getCloudProviderName() + i + ".yml";
cloudStormCredential.setCredInfoFile(credInfoFile); cloudStormCredential.setCredInfoFile(credInfoFile);
...@@ -196,7 +196,7 @@ class CloudStormService { ...@@ -196,7 +196,7 @@ class CloudStormService {
i++; i++;
} }
CloudCredentials cloudStormCredentials = new CloudCredentials(); CloudCredentials cloudStormCredentials = new CloudCredentials();
cloudStormCredentials.setCloudCredential(cloudStormCredentialList); cloudStormCredentials.setCloudCreds(cloudStormCredentialList);
objectMapper.writeValue(new File(credentialsTempInputDirPath + File.separator + "CloudStormCredentials.yml"), cloudStormCredentials); objectMapper.writeValue(new File(credentialsTempInputDirPath + File.separator + "CloudStormCredentials.yml"), cloudStormCredentials);
} }
......
CloudCredential: CloudCred:
type: "object" type: "object"
properties: properties:
cloudProvider: cloudProvider:
......
CloudCredentials: CloudCreds:
type: "object" type: "object"
properties: properties:
cloudCreds: cloudCreds:
type: "array" type: "array"
items: items:
$ref: "https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/openAPI/schema/CloudStorm/CloudCredential.yml#/CloudCredential" $ref: "https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/openAPI/schema/CloudStorm/CloudCred.yml#/CloudCred"
CloudDB:
type: "object"
properties:
cloudProvider:
type: "string"
dbInfoFile:
type: "string"
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