From 6a237c08f158ccbfdf13b44cbb62b3bcd2b97d2a Mon Sep 17 00:00:00 2001 From: GuangrongFu Date: Fri, 24 Aug 2018 14:05:41 +0800 Subject: Added Service Instance ID to the CL Event Change-Id: Ibed23ac96483f97e0b93384716925806bf672d5b Issue-ID: HOLMES-162 Signed-off-by: GuangrongFu --- rules/ccvnp-rule.drl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'rules') 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 getAdditionalResourceInfo(String networkId, String Map ret = new HashMap(); - 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")); -- cgit 1.2.3-korg