summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-tosca-lib/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib/src/main')
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java14
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java1
2 files changed, 15 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java
index 39240ebe05..c66a5ba13b 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java
@@ -1025,6 +1025,20 @@ public class DataModelUtil {
.getProperties();
}
+ public static void addNodeTemplateProperty(NodeTemplate nodeTemplate,
+ String propertyKey,
+ Object propertyValue) {
+ if (Objects.isNull(nodeTemplate)) {
+ return;
+ }
+
+ if(MapUtils.isEmpty(nodeTemplate.getProperties())) {
+ nodeTemplate.setProperties(new HashMap<>());
+ }
+
+ nodeTemplate.getProperties().put(propertyKey, propertyValue);
+ }
+
/**
* Gets substitution mappings in a service template.
*
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java
index 5d4b7dfa00..af0d236b11 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java
@@ -55,6 +55,7 @@ public class ToscaConstants {
public static final String SERVICE_TEMPLATE_FILTER_PROPERTY_NAME = "service_template_filter";
public static final String SUBSTITUTE_SERVICE_TEMPLATE_PROPERTY_NAME =
"substitute_service_template";
+ public static final String SERVICE_TEMPLATE_FILTER_COUNT = "service_template_filter_count";
public static final String COUNT_PROPERTY_NAME = "count";
public static final String MANDATORY_PROPERTY_NAME = "mandatory";
public static final String INDEX_VALUE_PROPERTY_NAME = "index_value";