diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/AnsibleBridge.java b/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/AnsibleBridge.java index ef33298..0ad1019 100644 --- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/AnsibleBridge.java +++ b/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/AnsibleBridge.java @@ -212,17 +212,17 @@ public class AnsibleBridge { */ public Collection generateRoles(Dependency d) { Collection roles = new Vector<>(); - if("os".equals(d.getType())) { + if("os".equalsIgnoreCase(d.getType())) { OSDependencyPackage pkg = new OSDependencyPackage(d); if(pkg!=null) { roles.addAll(pkg.getRoles(this.getTemplateManager())); } - } else if("custom".equals(d.getType())) { + } else if("custom".equalsIgnoreCase(d.getType())) { CustomDependencyPackage pkg = new CustomDependencyPackage(d); if(pkg!=null) { roles.addAll(pkg.getRoles(this.getCustomRoleManager())); } - } else if("cran".equals(d.getType())) { + } else if("cran".equalsIgnoreCase(d.getType())) { CranDependencyPackage pkg = new CranDependencyPackage(d); if(pkg!=null) { roles.addAll(pkg.getRoles(this.getTemplateManager())); diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/AlgorithmPackage.java b/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/AlgorithmPackage.java index 092a4f0..2921fa1 100644 --- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/AlgorithmPackage.java +++ b/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/ansiblebridge/template/AlgorithmPackage.java @@ -22,7 +22,15 @@ public class AlgorithmPackage { protected Map getDictionary(Algorithm a) { Map out = new HashMap(); out.put("name", a.getName()); + out.put("category", a.getCategory()); + out.put("class", a.getClazz()); + out.put("p5", "TEMP_TRANSDUCERS"); + out.put("p6", "TEMP_??"); + out.put("vre", "FAKE_VRE"); + out.put("packageurl", a.getPackageURL()); + out.put("description", a.getDescription()); String deps = ""; + for(Dependency d:a.getDependencies()) { deps+=String.format("- { role: %s }\n", d.getType()+"-"+d.getName()); } diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/process/AlgorithmPackageParser.java b/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/process/AlgorithmPackageParser.java index b1f65d1..a5ba19b 100644 --- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/process/AlgorithmPackageParser.java +++ b/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/process/AlgorithmPackageParser.java @@ -159,7 +159,7 @@ public class AlgorithmPackageParser { for (String pkg : dependencies) { Dependency dep = new Dependency(); dep.setName(pkg); - dep.setType("OS"); + dep.setType("os"); out.addDependency(dep); } } diff --git a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/service/DataminerPoolManager.java b/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/service/DataminerPoolManager.java index fa29a15..f3f5fb8 100644 --- a/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/service/DataminerPoolManager.java +++ b/src/main/java/org/gcube/dataanalysys/dataminerpoolmanager/service/DataminerPoolManager.java @@ -119,8 +119,4 @@ public class DataminerPoolManager { } -// private void updateClusters() { -// System.out.println("flushing changes to all clusters"); -// } - }