From 59acb467dc9c5aac97303e5c3b1d454b37dd3276 Mon Sep 17 00:00:00 2001 From: wangguirong Date: Thu, 28 Sep 2017 16:03:18 +0800 Subject: Modify VESJavaLibrary Change-Id: I24d38bf697e13f2da063f72d642eb2fac835fc93 Issue-Id:VFC-461 Signed-off-by: wangguirong --- ems/boco/lib/VESLibrary.jar | Bin 768880 -> 768920 bytes ems/boco/lib/dependencies-all.jar | Bin 665605 -> 665605 bytes .../northbound/client/NorthMessageMgr.java | 16 +++++++--------- .../src/main/assembly/lib/VESLibrary.jar | Bin 768880 -> 768920 bytes .../src/main/assembly/lib/dependencies-all.jar | Bin 665605 -> 665605 bytes 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/ems/boco/lib/VESLibrary.jar b/ems/boco/lib/VESLibrary.jar index ef9de52..0bad86f 100644 Binary files a/ems/boco/lib/VESLibrary.jar and b/ems/boco/lib/VESLibrary.jar differ diff --git a/ems/boco/lib/dependencies-all.jar b/ems/boco/lib/dependencies-all.jar index 725a4be..ac153c5 100644 Binary files a/ems/boco/lib/dependencies-all.jar and b/ems/boco/lib/dependencies-all.jar differ diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/client/NorthMessageMgr.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/client/NorthMessageMgr.java index 83a785f..8931d99 100644 --- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/client/NorthMessageMgr.java +++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/client/NorthMessageMgr.java @@ -40,7 +40,6 @@ import evel_javalibrary.att.com.EvelFault; import evel_javalibrary.att.com.EvelFault.EVEL_SEVERITIES; import evel_javalibrary.att.com.EvelFault.EVEL_SOURCE_TYPES; import evel_javalibrary.att.com.EvelFault.EVEL_VF_STATUSES; -import evel_javalibrary.att.com.EvelHeader.PRIORITIES; import evel_javalibrary.att.com.EvelHeader; import evel_javalibrary.att.com.EvelScalingMeasurement; @@ -212,6 +211,8 @@ public class NorthMessageMgr extends DriverThread{ String neUID = reagobj.getString("neUID"); flt.evel_reporting_entity_id_set(neUID.substring(0,9));// flt.evel_reporting_entity_name_set(neUID.substring(0,9)); + flt.evel_header_set_sourceid(true, reagobj.getString("neName")); + flt.evel_header_set_source_name(reagobj.getString("objectName")); flt.evel_header_set_priority(pri); for(String key : reagobj.keySet()){ @@ -295,17 +296,11 @@ public class NorthMessageMgr extends DriverThread{ String evid = reMap.get("startTime")+reMap.get("ObjectType")+reMap.get("rmUID"); int Period = Integer.parseInt(reMap.get("Period")!=null?reMap.get("Period"):"15"); EvelScalingMeasurement sm = new EvelScalingMeasurement(Period,evname, evid); - JsonObject objJson = null; - JsonBuilderFactory factory = null; - factory = Json.createBuilderFactory(null); - JsonObjectBuilder jsonObjectBuilder = factory.createObjectBuilder(); for(String key : reMap.keySet()){ - jsonObjectBuilder = jsonObjectBuilder.add(key, reMap.get(key)); + sm.evel_measurement_custom_measurement_add(reMap.get("ElementType"), key, reMap.get(key)); } - objJson = jsonObjectBuilder.build(); - sm.evel_measurement_add_jsonobj(objJson); sm.evel_nfcnamingcode_set(""); sm.evel_nfnamingcode_set(""); @@ -313,7 +308,10 @@ public class NorthMessageMgr extends DriverThread{ String rmUID = reMap.get("rmUID"); sm.evel_reporting_entity_id_set(rmUID.substring(0,9));// String Dn = reMap.get("Dn"); - sm.evel_reporting_entity_name_set(Dn); + sm.evel_reporting_entity_name_set(Dn.substring(0, Dn != null && Dn.indexOf(";")>0?Dn.indexOf(";"):Dn.length())); + sm.evel_header_set_sourceid(true, reMap.get("rmUID")); + sm.evel_header_set_source_name(reMap.get("rmUID")); + sm.evel_header_set_priority(EvelHeader.PRIORITIES.EVEL_PRIORITY_NORMAL); return sm; } diff --git a/ems/microservice-standalone/src/main/assembly/lib/VESLibrary.jar b/ems/microservice-standalone/src/main/assembly/lib/VESLibrary.jar index ef9de52..0bad86f 100644 Binary files a/ems/microservice-standalone/src/main/assembly/lib/VESLibrary.jar and b/ems/microservice-standalone/src/main/assembly/lib/VESLibrary.jar differ diff --git a/ems/microservice-standalone/src/main/assembly/lib/dependencies-all.jar b/ems/microservice-standalone/src/main/assembly/lib/dependencies-all.jar index 725a4be..ac153c5 100644 Binary files a/ems/microservice-standalone/src/main/assembly/lib/dependencies-all.jar and b/ems/microservice-standalone/src/main/assembly/lib/dependencies-all.jar differ -- cgit 1.2.3-korg