Commit b68f2f8d authored by Mohamed Khalil Labidi's avatar Mohamed Khalil Labidi
Browse files

Fix URI not hierarchical issue

parent 042a27a6
......@@ -239,7 +239,7 @@ public class PAGateway {
variables.put("NS_name", nodeSourceName);
variables.put("NS_nVMs", "0");
variables.put("security_group", cloud.getSecurityGroup());
variables.put("image", deployment.getLocationName() + "/" + deployment.getImageProviderId());
variables.put("image", deployment.getLocationName() + File.separator + deployment.getImageProviderId());
try {
URL endpointPa = (new URL(this.paURL));
variables.put("rm_host_name", endpointPa.getHost());
......@@ -249,12 +249,12 @@ public class PAGateway {
}
switch (cloud.getCloudProviderName()) {
case "aws-ec2":
filename = "/Define_NS_AWS.xml";
filename = File.separator + "Define_NS_AWS.xml";
variables.put("aws_username", cloud.getCredentials().getUserName());
variables.put("aws_secret", cloud.getCredentials().getPrivateKey());
break;
case "openstack":
filename = "/Define_NS_OS.xml";
filename = File.separator + "Define_NS_OS.xml";
variables.put("os_endpoint", cloud.getEndpoint());
variables.put("os_scopePrefix", cloud.getScopePrefix());
variables.put("os_scopeValue", cloud.getScopeValue());
......@@ -545,7 +545,7 @@ public class PAGateway {
}
private ScriptTask createInfraTask(Task task, Deployment deployment, String taskNameSuffix, String nodeToken) {
LOGGER.debug("Acquiring node AWS script file: " + getClass().getResource("/acquire_node_aws_script.groovy").toString());
LOGGER.debug("Acquiring node AWS script file: " + getClass().getResource(File.separator + "acquire_node_aws_script.groovy").toString());
ScriptTask deployNodeTask = PAFactory.createGroovyScriptTaskFromFile("acquireAWSNode_" + task.getName() + taskNameSuffix,
"acquire_node_aws_script.groovy");
......
......@@ -31,7 +31,7 @@ public class GeoLocationUtils {
List<GeoLocationData> cloudsGLDB = new LinkedList<>();
File input;
try {
input = new File(getClass().getResource("/db_cloud_regions.csv").toURI());
input = new File(getClass().getResource(File.separator + "db_cloud_regions.csv").toURI());
CsvSchema csv = CsvSchema.emptySchema().withHeader().withColumnSeparator(' ').withNullValue("");
CsvMapper csvMapper = new CsvMapper();
MappingIterator<Map<?, ?>> mappingIterator = csvMapper.reader().forType(Map.class).with(csv).readValues(input);
......
Supports Markdown
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