Several indentation issues were solved, also some style was applied
to improve code's readability.
cpplint is being used to get all these warnings, however there are
some warnings that were suppressed. This means that this file still
has the following issues:
- line length > 80 characters
- C casting in C++ code
- References that can be const or pointers
These issues will be solved in a next iteration as are more intrusive
with the code.
No functionality changes were done.
Story: 2006425
Task: 36322
Change-Id: I4a2d3bcf9a13e0ce2659cc9a8211fc727b34d80e
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
It is due to out of range access violation. Fix it by checking length
before access.
Closes-Bug: 1807986
Change-Id: Iba2b445f50fd98a74d932c9b3f691fc7145274bb
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
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
The macro STRCP_TO copies a c_str into a char buffer, it won't
copy more that sizeof(charb), however, the resulting string will
be truncated. Although this is expected, the resulting string
won't have a NULL terminator.
Story: 2003497
Task: 24774
Change-Id: I249c75af897ba02837ad6d3981d976c291e88aea
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
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>