summaryrefslogtreecommitdiffstats
path: root/mod/runtimeapi/runtime-web/src/main/java/org/onap/dcae/runtime/web/service/BlueprintInventory.java
diff options
context:
space:
mode:
authorDesai, Dhrumin (dd303q) <dd303q@att.com>2021-08-27 17:53:06 -0400
committerDhrumin Desai <dd303q@att.com>2021-10-07 22:22:22 -0400
commit4371989e7a50d015b6eefa074d4988033223551b (patch)
treeba7bfdedcc7b4fdf11c520be941190f7fcbc4f4a /mod/runtimeapi/runtime-web/src/main/java/org/onap/dcae/runtime/web/service/BlueprintInventory.java
parentf6129791bd343d7c4a19bc4c5c758d76e24f0926 (diff)
integrate helm-chart-generator to runtime api
Issue-ID: DCAEGEN2-2694 Issue-ID: DCAEGEN2-2805 Change-Id: I1b7d1bd7d2254280e0faa561e49223357c615090 Signed-off-by: Dhrumin Desai <dd303q@att.com>
Diffstat (limited to 'mod/runtimeapi/runtime-web/src/main/java/org/onap/dcae/runtime/web/service/BlueprintInventory.java')
-rw-r--r--mod/runtimeapi/runtime-web/src/main/java/org/onap/dcae/runtime/web/service/BlueprintInventory.java20
1 files changed, 12 insertions, 8 deletions
diff --git a/mod/runtimeapi/runtime-web/src/main/java/org/onap/dcae/runtime/web/service/BlueprintInventory.java b/mod/runtimeapi/runtime-web/src/main/java/org/onap/dcae/runtime/web/service/BlueprintInventory.java
index 789c9d1..d63deeb 100644
--- a/mod/runtimeapi/runtime-web/src/main/java/org/onap/dcae/runtime/web/service/BlueprintInventory.java
+++ b/mod/runtimeapi/runtime-web/src/main/java/org/onap/dcae/runtime/web/service/BlueprintInventory.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
*/
package org.onap.dcae.runtime.web.service;
+import org.json.JSONException;
import org.onap.dcae.runtime.core.FlowGraphParser.BlueprintVessel;
import org.onap.dcae.runtime.web.models.DashboardConfig;
import org.json.JSONObject;
@@ -46,7 +47,6 @@ public class BlueprintInventory {
JSONObject body = prepareBlueprintJsonObject(bpv.name, bpv.version, bpv.blueprint);
postToDashboard(body);
logger.info(String.format("Distributed: %s", bpv.toString()));
- //System.out.println(bpv.blueprint);
}
}
@@ -74,12 +74,16 @@ public class BlueprintInventory {
private JSONObject prepareBlueprintJsonObject(String blueprintName, int version, String blueprintContent) {
JSONObject blueprintJsonObject = new JSONObject();
- blueprintJsonObject.put("owner","dcae_mod");
- blueprintJsonObject.put("typeName",blueprintName);
- blueprintJsonObject.put("typeVersion",version);
- blueprintJsonObject.put("blueprintTemplate",blueprintContent);
- blueprintJsonObject.put("application","DCAE");
- blueprintJsonObject.put("component","dcae");
+ try {
+ blueprintJsonObject.put("owner","dcae_mod");
+ blueprintJsonObject.put("typeName",blueprintName);
+ blueprintJsonObject.put("typeVersion",version);
+ blueprintJsonObject.put("blueprintTemplate",blueprintContent);
+ blueprintJsonObject.put("application","DCAE");
+ blueprintJsonObject.put("component","dcae");
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
return blueprintJsonObject;
}