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

check if proxy is there

parent 89ba6361
......@@ -86,10 +86,11 @@ public class AAUtils {
case PROXY_FILE:
secretKey += "\n";
proxy_file = new File("/tmp/x509up_u1000");
Set<PosixFilePermission> perm = new HashSet<>();
perm.add(PosixFilePermission.OWNER_WRITE);
Files.setPosixFilePermissions(proxy_file.toPath(), perm);
if (proxy_file.exists()) {
Set<PosixFilePermission> perm = new HashSet<>();
perm.add(PosixFilePermission.OWNER_WRITE);
Files.setPosixFilePermissions(proxy_file.toPath(), perm);
}
Files.write(proxy_file.toPath(), secretKey.getBytes());
break;
case CERTIFICATE:
......
......@@ -58,6 +58,7 @@ import provisioning.database.EGI.EGIDatabase;
import provisioning.database.UserDatabase;
import provisioning.engine.TEngine.TEngine;
import provisioning.engine.VEngine.EGI.EGIAgent;
import provisioning.request.ScalingRequest;
import topologyAnalysis.TopologyAnalysisMain;
import topologyAnalysis.dataStructure.SubTopologyInfo;
import topologyAnalysis.dataStructure.VM;
......@@ -506,7 +507,15 @@ public class Consumer extends DefaultConsumer {
}
Message response = new Message();
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) {
ObjectMapper mapper = new ObjectMapper();
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