Merge "snmp traps missing for customer logs"

This commit is contained in:
Zuul 2019-08-01 17:23:19 +00:00 committed by Gerrit Code Review
commit 96f4179575
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 {