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 a9af368..e95e9a3 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
@@ -11,9 +11,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -370,8 +370,8 @@
                 NetworkAdapterNotify notifyPort = getNotifyEP(notificationUrl);
                 notifyPort.deleteNetworkNotification(messageId, false, exCat, eMsg, null);
             } catch (Exception e1) {
-                logger.error("{} {} Error sending createNetwork notification {} ",
-                        MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC, ErrorCode.DataError.getValue(), e1.getMessage(), e1);
+                logger.error(CREATE_NETWORK_ERROR_LOGMSG, MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC,
+                        ErrorCode.DataError.getValue(), e1.getMessage(), e1);
 
             }
             return;
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
index c934291..4c11527 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
@@ -90,6 +90,7 @@
     private static final String NETWORK_FQDN = "network_fqdn";
     private static final String CREATE_NETWORK_CONTEXT = "CreateNetwork";
     private static final String NEUTRON_MODE = "NEUTRON";
+    private static final String CLOUD_OWNER = "CloudOwner";
 
     private static final Logger logger = LoggerFactory.getLogger(MsoNetworkAdapterImpl.class);
 
@@ -310,7 +311,7 @@
             StackInfo heatStack = null;
             long queryNetworkStarttime = System.currentTimeMillis();
             try {
-                heatStack = heat.queryStack(cloudSiteId, "CloudOwner", tenantId, networkName);
+                heatStack = heat.queryStack(cloudSiteId, CLOUD_OWNER, tenantId, networkName);
             } catch (MsoException me) {
                 me.addContext(CREATE_NETWORK_CONTEXT);
                 logger.error("{} {} Create Network (heat): query network {} in {}/{}: ",
@@ -424,7 +425,7 @@
             try {
                 if (backout == null)
                     backout = true;
-                heatStack = heat.createStack(cloudSiteId, "CloudOwner", tenantId, networkName, null, template,
+                heatStack = heat.createStack(cloudSiteId, CLOUD_OWNER, tenantId, networkName, null, template,
                         stackParams, true, heatTemplate.getTimeoutMinutes(), null, null, null, backout.booleanValue());
             } catch (MsoException me) {
                 me.addContext(CREATE_NETWORK_CONTEXT);
@@ -607,7 +608,7 @@
             StackInfo heatStack = null;
             long queryStackStarttime = System.currentTimeMillis();
             try {
-                heatStack = heat.queryStack(cloudSiteId, "CloudOwner", tenantId, networkName);
+                heatStack = heat.queryStack(cloudSiteId, CLOUD_OWNER, tenantId, networkName);
             } catch (MsoException me) {
                 me.addContext(UPDATE_NETWORK_CONTEXT);
                 logger.error("{} {} Exception - QueryStack query {} in {}/{} ", MessageEnum.RA_QUERY_NETWORK_EXC,
@@ -727,7 +728,7 @@
             // Ignore MsoStackNotFound exception because we already checked.
             long updateStackStarttime = System.currentTimeMillis();
             try {
-                heatStack = heatWithUpdate.updateStack(cloudSiteId, "CloudOwner", tenantId, networkId, template,
+                heatStack = heatWithUpdate.updateStack(cloudSiteId, CLOUD_OWNER, tenantId, networkId, template,
                         stackParams, true, heatTemplate.getTimeoutMinutes());
             } catch (MsoException me) {
                 me.addContext(UPDATE_NETWORK_CONTEXT);
@@ -919,7 +920,7 @@
         StackInfo heatStack = null;
         long queryStackStarttime = System.currentTimeMillis();
         try {
-            heatStack = heat.queryStack(cloudSiteId, "CloudOwner", tenantId, networkNameOrId);
+            heatStack = heat.queryStack(cloudSiteId, CLOUD_OWNER, tenantId, networkNameOrId);
         } catch (MsoException me) {
             me.addContext("QueryNetwork");
             logger.error("{} {} Exception - Query Network (heat): {} in {}/{} ", MessageEnum.RA_QUERY_NETWORK_EXC,
@@ -1072,9 +1073,9 @@
                 // was deleted.
                 // So query first to report back if stack WAS deleted or just NOTOFUND
                 StackInfo heatStack = null;
-                heatStack = heat.queryStack(cloudSiteId, "CloudOwner", tenantId, networkId);
+                heatStack = heat.queryStack(cloudSiteId, CLOUD_OWNER, tenantId, networkId);
                 if (heatStack != null && heatStack.getStatus() != HeatStatus.NOTFOUND) {
-                    heat.deleteStack(tenantId, "CloudOwner", cloudSiteId, networkId, true);
+                    heat.deleteStack(tenantId, CLOUD_OWNER, cloudSiteId, networkId, true);
                     networkDeleted.value = true;
                 } else {
                     networkDeleted.value = false;
@@ -1157,7 +1158,7 @@
                 try {
                     // The deleteStack function in MsoHeatUtils returns success if the stack
                     // was not found. So don't bother to query first.
-                    heat.deleteStack(tenantId, "CloudOwner", cloudSiteId, networkId, true);
+                    heat.deleteStack(tenantId, CLOUD_OWNER, cloudSiteId, networkId, true);
                 } catch (MsoException me) {
                     me.addContext("RollbackNetwork");
                     logger.error("{} {} Exception - Rollback Network (heat): {} in {}/{} ",
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java
index df2c3a2..4eb5d56 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/NetworkAdapterRest.java
@@ -90,6 +90,7 @@
     private static final String TESTING_KEYWORD = "___TESTING___";
     private String exceptionMsg = "Exception:";
     private static final String SHARED = "shared";
+    private static final String EXTERNAL = "external";
 
     @Autowired
     private MsoNetworkAdapterImpl adapter;
@@ -207,8 +208,8 @@
                             shared = ctn.getShared();
                         }
                     }
-                    if (params.containsKey("external")) {
-                        external = params.get("external");
+                    if (params.containsKey(EXTERNAL)) {
+                        external = params.get(EXTERNAL);
                     } else {
                         if (ctn.getExternal() != null) {
                             external = ctn.getExternal();
@@ -228,8 +229,8 @@
                     }
                     if (params.containsKey(SHARED))
                         shared = params.get(SHARED);
-                    if (params.containsKey("external"))
-                        external = params.get("external");
+                    if (params.containsKey(EXTERNAL))
+                        external = params.get(EXTERNAL);
                     adapter.createNetwork(req.getCloudSiteId(), req.getTenantId(), req.getNetworkType(),
                             req.getModelCustomizationUuid(), req.getNetworkName(),
                             req.getProviderVlanNetwork().getPhysicalNetworkName(),
@@ -603,8 +604,8 @@
                             shared = ctn.getShared();
                         }
                     }
-                    if (params.containsKey("external")) {
-                        external = params.get("external");
+                    if (params.containsKey(EXTERNAL)) {
+                        external = params.get(EXTERNAL);
                     } else {
                         if (ctn.getExternal() != null) {
                             external = ctn.getExternal();
@@ -624,8 +625,8 @@
                     if (params.containsKey(SHARED)) {
                         shared = params.get(SHARED);
                     }
-                    if (params.containsKey("external")) {
-                        external = params.get("external");
+                    if (params.containsKey(EXTERNAL)) {
+                        external = params.get(EXTERNAL);
                     }
                     adapter.updateNetwork(req.getCloudSiteId(), req.getTenantId(), req.getNetworkType(),
                             req.getModelCustomizationUuid(), req.getNetworkStackId(), req.getNetworkName(),
