diff options
author | Sandeep J <sandeejh@in.ibm.com> | 2018-08-27 02:04:22 +0530 |
---|---|---|
committer | Sandeep Jha <sandeejh@in.ibm.com> | 2018-08-26 21:48:52 +0000 |
commit | cbb0a3f7a5392367e4bd84a2dd9b4aa6336863da (patch) | |
tree | 487a8ecc27e733f95bddf6cfaae83c6957df8c1d /adapters/mso-openstack-adapters | |
parent | ddf3c557dfd2d0e008cb9f3da751f96cf8b3d76c (diff) |
fixed sonar issue in MsoNetworkAdapterAsyncImpl
fixed sonar issues
Issue-ID: SO-909
Change-Id: If2a1ef898dfba15420f5deb245809cc8eeb6bdce
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'adapters/mso-openstack-adapters')
-rw-r--r-- | adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java index 83db2add0a..500b0b32e3 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java @@ -66,7 +66,10 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync { private static final MsoAlarmLogger alarmLogger = new MsoAlarmLogger (); private static final String BPEL_AUTH_PROP = "org.onap.so.adapters.network.bpelauth"; private static final String ENCRYPTION_KEY = "aa3871669d893c7fb8abbcda31b88b4f"; - + private static final String NETWORK_EXCEPTION_MSG="Got a NetworkException on createNetwork: "; + private static final String CREATE_NETWORK_ERROR_MSG="Error sending createNetwork notification "; + private static final String CREATE_NETWORK_EXCEPTON_MSG="Exception sending createNetwork notification"; + private static final String MSO_INTERNAL_ERROR_MSG="MsoInternalError"; @Autowired private Environment environment; @@ -160,7 +163,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync { subnetIdMap, networkRollback); } catch (NetworkException e) { - LOGGER.debug ("Got a NetworkException on createNetwork: ", e); + LOGGER.debug (NETWORK_EXCEPTION_MSG, e); MsoExceptionCategory exCat = null; String eMsg = null; try { @@ -174,9 +177,9 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync { NetworkAdapterNotify notifyPort = getNotifyEP (notificationUrl); notifyPort.createNetworkNotification (messageId, false, exCat, eMsg, null, null, null, null); } catch (Exception e1) { - error = "Error sending createNetwork notification " + e1.getMessage (); - LOGGER.error (MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC, "", "", MsoLogger.ErrorCode.DataError, "Exception sending createNetwork notification", e1); - alarmLogger.sendAlarm ("MsoInternalError", MsoAlarmLogger.CRITICAL, error); + error = CREATE_NETWORK_ERROR_MSG + e1.getMessage (); + LOGGER.error (MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC, "", "", MsoLogger.ErrorCode.DataError,CREATE_NETWORK_EXCEPTON_MSG, e1); + alarmLogger.sendAlarm (MSO_INTERNAL_ERROR_MSG, MsoAlarmLogger.CRITICAL, error); } return; } |