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 <david.sullivan@windriver.com>
This commit is contained in:
David Sullivan 2019-06-25 13:38:42 -04:00
parent 37589bf657
commit 5e4774768b
2 changed files with 16 additions and 16 deletions

View File

@ -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";

View File

@ -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 {