Commit 72508c0c authored by Spiros Koulouzis's avatar Spiros Koulouzis

check if proxy is there

parent 89ba6361
...@@ -86,10 +86,11 @@ public class AAUtils { ...@@ -86,10 +86,11 @@ public class AAUtils {
case PROXY_FILE: case PROXY_FILE:
secretKey += "\n"; secretKey += "\n";
proxy_file = new File("/tmp/x509up_u1000"); proxy_file = new File("/tmp/x509up_u1000");
Set<PosixFilePermission> perm = new HashSet<>(); if (proxy_file.exists()) {
perm.add(PosixFilePermission.OWNER_WRITE); Set<PosixFilePermission> perm = new HashSet<>();
Files.setPosixFilePermissions(proxy_file.toPath(), perm); perm.add(PosixFilePermission.OWNER_WRITE);
Files.setPosixFilePermissions(proxy_file.toPath(), perm);
}
Files.write(proxy_file.toPath(), secretKey.getBytes()); Files.write(proxy_file.toPath(), secretKey.getBytes());
break; break;
case CERTIFICATE: case CERTIFICATE:
......
...@@ -58,6 +58,7 @@ import provisioning.database.EGI.EGIDatabase; ...@@ -58,6 +58,7 @@ import provisioning.database.EGI.EGIDatabase;
import provisioning.database.UserDatabase; import provisioning.database.UserDatabase;
import provisioning.engine.TEngine.TEngine; import provisioning.engine.TEngine.TEngine;
import provisioning.engine.VEngine.EGI.EGIAgent; import provisioning.engine.VEngine.EGI.EGIAgent;
import provisioning.request.ScalingRequest;
import topologyAnalysis.TopologyAnalysisMain; import topologyAnalysis.TopologyAnalysisMain;
import topologyAnalysis.dataStructure.SubTopologyInfo; import topologyAnalysis.dataStructure.SubTopologyInfo;
import topologyAnalysis.dataStructure.VM; import topologyAnalysis.dataStructure.VM;
...@@ -506,7 +507,15 @@ public class Consumer extends DefaultConsumer { ...@@ -506,7 +507,15 @@ public class Consumer extends DefaultConsumer {
} }
Message response = new Message(); Message response = new Message();
try { try {
tEngine.autoScal(tam.wholeTopology, userCredential, userDatabase, tam.wholeTopology.topologies.get(0).topology , true, scalDCs); ScalingRequest scalReq = new ScalingRequest();
scalReq.cloudProvider = "ec2";
scalReq.domain = "Ohio";
scalReq.satisfied = false;
ArrayList<ScalingRequest> scalDCs = new ArrayList<>();
scalDCs.add(scalReq);
tEngine.autoScal(tam.wholeTopology, userCredential, userDatabase, "ec2_zh_b", true, scalDCs);
} catch (Throwable ex) { } catch (Throwable ex) {
ObjectMapper mapper = new ObjectMapper(); ObjectMapper mapper = new ObjectMapper();
mapper.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true); mapper.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true);
......
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