as for strncpy does not guarantee null terminated of dest string,
but snprintf does.
so change code from
strncpy(buffer, source, sizeof buffer);
to
int n = snprintf(buffer, sizeof buffer, "%s", source);
assert(n >= 0 && n < sizeof buffer);
test case:
1. a simple test about difference between strncpy and snprintf
2. use fmClientCli to create an alarm
mock the init_tables() function so there is no need to
connect to the server.
add code to dump SFmAlarmDataT to check datas return.
3. one controller + one compute deploy (virtual)
success deploy and create an instance.
Closes-Bug: 1794701
Change-Id: I04b4c5c85782ff571e2957e12c47f2f628d2b772
Create fault management REST API service
Create fault management client and CLI shell
Add a python extension for fault management application APIs
Update fault management python APIs to use the python extension
Update fault manager to retrieve the SNMP configuration from the config file
Story: 2002828
Task: 22747
Depends-On: https://review.openstack.org/#/c/592176/
Change-Id: I888d8d23edf75d05d51594ccca55570ae366c848
Signed-off-by: Tao Liu <tao.liu@windriver.com>