Commit 6c746bf4 authored by Spiros Koulouzis's avatar Spiros Koulouzis

added exogeni support

parent c04ca632
......@@ -211,8 +211,11 @@ public class MessageParsing {
if (att != null && att.containsKey("keystore")) {
String javaKeyStoreEncoded = (String) att.get("keystore");
byte[] decoded = Base64.getDecoder().decode(javaKeyStoreEncoded);
FileUtils.writeByteArrayToFile(new File(tempInputDirPath + File.separator + "user.jks"), decoded);
File keyStoreFile = new File(tempInputDirPath + File.separator + "user.jks");
FileUtils.writeByteArrayToFile(keyStoreFile, decoded);
exoGeniCredential.userKeyPath = keyStoreFile.getAbsolutePath();
}
credential = exoGeniCredential;
}
......
......@@ -58,6 +58,7 @@ import provisioning.credential.SSHKeyPair;
import provisioning.credential.UserCredential;
import provisioning.database.EC2.EC2Database;
import provisioning.database.EGI.EGIDatabase;
import provisioning.database.ExoGENI.ExoGENIDatabase;
import provisioning.database.UserDatabase;
import provisioning.engine.TEngine.TEngine;
import provisioning.request.RecoverRequest;
......@@ -481,6 +482,8 @@ public class Consumer extends DefaultConsumer {
if (userDatabase.databases == null) {
userDatabase.databases = new HashMap<>();
}
ExoGENIDatabase exoGENIDB = new ExoGENIDatabase();
userDatabase.databases.put("exogeni", exoGENIDB);
userDatabase.databases.put("ec2", ec2Database);
userDatabase.databases.put("egi", egiDatabase);
return userDatabase;
......@@ -500,8 +503,8 @@ public class Consumer extends DefaultConsumer {
if (cred instanceof EGICredential) {
userCredential.cloudAccess.put("egi", cred);
}
if (cred instanceof ExoGENICredential) {
userCredential.cloudAccess.put("egi", cred);
if (cred instanceof ExoGENICredential) {
userCredential.cloudAccess.put("exogeni", cred);
}
}
return userCredential;
......@@ -641,7 +644,7 @@ public class Consumer extends DefaultConsumer {
paramValue += sub.userName + " ";
// paramValue += tempInputDirPath + File.separator + sub.subTopology.accessKeyPair.SSHKeyPairId + File.separator + "id_rsa";
paramValue += vm.role + "\n";
}
}
// else if (vm == null || !sub.status.equals("running")) {
// throw new Exception("A VM failed to start. Deleteing all topology");
// }
......
......@@ -113,8 +113,8 @@ class DumpPlanner:
host['disk_size'] = '10GB'
vm['host'] = host
os = {}
os['os_version'] = 16.04
os['distribution'] = 'ubuntu'
os['os_version'] = 14.04
os['distribution'] = 'Ubuntu'
os['type'] = 'linux'
os['architecture'] = 'x86_64'
vm['os'] = os
......@@ -145,8 +145,8 @@ class DumpPlanner:
vm['host'] = host
if 'os' not in vm:
os = {}
os['os_version'] = 16.04
os['distribution'] = 'ubuntu'
os['os_version'] = 14.04
os['distribution'] = 'Ubuntu'
os['type'] = 'linux'
os['architecture'] = 'x86_64'
vm['os'] = os
......
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