Commit fb0fe2be authored by Spiros Koulouzis's avatar Spiros Koulouzis

typo

parent 7dfd001e
...@@ -19,7 +19,7 @@ package nl.uva.sne.drip.commons.utils; ...@@ -19,7 +19,7 @@ package nl.uva.sne.drip.commons.utils;
* *
* @author S. Koulouzis * @author S. Koulouzis
*/ */
public class Constatnts { public class Constants {
public static final String VM_CAPABILITY = "tosca.capabilities.ARTICONF.VM"; public static final String VM_CAPABILITY = "tosca.capabilities.ARTICONF.VM";
public static final String VM_TYPE = "tosca.nodes.ARTICONF.VM.Compute"; public static final String VM_TYPE = "tosca.nodes.ARTICONF.VM.Compute";
......
...@@ -45,7 +45,7 @@ import org.apache.commons.io.FileUtils; ...@@ -45,7 +45,7 @@ import org.apache.commons.io.FileUtils;
import nl.uva.sne.drip.sure.tosca.client.ApiException; import nl.uva.sne.drip.sure.tosca.client.ApiException;
import nl.uva.sne.drip.sure.tosca.client.Configuration; import nl.uva.sne.drip.sure.tosca.client.Configuration;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import static nl.uva.sne.drip.commons.utils.Constatnts.*; import static nl.uva.sne.drip.commons.utils.Constants.*;
import nl.uva.sne.drip.model.cloud.storm.CloudsStormSubTopology.StatusEnum; import nl.uva.sne.drip.model.cloud.storm.CloudsStormSubTopology.StatusEnum;
import nl.uva.sne.drip.model.cloud.storm.OpCode; import nl.uva.sne.drip.model.cloud.storm.OpCode;
......
...@@ -32,7 +32,7 @@ import java.util.HashMap; ...@@ -32,7 +32,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Properties; import java.util.Properties;
import static nl.uva.sne.drip.commons.utils.Constatnts.*; import static nl.uva.sne.drip.commons.utils.Constants.*;
import nl.uva.sne.drip.model.NodeTemplate; import nl.uva.sne.drip.model.NodeTemplate;
import nl.uva.sne.drip.model.NodeTemplateMap; import nl.uva.sne.drip.model.NodeTemplateMap;
import nl.uva.sne.drip.model.Provisioner; import nl.uva.sne.drip.model.Provisioner;
...@@ -453,7 +453,7 @@ public class ToscaHelperTest { ...@@ -453,7 +453,7 @@ public class ToscaHelperTest {
public void testCloudStormStatus2NodeState() { public void testCloudStormStatus2NodeState() {
System.out.println("cloudStormStatus2NodeState"); System.out.println("cloudStormStatus2NodeState");
for (CloudsStormSubTopology.StatusEnum value : CloudsStormSubTopology.StatusEnum.values()) { for (CloudsStormSubTopology.StatusEnum value : CloudsStormSubTopology.StatusEnum.values()) {
Constatnts.NODE_STATES result = ToscaHelper.cloudStormStatus2NodeState(value); Constants.NODE_STATES result = ToscaHelper.cloudStormStatus2NodeState(value);
if (value.equals(CloudsStormSubTopology.StatusEnum.FRESH)) { if (value.equals(CloudsStormSubTopology.StatusEnum.FRESH)) {
assertNull(result); assertNull(result);
} else { } else {
...@@ -475,8 +475,8 @@ public class ToscaHelperTest { ...@@ -475,8 +475,8 @@ public class ToscaHelperTest {
System.out.println("getNodeCurrentState"); System.out.println("getNodeCurrentState");
instance.uploadToscaTemplate(provisionedToscaTemplate); instance.uploadToscaTemplate(provisionedToscaTemplate);
NodeTemplateMap node = instance.getVMTopologyTemplates().get(0); NodeTemplateMap node = instance.getVMTopologyTemplates().get(0);
Constatnts.NODE_STATES expResult = Constatnts.NODE_STATES.RUNNING; Constants.NODE_STATES expResult = Constants.NODE_STATES.RUNNING;
Constatnts.NODE_STATES result = instance.getNodeCurrentState(node); Constants.NODE_STATES result = instance.getNodeCurrentState(node);
assertEquals(expResult, result); assertEquals(expResult, result);
} }
...@@ -495,7 +495,7 @@ public class ToscaHelperTest { ...@@ -495,7 +495,7 @@ public class ToscaHelperTest {
System.out.println("setNodeCurrentState"); System.out.println("setNodeCurrentState");
instance.uploadToscaTemplate(provisionedToscaTemplate); instance.uploadToscaTemplate(provisionedToscaTemplate);
NodeTemplateMap node = instance.getVMTopologyTemplates().get(0); NodeTemplateMap node = instance.getVMTopologyTemplates().get(0);
Constatnts.NODE_STATES nodeState = Constatnts.NODE_STATES.DELETED; Constants.NODE_STATES nodeState = Constants.NODE_STATES.DELETED;
NodeTemplateMap result = instance.setNodeCurrentState(node, nodeState); NodeTemplateMap result = instance.setNodeCurrentState(node, nodeState);
assertEquals(instance.getNodeCurrentState(node), nodeState); assertEquals(instance.getNodeCurrentState(node), nodeState);
...@@ -511,22 +511,22 @@ public class ToscaHelperTest { ...@@ -511,22 +511,22 @@ public class ToscaHelperTest {
@Test @Test
public void testNodeDesiredState2CloudStormOperation() { public void testNodeDesiredState2CloudStormOperation() {
System.out.println("NodeDesiredState2CloudStormOperation"); System.out.println("NodeDesiredState2CloudStormOperation");
Constatnts.NODE_STATES nodeDesiredState = Constatnts.NODE_STATES.RUNNING; Constants.NODE_STATES nodeDesiredState = Constants.NODE_STATES.RUNNING;
OpCode.OperationEnum expResult = OpCode.OperationEnum.PROVISION; OpCode.OperationEnum expResult = OpCode.OperationEnum.PROVISION;
OpCode.OperationEnum result = ToscaHelper.NodeDesiredState2CloudStormOperation(nodeDesiredState); OpCode.OperationEnum result = ToscaHelper.NodeDesiredState2CloudStormOperation(nodeDesiredState);
assertEquals(expResult, result); assertEquals(expResult, result);
nodeDesiredState = Constatnts.NODE_STATES.DELETED; nodeDesiredState = Constants.NODE_STATES.DELETED;
expResult = OpCode.OperationEnum.DELETE; expResult = OpCode.OperationEnum.DELETE;
result = ToscaHelper.NodeDesiredState2CloudStormOperation(nodeDesiredState); result = ToscaHelper.NodeDesiredState2CloudStormOperation(nodeDesiredState);
assertEquals(expResult, result); assertEquals(expResult, result);
nodeDesiredState = Constatnts.NODE_STATES.STOPPED; nodeDesiredState = Constants.NODE_STATES.STOPPED;
expResult = OpCode.OperationEnum.STOP; expResult = OpCode.OperationEnum.STOP;
result = ToscaHelper.NodeDesiredState2CloudStormOperation(nodeDesiredState); result = ToscaHelper.NodeDesiredState2CloudStormOperation(nodeDesiredState);
assertEquals(expResult, result); assertEquals(expResult, result);
nodeDesiredState = Constatnts.NODE_STATES.STARTED; nodeDesiredState = Constants.NODE_STATES.STARTED;
expResult = OpCode.OperationEnum.START; expResult = OpCode.OperationEnum.START;
result = ToscaHelper.NodeDesiredState2CloudStormOperation(nodeDesiredState); result = ToscaHelper.NodeDesiredState2CloudStormOperation(nodeDesiredState);
assertEquals(expResult, result); assertEquals(expResult, result);
...@@ -539,7 +539,7 @@ public class ToscaHelperTest { ...@@ -539,7 +539,7 @@ public class ToscaHelperTest {
@Test @Test
public void testNodeCurrentState2CloudStormStatus() { public void testNodeCurrentState2CloudStormStatus() {
System.out.println("nodeCurrentState2CloudStormStatus"); System.out.println("nodeCurrentState2CloudStormStatus");
Constatnts.NODE_STATES currentState = Constatnts.NODE_STATES.CONFIGURED; Constants.NODE_STATES currentState = Constants.NODE_STATES.CONFIGURED;
CloudsStormSubTopology.StatusEnum expResult = null; CloudsStormSubTopology.StatusEnum expResult = null;
CloudsStormSubTopology.StatusEnum result = ToscaHelper.nodeCurrentState2CloudStormStatus(currentState); CloudsStormSubTopology.StatusEnum result = ToscaHelper.nodeCurrentState2CloudStormStatus(currentState);
assertEquals(expResult, result); assertEquals(expResult, result);
......
...@@ -13,7 +13,7 @@ import java.util.logging.Level; ...@@ -13,7 +13,7 @@ import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import nl.uva.sne.drip.api.NotFoundException; import nl.uva.sne.drip.api.NotFoundException;
import nl.uva.sne.drip.commons.utils.ToscaHelper; import nl.uva.sne.drip.commons.utils.ToscaHelper;
import nl.uva.sne.drip.commons.utils.Constatnts.NODE_STATES; import nl.uva.sne.drip.commons.utils.Constants.NODE_STATES;
import nl.uva.sne.drip.model.Exceptions.MissingCredentialsException; import nl.uva.sne.drip.model.Exceptions.MissingCredentialsException;
import nl.uva.sne.drip.model.Exceptions.MissingVMTopologyException; import nl.uva.sne.drip.model.Exceptions.MissingVMTopologyException;
import nl.uva.sne.drip.model.Exceptions.TypeExeption; import nl.uva.sne.drip.model.Exceptions.TypeExeption;
......
...@@ -7,7 +7,7 @@ package nl.uva.sne.drip.service; ...@@ -7,7 +7,7 @@ package nl.uva.sne.drip.service;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static nl.uva.sne.drip.commons.utils.Constatnts.CLOUD_STORM_INTERFACE; import static nl.uva.sne.drip.commons.utils.Constants.CLOUD_STORM_INTERFACE;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import nl.uva.sne.drip.model.Provisioner; import nl.uva.sne.drip.model.Provisioner;
......
...@@ -39,8 +39,8 @@ import java.util.logging.Level; ...@@ -39,8 +39,8 @@ import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import nl.uva.sne.drip.Swagger2SpringBoot; import nl.uva.sne.drip.Swagger2SpringBoot;
import nl.uva.sne.drip.api.NotFoundException; import nl.uva.sne.drip.api.NotFoundException;
import nl.uva.sne.drip.commons.utils.Constatnts; import nl.uva.sne.drip.commons.utils.Constants;
import static nl.uva.sne.drip.commons.utils.Constatnts.*; import static nl.uva.sne.drip.commons.utils.Constants.*;
import nl.uva.sne.drip.commons.utils.Converter; import nl.uva.sne.drip.commons.utils.Converter;
import nl.uva.sne.drip.commons.utils.ToscaHelper; import nl.uva.sne.drip.commons.utils.ToscaHelper;
import nl.uva.sne.drip.configuration.MongoConfig; import nl.uva.sne.drip.configuration.MongoConfig;
...@@ -435,7 +435,7 @@ public class ServiceTests { ...@@ -435,7 +435,7 @@ public class ServiceTests {
Assert.assertTrue(attributes.containsKey("credential")); Assert.assertTrue(attributes.containsKey("credential"));
assertNotNull(attributes.get("credential")); assertNotNull(attributes.get("credential"));
} }
toscaTemplate = dripService.setDesieredSate(toscaTemplate, vmTopologies, Constatnts.NODE_STATES.RUNNING); toscaTemplate = dripService.setDesieredSate(toscaTemplate, vmTopologies, Constants.NODE_STATES.RUNNING);
Map<String, NodeTemplate> nodes = toscaTemplate.getTopologyTemplate().getNodeTemplates(); Map<String, NodeTemplate> nodes = toscaTemplate.getTopologyTemplate().getNodeTemplates();
Set<String> names = nodes.keySet(); Set<String> names = nodes.keySet();
for (String name : names) { for (String name : names) {
......
...@@ -29,9 +29,9 @@ import java.util.Properties; ...@@ -29,9 +29,9 @@ import java.util.Properties;
import java.util.Set; import java.util.Set;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import nl.uva.sne.drip.commons.utils.Constatnts; import nl.uva.sne.drip.commons.utils.Constants;
import static nl.uva.sne.drip.commons.utils.Constatnts.CLOUD_STORM_FILES_ZIP_SUXIF; import static nl.uva.sne.drip.commons.utils.Constants.CLOUD_STORM_FILES_ZIP_SUXIF;
import static nl.uva.sne.drip.commons.utils.Constatnts.ENCODED_FILE_DATATYPE; import static nl.uva.sne.drip.commons.utils.Constants.ENCODED_FILE_DATATYPE;
import nl.uva.sne.drip.commons.utils.Converter; import nl.uva.sne.drip.commons.utils.Converter;
import nl.uva.sne.drip.commons.utils.ToscaHelper; import nl.uva.sne.drip.commons.utils.ToscaHelper;
import static nl.uva.sne.drip.commons.utils.ToscaHelper.cloudStormStatus2NodeState; import static nl.uva.sne.drip.commons.utils.ToscaHelper.cloudStormStatus2NodeState;
...@@ -206,8 +206,8 @@ class CloudStormService { ...@@ -206,8 +206,8 @@ class CloudStormService {
cloudsStormSubTopology.setDomain(domain); cloudsStormSubTopology.setDomain(domain);
cloudsStormSubTopology.setCloudProvider(provider); cloudsStormSubTopology.setCloudProvider(provider);
cloudsStormSubTopology.setTopology(SUB_TOPOLOGY_NAME + i); cloudsStormSubTopology.setTopology(SUB_TOPOLOGY_NAME + i);
Constatnts.NODE_STATES currentState = getHelper().getNodeCurrentState(nodeTemplateMap); Constants.NODE_STATES currentState = getHelper().getNodeCurrentState(nodeTemplateMap);
Constatnts.NODE_STATES desiredState = getHelper().getNodeDesiredState(nodeTemplateMap); Constants.NODE_STATES desiredState = getHelper().getNodeDesiredState(nodeTemplateMap);
cloudsStormSubTopology.setStatus(ToscaHelper.nodeCurrentState2CloudStormStatus(currentState)); cloudsStormSubTopology.setStatus(ToscaHelper.nodeCurrentState2CloudStormStatus(currentState));
CloudsStormVMs cloudsStormVMs = new CloudsStormVMs(); CloudsStormVMs cloudsStormVMs = new CloudsStormVMs();
...@@ -320,8 +320,8 @@ class CloudStormService { ...@@ -320,8 +320,8 @@ class CloudStormService {
int i = 0; int i = 0;
List<InfrasCode> infrasCodes = new ArrayList<>(); List<InfrasCode> infrasCodes = new ArrayList<>();
for (NodeTemplateMap vmTopologyMap : vmTopologiesMaps) { for (NodeTemplateMap vmTopologyMap : vmTopologiesMaps) {
Constatnts.NODE_STATES nodeCurrentState = getHelper().getNodeCurrentState(vmTopologyMap); Constants.NODE_STATES nodeCurrentState = getHelper().getNodeCurrentState(vmTopologyMap);
Constatnts.NODE_STATES nodeDesiredState = getHelper().getNodeDesiredState(vmTopologyMap); Constants.NODE_STATES nodeDesiredState = getHelper().getNodeDesiredState(vmTopologyMap);
//Can provision //Can provision
Map<String, Object> provisionInterface = getHelper().getProvisionerInterfaceFromVMTopology(vmTopologyMap); Map<String, Object> provisionInterface = getHelper().getProvisionerInterfaceFromVMTopology(vmTopologyMap);
......
...@@ -19,7 +19,7 @@ import java.nio.file.Files; ...@@ -19,7 +19,7 @@ import java.nio.file.Files;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import static nl.uva.sne.drip.commons.utils.Constatnts.CLOUD_STORM_FILES_ZIP_SUXIF; import static nl.uva.sne.drip.commons.utils.Constants.CLOUD_STORM_FILES_ZIP_SUXIF;
import nl.uva.sne.drip.commons.utils.Converter; import nl.uva.sne.drip.commons.utils.Converter;
import nl.uva.sne.drip.commons.utils.ToscaHelper; import nl.uva.sne.drip.commons.utils.ToscaHelper;
import nl.uva.sne.drip.model.Message; import nl.uva.sne.drip.model.Message;
......
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