summaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorRob Daugherty <rd472p@att.com>2018-08-27 13:48:20 +0000
committerGerrit Code Review <gerrit@onap.org>2018-08-27 13:48:20 +0000
commit078ac93448a101ad573598b4538cf18a6be15596 (patch)
tree872e2dd40bdba7f218daec262dd926948410ab5e /adapters
parenta9ca0093fb23f960a9eee63ed896154623237d7e (diff)
parentcbb0a3f7a5392367e4bd84a2dd9b4aa6336863da (diff)
Merge "fixed sonar issue in MsoNetworkAdapterAsyncImpl"
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java13
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;
}