summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-06-11 14:22:02 +0300
committerMichael Lando <ml636r@att.com>2017-06-11 17:48:32 +0300
commitb3d4898d9e8452ea0b8d848c048e712d43b8d9a3 (patch)
tree0609319203be13f6c29ccbe24cb39c9d64f90095 /openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java
parentaf9929df75604ce407d0ca542b200630164e0ae6 (diff)
[SDC-29] rebase continue work to align source
Change-Id: I218f1c5ee23fb2c8314f1c70921d3ad8682c10f4 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java')
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/external/artifact/ExternalArtifactEnricher.java6
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/external/artifact/ProcessArtifactEnricher.java5
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/AbstractSubstituteToscaEnricher.java1
3 files changed, 9 insertions, 3 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/external/artifact/ExternalArtifactEnricher.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/external/artifact/ExternalArtifactEnricher.java
index 3c27a0fac8..fb0622cd67 100644
--- a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/external/artifact/ExternalArtifactEnricher.java
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/external/artifact/ExternalArtifactEnricher.java
@@ -26,6 +26,8 @@ import org.openecomp.sdc.common.utils.CommonUtil;
import org.openecomp.sdc.datatypes.error.ErrorMessage;
import org.openecomp.sdc.enrichment.inter.Enricher;
import org.openecomp.sdc.enrichment.inter.ExternalArtifactEnricherInterface;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
import java.io.InputStream;
@@ -43,6 +45,7 @@ public class ExternalArtifactEnricher extends Enricher {
"An Error has occured during enrichment of external artifacts ";
private static Collection<String> implementingClasses =
getExternalArtifactEnrichedImplClassesList();
+ private static Logger logger = LoggerFactory.getLogger(ExternalArtifactEnricher.class);
private static Collection<String> getExternalArtifactEnrichedImplClassesList() {
InputStream externalArtifactEnrichConfigurationJson =
@@ -68,7 +71,8 @@ public class ExternalArtifactEnricher extends Enricher {
externalArtifactEnricherInstance.enrich(this.data);
}
} catch (Exception e) {
- e.printStackTrace(); //// FIXME: 29-Nov-16
+ e.printStackTrace();
+ logger.error(e.getMessage());
}
mdcDataDebugMessage.debugExitMessage(null, null);
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/external/artifact/ProcessArtifactEnricher.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/external/artifact/ProcessArtifactEnricher.java
index b4a2815d69..a5f6529bbb 100644
--- a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/external/artifact/ProcessArtifactEnricher.java
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/external/artifact/ProcessArtifactEnricher.java
@@ -80,14 +80,15 @@ public class ProcessArtifactEnricher implements ExternalArtifactEnricherInterfac
componentId, entity.getId());*/
processes.stream()
- .filter(entity -> entity.getType().equals(ProcessType.Lifecycle_Operations))
.forEach(entity -> {
ProcessEntity artifactEntity = new ProcessEntity(vspId, version,
componentId, entity.getId());
ProcessEntity artifactProcessEntity = getProcessDao().get(artifactEntity);
//ProcessArtifactEntity artifact = getProcessArtifactDao().get(artifactEntity);
- if (artifactProcessEntity != null) {
+ if (artifactProcessEntity != null && ProcessType.Lifecycle_Operations.equals(
+ artifactProcessEntity.getType())
+ && artifactProcessEntity.getArtifactName() != null ) {
String componentName = componentEntity.getComponentCompositionData().getName();
String path = componentName + File.separator
+ ArtifactCategory.DEPLOYMENT.getDisplayName() + File.separator
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/AbstractSubstituteToscaEnricher.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/AbstractSubstituteToscaEnricher.java
index d75c83f24c..93c4e67fc9 100644
--- a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/AbstractSubstituteToscaEnricher.java
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/main/java/org/openecomp/sdc/enrichment/impl/tosca/AbstractSubstituteToscaEnricher.java
@@ -59,6 +59,7 @@ public class AbstractSubstituteToscaEnricher {
final Map<String, NodeTemplate> node_templates =
serviceTemplate.getTopology_template().getNode_templates();
+ if(node_templates == null) return errors;
final Map<String, List<String>> componentDisplayNameToNodeTempalteIds =
populateAllNodeTemplateIdForComponent(node_templates, serviceTemplate, toscaModel);