Commit f5f5c03c authored by Spiros Koulouzis's avatar Spiros Koulouzis

Added tests for utils

updated model
parent 4053fc74
......@@ -6,6 +6,8 @@
package nl.uva.sne.drip.service;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeoutException;
import java.util.logging.Level;
import java.util.logging.Logger;
......@@ -22,24 +24,31 @@ import org.springframework.stereotype.Service;
* @author S. Koulouzis
*/
@Service
public class ProvisionerService {
public class ProvisionerService {
@Value("${message.broker.queue.provisioner}")
private String queueName;
@Value("${tosca.types.interface}")
private String toscaTypesInterface;
private String toscaTypesInterface;
@Autowired
private ToscaTemplateService toscaTemplateService;
public String provision(String id) throws IOException {
String ymlToscaTemplate = toscaTemplateService.findByID(id);
ToscaTemplate toscaTemplate = toscaTemplateService.getYaml2ToscaTemplate(ymlToscaTemplate);
List<Map.Entry> vmTopologies = getVmTopologies(toscaTemplate);
for(Map.Entry topology: vmTopologies){
topology.
}
return null;
}
public List<Map.Entry> getVmTopologies(ToscaTemplate toscaTemplate) {
return TOSCAUtils.getNodesByType(toscaTemplate, "tosca.nodes.ARTICONF.VM.topology");
}
}
......@@ -546,7 +546,7 @@ definitions:
node_templates:
type: object
additionalProperties:
type: object
$ref: '#/definitions/NodeTemplate'
relationship_templates:
type: object
additionalProperties:
......
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