Some updates for adding codes to ves message
Change-Id: I9a592c6742664a03e02ac851d15b7f82bfec989b
diff --git a/config/config.properties b/config/config.properties
index 2c4a4c5..ce035c3 100644
--- a/config/config.properties
+++ b/config/config.properties
@@ -4,3 +4,6 @@
kafka_address=kafka.voltha.svc.cluster.local
kafka_port=9092
kafka_topic=voltha.alarms
+
+co_id=001
+pod_id=001
diff --git a/src/main/java/config/Config.java b/src/main/java/config/Config.java
index 3e520e3..ec27cfa 100644
--- a/src/main/java/config/Config.java
+++ b/src/main/java/config/Config.java
@@ -65,4 +65,12 @@
public static String getKafkaTopic() {
return get("kafka_topic");
}
+
+ public static String getCoId() {
+ return get("co_id");
+ }
+
+ public static String getPodId() {
+ return get("pod_id");
+ }
}
diff --git a/src/main/java/ves/VesAgent.java b/src/main/java/ves/VesAgent.java
index a9a723d..bea964d 100644
--- a/src/main/java/ves/VesAgent.java
+++ b/src/main/java/ves/VesAgent.java
@@ -51,7 +51,6 @@
mapper = new VesVolthaMapper();
AgentMain.evel_initialize("http://"+Config.getVesAddress(),
Integer.parseInt(Config.getVesPort()),
- // "http://1.2.3.4", 8080,
//"/vendor_event_listener","/example_vnf",
null,null,
"will",
@@ -77,7 +76,7 @@
String severity = message.getSeverity();
String state = message.getState();
String resourceId = message.getResourceId();
-
+
EVEL_SEVERITIES vesSeverity = mapSeverity(severity);
EVEL_SOURCE_TYPES vesType = mapType(type);
EvelFault flt = new EvelFault(
@@ -91,6 +90,8 @@
EVEL_VF_STATUSES.EVEL_VF_STATUS_ACTIVE);
flt.evel_fault_addl_info_add("voltha", json);
flt.evel_fault_addl_info_add("state", state);
+ flt.evel_fault_addl_info_add("co_id", Config.getCoId());
+ flt.evel_fault_addl_info_add("pod_id", Config.getPodId());
flt.evel_fault_addl_info_add("resourceId", resourceId);
flt.evel_fault_category_set(category);