From 5e4774768b81389ac33c9d5c50ccdc0c056d8f42 Mon Sep 17 00:00:00 2001 From: David Sullivan Date: Tue, 25 Jun 2019 13:38:42 -0400 Subject: [PATCH] snmp traps missing for customer logs The Customer Log Table was removed in a prior change and the customer log MIB object identifiers are no longer available. This change replaces the customer log identifiers with the event identifiers. Change-Id: Ia8a9c5250744f4206d57c309d26c9398ff01fcba Closes-Bug: 1828453 Signed-off-by: David Sullivan --- fm-common/sources/fmSnmpConstants.h | 16 ++++++++-------- fm-common/sources/fmSnmpUtils.cpp | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/fm-common/sources/fmSnmpConstants.h b/fm-common/sources/fmSnmpConstants.h index 061d11c2..452b63ec 100644 --- a/fm-common/sources/fmSnmpConstants.h +++ b/fm-common/sources/fmSnmpConstants.h @@ -44,14 +44,14 @@ const std::string ALARM_REPAIR_ACTION = "wrsAlarmActiveProposedRepairAction"; const std::string ALARM_SERVICE_AFFECTING = "wrsAlarmActiveServiceAffecting"; const std::string ALARM_SUPPRESSION = "wrsAlarmActiveSuppressionAllowed"; -const std::string CUSTOMER_LOG_ID = "wrsCustomerLogId"; -const std::string CUSTOMER_LOG_INSTANCE_ID = "wrsCustomerLogEntityInstanceId"; -const std::string CUSTOMER_LOG_DATE_TIME = "wrsCustomerLogDateAndTime"; -const std::string CUSTOMER_LOG_SEVERITY = "wrsCustomerLogSeverity"; -const std::string CUSTOMER_LOG_REASON_TEXT = "wrsCustomerLogReasonText"; -const std::string CUSTOMER_LOG_EVENT_TYPE = "wrsCustomerLogEventType"; -const std::string CUSTOMER_LOG_CAUSE = "wrsCustomerLogProbableCause"; -const std::string CUSTOMER_LOG_SERVICE_AFFECTING = "wrsCustomerLogServiceAffecting"; +const std::string EVENT_ID = "wrsEventEventId"; +const std::string EVENT_INSTANCE_ID = "wrsEventEntityInstanceId"; +const std::string EVENT_DATE_TIME = "wrsEventDateAndTime"; +const std::string EVENT_SEVERITY = "wrsEventSeverity"; +const std::string EVENT_REASON_TEXT = "wrsEventReasonText"; +const std::string EVENT_EVENT_TYPE = "wrsEventEventType"; +const std::string EVENT_CAUSE = "wrsEventProbableCause"; +const std::string EVENT_SERVICE_AFFECTING = "wrsEventServiceAffecting"; const std::string SNMPv2_MIB = "SNMPv2-MIB"; const std::string WARM_START = "warmStart"; diff --git a/fm-common/sources/fmSnmpUtils.cpp b/fm-common/sources/fmSnmpUtils.cpp index 1086a947..6f650749 100644 --- a/fm-common/sources/fmSnmpUtils.cpp +++ b/fm-common/sources/fmSnmpUtils.cpp @@ -145,14 +145,14 @@ static std::string format_trap_cmd(int type, SFmAlarmDataT &data, cmd = add_time_val(cmd, ALARM_DATE_TIME, 0); cmd = add_str_val(cmd, ALARM_REASON_TEXT, CLEAR_REASON_TEXT.c_str()); } else if (operation_type == ALARM_MSG){ - cmd = add_str_val(cmd, CUSTOMER_LOG_ID, data.alarm_id); - cmd = add_str_val(cmd, CUSTOMER_LOG_INSTANCE_ID, data.entity_instance_id); - cmd = add_time_val(cmd, CUSTOMER_LOG_DATE_TIME, data.timestamp); - cmd = add_int_val(cmd, CUSTOMER_LOG_SEVERITY, data.severity); - cmd = add_str_val(cmd, CUSTOMER_LOG_REASON_TEXT, data.reason_text); - cmd = add_int_val(cmd, CUSTOMER_LOG_EVENT_TYPE, data.alarm_type); - cmd = add_int_val(cmd, CUSTOMER_LOG_CAUSE, data.probable_cause); - cmd = add_int_val(cmd, CUSTOMER_LOG_SERVICE_AFFECTING, data.service_affecting); + cmd = add_str_val(cmd, EVENT_ID, data.alarm_id); + cmd = add_str_val(cmd, EVENT_INSTANCE_ID, data.entity_instance_id); + cmd = add_time_val(cmd, EVENT_DATE_TIME, data.timestamp); + cmd = add_int_val(cmd, EVENT_SEVERITY, data.severity); + cmd = add_str_val(cmd, EVENT_REASON_TEXT, data.reason_text); + cmd = add_int_val(cmd, EVENT_EVENT_TYPE, data.alarm_type); + cmd = add_int_val(cmd, EVENT_CAUSE, data.probable_cause); + cmd = add_int_val(cmd, EVENT_SERVICE_AFFECTING, data.service_affecting); } else if (operation_type == WARM_START){ // nothing to add to cmd } else {