aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java/org/openecomp
diff options
context:
space:
mode:
authordavsad <david.sadlier@est.tech>2021-03-29 14:20:02 +0100
committerDavid Sadlier <david.sadlier@est.tech>2021-03-29 18:17:50 +0000
commitf27bba9ad6e8afe8306cdcc4af4f595b1cfff49d (patch)
tree0475f7a140790d3ab03048ffbfe79ce5fde4e457 /catalog-be/src/main/java/org/openecomp
parentda41c43ddbb7f688e128bf369d5a9548f807f5bb (diff)
Fix restricting valid values for ONAP service metadata
Issue-ID: SDC-3539 Signed-off-by: davsad <david.sadlier@est.tech> Change-Id: I10658e29bc986f9fd9c5d5d6ce34d0bd02d70e11
Diffstat (limited to 'catalog-be/src/main/java/org/openecomp')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java
index efb3f49d03..10d2130792 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java
@@ -151,6 +151,7 @@ public class ToscaExportHandler {
private static final String FAILED_TO_GET_DEFAULT_IMPORTS_CONFIGURATION = "convertToToscaTemplate - failed to get Default Imports section from configuration";
private static final String NOT_SUPPORTED_COMPONENT_TYPE = "Not supported component type {}";
private static final String NATIVE_ROOT = "tosca.nodes.Root";
+ private static final List<String> EXCLUDED_CATEGORY_SPECIFIC_METADATA = List.of("Service Function", "Service Role", "Naming Policy", "Service Type");
private static final YamlUtil yamlUtil = new YamlUtil();
private ApplicationDataTypeCache dataTypeCache;
private ToscaOperationFacade toscaOperationFacade;
@@ -482,7 +483,8 @@ public class ToscaExportHandler {
log.debug(NOT_SUPPORTED_COMPONENT_TYPE, component.getComponentType());
}
for (final String key : component.getCategorySpecificMetadata().keySet()) {
- toscaMetadata.put(key, component.getCategorySpecificMetadata().get(key));
+ if (!EXCLUDED_CATEGORY_SPECIFIC_METADATA.contains(key))
+ toscaMetadata.put(key, component.getCategorySpecificMetadata().get(key));
}
return toscaMetadata;
}