SDC changes for adding helm 02/111302/1
authorSithara Nambiar <sitharav.aredath@huawei.com>
Sun, 16 Aug 2020 16:58:48 +0000 (22:28 +0530)
committerSithara Nambiar <sitharav.aredath@huawei.com>
Sun, 16 Aug 2020 16:58:48 +0000 (22:28 +0530)
Issue-ID: REQ-341

Signed-off-by: Sithara Nambiar <sitharav.aredath@huawei.com>
Change-Id: I4721f6e8e2690dc5f7c10bb7b1b2f53ec5f318c7

catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb
catalog-be/src/main/resources/config/configuration.yaml
catalog-be/src/test/resources/config/catalog-be/configuration.yaml
common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java
openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/FileData.java
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 d7a2d66..830ba40 100644 (file)
@@ -206,6 +206,15 @@ artifacts:
       - PNF
     acceptedTypes:
       - zip
+  - type: HELM
+    categories:
+      - DEPLOYMENT
+    componentTypes:
+      - SERVICE
+      - RESOURCE
+    resourceTypes: *allResourceTypes
+    acceptedTypes:
+      - tgz
   - type: YANG_XML
     categories:
       - DEPLOYMENT
index 3e34e21..ab89d8f 100644 (file)
@@ -301,6 +301,9 @@ serviceDeploymentArtifacts:
     CONTROLLER_BLUEPRINT_ARCHIVE:
         acceptedTypes:
             - zip
+    HELM:
+        acceptedTypes:
+            - tgz
     YANG_XML:
         acceptedTypes:
             - xml
@@ -498,6 +501,10 @@ resourceDeploymentArtifacts:
         validForResourceTypes:
             - VF
             - PNF
+    HELM:
+        acceptedTypes:
+            - tgz
+        validForResourceTypes: *allResourceTypes
     CONTROLLER_BLUEPRINT_ARCHIVE:
         acceptedTypes:
             - zip
index 0065d7b..bf6176f 100644 (file)
@@ -566,6 +566,15 @@ artifacts:
       - PNF
     acceptedTypes:
       - zip
+  - type: HELM
+    categories:
+      - DEPLOYMENT
+    componentTypes:
+      - SERVICE
+      - RESOURCE
+    resourceTypes: *allResourceTypes
+    acceptedTypes:
+      - tgz
   - type: YANG_XML
     categories:
       - DEPLOYMENT
index 94d9a8e..6a8b405 100644 (file)
@@ -44,6 +44,7 @@ public enum ArtifactTypeEnum {
     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"),
index 2640523..8b4eebd 100644 (file)
@@ -95,6 +95,7 @@ public class FileData {
         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");
 
index cac8462..539e98d 100644 (file)
@@ -41,6 +41,7 @@ public class ManifestCreatorNamingConventionImpl implements ManifestCreator {
   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 @@ public class ManifestCreatorNamingConventionImpl implements ManifestCreator {
     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 @@ public class ManifestCreatorNamingConventionImpl implements ManifestCreator {
             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));
         }
       }