summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org
diff options
context:
space:
mode:
authorojasdubey <ojas.dubey@amdocs.com>2018-03-27 17:03:51 +0530
committerOren Kleks <orenkle@amdocs.com>2018-03-29 05:40:56 +0000
commit707adfa57f63b49519badddbf72e411485269c37 (patch)
treeba4fc46a73b092b283fad92f1983dea55e6a199c /openecomp-be/lib/openecomp-tosca-lib/src/main/java/org
parentff31b1eea7a5aec585fbbdf5004d2c1d93f4437e (diff)
VLAN tagging - Support Pattern 1C2
1. Pattern 1C2 vlan tagging code 2. Count property handling 3. Added tests and updated existing test data Change-Id: Idef33b142d415e1c0a9663497eed621f35c2393b Issue-ID: SDC-1174 Signed-off-by: ojasdubey <ojas.dubey@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib/src/main/java/org')
-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";