Commit 483fa864 authored by Spiros Koulouzis's avatar Spiros Koulouzis

removed status. It is now set as current state

parent 98c7bd7a
...@@ -155,6 +155,10 @@ node_types: ...@@ -155,6 +155,10 @@ node_types:
ssh_keys: ssh_keys:
type: tosca.datatypes.ARTICONF.Credential type: tosca.datatypes.ARTICONF.Credential
required: false required: false
artifacts:
provisioned_files:
type: string
required: false
interfaces: interfaces:
CloudsStorm: CloudsStorm:
type: tosca.interfaces.ARTICONF.CloudsStorm type: tosca.interfaces.ARTICONF.CloudsStorm
......
...@@ -290,16 +290,6 @@ public class ToscaHelper { ...@@ -290,16 +290,6 @@ public class ToscaHelper {
return "vm_user"; return "vm_user";
} }
public CloudsStormSubTopology.StatusEnum getVMTopologyTemplateStatus(NodeTemplateMap nodeTemplateMap) throws TypeExeption {
NodeTemplate nodeTemplate = nodeTemplateMap.getNodeTemplate();
if (nodeTemplate.getType().equals(VM_TOPOLOGY)) {
String status = (String) nodeTemplate.getAttributes().get("status");
return CloudsStormSubTopology.StatusEnum.fromValue(status);
} else {
throw new TypeExeption("NodeTemplateMap is not of type: " + VM_TOPOLOGY + " it is of type: " + nodeTemplate.getType());
}
}
public NODE_STATES getNodeCurrentState(NodeTemplateMap node) { public NODE_STATES getNodeCurrentState(NodeTemplateMap node) {
return getNodeState(node, "current_state"); return getNodeState(node, "current_state");
} }
......
...@@ -420,25 +420,6 @@ public class ToscaHelperTest { ...@@ -420,25 +420,6 @@ public class ToscaHelperTest {
} }
} }
/**
* Test of getVMTopologyTemplateStatus method, of class ToscaHelper.
*/
@Test
public void testGetVMTopologyTemplateStatus() throws Exception {
if (serviceUp) {
System.out.println("getVMTopologyTemplateStatus");
toscaTemplateWithCredentials = null;
instance.uploadToscaTemplate(provisionedToscaTemplate);
List<NodeTemplateMap> vmTopologies = instance.getVMTopologyTemplates();
for (NodeTemplateMap vmTopology : vmTopologies) {
CloudsStormSubTopology.StatusEnum status = instance.getVMTopologyTemplateStatus(vmTopology);
assertEquals(CloudsStormSubTopology.StatusEnum.RUNNING, status);
}
}
}
/** /**
* Test of getKeyPairsFromVM method, of class ToscaHelper. * Test of getKeyPairsFromVM method, of class ToscaHelper.
......
...@@ -160,7 +160,6 @@ public class DRIPService { ...@@ -160,7 +160,6 @@ public class DRIPService {
if (nodeNames == null || nodeNames.isEmpty()) { if (nodeNames == null || nodeNames.isEmpty()) {
List<NodeTemplateMap> vmTopologies = helper.getVMTopologyTemplates(); List<NodeTemplateMap> vmTopologies = helper.getVMTopologyTemplates();
for (NodeTemplateMap vmTopology : vmTopologies) { for (NodeTemplateMap vmTopology : vmTopologies) {
CloudsStormSubTopology.StatusEnum status = helper.getVMTopologyTemplateStatus(vmTopology);
toscaTemplate = setDesieredSate(toscaTemplate, vmTopologies, NODE_STATES.DELETED); toscaTemplate = setDesieredSate(toscaTemplate, vmTopologies, NODE_STATES.DELETED);
} }
return execute(toscaTemplate, provisionerQueueName); return execute(toscaTemplate, provisionerQueueName);
......
...@@ -113,7 +113,7 @@ class CloudStormService { ...@@ -113,7 +113,7 @@ class CloudStormService {
} }
public ToscaTemplate execute() throws FileNotFoundException, JSchException, IOException, ApiException, Exception { public ToscaTemplate execute() throws FileNotFoundException, JSchException, IOException, ApiException, Exception {
String tempInputDirPath = System.getProperty("java.io.tmpdir") + File.separator + "Input-" + Long.toString(System.nanoTime()) + File.separator; String tempInputDirPath = System.getProperty("java.io.tmpdir") + File.separator + "Input-" + Long.toString(System.nanoTime()) + File.separator;
File tempInputDir = new File(tempInputDirPath); File tempInputDir = new File(tempInputDirPath);
if (!(tempInputDir.mkdirs())) { if (!(tempInputDir.mkdirs())) {
......
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