From 4da6618d7a8b03594cfdd642811b72ffa308bcff Mon Sep 17 00:00:00 2001 From: "Kotagiri, Ramprasad (rp5662)" Date: Mon, 2 Mar 2020 15:18:48 -0500 Subject: 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) --- ccsdk-app-common/pom.xml | 4 ++-- .../onap/ccsdk/dashboard/model/inventory/ServiceType.java | 13 +++++++------ ccsdk-app-os/pom.xml | 4 ++-- ccsdk-app-overlay/pom.xml | 4 ++-- pom.xml | 2 +- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/ccsdk-app-common/pom.xml b/ccsdk-app-common/pom.xml index 48a6521..36edff4 100644 --- a/ccsdk-app-common/pom.xml +++ b/ccsdk-app-common/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.dashboard ccsdk-app-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.dashboard ccsdk-app-common - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT jar ONAP Operations Manager Dashboard common CCSDK Dashboard common Java code 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 deactivated; /** Map that stores the inputs for a Blueprint */ - private final Map blueprintInputs; + private Map blueprintInputs; /** Description of a blueprint */ - private final String blueprintDescription; + private String blueprintDescription; /** internal role based setting */ private Optional 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);*/ } } diff --git a/ccsdk-app-os/pom.xml b/ccsdk-app-os/pom.xml index f0764d4..3e5cd61 100644 --- a/ccsdk-app-os/pom.xml +++ b/ccsdk-app-os/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.dashboard ccsdk-app-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.dashboard ccsdk-app-os - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT war ONAP Operations Manager Dashboard app CCSDK Dashboard Web Application for external release diff --git a/ccsdk-app-overlay/pom.xml b/ccsdk-app-overlay/pom.xml index f6177be..a8c989f 100644 --- a/ccsdk-app-overlay/pom.xml +++ b/ccsdk-app-overlay/pom.xml @@ -6,12 +6,12 @@ org.onap.ccsdk.dashboard ccsdk-app-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.ccsdk.dashboard ccsdk-app-overlay - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT war ONAP Operations Manager Dashboard overlay CCSDK Dashboard web resources diff --git a/pom.xml b/pom.xml index 903095a..f8a605c 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ org.onap.ccsdk.dashboard ccsdk-app-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT pom ccsdk-dashboard -- cgit 1.2.3-korg