aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/src
diff options
context:
space:
mode:
authorSindhuri.A <arcot.sindhuri@huawei.com>2019-04-19 20:41:25 +0530
committerSindhuri.A <arcot.sindhuri@huawei.com>2019-04-19 20:41:25 +0530
commita2cfeaf853126c027b7b637c838cd16389f73983 (patch)
tree3c120ab3e2a82b5c749a4146b0702d35976d0ffe /adapters/mso-openstack-adapters/src
parent0943ee25bcdb181d926c12678db932ed3f100da3 (diff)
Replace String Literal with Constant
Replace String Literal with Constant MsoNetworkAdapterAsyncImpl class Issue-ID: SO-1490 Change-Id: I906efda71f380c495bc4b6988a0d8f6c57d2983e Signed-off-by: Sindhuri.A <arcot.sindhuri@huawei.com>
Diffstat (limited to 'adapters/mso-openstack-adapters/src')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterAsyncImpl.java11
1 files changed, 6 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 d042c9eb19..429948cef1 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
@@ -72,6 +72,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
private static final String CREATE_NETWORK_ERROR_LOGMSG = "{} {} Error sending createNetwork notification {} ";
private static final String FAULT_INFO_ERROR_LOGMSG = "{} {} Exception - fault info ";
private static final String SHARED = "shared";
+ private static final String EXTERNAL = "external";
@Autowired
private Environment environment;
@@ -133,8 +134,8 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
String external = null;
if (params.containsKey(SHARED))
shared = params.get(SHARED);
- if (params.containsKey("external"))
- external = params.get("external");
+ if (params.containsKey(EXTERNAL))
+ external = params.get(EXTERNAL);
try {
networkAdapter.createNetwork(cloudSiteId, tenantId, networkType, modelCustomizationUuid, networkName,
@@ -217,8 +218,8 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
String external = null;
if (params.containsKey(SHARED))
shared = params.get(SHARED);
- if (params.containsKey("external"))
- external = params.get("external");
+ if (params.containsKey(EXTERNAL))
+ external = params.get(EXTERNAL);
try {
networkAdapter.updateNetwork(cloudSiteId, tenantId, networkType, modelCustomizationUuid, networkId,
@@ -269,7 +270,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync {
MsoRequest msoRequest, String notificationUrl) {
logger.debug("Async Query Network {} in {}/{}", networkNameOrId, cloudSiteId, tenantId);
- String errorCreateNetworkMessage = "{} {} Error sending createNetwork notification {} ";
+ String errorCreateNetworkMessage = CREATE_NETWORK_ERROR_LOGMSG;
// Use the synchronous method to perform the actual Create