Commit 468f2d94 authored by Spiros Koulouzis's avatar Spiros Koulouzis

Fixed pom

Added converter to project
parent 90df0ed0
...@@ -3,4 +3,5 @@ ...@@ -3,4 +3,5 @@
/drip-planner/target/ /drip-planner/target/
/drip-commons/nbproject/ /drip-commons/nbproject/
/drip-simple_planner/target/ /drip-simple_planner/target/
/drip-provisioner/target/ /drip-provisioner/target/
\ No newline at end of file /target/
\ No newline at end of file
...@@ -63,23 +63,23 @@ public class PlannerService { ...@@ -63,23 +63,23 @@ public class PlannerService {
ObjectMapper mapper = new ObjectMapper(); ObjectMapper mapper = new ObjectMapper();
mapper.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true); mapper.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true);
String jsonString = mapper.writeValueAsString(plannerReturnedMessage); String jsonString = mapper.writeValueAsString(plannerReturnedMessage);
// SimplePlanContainer simplePlan = Converter.plannerOutput2SimplePlanContainer(jsonString); SimplePlanContainer simplePlan = Converter.plannerOutput2SimplePlanContainer(jsonString);
Plan topLevel = new Plan(); Plan topLevel = new Plan();
topLevel.setLevel(0); topLevel.setLevel(0);
topLevel.setToscaID(toscaId); topLevel.setToscaID(toscaId);
topLevel.setName("planner_output_all.yml"); topLevel.setName("planner_output_all.yml");
// topLevel.setKvMap(Converter.ymlString2Map(simplePlan.getTopLevel())); topLevel.setKvMap(Converter.ymlString2Map(simplePlan.getTopLevel()));
// Map<String, String> map = simplePlan.getLowerLevels(); Map<String, String> map = simplePlan.getLowerLevels();
Set<String> loweLevelPlansIDs = new HashSet<>(); Set<String> loweLevelPlansIDs = new HashSet<>();
// for (String lowLevelNames : map.keySet()) { for (String lowLevelNames : map.keySet()) {
// Plan lowLevelPlan = new Plan(); Plan lowLevelPlan = new Plan();
// lowLevelPlan.setLevel(1); lowLevelPlan.setLevel(1);
// lowLevelPlan.setToscaID(toscaId); lowLevelPlan.setToscaID(toscaId);
// lowLevelPlan.setName(lowLevelNames); lowLevelPlan.setName(lowLevelNames);
// lowLevelPlan.setKvMap(Converter.ymlString2Map(map.get(lowLevelNames))); lowLevelPlan.setKvMap(Converter.ymlString2Map(map.get(lowLevelNames)));
// planDao.save(lowLevelPlan); planDao.save(lowLevelPlan);
// loweLevelPlansIDs.add(lowLevelPlan.getId()); loweLevelPlansIDs.add(lowLevelPlan.getId());
// } }
topLevel.setLoweLevelPlansIDs(loweLevelPlansIDs); topLevel.setLoweLevelPlansIDs(loweLevelPlansIDs);
planDao.save(topLevel); planDao.save(topLevel);
......
...@@ -37,7 +37,7 @@ import org.yaml.snakeyaml.Yaml; ...@@ -37,7 +37,7 @@ import org.yaml.snakeyaml.Yaml;
*/ */
public class Converter { public class Converter {
private static Map<String, String> EC2_NAME_MAP = new HashMap(); private static final Map<String, String> EC2_NAME_MAP = new HashMap();
public static String ymlString2Json(String yamlString) { public static String ymlString2Json(String yamlString) {
JSONObject jsonObject = new JSONObject(ymlString2Map(yamlString)); JSONObject jsonObject = new JSONObject(ymlString2Map(yamlString));
...@@ -71,10 +71,10 @@ public class Converter { ...@@ -71,10 +71,10 @@ public class Converter {
return jsonObject2Map(jsonObject); return jsonObject2Map(jsonObject);
} }
// public static SimplePlanContainer plannerOutput2SimplePlanContainer(String jsonString) throws JSONException { public static SimplePlanContainer plannerOutput2SimplePlanContainer(String jsonString) throws JSONException {
// return null;
// return null; }
// }
public static Map<String, Object> jsonObject2Map(JSONObject object) throws JSONException { public static Map<String, Object> jsonObject2Map(JSONObject object) throws JSONException {
Map<String, Object> map = new HashMap(); Map<String, Object> map = new HashMap();
......
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAm6AALYxkJFNzD3bfVJ4+hMY5j0/kqM9CURLKXMlYuAysnvoG8wZKx9Bedefm
eNSse4zTg798ZA2kDMZFIrwp1AseTwtj8DDu5fhG5DjyI3g6iJltS5zFQdMXneDlHXBX8cncSzNY
Rx0NdjEMAe7YttvI8FNlxL0VnMFli/HB/ftzYMe5+AmkSROncVGHiwoiUpj+vtobCF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x74O8JleXaHpxEAmh4h7VbLmJ3mOylfBmOdzcHeedJQw
ack2SAv65WBI9S9MEQ7J/vFuyw5HNk3C/mcWgzDQXSNIhHLvl/Z9sux/Qpm3SQWLz0RBxKV3dJ4r
wcAxzVA93+/L1Nee+VOKnlyRumvVa6+XLsLagpap2AVcTqlerMcCgYEAx3T2pXtqkCE9eU/ov22r
pdaKjgHoGOUg1CMEfWi/Ch6sYIIRyrHz6dhy+yR1pXNgPbLWdrn8l88F3+IsmbaMupMgRmqwEC3G
9Y2FglGIVvRdZaagvRxLzRCcvcN4v6OYs9ST4o1xlv7Qxphld+0XDKv7VSCv/rASuK8BqlFL3E8C
gYArMXJRnRjG7qh6g9TRIjZphdI3XxX9s5Rt2D8iZvuhAhqmBZjzY4PR7kxYmO2+EpCjzNnEl0XW
/GHaWbiIjhnAykx4N9KP7gGom3O5lzwHUme1XnFKcO2wDjQwJbufRmba8iQF1srN577mF+Z7ha4V
J1duCTzvWF1KFX6sk/uhKQKBgAcDFai7rgNjJ8YcCRKxyFcMM9LKPl6hr4XFtWKzTAQPEABUkkuN
9gVClsg9f+VRKRECOIf0Ae1UWeCFEwxUXp4wjfHrzkTDVztKvmbWdvSXorDwKrZ7SC7tZpVFSfly
xuuLjadpUZT9YFmbAfY1X5oSccOMYqORjRbxEB3svb4BAoGAGTgFuq9Zojh/KIqY8b4HpEfmh6CQ
hLVfD98Nqd6GDbxgvIM0v4mFXE92x2jn35Ia0JdFyh3B8Vkl7sqQZfxDFXI9O9pte2mPJxY9ICaY
55+X/SN1pd53BH+gaPZJy/R+Vpvs5MN48howjUKy5UKpoFeUWrS5QArjtvNCm4SGlXw=
-----END RSA PRIVATE KEY-----
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>nl.uva.sne.drip</groupId> <groupId>nl.uva.sne.drip</groupId>
<artifactId>drip-planner2provisioner</artifactId> <artifactId>drip</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>pom</packaging>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties> </properties>
<modules>
<dependencies> <module>drip-api</module>
<module>drip-commons</module>
<dependency> <module>drip-simple_planner</module>
<groupId>com.fasterxml.jackson.dataformat</groupId> <module>drip-provisioner</module>
<artifactId>jackson-dataformat-yaml</artifactId> <module>drip-planner2provisioner</module>
<version>2.5.0</version> </modules>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
</dependencies>
<build>
<plugins>
<!--mvn clean compile assembly:single-->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass></mainClass>
</manifest>
<manifestEntries>
<Class-Path>.</Class-Path>
</manifestEntries>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
</project> </project>
\ No newline at end of file
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