Commit 4cf842b3 authored by Spiros Koulouzis's avatar Spiros Koulouzis

added subnets

parent 01605b7e
......@@ -161,7 +161,7 @@
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${basedir}/../openAPI/API/CONF-3.0.0-swagger.yaml</inputSpec>
<inputSpec>${basedir}/../openAPI/API/CloudStorm-1.0.0-openapi.yaml</inputSpec>
<generatorName>java</generatorName>
<output>${project.build.directory}/generated-sources</output>
<apiPackage>${default.package}.handler</apiPackage>
......
......@@ -28,6 +28,7 @@ import java.util.Map;
import nl.uva.sne.drip.commons.sure_tosca.client.ApiException;
import nl.uva.sne.drip.commons.sure_tosca.client.Configuration;
import nl.uva.sne.drip.commons.sure_tosca.client.DefaultApi;
import nl.uva.sne.drip.model.NodeTemplate;
import nl.uva.sne.drip.model.ToscaTemplate;
import org.apache.commons.io.FileUtils;
......@@ -79,4 +80,9 @@ public class ToscaHelper {
return interfaceDefinitions;
}
public List<NodeTemplate> getVMTopologyTemplates(ToscaTemplate toscaTemplate) throws ApiException {
List<NodeTemplate> vmTopologyTemplates = api.getNodeTemplates(String.valueOf(id), "tosca.nodes.ARTICONF.VM.topology", null, null, null, null, null, null, null, null);
return vmTopologyTemplates;
}
}
......@@ -16,53 +16,104 @@
package nl.uva.sne.drip.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author S. Koulouzis
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-12-09T16:00:08.961312+01:00[Europe/Amsterdam]")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2019-12-09T15:55:39.959Z[GMT]")
public class CloudsStormSubTopology {
@JsonProperty("topology")
private String topology = null;
public static final String SERIALIZED_NAME_VMS = "VMs";
@SerializedName(SERIALIZED_NAME_VMS)
private List<CloudsStormVM> vms = null;
@JsonProperty("cloudProvider")
private String cloudProvider = null;
public CloudsStormSubTopology vms(List<CloudsStormVM> vms) {
@JsonProperty("domain")
private String domain = null;
this.vms = vms;
@JsonProperty("status")
private String status = null;
public CloudsStormSubTopology topology(String topology) {
this.topology = topology;
return this;
}
public CloudsStormSubTopology addVmsItem(CloudsStormVM vmsItem) {
if (this.vms == null) {
this.vms = new ArrayList<CloudsStormVM>();
/**
* Get topology
* @return topology
**/
@ApiModelProperty(value = "")
public String getTopology() {
return topology;
}
this.vms.add(vmsItem);
public void setTopology(String topology) {
this.topology = topology;
}
public CloudsStormSubTopology cloudProvider(String cloudProvider) {
this.cloudProvider = cloudProvider;
return this;
}
/**
* Get vms
*
* @return vms
*
*/
@javax.annotation.Nullable
* Get cloudProvider
* @return cloudProvider
**/
@ApiModelProperty(value = "")
public List<CloudsStormVM> getVms() {
return vms;
public String getCloudProvider() {
return cloudProvider;
}
public void setCloudProvider(String cloudProvider) {
this.cloudProvider = cloudProvider;
}
public void setVms(List<CloudsStormVM> vms) {
this.vms = vms;
public CloudsStormSubTopology domain(String domain) {
this.domain = domain;
return this;
}
/**
* Get domain
* @return domain
**/
@ApiModelProperty(value = "")
public String getDomain() {
return domain;
}
public void setDomain(String domain) {
this.domain = domain;
}
public CloudsStormSubTopology status(String status) {
this.status = status;
return this;
}
/**
* Get status
* @return status
**/
@ApiModelProperty(value = "")
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
......@@ -72,19 +123,26 @@ public class CloudsStormSubTopology {
return false;
}
CloudsStormSubTopology cloudsStormSubTopology = (CloudsStormSubTopology) o;
return Objects.equals(this.vms, cloudsStormSubTopology.vms);
return Objects.equals(this.topology, cloudsStormSubTopology.topology) &&
Objects.equals(this.cloudProvider, cloudsStormSubTopology.cloudProvider) &&
Objects.equals(this.domain, cloudsStormSubTopology.domain) &&
Objects.equals(this.status, cloudsStormSubTopology.status);
}
@Override
public int hashCode() {
return Objects.hash(vms);
return Objects.hash(topology, cloudProvider, domain, status);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CloudsStormSubTopology {\n");
sb.append(" vms: ").append(toIndentedString(vms)).append("\n");
sb.append(" topology: ").append(toIndentedString(topology)).append("\n");
sb.append(" cloudProvider: ").append(toIndentedString(cloudProvider)).append("\n");
sb.append(" domain: ").append(toIndentedString(domain)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append("}");
return sb.toString();
}
......@@ -99,5 +157,4 @@ public class CloudsStormSubTopology {
}
return o.toString().replace("\n", "\n ");
}
}
......@@ -25,9 +25,8 @@ import java.util.List;
*
* @author S. Koulouzis
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-12-09T16:00:08.961312+01:00[Europe/Amsterdam]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-12-09T16:51:48.830052+01:00[Europe/Amsterdam]")
public class CloudsStormTopTopology {
public static final String SERIALIZED_NAME_USER_NAME = "userName";
@SerializedName(SERIALIZED_NAME_USER_NAME)
private String userName;
......@@ -40,6 +39,7 @@ public class CloudsStormTopTopology {
@SerializedName(SERIALIZED_NAME_TOPOLOGIES)
private List<CloudsStormSubTopology> topologies = null;
public CloudsStormTopTopology userName(String userName) {
this.userName = userName;
......@@ -48,10 +48,8 @@ public class CloudsStormTopTopology {
/**
* Get userName
*
* @return userName
*
*/
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
......@@ -59,10 +57,12 @@ public class CloudsStormTopTopology {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public CloudsStormTopTopology publicKeyPath(String publicKeyPath) {
this.publicKeyPath = publicKeyPath;
......@@ -71,10 +71,8 @@ public class CloudsStormTopTopology {
/**
* Get publicKeyPath
*
* @return publicKeyPath
*
*/
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
......@@ -82,10 +80,12 @@ public class CloudsStormTopTopology {
return publicKeyPath;
}
public void setPublicKeyPath(String publicKeyPath) {
this.publicKeyPath = publicKeyPath;
}
public CloudsStormTopTopology topologies(List<CloudsStormSubTopology> topologies) {
this.topologies = topologies;
......@@ -102,10 +102,8 @@ public class CloudsStormTopTopology {
/**
* Get topologies
*
* @return topologies
*
*/
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
......@@ -113,10 +111,12 @@ public class CloudsStormTopTopology {
return topologies;
}
public void setTopologies(List<CloudsStormSubTopology> topologies) {
this.topologies = topologies;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
......@@ -126,9 +126,9 @@ public class CloudsStormTopTopology {
return false;
}
CloudsStormTopTopology cloudsStormTopTopology = (CloudsStormTopTopology) o;
return Objects.equals(this.userName, cloudsStormTopTopology.userName)
&& Objects.equals(this.publicKeyPath, cloudsStormTopTopology.publicKeyPath)
&& Objects.equals(this.topologies, cloudsStormTopTopology.topologies);
return Objects.equals(this.userName, cloudsStormTopTopology.userName) &&
Objects.equals(this.publicKeyPath, cloudsStormTopTopology.publicKeyPath) &&
Objects.equals(this.topologies, cloudsStormTopTopology.topologies);
}
@Override
......@@ -136,6 +136,7 @@ public class CloudsStormTopTopology {
return Objects.hash(userName, publicKeyPath, topologies);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
......
......@@ -23,9 +23,8 @@ import io.swagger.annotations.ApiModelProperty;
*
* @author S. Koulouzis
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-12-09T16:00:08.961312+01:00[Europe/Amsterdam]")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2019-12-09T16:51:48.830052+01:00[Europe/Amsterdam]")
public class CloudsStormVM {
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
......@@ -46,6 +45,7 @@ public class CloudsStormVM {
@SerializedName(SERIALIZED_NAME_PUBLIC_ADDRESS)
private String publicAddress;
public CloudsStormVM name(String name) {
this.name = name;
......@@ -54,10 +54,8 @@ public class CloudsStormVM {
/**
* Get name
*
* @return name
*
*/
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
......@@ -65,10 +63,12 @@ public class CloudsStormVM {
return name;
}
public void setName(String name) {
this.name = name;
}
public CloudsStormVM nodeType(String nodeType) {
this.nodeType = nodeType;
......@@ -77,10 +77,8 @@ public class CloudsStormVM {
/**
* Get nodeType
*
* @return nodeType
*
*/
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
......@@ -88,10 +86,12 @@ public class CloudsStormVM {
return nodeType;
}
public void setNodeType(String nodeType) {
this.nodeType = nodeType;
}
public CloudsStormVM osType(String osType) {
this.osType = osType;
......@@ -100,10 +100,8 @@ public class CloudsStormVM {
/**
* Get osType
*
* @return osType
*
*/
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
......@@ -111,10 +109,12 @@ public class CloudsStormVM {
return osType;
}
public void setOsType(String osType) {
this.osType = osType;
}
public CloudsStormVM script(String script) {
this.script = script;
......@@ -123,10 +123,8 @@ public class CloudsStormVM {
/**
* Get script
*
* @return script
*
*/
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
......@@ -134,10 +132,12 @@ public class CloudsStormVM {
return script;
}
public void setScript(String script) {
this.script = script;
}
public CloudsStormVM publicAddress(String publicAddress) {
this.publicAddress = publicAddress;
......@@ -146,10 +146,8 @@ public class CloudsStormVM {
/**
* Get publicAddress
*
* @return publicAddress
*
*/
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
......@@ -157,10 +155,12 @@ public class CloudsStormVM {
return publicAddress;
}
public void setPublicAddress(String publicAddress) {
this.publicAddress = publicAddress;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
......@@ -170,11 +170,11 @@ public class CloudsStormVM {
return false;
}
CloudsStormVM cloudsStormVM = (CloudsStormVM) o;
return Objects.equals(this.name, cloudsStormVM.name)
&& Objects.equals(this.nodeType, cloudsStormVM.nodeType)
&& Objects.equals(this.osType, cloudsStormVM.osType)
&& Objects.equals(this.script, cloudsStormVM.script)
&& Objects.equals(this.publicAddress, cloudsStormVM.publicAddress);
return Objects.equals(this.name, cloudsStormVM.name) &&
Objects.equals(this.nodeType, cloudsStormVM.nodeType) &&
Objects.equals(this.osType, cloudsStormVM.osType) &&
Objects.equals(this.script, cloudsStormVM.script) &&
Objects.equals(this.publicAddress, cloudsStormVM.publicAddress);
}
@Override
......@@ -182,6 +182,7 @@ public class CloudsStormVM {
return Objects.hash(name, nodeType, osType, script, publicAddress);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
......@@ -207,3 +208,4 @@ public class CloudsStormVM {
}
}
message.broker.host=127.0.0.1
message.broker.username=guest
message.broker.password=guest
message.broker.queue.provisioner=provisioner
message.broker.queue.planner=planner
message.broker.queue.deployer=deployer
sure-tosca.base.path=http://localhost:8081/tosca-sure/1.0.0
......@@ -2,8 +2,15 @@
<project version="4">
<component name="ChangeListManager">
<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 afterPath="$PROJECT_DIR$/../drip-commons/src/main/resources/application.properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-commons/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-commons/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-commons/src/main/java/nl/uva/sne/drip/commons/utils/ToscaHelper.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-commons/src/main/java/nl/uva/sne/drip/commons/utils/ToscaHelper.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-commons/src/main/java/nl/uva/sne/drip/model/CloudsStormSubTopology.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-commons/src/main/java/nl/uva/sne/drip/model/CloudsStormSubTopology.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-commons/src/main/java/nl/uva/sne/drip/model/CloudsStormTopTopology.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-commons/src/main/java/nl/uva/sne/drip/model/CloudsStormTopTopology.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-commons/src/main/java/nl/uva/sne/drip/model/CloudsStormVM.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-commons/src/main/java/nl/uva/sne/drip/model/CloudsStormVM.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-provisioner/src/main/java/nl/uva/sne/drip/provisioner/CloudStormService.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-provisioner/src/main/java/nl/uva/sne/drip/provisioner/CloudStormService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-provisioner/src/main/java/nl/uva/sne/drip/provisioner/Consumer.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-provisioner/src/main/java/nl/uva/sne/drip/provisioner/Consumer.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -29,7 +36,7 @@
</component>
<component name="PropertiesComponent">
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../sure_tosca-flask-server" />
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
</component>
<component name="RecentsManager">
......@@ -242,10 +249,10 @@
<screen x="67" y="34" width="2493" height="1406" />
</state>
<state x="925" y="283" width="767" height="906" key="#__main__/67.34.2493.1406@67.34.2493.1406" timestamp="1575885420596" />
<state x="1043" y="437" width="530" height="598" key="FileChooserDialogImpl" timestamp="1575885341909">
<state x="1043" y="437" width="530" height="598" key="FileChooserDialogImpl" timestamp="1575907769017">
<screen x="67" y="34" width="2493" height="1406" />
</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="1575907769017" />
<state width="2465" height="410" key="GridCell.Tab.0.bottom" timestamp="1575891807013">
<screen x="67" y="34" width="2493" height="1406" />
</state>
......@@ -282,10 +289,10 @@
<screen x="67" y="34" width="2493" height="1406" />
</state>
<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="1575891786241">
<state x="893" y="526" key="com.intellij.ide.util.TipDialog" timestamp="1575907758846">
<screen x="67" y="34" width="2493" height="1406" />
</state>
<state x="893" y="526" key="com.intellij.ide.util.TipDialog/67.34.2493.1406@67.34.2493.1406" timestamp="1575891786241" />
<state x="893" y="526" key="com.intellij.ide.util.TipDialog/67.34.2493.1406@67.34.2493.1406" timestamp="1575907758846" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
......
......@@ -5,6 +5,7 @@
*/
package nl.uva.sne.drip.provisioner;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.jcraft.jsch.JSch;
import com.jcraft.jsch.JSchException;
import com.jcraft.jsch.KeyPair;
......@@ -15,9 +16,12 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import nl.uva.sne.drip.commons.sure_tosca.client.ApiException;
import nl.uva.sne.drip.commons.utils.ToscaHelper;
import nl.uva.sne.drip.model.CloudsStormSubTopology;
import nl.uva.sne.drip.model.CloudsStormTopTopology;
import nl.uva.sne.drip.model.CloudsStormVM;
import nl.uva.sne.drip.model.NodeTemplate;
import nl.uva.sne.drip.model.ToscaTemplate;
import org.apache.commons.io.FilenameUtils;
......@@ -29,8 +33,15 @@ class CloudStormService {
private List<Map.Entry> vmTopologies;
private String tempInputDirPath;
private final ToscaTemplate toscaTemplate;
private final ToscaHelper helper;
ToscaTemplate execute(ToscaTemplate toscaTemplate) throws FileNotFoundException, JSchException, IOException {
CloudStormService(String sureToscaBasePath,ToscaTemplate toscaTemplate) throws IOException, JsonProcessingException, ApiException {
this.toscaTemplate = toscaTemplate;
this.helper = new ToscaHelper(toscaTemplate, sureToscaBasePath);
}
ToscaTemplate execute() throws FileNotFoundException, JSchException, IOException {
tempInputDirPath = System.getProperty("java.io.tmpdir") + File.separator + "Input-" + Long.toString(System.nanoTime()) + File.separator;
File tempInputDir = new File(tempInputDirPath);
if (!(tempInputDir.mkdirs())) {
......@@ -47,6 +58,7 @@ class CloudStormService {
String publicKeyPath = buildSSHKeyPair();
topTopology.setPublicKeyPath(publicKeyPath);
topTopology.setUserName(getUserName());
List<CloudsStormSubTopology> topologies = getCloudsStormSubTopologies(toscaTemplate);
topTopology.setTopologies(topologies);
......@@ -69,18 +81,29 @@ class CloudStormService {
return "vm_user";
}
private List<CloudsStormSubTopology> getCloudsStormSubTopologies(ToscaTemplate toscaTemplate) {
private List<CloudsStormSubTopology> getCloudsStormSubTopologies(ToscaTemplate toscaTemplate) throws ApiException {
List<NodeTemplate> vmTopologyTemplates = helper.getVMTopologyTemplates(toscaTemplate);
List<CloudsStormSubTopology> cloudsStormSubTopologies = new ArrayList<>();
for(NodeTemplate nodeTemplate: vmTopologyTemplates){
CloudsStormSubTopology cloudsStormSubTopology = new CloudsStormSubTopology();
List<CloudsStormVM> vms = new ArrayList<>();
CloudsStormVM cloudsStormVM = new CloudsStormVM();
cloudsStormVM.setName("Node1");
vms.add(cloudsStormVM);
Map<String, Object> properties = nodeTemplate.getProperties();
String domain = (String) properties.get("domain");
String provider = (String) properties.get("provider");
cloudsStormSubTopology.setCloudProvider(domain);
cloudsStormSubTopology.setCloudProvider(provider);
cloudsStormSubTopology.setTopology("vm");
}
cloudsStormSubTopology.setVms(vms);
cloudsStormSubTopology.
// List<CloudsStormVM> vms = new ArrayList<>();
// CloudsStormVM cloudsStormVM = new CloudsStormVM();
// cloudsStormVM.setName("Node1");
//
// vms.add(cloudsStormVM);
return cloudsStormSubTopologies;
}
......
......@@ -15,6 +15,7 @@
*/
package nl.uva.sne.drip.provisioner;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.jcraft.jsch.JSchException;
......@@ -28,6 +29,7 @@ import java.io.IOException;
import java.util.concurrent.TimeoutException;
import java.util.logging.Level;
import java.util.logging.Logger;
import nl.uva.sne.drip.commons.sure_tosca.client.ApiException;
import nl.uva.sne.drip.model.Message;
import nl.uva.sne.drip.model.ToscaTemplate;
......@@ -43,9 +45,11 @@ public class Consumer extends DefaultConsumer {
private final Channel channel;
private final Logger logger;
private final ObjectMapper objectMapper;
private final String sureToscaBasePath;
public Consumer(Channel channel) throws IOException, TimeoutException {
public Consumer(Channel channel,String sureToscaBasePath) throws IOException, TimeoutException {
super(channel);
this.sureToscaBasePath = sureToscaBasePath;
this.channel = channel;
logger = Logger.getLogger(Consumer.class.getName());
this.objectMapper = new ObjectMapper();
......@@ -53,7 +57,7 @@ public class Consumer extends DefaultConsumer {
}
@Override
public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body) throws IOException, FileNotFoundException {
public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body) throws IOException, FileNotFoundException, JsonProcessingException {
try {
//Create the reply properties which tells us where to reply, and which id to use.
//No need to change anything here
......@@ -69,8 +73,8 @@ public class Consumer extends DefaultConsumer {
throw new FileNotFoundException("Could not create input directory: " + tempInputDir.getAbsolutePath());
}
CloudStormService service = new CloudStormService();
ToscaTemplate toscaTemplate = service.execute(message.getToscaTemplate());
CloudStormService service = new CloudStormService(sureToscaBasePath,message.getToscaTemplate());
ToscaTemplate toscaTemplate = service.execute();
Message responceMessage = new Message();
responceMessage.setCreationDate(System.currentTimeMillis());
......@@ -83,7 +87,7 @@ public class Consumer extends DefaultConsumer {
//We send the response back. No need to change anything here
channel.basicPublish("", properties.getReplyTo(), replyProps, response.getBytes("UTF-8"));
channel.basicAck(envelope.getDeliveryTag(), false);
} catch (JSchException ex) {
} catch (JSchException | ApiException ex) {
Logger.getLogger(Consumer.class.getName()).log(Level.SEVERE, null, ex);
}
......
......@@ -70,7 +70,7 @@ public class RPCServer {
//We define the queue name
channel.queueDeclare(prop.getProperty("message.broker.queue.provisioner", "provisioner"), false, false, false, null);
DefaultConsumer c;
c = new nl.uva.sne.drip.provisioner.Consumer(channel);
c = new nl.uva.sne.drip.provisioner.Consumer(channel,prop.getProperty("sure-tosca.base.path"));
//Start listening for messages
channel.basicConsume(prop.getProperty("message.broker.queue.provisioner", "provisioner"), false, c);
......
CloudsStormSubMembers:
type: "object"
properties:
vmName:
type: "string"
address:
type: "string"
CloudsStormSubnets:
type: "object"
properties:
name:
type: "string"
subnet:
type: "string"
netmask:
type: "string"
members:
type: array
items:
$ref: 'https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/openAPI/schema/CloudsStormSubMembers.yml#/CloudsStormSubMembers'
......@@ -9,3 +9,8 @@
type: array
items:
$ref: 'https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/openAPI/schema/CloudsStormSubTopology.yml#/CloudsStormSubTopology'
subnets:
type: array
items:
$ref: 'https://raw.githubusercontent.com/skoulouzis/CONF/DRIP_3.0/openAPI/schema/CloudsStormSubnets.yml#/CloudsStormSubnets'
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