summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortang peng <tang.peng5@zte.com.cn>2018-08-24 06:14:19 +0000
committerGerrit Code Review <gerrit@onap.org>2018-08-24 06:14:19 +0000
commitd2bdc451ba7560d2462711e4d496ea7840a6dbc2 (patch)
tree98fd96d9a6d04b060e962f13138b3941abcdd55d
parent425eb3a7daf8820688a1f1d633e3021905732e82 (diff)
parent6a237c08f158ccbfdf13b44cbb62b3bcd2b97d2a (diff)
Merge "Added Service Instance ID to the CL Event"
-rw-r--r--rules/ccvnp-rule.drl10
1 files changed, 7 insertions, 3 deletions
diff --git a/rules/ccvnp-rule.drl b/rules/ccvnp-rule.drl
index e1bfc8a..9de2491 100644
--- a/rules/ccvnp-rule.drl
+++ b/rules/ccvnp-rule.drl
@@ -72,14 +72,18 @@ function Map<String, Object> getAdditionalResourceInfo(String networkId, String
Map<String, Object> ret = new HashMap<String, Object>();
- StringBuilder sb = new StringBuilder();
+ StringBuilder sbn = new StringBuilder();
+ StringBuilder sbi = new StringBuilder();
for(int i = 0; i < instances.size(); ++i) {
JSONObject o = instances.getJSONObject(i);
String name = o.getString("service-instance-name");
+ String id = o.getString("service-instance-id");
ret.put(name + ".input-parameters", o.getString("input-parameters"));
- sb.append(name).append(",");
+ sbn.append(name).append(",");
+ sbi.append(id).append(",");
}
- ret.put("service-instance.service-instance-name", sb.substring(0, sb.length() -1).toString());
+ ret.put("service-instance.service-instance-name", sbn.substring(0, sbn.length() -1).toString());
+ ret.put("service-instance.service-instance-id", sbi.substring(0, sbi.length() -1).toString());
ret.put("vserver.vserver-name", "TBD");
ret.put("globalSubscriberId", instances.getJSONObject(0).getString("globalSubscriberId"));
ret.put("serviceType", instances.getJSONObject(0).getString("serviceType"));