Merge "Add missing fields for Event traps"

This commit is contained in:
Zuul 2023-09-08 18:09:55 +00:00 committed by Gerrit Code Review
commit e2e6af9d71
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,5 @@
//
// Copyright (c) 2017-2022 Wind River Systems, Inc.
// Copyright (c) 2017-2023 Wind River Systems, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
@ -45,7 +45,9 @@ 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_REPAIR_ACTION = "wrsEventProposedRepairAction";
const std::string EVENT_SERVICE_AFFECTING = "wrsEventServiceAffecting";
const std::string EVENT_SUPPRESSION = "wrsEventSuppressionAllowed";
const std::string SNMPv2_MIB = "SNMPv2-MIB";
const std::string WARM_START = "warmStart";

View File

@ -1,5 +1,5 @@
//
// Copyright (c) 2014-2022 Wind River Systems, Inc.
// Copyright (c) 2014-2023 Wind River Systems, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
@ -232,8 +232,12 @@ static std::string format_trap_json(int type, SFmAlarmDataT &data){
fm_db_util_int_to_string(data.alarm_type));
add_value_json_trap(result, EVENT_CAUSE,
fm_db_util_int_to_string(data.probable_cause));
add_value_json_trap(result, EVENT_REPAIR_ACTION,
"N/A");
add_value_json_trap(result, EVENT_SERVICE_AFFECTING,
fm_db_util_int_to_string(data.service_affecting));
add_value_json_trap(result, EVENT_SUPPRESSION,
fm_db_util_int_to_string(0));
} else if (operation_type == WARM_START){
// nothing to add to cmd
} else {