fault/fm-common/sources
Shuicheng Lin cca4dc0c54 Implement FaultAPIsV2 to distinguish fail and no data case
Current FaultAPIs (get_fault/get_faults/get_faults_by_id) cannot
distinguish error and no data case. None will be returned for both
case. To separate these two cases, and implement the code more as
pythonic way, FaultAPIsV2 is added, which will raise exception for
error case.
In order to separate the cases, the C functions called by API are
modified to return FALSE for error, and return None for no data.

Test:
Pass basic deploy test, and "fm alarm-*" cmd work as before.
Use fm_api_test.py/fm_api_v2_test.py to manual trigger API call,
confirm alarm could be created/get/deleted, and value is the same
as "fm alarm-list".
Modify fmManager to simulate error case, confirm exception is
generated for FaultAPIsV2, and behavior is not changed for
FaultAPIs.

Story: 2004859
Task: 29097

Change-Id: Ic1c0a15eb8dfec6c368099b096d6a158da0d3c77
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
2019-03-05 20:14:49 +08:00
..
fm_cli.cpp StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fm_db_sync_event_suppression.py Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fm_python_mod_main.cpp Implement FaultAPIsV2 to distinguish fail and no data case 2019-03-05 20:14:49 +08:00
fmAlarm.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmAlarmUtils.cpp fix issue: fmClient segfaults on short string parameter 2019-01-29 02:25:12 +08:00
fmAlarmUtils.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmAPI.cpp StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmAPI.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmConfig.cpp Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmConfig.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmConstants.h Standardize install target for fm-common. 2018-12-05 15:06:56 -06:00
fmDb.cpp Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmDb.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmDbAlarm.cpp replace strncpy by snprintf 2018-11-03 00:56:57 +08:00
fmDbAlarm.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmDbAPI.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmDbEventLog.cpp replace strncpy by snprintf 2018-11-03 00:56:57 +08:00
fmDbEventLog.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmDbUtils.cpp free memory when it is no longer in use 2018-11-09 00:34:19 +00:00
fmDbUtils.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmEventSuppression.cpp Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmEventSuppression.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmFile.cpp StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmFile.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmLog.cpp Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmLog.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmMsg.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmMsgServer.cpp Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmMsgServer.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmMutex.cpp StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmMutex.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmSnmpConstants.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmSnmpUtils.cpp Avoid null check for reference in fm_snmp_util_gen_trap 2018-08-22 23:35:29 -05:00
fmSnmpUtils.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmSocket.cpp StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmSocket.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmThread.cpp StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmThread.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmTime.cpp StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmTime.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
LICENSE StarlingX open source release updates 2018-05-31 07:36:00 -07:00
Makefile Improve security by avoiding buffer overflows 2019-01-08 09:55:07 -06:00
setup.py Add hooks for python wheel generation 2018-10-24 17:12:50 +00:00