aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib
diff options
context:
space:
mode:
authorshrikantawachar <shrikant.awachar@amdocs.com>2018-02-28 17:48:04 +0530
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-02-28 14:27:41 +0000
commita370bbd083a9bcfb74f18f48d3b36be3fb4026c2 (patch)
tree60daa44b66e12be95a5406eac9aa1439769d8403 /openecomp-be/lib/openecomp-sdc-vendor-software-product-lib
parentae7384a8dadee748c4d4890d51a49b191e3f92d6 (diff)
Healing for enforcing HEAT validation
Healing implementation for enforcing HEAT validation after upload. Change-Id: I56614245d52a26d570cf2a4548057b9025e1f5cc Issue-ID: SDC-1057 Signed-off-by: shrikantawachar <shrikant.awachar@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-vendor-software-product-lib')
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateCandidateDaoZusammenImpl.java2
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateDaoZusammenImpl.java2
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/VspZusammenUtil.java13
3 files changed, 2 insertions, 15 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateCandidateDaoZusammenImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateCandidateDaoZusammenImpl.java
index bf592e2169..22fe1dd98c 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateCandidateDaoZusammenImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateCandidateDaoZusammenImpl.java
@@ -271,7 +271,7 @@ public class OrchestrationTemplateCandidateDaoZusammenImpl
Optional<Element> element = zusammenAdaptor.getElementByName(context, elementContext, null,
ElementType.OrchestrationTemplateCandidate.name());
- if (element.isPresent() && !VspZusammenUtil.isEmpty(element.get().getData())) {
+ if (element.isPresent() && !VspZusammenUtil.hasEmptyData(element.get().getData())) {
return Optional.of(new String(FileUtils.toByteArray(element.get().getData())));
}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateDaoZusammenImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateDaoZusammenImpl.java
index 3b3cdfead3..26280ecafa 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateDaoZusammenImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateDaoZusammenImpl.java
@@ -187,7 +187,7 @@ public class OrchestrationTemplateDaoZusammenImpl implements OrchestrationTempla
orchestrationTemplateElement.get().getElementId(),
ElementType.OrchestrationTemplateStructure.name());
if (orchestrationTemplateStructureElement.isPresent() &&
- !VspZusammenUtil.isEmpty(orchestrationTemplateStructureElement.get().getData())) {
+ !VspZusammenUtil.hasEmptyData(orchestrationTemplateStructureElement.get().getData())) {
return Optional.of(new String(
FileUtils.toByteArray(orchestrationTemplateStructureElement.get().getData())));
}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/VspZusammenUtil.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/VspZusammenUtil.java
index 09fd948030..d096b35d0d 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/VspZusammenUtil.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/VspZusammenUtil.java
@@ -30,19 +30,6 @@ class VspZusammenUtil {
return head;
}
- static boolean isEmpty(InputStream elementData) {
- byte[] byteElementData;
- if (Objects.isNull(elementData)) {
- return true;
- }
- try {
- byteElementData = IOUtils.toByteArray(elementData);
- } catch (IOException e) {
- return false;
- }
- return ArrayUtils.isEmpty(byteElementData);
- }
-
static boolean hasEmptyData(InputStream elementData) {
String EMPTY_DATA = "{}";
byte[] byteElementData;