summaryrefslogtreecommitdiffstats
path: root/asdc-controller/src
diff options
context:
space:
mode:
authorzm330 <zhangminyj@chinamobile.com>2020-10-22 15:49:54 +0800
committerzm330 <zhangminyj@chinamobile.com>2020-10-22 15:50:11 +0800
commit506cd385cb845fa334856c0e236a79b058c8eb35 (patch)
tree511df3c519bc4904dfb8bed192b26944423a3218 /asdc-controller/src
parent9843a950bc17b32189ebbb8668079c611f727bc3 (diff)
fix template parsing problems
Issue-ID: SO-2963 Signed-off-by: zm330 <zhangminyj@chinamobile.com> Change-Id: I4eac0ddc5909076c4b83a7866b9a14a69e7b32c7
Diffstat (limited to 'asdc-controller/src')
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java2
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java8
2 files changed, 7 insertions, 3 deletions
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java
index 44ea2a25a2..02b1df79dd 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java
@@ -978,7 +978,7 @@ public class ASDCController {
String artifactContent = null;
List<IArtifactInfo> serviceArtifacts = iNotif.getServiceArtifacts();
Optional<IArtifactInfo> artifactOpt = serviceArtifacts.stream()
- .filter(e -> e.getArtifactType().equalsIgnoreCase("OTHER")).findFirst();
+ .filter(e -> e.getArtifactType().equalsIgnoreCase("WORKFLOW")).findFirst();
if (artifactOpt.isPresent()) {
IArtifactInfo artifactInfo = artifactOpt.get();
logger.debug("Ready to parse this serviceArtifactUUID: " + artifactInfo.getArtifactUUID());
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
index 49fef1d3f0..d57b305902 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
@@ -2913,15 +2913,19 @@ public class ToscaResourceInstaller {
}
private void createServiceArtifact(Service service, VfResourceStructure vfResourceStruct, String artifactContent) {
+ if (null == vfResourceStruct) {
+ return;
+ }
List<ServiceArtifact> serviceArtifactList = new ArrayList<>();
ServiceArtifact serviceArtifact;
List<IArtifactInfo> artifactInfoList = vfResourceStruct.getNotification().getServiceArtifacts().stream()
- .filter(artifact -> artifact.getArtifactType().equalsIgnoreCase("OTHER")).collect(Collectors.toList());
+ .filter(artifact -> artifact.getArtifactType().equalsIgnoreCase("WORKFLOW"))
+ .collect(Collectors.toList());
for (IArtifactInfo artifactInfo : artifactInfoList) {
serviceArtifact = new ServiceArtifact();
serviceArtifact.setArtifactUUID(artifactInfo.getArtifactUUID());
serviceArtifact.setName(artifactInfo.getArtifactName());
- serviceArtifact.setType(artifactInfo.getArtifactType());
+ serviceArtifact.setType("OTHER");
serviceArtifact.setVersion(artifactInfo.getArtifactVersion());
serviceArtifact.setDescription(artifactInfo.getArtifactDescription());
serviceArtifact.setChecksum(artifactInfo.getArtifactChecksum());