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

added exogeni support

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