Commit af86bc77 authored by Spiros Koulouzis's avatar Spiros Koulouzis

added dummy keys to pass tests

parent 467f35da
......@@ -22,8 +22,8 @@
"user_key_pair": {
"protocol": "ssh",
"keys": {
"public_key": "XXXXXXXXXXXXXXXXXXX",
"private_key": "XXXXXXXXXXX"
"public_key": "c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFBZ1FDYUVhemZ3c003cEc4MTRnUnpaRktHeUxCcVlzVXlSNEd2SXVBQ3d0dmpQN3hDNGVZMDloVDFHVEx0dER4K1NGdkdEbVhmeTQzWTFJUU9WNTVlRitPbjNQNXk3Ris2K3FTeWtPTVBvaUQ0Q3JpVCswNGdMbUR2OHJSU3g1TytkU1lycjdWNGs3L1VJdWxMYlhEb2p6T3NZYkpjYlZlODRGM0tnTGJTcG4yeDJRPT0gZ2VuZXJhdGVkIHVzZXIgYWNjZWVzIGtleXMK",
"private_key": "LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlDV3dJQkFBS0JnUUNhRWF6ZndzTTdwRzgxNGdSelpGS0d5TEJxWXNVeVI0R3ZJdUFDd3R2alA3eEM0ZVkwCjloVDFHVEx0dER4K1NGdkdEbVhmeTQzWTFJUU9WNTVlRitPbjNQNXk3Ris2K3FTeWtPTVBvaUQ0Q3JpVCswNGcKTG1EdjhyUlN4NU8rZFNZcnI3VjRrNy9VSXVsTGJYRG9qek9zWWJKY2JWZTg0RjNLZ0xiU3BuMngyUUlEQVFBQgpBbjhyVk0xS0lYekhTWGY5cjVPUTRLWlZRaHhiejJ1bXVIWEF6QTQwdUprZlVNMmlBZWE4L25qbWRpL2NxdFJZCnNBRWZzdXowQkV2Z3IrUjBKREJtUmxIQWRKckJ0Tyt6b3VTVVJVekQzQVBCOGd3VTJIVWNXL1EzeFVZZWQvOWoKV3RDNDVma2hUc1NGN08wK2sxTDY0UnpESWc1YW53N0Z3ZDc5OFpCdVk3Z0JBa0VBem8yM2tCYVpIZ1BiZmx1UgpvbGcvUUxBTlZYeDZTMFIzaUxJWWlEc0lVclk4RjdvbEFDNm12VGxaZ2xpendqWXRPNDlsODllTjJsOFZHZUtNCkdJYnpJUUpCQUw3emlIblNXTGIxYUVTOHNzUWZhclZrMytzRGxNTGhoNTJYOUEwbmNWTjk0bU83T2JCZ0FFUVcKYzdBdkhyNXdqSCtyNWRnSmN6eVlmU3YyZjV1bkg3a0NRUUNOV2R4QnhjVTVEaWk2T3czWnpJeFV4MllJbDJ2VgpjR0JnOG9mcFNvU3luYlZZQTNIb3d3UW1RRVhwOXF2bGYwL0xENklVa2ZHb2ZDTWptSzZJNW1raEFrRUFrUml1CndKcmtqSW5uNUN0YXo0cHI1RkExa2ZnVHB3NEdwZXFjS1E2cW4xM05sQ2psU2k5NHBFUkhQajVmNXlmUXF3YnMKelA5SlVHY3kzaUFka1NJcUNRSkFZc29JUHZZZStjMUZlbkdtWjZFZDl0VjM5QzFNRjhOWGQ5dnFYWmJLazdvZwp2OGZtaGtnRVlVc0ZnbW13NzZiRllOMFNQVkVlbk1INUh1MEQwcnZKUFE9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo="
}
},
"public_ip": "3.124.193.148",
......@@ -32,8 +32,8 @@
"root_key_pair": {
"protocol": "ssh",
"keys": {
"public_key": "XXXXXXXXXXXXXXXXXXX",
"private_key": "XXXXXXXXXXXXXXX"
"public_key": "c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFBZ1FDYUVhemZ3c003cEc4MTRnUnpaRktHeUxCcVlzVXlSNEd2SXVBQ3d0dmpQN3hDNGVZMDloVDFHVEx0dER4K1NGdkdEbVhmeTQzWTFJUU9WNTVlRitPbjNQNXk3Ris2K3FTeWtPTVBvaUQ0Q3JpVCswNGdMbUR2OHJSU3g1TytkU1lycjdWNGs3L1VJdWxMYlhEb2p6T3NZYkpjYlZlODRGM0tnTGJTcG4yeDJRPT0gZ2VuZXJhdGVkIHVzZXIgYWNjZWVzIGtle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WjZFZDl0VjM5QzFNRjhOWGQ5dnFYWmJLazdvZwp2OGZtaGtnRVlVc0ZnbW13NzZiRllOMFNQVkVlbk1INUh1MEQwcnZKUFE9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo="
}
},
"host_name": "vm0"
......@@ -57,8 +57,8 @@
"user_key_pair": {
"protocol": "ssh",
"keys": {
"public_key": "XXXXXXXXXXXXXXXXXXXX",
"private_key": "XXXXXXXXXXXXXXX"
"public_key": "cHVibGljS2V5LTVhMDU5ZDE3LTQwZDEtNGE4ZC04MDI4LTQzOGEyNTE3MjczMQ==",
"private_key": "LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlDV3dJQkFBS0JnUUNhRWF6ZndzTTdwRzgxNGdSelpGS0d5TEJxWXNVeVI0R3ZJdUFDd3R2alA3eEM0ZVkwCjloVDFHVEx0dER4K1NGdkdEbVhmeTQzWTFJUU9WNTVlRitPbjNQNXk3Ris2K3FTeWtPTVBvaUQ0Q3JpVCswNGcKTG1EdjhyUlN4NU8rZFNZcnI3VjRrNy9VSXVsTGJYRG9qek9zWWJKY2JWZTg0RjNLZ0xiU3BuMngyUUlEQVFBQgpBbjhyVk0xS0lYekhTWGY5cjVPUTRLWlZRaHhiejJ1bXVIWEF6QTQwdUprZlVNMmlBZWE4L25qbWRpL2NxdFJZCnNBRWZzdXowQkV2Z3IrUjBKREJtUmxIQWRKckJ0Tyt6b3VTVVJVekQzQVBCOGd3VTJIVWNXL1EzeFVZZWQvOWoKV3RDNDVma2hUc1NGN08wK2sxTDY0UnpESWc1YW53N0Z3ZDc5OFpCdVk3Z0JBa0VBem8yM2tCYVpIZ1BiZmx1UgpvbGcvUUxBTlZYeDZTMFIzaUxJWWlEc0lVclk4RjdvbEFDNm12VGxaZ2xpendqWXRPNDlsODllTjJsOFZHZUtNCkdJYnpJUUpCQUw3emlIblNXTGIxYUVTOHNzUWZhclZrMytzRGxNTGhoNTJYOUEwbmNWTjk0bU83T2JCZ0FFUVcKYzdBdkhyNXdqSCtyNWRnSmN6eVlmU3YyZjV1bkg3a0NRUUNOV2R4QnhjVTVEaWk2T3czWnpJeFV4MllJbDJ2VgpjR0JnOG9mcFNvU3luYlZZQTNIb3d3UW1RRVhwOXF2bGYwL0xENklVa2ZHb2ZDTWptSzZJNW1raEFrRUFrUml1CndKcmtqSW5uNUN0YXo0cHI1RkExa2ZnVHB3NEdwZXFjS1E2cW4xM05sQ2psU2k5NHBFUkhQajVmNXlmUXF3YnMKelA5SlVHY3kzaUFka1NJcUNRSkFZc29JUHZZZStjMUZlbkdtWjZFZDl0VjM5QzFNRjhOWGQ5dnFYWmJLazdvZwp2OGZtaGtnRVlVc0ZnbW13NzZiRllOMFNQVkVlbk1INUh1MEQwcnZKUFE9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo="
}
},
"public_ip": "18.197.132.48",
......@@ -67,8 +67,8 @@
"root_key_pair": {
"protocol": "ssh",
"keys": {
"public_key": "XXXXXXXXXXXX",
"private_key": "XXXXXXXXXXXXX"
"public_key": "cHVibGljS2V5LTVhMDU5ZDE3LTQwZDEtNGE4ZC04MDI4LTQzOGEyNTE3MjczMQ==",
"private_key": "LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlDV3dJQkFBS0JnUUNhRWF6ZndzTTdwRzgxNGdSelpGS0d5TEJxWXNVeVI0R3ZJdUFDd3R2alA3eEM0ZVkwCjloVDFHVEx0dER4K1NGdkdEbVhmeTQzWTFJUU9WNTVlRitPbjNQNXk3Ris2K3FTeWtPTVBvaUQ0Q3JpVCswNGcKTG1EdjhyUlN4NU8rZFNZcnI3VjRrNy9VSXVsTGJYRG9qek9zWWJKY2JWZTg0RjNLZ0xiU3BuMngyUUlEQVFBQgpBbjhyVk0xS0lYekhTWGY5cjVPUTRLWlZRaHhiejJ1bXVIWEF6QTQwdUprZlVNMmlBZWE4L25qbWRpL2NxdFJZCnNBRWZzdXowQkV2Z3IrUjBKREJtUmxIQWRKckJ0Tyt6b3VTVVJVekQzQVBCOGd3VTJIVWNXL1EzeFVZZWQvOWoKV3RDNDVma2hUc1NGN08wK2sxTDY0UnpESWc1YW53N0Z3ZDc5OFpCdVk3Z0JBa0VBem8yM2tCYVpIZ1BiZmx1UgpvbGcvUUxBTlZYeDZTMFIzaUxJWWlEc0lVclk4RjdvbEFDNm12VGxaZ2xpendqWXRPNDlsODllTjJsOFZHZUtNCkdJYnpJUUpCQUw3emlIblNXTGIxYUVTOHNzUWZhclZrMytzRGxNTGhoNTJYOUEwbmNWTjk0bU83T2JCZ0FFUVcKYzdBdkhyNXdqSCtyNWRnSmN6eVlmU3YyZjV1bkg3a0NRUUNOV2R4QnhjVTVEaWk2T3czWnpJeFV4MllJbDJ2VgpjR0JnOG9mcFNvU3luYlZZQTNIb3d3UW1RRVhwOXF2bGYwL0xENklVa2ZHb2ZDTWptSzZJNW1raEFrRUFrUml1CndKcmtqSW5uNUN0YXo0cHI1RkExa2ZnVHB3NEdwZXFjS1E2cW4xM05sQ2psU2k5NHBFUkhQajVmNXlmUXF3YnMKelA5SlVHY3kzaUFka1NJcUNRSkFZc29JUHZZZStjMUZlbkdtWjZFZDl0VjM5QzFNRjhOWGQ5dnFYWmJLazdvZwp2OGZtaGtnRVlVc0ZnbW13NzZiRllOMFNQVkVlbk1INUh1MEQwcnZKUFE9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo="
}
},
"host_name": "vm1"
......
......@@ -388,6 +388,7 @@ class CloudStormService {
for (NodeTemplateMap nodeTemplateMap : vmTopologyTemplatesMap) {
List<NodeTemplateMap> vmTemplatesMap = getHelper().getTemplateVMsForVMTopology(nodeTemplateMap);
for (NodeTemplateMap vmMap : vmTemplatesMap) {
Logger.getLogger(CloudStormService.class.getName()).log(Level.INFO, "Getting ssh keys for: {0}", vmMap.getName()) ;
keyPair = getHelper().getKeyPairsFromVM(vmMap.getNodeTemplate());
break;
}
......
......@@ -19,6 +19,7 @@ import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import static nl.uva.sne.drip.commons.utils.Constants.*;
import nl.uva.sne.drip.commons.utils.Converter;
import nl.uva.sne.drip.commons.utils.ToscaHelper;
......@@ -45,6 +46,7 @@ import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
import java.util.logging.Logger;
/**
*
......@@ -124,6 +126,7 @@ public class CloudStormServiceTest {
}
private CloudStormService getService(String messagefilePath) throws IOException, JsonProcessingException, ApiException {
Logger.getLogger(CloudStormServiceTest.class.getName()).log(Level.INFO, "Reterning CloudStormService for file: {0}", new File(messagefilePath).getAbsolutePath());
Message message = objectMapper.readValue(new File(messagefilePath), Message.class);
return new CloudStormService(RPCServer.getProp(), message.getToscaTemplate());
}
......@@ -217,6 +220,7 @@ public class CloudStormServiceTest {
CloudStormService instance = getService(messageExampleProvisioneRequestFilePath);
KeyPair result = instance.getKeyPair();
assertNull(result);
instance = getService(messageExampleDeleteRequestFilePath);
result = instance.getKeyPair();
assertNotNull(result);
......
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