aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-05-31 16:51:00 +0000
committerGerrit Code Review <gerrit@onap.org>2019-05-31 16:51:00 +0000
commitd4b09792fff9dc6f84c5cc86cf443aceab3cf193 (patch)
tree5bb177b6a1925a679db39c5c96b371328f8293e0
parent2097de57c95002d6f1a9f3e5f4e5398ab6e19e94 (diff)
parenta737222ca2fa0fcf87c2062c52fca8577aab87b9 (diff)
Merge "Remove oof_directives from user_directives BB path" into dublin
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java18
1 files changed, 13 insertions, 5 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
index 94e95687db..b0ba0595d5 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
@@ -205,14 +205,22 @@ public class VnfAdapterVfModuleObjectMapper {
private void buildDirectivesParamFromMap(Map<String, Object> paramsMap, String directive,
Map<String, Object> srcMap) {
StringBuilder directives = new StringBuilder();
- if (srcMap.size() > 0) {
+ int no_directives_size = 0;
+ if (directives.equals(MsoMulticloudUtils.USER_DIRECTIVES)
+ && srcMap.containsKey(MsoMulticloudUtils.OOF_DIRECTIVES)) {
+ no_directives_size = 1;
+ }
+ if (srcMap.size() > no_directives_size) {
directives.append("{ \"attributes\": [ ");
int i = 0;
for (String attributeName : srcMap.keySet()) {
- directives.append(new AttributeNameValue(attributeName, srcMap.get(attributeName).toString()));
- if (i < (srcMap.size() - 1))
- directives.append(", ");
- i++;
+ if (!(MsoMulticloudUtils.USER_DIRECTIVES.equals(directives)
+ && attributeName.equals(MsoMulticloudUtils.OOF_DIRECTIVES))) {
+ directives.append(new AttributeNameValue(attributeName, srcMap.get(attributeName).toString()));
+ if (i < (srcMap.size() - 1 + no_directives_size))
+ directives.append(", ");
+ i++;
+ }
}
directives.append("] }");
} else {