summaryrefslogtreecommitdiffstats
path: root/common-be/src/main/java/org
diff options
context:
space:
mode:
authoraribeiro <anderson.ribeiro@est.tech>2021-02-08 14:41:39 +0000
committerChristophe Closset <christophe.closset@intl.att.com>2021-02-22 14:15:07 +0000
commit1e12c6b9b28c49ed02ab8d2f156a6cf52cc305d7 (patch)
tree5c3f86a37a87f0b16ba91c252d918b7c081f378d /common-be/src/main/java/org
parent086406a3af88a1f77e2be783e6f458dc3c66d4ca (diff)
Add new SOL004 ETSI Validator
Support for onboarding ETSI v3.3.1 SOL004 VNF CSAR Packages with minimum CNF enhancements from 4.1.1 Issue-ID: SDC-3337 Signed-off-by: aribeiro <anderson.ribeiro@est.tech> Change-Id: I0fefb43b8462133ae82d10418c79f9e2b126defb
Diffstat (limited to 'common-be/src/main/java/org')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/config/NonManoArtifactType.java3
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/config/NonManoConfiguration.java14
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/config/NonManoFolderType.java6
3 files changed, 22 insertions, 1 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/config/NonManoArtifactType.java b/common-be/src/main/java/org/openecomp/sdc/be/config/NonManoArtifactType.java
index 8f35b60bf8..02dcb3591b 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/config/NonManoArtifactType.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/config/NonManoArtifactType.java
@@ -37,7 +37,8 @@ public enum NonManoArtifactType {
ONAP_ANSIBLE_PLAYBOOKS("onap_ansible_playbooks"),
ONAP_SCRIPTS("onap_scripts"),
ONAP_OTHERS("onap_others"),
- ONAP_SW_INFORMATION("onap_pnf_sw_information");
+ ONAP_SW_INFORMATION("onap_pnf_sw_information"),
+ ONAP_CNF_HELM("onap_cnf_helm");
private final String type;
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/config/NonManoConfiguration.java b/common-be/src/main/java/org/openecomp/sdc/be/config/NonManoConfiguration.java
index 93d09a2e7a..2b2602240a 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/config/NonManoConfiguration.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/config/NonManoConfiguration.java
@@ -19,9 +19,13 @@
package org.openecomp.sdc.be.config;
+import java.util.Collections;
+import java.util.Map.Entry;
+import java.util.stream.Collectors;
import lombok.Data;
import java.util.Map;
+import org.apache.commons.collections.MapUtils;
/**
* Represents the non-mano configuration yaml.
@@ -39,4 +43,14 @@ public class NonManoConfiguration {
public NonManoFolderType getNonManoType(final NonManoArtifactType nonManoArtifactType) {
return nonManoKeyFolderMapping.get(nonManoArtifactType.getType());
}
+
+ public Map<String, NonManoFolderType> getNonManoKeyFolderMapping() {
+ if (MapUtils.isEmpty(nonManoKeyFolderMapping)) {
+ return Collections.emptyMap();
+ }
+
+ return nonManoKeyFolderMapping.entrySet().stream()
+ .filter(entry -> entry.getValue().isValid())
+ .collect(Collectors.toMap(Entry::getKey, Entry::getValue));
+ }
}
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/config/NonManoFolderType.java b/common-be/src/main/java/org/openecomp/sdc/be/config/NonManoFolderType.java
index 4d815e3f57..4ad6c31fd5 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/config/NonManoFolderType.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/config/NonManoFolderType.java
@@ -19,6 +19,7 @@
package org.openecomp.sdc.be.config;
import lombok.Data;
+import org.apache.commons.lang.StringUtils;
@Data
public class NonManoFolderType {
@@ -32,4 +33,9 @@ public class NonManoFolderType {
public String getPath() {
return String.format("Artifacts/%s/%s", type, location);
}
+
+
+ public boolean isValid() {
+ return StringUtils.isNotBlank(location) && StringUtils.isNotBlank(type);
+ }
}