summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib
diff options
context:
space:
mode:
authorSithara Nambiar <sitharav.aredath@huawei.com>2020-09-29 23:10:17 +0530
committerSithara Nambiar <sitharav.aredath@huawei.com>2020-10-03 15:03:26 +0530
commitc0cd58244635c610c604066e9542058b310a706d (patch)
treec9a2c2dd6608ce153549aa3b399ab4d952c60fe7 /openecomp-be/lib/openecomp-sdc-vendor-software-product-lib
parent0fa53516c409ac136f654475c1e41c77cad9cf09 (diff)
sdc changes for identifying helm package as a vfm
Issue-ID: REQ-341 Signed-off-by: Sithara Nambiar <sitharav.aredath@huawei.com> Change-Id: Ide4736655c01dd25dae5afe1207a292a6bcd6951
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-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/candidateheat/Module.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/services/impl/filedatastructuremodule/CandidateServiceImpl.java11
-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/services/impl/filedatastructuremodule/ManifestCreatorNamingConventionImpl.java6
3 files changed, 17 insertions, 2 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/candidateheat/Module.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/candidateheat/Module.java
index d25341469f..25a004e890 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/candidateheat/Module.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-api/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/types/candidateheat/Module.java
@@ -23,6 +23,7 @@ package org.openecomp.sdc.vendorsoftwareproduct.types.candidateheat;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
+import org.openecomp.sdc.heat.datatypes.manifest.FileData;
@Getter
@Setter
@@ -35,5 +36,6 @@ public class Module {
private String env;
private String vol;
private String volEnv;
+ private FileData.Type type;
}
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/services/impl/filedatastructuremodule/CandidateServiceImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/CandidateServiceImpl.java
index 5535416838..8bae5e8193 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/CandidateServiceImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/CandidateServiceImpl.java
@@ -262,11 +262,20 @@ public class CandidateServiceImpl implements CandidateService {
if (Objects.nonNull(fileData.getType()) &&
fileData.getType().equals(FileData.Type.HEAT)) {
Module module = new Module();
+ module.setType(FileData.Type.HEAT);
module.setYaml(fileData.getFile());
module.setIsBase(fileData.getBase());
addHeatDependenciesToModule(module, fileData.getData());
structure.getModules().add(module);
- } else if (HeatFileAnalyzer.isYamlOrEnvFile(fileData.getFile()) &&
+ }else if (Objects.nonNull(fileData.getType()) &&
+ fileData.getType().equals(FileData.Type.HELM)) {
+ Module module = new Module();
+ module.setType(FileData.Type.HELM);
+ module.setYaml(fileData.getFile());
+ module.setIsBase(fileData.getBase());
+ structure.getModules().add(module);
+ }
+ else if (HeatFileAnalyzer.isYamlOrEnvFile(fileData.getFile()) &&
!FileData.Type.isArtifact(fileData.getType())) {
structure.getUnassigned().add(fileData.getFile());
} else {
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/services/impl/filedatastructuremodule/ManifestCreatorNamingConventionImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/ManifestCreatorNamingConventionImpl.java
index 539e98df5a..3f061b059c 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/ManifestCreatorNamingConventionImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/ManifestCreatorNamingConventionImpl.java
@@ -184,7 +184,11 @@ public class ManifestCreatorNamingConventionImpl implements ManifestCreator {
FilesDataStructure filesDataStructure, List<FileData> fileDataList) {
if (CollectionUtils.isNotEmpty(filesDataStructure.getModules())) {
for (Module module : filesDataStructure.getModules()) {
- FileData fileData = createBaseFileData(FileData.Type.HEAT, module.getYaml());
+ FileData.Type type = module.getType();
+ if (type == null) {
+ type = FileData.Type.HEAT;
+ }
+ FileData fileData = createBaseFileData(type, module.getYaml());
fileData.setBase(module.getIsBase());
addEnv(module, fileData);
addVolume(module, fileData);