summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be/src/main/java/org')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/YamlTemplateParsingHandler.java16
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportManager.java8
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaUtils.java6
3 files changed, 21 insertions, 9 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/YamlTemplateParsingHandler.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/YamlTemplateParsingHandler.java
index 9636885190..58f46bcfa7 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/YamlTemplateParsingHandler.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/YamlTemplateParsingHandler.java
@@ -320,7 +320,7 @@ public class YamlTemplateParsingHandler {
.left()
.on(err -> logGroupsNotFound(fileName));
- if (MapUtils.isNotEmpty(foundGroups)) {
+ if (MapUtils.isNotEmpty(foundGroups) && matcheKey(foundGroups)) {
Map<String, GroupDefinition> groups = foundGroups
.entrySet()
.stream()
@@ -336,6 +336,20 @@ public class YamlTemplateParsingHandler {
return new HashMap<>();
}
+ private boolean matcheKey(Map<String, Object> foundGroups){
+ if (foundGroups!=null && !foundGroups.isEmpty()) {
+ for (Map.Entry<String, Object> stringObjectEntry : foundGroups.entrySet()) {
+ String key = stringObjectEntry.getKey();
+ if (key.contains("group")) {
+ if (foundGroups.get(key) instanceof Map) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
private Map<String, Object> logGroupsNotFound(String fileName) {
log.debug("#logGroupsNotFound - Groups were not found in the yaml template {}.", fileName);
return new HashMap<>();
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportManager.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportManager.java
index 8e7c1e852c..fa079d2f65 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportManager.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportManager.java
@@ -92,14 +92,6 @@ public class ServiceImportManager {
}
}
- public void populateRealServiceMetadata(UploadServiceInfo serviceMetaData, Service service) {
- if (service != null && serviceMetaData != null) {
- service.setTags(serviceMetaData.getTags());
- service.setContactId(serviceMetaData.getContactId());
- service.setName(serviceMetaData.getName());
- }
- }
-
public synchronized void init(ServletContext servletContext) {
if (this.servletContext == null) {
this.servletContext = servletContext;
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaUtils.java b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaUtils.java
index 5b03b6378e..38e60617c4 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaUtils.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaUtils.java
@@ -41,6 +41,12 @@ public class ToscaUtils {
if (ResourceTypeEnum.CVFC == resourceType ) {
return false;
}
+ if (component.getComponentMetadataDefinition()!=null && component.getComponentMetadataDefinition().getMetadataDataDefinition()!=null
+ && component.getComponentMetadataDefinition().getMetadataDataDefinition().getDescription()!=null){
+ if(component.getComponentMetadataDefinition().getMetadataDataDefinition().getDescription().equalsIgnoreCase("Nested VF in service")){
+ return false;
+ }
+ }
}
return true;
}