SDC changes for adding helm
Issue-ID: REQ-341
Signed-off-by: Sithara Nambiar <sitharav.aredath@huawei.com>
Change-Id: I4721f6e8e2690dc5f7c10bb7b1b2f53ec5f318c7
diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb
index d7a2d66..830ba40 100644
--- a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb
+++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb
@@ -206,6 +206,15 @@
- PNF
acceptedTypes:
- zip
+ - type: HELM
+ categories:
+ - DEPLOYMENT
+ componentTypes:
+ - SERVICE
+ - RESOURCE
+ resourceTypes: *allResourceTypes
+ acceptedTypes:
+ - tgz
- type: YANG_XML
categories:
- DEPLOYMENT
diff --git a/catalog-be/src/main/resources/config/configuration.yaml b/catalog-be/src/main/resources/config/configuration.yaml
index 3e34e21..ab89d8f 100644
--- a/catalog-be/src/main/resources/config/configuration.yaml
+++ b/catalog-be/src/main/resources/config/configuration.yaml
@@ -301,6 +301,9 @@
CONTROLLER_BLUEPRINT_ARCHIVE:
acceptedTypes:
- zip
+ HELM:
+ acceptedTypes:
+ - tgz
YANG_XML:
acceptedTypes:
- xml
@@ -498,6 +501,10 @@
validForResourceTypes:
- VF
- PNF
+ HELM:
+ acceptedTypes:
+ - tgz
+ validForResourceTypes: *allResourceTypes
CONTROLLER_BLUEPRINT_ARCHIVE:
acceptedTypes:
- zip
diff --git a/catalog-be/src/test/resources/config/catalog-be/configuration.yaml b/catalog-be/src/test/resources/config/catalog-be/configuration.yaml
index 0065d7b..bf6176f 100644
--- a/catalog-be/src/test/resources/config/catalog-be/configuration.yaml
+++ b/catalog-be/src/test/resources/config/catalog-be/configuration.yaml
@@ -566,6 +566,15 @@
- PNF
acceptedTypes:
- zip
+ - type: HELM
+ categories:
+ - DEPLOYMENT
+ componentTypes:
+ - SERVICE
+ - RESOURCE
+ resourceTypes: *allResourceTypes
+ acceptedTypes:
+ - tgz
- type: YANG_XML
categories:
- DEPLOYMENT
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java b/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java
index 94d9a8e..6a8b405 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java
@@ -44,6 +44,7 @@
CHEF("CHEF"),
CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT("CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT"),
CONTROLLER_BLUEPRINT_ARCHIVE("CONTROLLER_BLUEPRINT_ARCHIVE"),
+ HELM("HELM"),
DCAE_DOC("DCAE_DOC"),
DCAE_EVENT("DCAE_EVENT"),
DCAE_INVENTORY_BLUEPRINT("DCAE_INVENTORY_BLUEPRINT"),
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/FileData.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/FileData.java
index 2640523..8b4eebd 100644
--- a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/FileData.java
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/FileData.java
@@ -95,6 +95,7 @@
VF_LICENSE("VF_LICENSE"),
CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT("CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT"),
CONTROLLER_BLUEPRINT_ARCHIVE("CONTROLLER_BLUEPRINT_ARCHIVE"),
+ HELM("HELM"),
OTHER("OTHER"),
PNF_SW_INFORMATION("PNF_SW_INFORMATION");
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 cac8462..539e98d 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
@@ -41,6 +41,7 @@
private static final String[][] CLOUD_SPECIFIC_KEY_WORDS = {{"k8s", "azure", "aws"}, /* cloud specific technology */
{"charts", "day0", "configtemplate"} /*cloud specific sub type*/};
private static final String CONTROLLER_BLUEPRINT_ARCHIVE_FIXED_KEY_WORD = "CBA";
+ private static final String HELM_KEY_WORD = "HELM";
@Override
public Optional<ManifestContent> createManifest(
@@ -155,6 +156,10 @@
return artifact.toUpperCase().contains(CONTROLLER_BLUEPRINT_ARCHIVE_FIXED_KEY_WORD);
}
+ private boolean isHelm(String artifact) {
+ return artifact.toUpperCase().contains(HELM_KEY_WORD);
+ }
+
private void addArtifactsToManifestFileDataList(
FilesDataStructure filesDataStructure, List<FileData> fileDataList) {
Collection<String> forArtifacts = CollectionUtils
@@ -165,7 +170,10 @@
fileDataList.add(createBaseFileData(FileData.Type.CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT, artifact));
} else if (isControllerBlueprintArchive(artifact)) {
fileDataList.add(createBaseFileData(FileData.Type.CONTROLLER_BLUEPRINT_ARCHIVE, artifact));
- } else {
+ } else if (isHelm(artifact)) {
+ fileDataList.add(createBaseFileData(FileData.Type.HELM, artifact));
+ }
+ else {
fileDataList.add(createBaseFileData(FileData.Type.OTHER, artifact));
}
}