aboutsummaryrefslogtreecommitdiffstats
path: root/ccsdk-app-common/src
diff options
context:
space:
mode:
authorKotagiri, Ramprasad (rp5662) <rp5662@att.com>2020-03-02 15:18:48 -0500
committerKotagiri, Ramprasad (rp5662) <rp5662@att.com>2020-03-02 15:21:04 -0500
commit4da6618d7a8b03594cfdd642811b72ffa308bcff (patch)
treee15ad524dca650e433b38b52ee81e8c91ad33b1a /ccsdk-app-common/src
parent523f37fb7d255e436daf5320c7fd09c872f1be59 (diff)
skip blueprint parsing exceptions for invalid YAML
Allow blueprint records to be displayed by skipping records with invalid YAML. Issue-ID: DCAEGEN2-2120 Change-Id: I025bfc27e175683005400ab094c8a430191f56f4 Signed-off-by: Kotagiri, Ramprasad (rp5662) <rp5662@att.com>
Diffstat (limited to 'ccsdk-app-common/src')
-rw-r--r--ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/inventory/ServiceType.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/inventory/ServiceType.java b/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/inventory/ServiceType.java
index 6a7868e..4af4cb1 100644
--- a/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/inventory/ServiceType.java
+++ b/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/model/inventory/ServiceType.java
@@ -95,10 +95,10 @@ public class ServiceType {
private final Optional<String> deactivated;
/** Map that stores the inputs for a Blueprint */
- private final Map<String, BlueprintInput> blueprintInputs;
+ private Map<String, BlueprintInput> blueprintInputs;
/** Description of a blueprint */
- private final String blueprintDescription;
+ private String blueprintDescription;
/** internal role based setting */
private Optional<Boolean> canDeploy;
@@ -233,11 +233,12 @@ public class ServiceType {
this.deactivated = Optional.ofNullable(deactivated);
this.canDeploy = Optional.of(false);
try {
- this.blueprintInputs = Blueprint.parse(blueprintTemplate).getInputs();
- this.blueprintDescription = Blueprint.parse(blueprintTemplate).getDescription();
+ Blueprint bpObj = Blueprint.parse(blueprintTemplate);
+ this.blueprintInputs = bpObj.getInputs();
+ this.blueprintDescription = bpObj.getDescription();
} catch (BlueprintParseException e) {
- throw new RuntimeException(
- "Error while parsing blueprint template for " + this.typeName + " " + this.typeVersion, e);
+/* throw new RuntimeException(
+ "Error while parsing blueprint template for " + this.typeName + " " + this.typeVersion, e);*/
}
}