From 2b0842337832cc49b98ef505026981fe8b498456 Mon Sep 17 00:00:00 2001 From: Gerry Kopec Date: Mon, 30 Mar 2020 01:00:08 -0400 Subject: [PATCH] Remove dcorch-snmp dcorch-snmp process/service is being removed from distributed cloud. Remove hook in fm. Change-Id: I74e82110b147680c8c9eb0c0f100b459cef4513a Story: 2007267 Task: 39193 Depends-On: https://review.opendev.org/#/c/715765 Signed-off-by: Gerry Kopec --- fm-common/sources/fmSnmpConstants.h | 4 ---- fm-common/sources/fmSnmpUtils.cpp | 9 +-------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/fm-common/sources/fmSnmpConstants.h b/fm-common/sources/fmSnmpConstants.h index 452b63ec..b6d38bb4 100644 --- a/fm-common/sources/fmSnmpConstants.h +++ b/fm-common/sources/fmSnmpConstants.h @@ -64,7 +64,3 @@ const std::string SCOPE = "::"; const std::string STR_TYPE = " s "; const std::string INT_TYPE = " i "; const std::string OPTION_COMM = " -c "; - -const std::string DC_COMM_STR = "dcorchAlarmAggregator"; -const std::string CONF_PATH_ENV = "SNMPCONFPATH="; -const std::string CONF_DIR = "/etc/snmp"; diff --git a/fm-common/sources/fmSnmpUtils.cpp b/fm-common/sources/fmSnmpUtils.cpp index 6f650749..9177a028 100644 --- a/fm-common/sources/fmSnmpUtils.cpp +++ b/fm-common/sources/fmSnmpUtils.cpp @@ -125,14 +125,7 @@ static std::string format_trap_cmd(int type, SFmAlarmDataT &data, objtype = mib + SCOPE + get_trap_objtype(type); - if (comm.compare(DC_COMM_STR) == 0){ - env = CONF_PATH_ENV + CONF_DIR + SEP; - } - else { - env = ""; - } - - cmd = env + TRAP_CMD + OPTION_COMM + comm + SEP + ip + SEP + s + objtype + SEP; + cmd = TRAP_CMD + OPTION_COMM + comm + SEP + ip + SEP + s + objtype + SEP; std::string operation_type =get_trap_objtype(type); if (operation_type == ALARM_CLEAR){