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
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 8f35b60..02dcb35 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 @@
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 93d09a2..2b26022 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 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 4d815e3..4ad6c31 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 String getPath() {
return String.format("Artifacts/%s/%s", type, location);
}
+
+
+ public boolean isValid() {
+ return StringUtils.isNotBlank(location) && StringUtils.isNotBlank(type);
+ }
}
diff --git a/common-be/src/main/resources/config/nonManoConfig.yaml b/common-be/src/main/resources/config/nonManoConfig.yaml
index 4ace330..04485a4 100644
--- a/common-be/src/main/resources/config/nonManoConfig.yaml
+++ b/common-be/src/main/resources/config/nonManoConfig.yaml
@@ -19,4 +19,7 @@
type: Informational
onap_pnf_sw_information:
location: PNF_SW_INFORMATION
- type: Informational
\ No newline at end of file
+ type: Informational
+ onap_cnf_helm:
+ location:
+ type: