Oof_directives - when populated with a json
string, breaks the parsing of the user_directives.
Since it is not needed in the user_directives,
remove it.
Change-Id: I0e2c3deef8266df52ac73b95209843ac31f986ef
Issue-ID: SO-1939
Signed-off-by: Eric Multanen <eric.w.multanen@intel.com>
String vnfKey = entry.getKey()
String vnfValue = entry.getValue()
paramsMap.put("$vnfKey", "$vnfValue")
String vnfKey = entry.getKey()
String vnfValue = entry.getValue()
paramsMap.put("$vnfKey", "$vnfValue")
- if (pcnt > 0) {
- userDirectivesBuilder.append(",")
+ if (!"oof_directives".equals(vnfKey)) {
+ if (pcnt > 0) {
+ userDirectivesBuilder.append(",")
+ }
+ pcnt++
+ userDirectivesBuilder.append("{\"attribute_name\":\"${vnfKey}\",")
+ userDirectivesBuilder.append("\"attribute_value\":\"${vnfValue}\"}")
- pcnt++
- userDirectivesBuilder.append("{\"attribute_name\":\"${vnfKey}\",")
- userDirectivesBuilder.append("\"attribute_value\":\"${vnfValue}\"}")
}
if (pcnt > 0) {
userDirectives = userDirectivesBuilder.append("]}").toString()
}
if (pcnt > 0) {
userDirectives = userDirectivesBuilder.append("]}").toString()