Refactoring VnfApiProvider part 1
[sdnc/northbound.git] / vnfapi / provider / src / main / java / org / onap / sdnc / vnfapi / VnfApiProvider.java
index f390eeb..42d0241 100644 (file)
@@ -24,7 +24,6 @@ package org.onap.sdnc.vnfapi;
 import com.google.common.util.concurrent.CheckedFuture;
 import com.google.common.util.concurrent.FutureCallback;
 import com.google.common.util.concurrent.Futures;
-import com.google.common.util.concurrent.SettableFuture;
 import com.google.common.base.Optional;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
@@ -131,6 +130,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.ModifiedNodeDoesNotExistException;
+import org.onap.ccsdk.sli.core.sli.SvcLogicException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.MDC;
@@ -152,16 +152,26 @@ import java.util.concurrent.Future;
  * the most commonly used components of the MD-SAL. Additionally the base class provides some basic logging and
  * initialization / clean up methods.
  */
-public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeListener {
 
+public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeListener {
+    protected DataBroker dataBroker;
+    protected NotificationPublishService notificationService;
+    protected RpcProviderRegistry rpcRegistry;
+    protected BindingAwareBroker.RpcRegistration<VNFAPIService> rpcRegistration;
     private final Logger log = LoggerFactory.getLogger(VnfApiProvider.class);
     private final ExecutorService executor;
 
+    private static final String PRELOAD_DATA = "] PreloadData: ";
+    private static final String SENDING_SUCCESS_RPC = "Sending Success rpc result due to external error";
+    public static final String REASON = "', Reason: '";
+    public static final String ERROR_CODE = "] error code: '";
+    public static final String INVALID_INPUT_INVALID_PRELOAD_TYPE = "invalid input, invalid preload-type";
+    public static final String BECAUSE_OF_INVALID_PRELOAD_TYPE = " because of invalid preload-type";
+    public static final String INVALID_INPUT_NULL_OR_EMPTY_SERVICE_INSTANCE_ID = "invalid input, null or empty service-instance-id";
+    public static final String BECAUSE_OF_INVALID_INPUT_NULL_OR_EMPTY_SERVICE_INSTANCE_ID = " because of invalid input, null or empty service-instance-id";
     private static final String APP_NAME = "vnfapi";
     private static final String VNF_API = "VNF-API";
     private static final String OPERATIONAL_DATA = "operational-data";
-    private static final String SVC_OPERATION = "vf-module-topology-operation";
-
     private static final String READ_MD_SAL_STR = "Read MD-SAL (";
     private static final String DATA_FOR_STR = ") data for [";
     private static final String SERVICE_DATA_STR = "] ServiceData: ";
@@ -185,12 +195,7 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
     private static final String INVALID_INPUT_VNF_INSTANCE_STR = "invalid input, null or empty vnf-instance-id";
 
     private VNFSDNSvcLogicServiceClient svcLogicClient;
-
-    protected DataBroker dataBroker;
-    protected NotificationPublishService notificationService;
-    protected RpcProviderRegistry rpcRegistry;
-    protected BindingAwareBroker.RpcRegistration<VNFAPIService> rpcRegistration;
-
+    
     public VnfApiProvider(DataBroker dataBroker2, NotificationPublishService notificationPublishService,
         RpcProviderRegistry rpcProviderRegistry, VNFSDNSvcLogicServiceClient client) {
         log.info("Creating provider for " + APP_NAME);
@@ -616,8 +621,7 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         }
 
         if (data.isPresent()) {
-            VnfInstanceServiceData vnfInstanceServiceData =
-                (VnfInstanceServiceData) data.get().getVnfInstanceServiceData();
+            VnfInstanceServiceData vnfInstanceServiceData = data.get().getVnfInstanceServiceData();
             if (vnfInstanceServiceData != null) {
                 log.info(READ_MD_SAL_STR + type + DATA_FOR_STR + siid + "] VnfInstanceServiceData: "
                     + vnfInstanceServiceData);
@@ -709,7 +713,7 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         if (data.isPresent()) {
             PreloadData preloadData = (PreloadData) data.get().getPreloadData();
             if (preloadData != null) {
-                log.info(READ_MD_SAL_STR + type + DATA_FOR_STR + preloadName + "," + preloadType + "] PreloadData: "
+              log.info(READ_MD_SAL_STR + type + DATA_FOR_STR  + preloadName + "," + preloadType + PRELOAD_DATA
                     + preloadData);
                 preloadDataBuilder.setVnfTopologyInformation(preloadData.getVnfTopologyInformation());
                 preloadDataBuilder.setNetworkTopologyInformation(preloadData.getNetworkTopologyInformation());
@@ -812,7 +816,6 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
             .child(VnfList.class, entry.getKey())
             .build();
 
-
         int optimisticLockTries = 2;
         boolean tryAgain = true;
         while (tryAgain) {
@@ -861,7 +864,6 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
             .child(VnfInstanceList.class, entry.getKey())
             .build();
 
-
         tryUpdateDataStore(entry, merge, storeType, path);
     }
 
@@ -913,7 +915,7 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         tryUpdateDataStore(entry, merge, storeType, path);
     }
 
-    private  <T extends DataObject> void tryUpdateDataStore(T entry, boolean merge, LogicalDatastoreType storeType,
+    private <T extends DataObject> void tryUpdateDataStore(T entry, boolean merge, LogicalDatastoreType storeType,
         InstanceIdentifier<T> path) {
 
         int tries = 2;
@@ -947,30 +949,44 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
     }
 
     //1610 vnf-instance-topology-operation
+
+    private Boolean validateVnfInstanceTopologyOperationInput(VnfInstanceTopologyOperationInput input) {
+        return input != null
+                && input.getVnfInstanceRequestInformation() != null
+                && input.getVnfInstanceRequestInformation().getVnfInstanceId() != null
+                && input.getVnfInstanceRequestInformation().getVnfInstanceId().length() != 0;
+    }
+
+    private Future<RpcResult<VnfInstanceTopologyOperationOutput>> buildVnfInstanceTopologyOperationOutputWithtError(
+            String responseCode, String responseMessage, String ackFinalIndicator) {
+        VnfInstanceTopologyOperationOutputBuilder responseBuilder = new VnfInstanceTopologyOperationOutputBuilder();
+        responseBuilder.setResponseCode(responseCode);
+        responseBuilder.setResponseMessage(responseMessage);
+        responseBuilder.setAckFinalIndicator(ackFinalIndicator);
+        return Futures.immediateFuture(RpcResultBuilder
+                .<VnfInstanceTopologyOperationOutput>status(true)
+                .withResult(responseBuilder.build())
+                .build());
+    }
+
     @Override
     public Future<RpcResult<VnfInstanceTopologyOperationOutput>> vnfInstanceTopologyOperation(
         VnfInstanceTopologyOperationInput input) {
 
+        final String svcOperation = "vnf-instance-topology-operation";
         VnfInstanceServiceData vnfInstanceServiceData;
         ServiceStatusBuilder serviceStatusBuilder = new ServiceStatusBuilder();
         Properties parms = new Properties();
 
-        log.info(SVC_OPERATION + CALLED_STR);
+        log.info(svcOperation + CALLED_STR);
         // create a new response object
         VnfInstanceTopologyOperationOutputBuilder responseBuilder = new VnfInstanceTopologyOperationOutputBuilder();
 
-        if (input == null || input.getVnfInstanceRequestInformation() == null
-            || input.getVnfInstanceRequestInformation().getVnfInstanceId() == null) {
-            log.debug(EXITING_STR + SVC_OPERATION + " because of " + INVALID_INPUT_VNF_INSTANCE_STR);
-            responseBuilder.setResponseCode("403");
-            responseBuilder.setResponseMessage(INVALID_INPUT_VNF_INSTANCE_STR);
-            responseBuilder.setAckFinalIndicator("Y");
-            RpcResult<VnfInstanceTopologyOperationOutput> rpcResult = RpcResultBuilder
-                .<VnfInstanceTopologyOperationOutput>status(true)
-                .withResult(responseBuilder.build())
-                .build();
-            // return error
-            return Futures.immediateFuture(rpcResult);
+        if (!validateVnfInstanceTopologyOperationInput(input)) {
+            log.debug(EXITING_STR + svcOperation + " because of " + INVALID_INPUT_VNF_INSTANCE_STR);
+            return buildVnfInstanceTopologyOperationOutputWithtError("403",
+                    INVALID_INPUT_VNF_INSTANCE_STR,
+                    "Y" );
         }
 
         // Grab the service instance ID from the input buffer
@@ -978,20 +994,6 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         String preloadName = input.getVnfInstanceRequestInformation().getVnfInstanceName();
         String preloadType = input.getVnfInstanceRequestInformation().getVnfModelId();
 
-        // Make sure we have a valid viid
-        if (viid == null || viid.length() == 0) {
-            log.debug(EXITING_STR + SVC_OPERATION + " because of invalid vnf-instance-id");
-            responseBuilder.setResponseCode("403");
-            responseBuilder.setResponseMessage(INVALID_INPUT_VNF_INSTANCE_STR);
-            responseBuilder.setAckFinalIndicator("Y");
-            RpcResult<VnfInstanceTopologyOperationOutput> rpcResult = RpcResultBuilder
-                .<VnfInstanceTopologyOperationOutput>status(true)
-                .withResult(responseBuilder.build())
-                .build();
-            // return error
-            return Futures.immediateFuture(rpcResult);
-        }
-
         if (input.getSdncRequestHeader() != null) {
             responseBuilder.setSvcRequestId(input.getSdncRequestHeader().getSvcRequestId());
             setRequestIdAsMDC(input.getSdncRequestHeader().getSvcRequestId());
@@ -1015,7 +1017,7 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
 
         //
         // setup a service-data object builder
-        // ACTION vnf-topology-operation
+        // ACTION vnf-topology-operationa
         // INPUT:
         //  USES sdnc-request-header;
         //  USES request-information;
@@ -1030,16 +1032,16 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         //   uses vnf-configuration-information;
         //   uses oper-status;
 
-        log.info(ADDING_INPUT_DATA_STR + SVC_OPERATION + " [" + viid + INPUT_STR + input);
+        log.info(ADDING_INPUT_DATA_STR + svcOperation + " [" + viid + INPUT_STR + input);
         VnfInstanceTopologyOperationInputBuilder inputBuilder = new VnfInstanceTopologyOperationInputBuilder(input);
         VnfSdnUtil.toProperties(parms, inputBuilder.build());
 
-        log.info(ADDING_OPERATIONAL_DATA_STR + SVC_OPERATION + " [" + viid + OPERATIONAL_DATA_STR + operDataBuilder
+        log.info(ADDING_OPERATIONAL_DATA_STR + svcOperation + " [" + viid + OPERATIONAL_DATA_STR + operDataBuilder
             .build());
         VnfSdnUtil.toProperties(parms, OPERATIONAL_DATA, operDataBuilder);
 
         log.info(
-            ADDING_CONFIG_DATA_STR + SVC_OPERATION + " [" + preloadName + "," + preloadType + "] preload-data: "
+            ADDING_CONFIG_DATA_STR + svcOperation + " [" + preloadName + "," + preloadType + "] preload-data: "
                 + vnfInstancePreloadDataBuilder.build());
         VnfSdnUtil.toProperties(parms, "vnf-instance-preload-data", vnfInstancePreloadDataBuilder);
 
@@ -1051,20 +1053,16 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         String ackFinal = "Y";
 
         try {
-            if (svcLogicClient.hasGraph(VNF_API, SVC_OPERATION, null, "sync")) {
-
-                try {
-                    respProps = svcLogicClient
-                        .execute(VNF_API, SVC_OPERATION, null, "sync", vnfInstanceServiceDataBuilder, parms);
-                } catch (Exception e) {
-                    log.error("Caught exception executing service logic for " + SVC_OPERATION, e);
-                    errorMessage = e.getMessage();
-                    errorCode = "500";
-                }
+            if (svcLogicClient.hasGraph(VNF_API, svcOperation, null, "sync")) {
+                respProps = svcLogicClient.execute(VNF_API, svcOperation, null, "sync", vnfInstanceServiceDataBuilder, parms);
             } else {
-                errorMessage = "No service logic active for VNF-API: '" + SVC_OPERATION + "'";
+                errorMessage = "No service logic active for VNF-API: '" + svcOperation + "'";
                 errorCode = "503";
             }
+        } catch (SvcLogicException e) {
+            log.error("Caught exception executing service logic for " + svcOperation, e);
+            errorMessage = e.getMessage();
+            errorCode = "500";
         } catch (Exception e) {
             errorCode = "500";
             errorMessage = e.getMessage();
@@ -1091,9 +1089,9 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
             try {
                 saveVnfInstanceList(vnfInstanceListBuilder.build(), true, LogicalDatastoreType.CONFIGURATION);
             } catch (Exception e) {
-                log.error(CAUGHT_EXCEPTION_STR + SVC_OPERATION + " [" + viid + "] \n", e);
+                log.error(CAUGHT_EXCEPTION_STR + svcOperation + " [" + viid + "] \n", e);
             }
-            log.error(RETURNED_FAILED_STR + SVC_OPERATION + " [" + viid + "] " + responseBuilder.build());
+            log.error(RETURNED_FAILED_STR + svcOperation + " [" + viid + "] " + responseBuilder.build());
             RpcResult<VnfInstanceTopologyOperationOutput> rpcResult = RpcResultBuilder
                 .<VnfInstanceTopologyOperationOutput>status(true)
                 .withResult(responseBuilder.build())
@@ -1105,13 +1103,12 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         // Got success from SLI
         try {
             vnfInstanceServiceData = vnfInstanceServiceDataBuilder.build();
-            log.info(UPDATING_MD_SAL_STR + SVC_OPERATION + " [" + viid + "] VnfInstanceServiceData: "
+            log.info(UPDATING_MD_SAL_STR + svcOperation + " [" + viid + "] VnfInstanceServiceData: "
                 + vnfInstanceServiceData);
             // svc-configuration-list
             VnfInstanceListBuilder vnfInstanceListBuilder = new VnfInstanceListBuilder();
             vnfInstanceListBuilder.setVnfInstanceServiceData(vnfInstanceServiceData);
             vnfInstanceListBuilder.setVnfInstanceId(vnfInstanceServiceData.getVnfInstanceId());
-            //siid = vnfInstanceServiceData.getVnfInstanceId();
             vnfInstanceListBuilder.setServiceStatus(serviceStatusBuilder.build());
             saveVnfInstanceList(vnfInstanceListBuilder.build(), false, LogicalDatastoreType.CONFIGURATION);
             if (input.getSdncRequestHeader() != null && input.getSdncRequestHeader().getSvcAction() != null) {
@@ -1127,11 +1124,11 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
             responseBuilder.setVnfInstanceInformation(vnfInstanceInformationBuilder.build());
             responseBuilder.setServiceInformation(vnfInstanceServiceData.getServiceInformation());
         } catch (Exception e) {
-            log.error(CAUGHT_EXCEPTION_STR + SVC_OPERATION + " [" + viid + "] \n", e);
+            log.error(CAUGHT_EXCEPTION_STR + svcOperation + " [" + viid + "] \n", e);
             responseBuilder.setResponseCode("500");
             responseBuilder.setResponseMessage(e.toString());
             responseBuilder.setAckFinalIndicator("Y");
-            log.error(RETURNED_FAILED_STR + SVC_OPERATION + " [" + viid + "] " + responseBuilder.build());
+            log.error(RETURNED_FAILED_STR + svcOperation + " [" + viid + "] " + responseBuilder.build());
             RpcResult<VnfInstanceTopologyOperationOutput> rpcResult = RpcResultBuilder
                 .<VnfInstanceTopologyOperationOutput>status(true)
                 .withResult(responseBuilder.build())
@@ -1146,8 +1143,8 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         if (errorMessage != null) {
             responseBuilder.setResponseMessage(errorMessage);
         }
-        log.info(UPDATED_MD_SAL_STR + SVC_OPERATION + " [" + viid + "] ");
-        log.info(RETURNED_SUCCESS_STR + SVC_OPERATION + " [" + viid + "] " + responseBuilder.build());
+        log.info(UPDATED_MD_SAL_STR + svcOperation + " [" + viid + "] ");
+        log.info(RETURNED_SUCCESS_STR + svcOperation + " [" + viid + "] " + responseBuilder.build());
 
         RpcResult<VnfInstanceTopologyOperationOutput> rpcResult = RpcResultBuilder
             .<VnfInstanceTopologyOperationOutput>status(true)
@@ -1162,18 +1159,19 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
     public Future<RpcResult<VfModuleTopologyOperationOutput>> vfModuleTopologyOperation(
         VfModuleTopologyOperationInput input) {
 
+        final String svcOperation = "vf-module-topology-operation";
         VfModuleServiceData vfModuleServiceData;
         ServiceStatusBuilder serviceStatusBuilder = new ServiceStatusBuilder();
         Properties parms = new Properties();
 
-        log.info(SVC_OPERATION + CALLED_STR);
+        log.info(svcOperation + CALLED_STR);
         // create a new response object
         VfModuleTopologyOperationOutputBuilder responseBuilder = new VfModuleTopologyOperationOutputBuilder();
 
         // Validate vf-module-id from vf-module-request-information
         if (input == null || input.getVfModuleRequestInformation() == null
             || input.getVfModuleRequestInformation().getVfModuleId() == null) {
-            log.debug(EXITING_STR + SVC_OPERATION + " because of invalid input, null or empty vf-module-id");
+            log.debug(EXITING_STR + svcOperation + " because of invalid input, null or empty vf-module-id");
             responseBuilder.setResponseCode("403");
             responseBuilder.setResponseMessage(INVALID_INPUT_VF_MODULE_STR);
             responseBuilder.setAckFinalIndicator("Y");
@@ -1192,7 +1190,7 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
 
         // Make sure we have a valid siid
         if (vfid == null || vfid.length() == 0) {
-            log.debug(EXITING_STR + SVC_OPERATION + " because of invalid vf-module-id");
+            log.debug(EXITING_STR + svcOperation + " because of invalid vf-module-id");
             responseBuilder.setResponseCode("403");
             responseBuilder.setResponseMessage(INVALID_INPUT_VF_MODULE_STR);
             responseBuilder.setAckFinalIndicator("Y");
@@ -1208,7 +1206,7 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         String viid = input.getVfModuleRequestInformation().getVnfInstanceId();
 
         if (viid == null || viid.length() == 0) {
-            log.debug(EXITING_STR + SVC_OPERATION + " because of invalid vnf-instance-id");
+            log.debug(EXITING_STR + svcOperation + " because of invalid vnf-instance-id");
             responseBuilder.setResponseCode("403");
             responseBuilder.setResponseMessage(INVALID_INPUT_VNF_INSTANCE_STR);
             responseBuilder.setAckFinalIndicator("Y");
@@ -1237,10 +1235,6 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         VfModuleServiceDataBuilder operDataBuilder = new VfModuleServiceDataBuilder();
         getVfModuleServiceData(vfid, operDataBuilder, LogicalDatastoreType.OPERATIONAL);
 
-        // save service-data builder object for rollback
-        VfModuleServiceDataBuilder rb_vfModuleServiceDataBuilder = vfModuleServiceDataBuilder;
-        VfModuleServiceDataBuilder rb_operDataBuilder = operDataBuilder;
-
         // 1610 Need to pull vnf-instance-list.vf-module-relationship-list from MD-SAL
         VnfInstanceServiceDataBuilder vnfInstanceServiceDataBuilder = new VnfInstanceServiceDataBuilder();
         getVnfInstanceServiceData(viid, vnfInstanceServiceDataBuilder);
@@ -1249,10 +1243,6 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         VnfInstanceServiceDataBuilder vnfInstanceOperDataBuilder = new VnfInstanceServiceDataBuilder();
         getVnfInstanceServiceData(viid, vnfInstanceOperDataBuilder, LogicalDatastoreType.OPERATIONAL);
 
-        // save operational builder object for rollback
-        VnfInstanceServiceDataBuilder rb_vnfInstanceServiceDataBuilder = vnfInstanceServiceDataBuilder;
-        VnfInstanceServiceDataBuilder rb_vnfInstanceOperDataBuilder = vnfInstanceOperDataBuilder;
-
         // Set the serviceStatus based on input
         setServiceStatus(serviceStatusBuilder, input.getSdncRequestHeader());
         setServiceStatus(serviceStatusBuilder, input.getRequestInformation());
@@ -1261,36 +1251,32 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         // setup a service-data object builder
         // ACTION vnf-topology-operation
         // INPUT:
-        //  USES sdnc-request-header;
         //  USES request-information;
         //  USES service-information;
         //  USES vnf-request-information
         // OUTPUT:
-        //  USES vnf-topology-response-body;
         //  USES vnf-information
         //  USES service-information
         //
         // container service-data
-        //   uses vnf-configuration-information;
-        //   uses oper-status;
 
-        log.info(ADDING_INPUT_DATA_STR + SVC_OPERATION + " [" + vfid + INPUT_STR + input);
+        log.info(ADDING_INPUT_DATA_STR + svcOperation + " [" + vfid + INPUT_STR + input);
         VfModuleTopologyOperationInputBuilder inputBuilder = new VfModuleTopologyOperationInputBuilder(input);
         VnfSdnUtil.toProperties(parms, inputBuilder.build());
 
-        log.info(ADDING_OPERATIONAL_DATA_STR + SVC_OPERATION + " [" + vfid + "] vf-module operational-data: "
+        log.info(ADDING_OPERATIONAL_DATA_STR + svcOperation + " [" + vfid + "] vf-module operational-data: "
             + operDataBuilder.build());
         VnfSdnUtil.toProperties(parms, OPERATIONAL_DATA, operDataBuilder);
 
-        log.info(ADDING_CONFIG_DATA_STR + SVC_OPERATION + " [" + preloadName + "," + preloadType
+        log.info(ADDING_CONFIG_DATA_STR + svcOperation + " [" + preloadName + "," + preloadType
             + "] vf-module-preload-data: " + vfModulePreloadDataBuilder.build());
         VnfSdnUtil.toProperties(parms, "vf-module-preload-data", vfModulePreloadDataBuilder);
 
-        log.info("Adding vnf-instance CONFIG data for " + SVC_OPERATION + " [" + viid + "] vnf-instance-service-data: "
+        log.info("Adding vnf-instance CONFIG data for " + svcOperation + " [" + viid + "] vnf-instance-service-data: "
             + vnfInstanceServiceDataBuilder.build());
         VnfSdnUtil.toProperties(parms, "vnf-instance-service-data", vnfInstanceServiceDataBuilder);
 
-        log.info("Adding vnf-instance OPERATIONAL data for " + SVC_OPERATION + " [" + viid
+        log.info("Adding vnf-instance OPERATIONAL data for " + svcOperation + " [" + viid
             + "] vnf-instance operational-data: " + vnfInstanceOperDataBuilder.build());
         VnfSdnUtil.toProperties(parms, "vnf-instance-operational-data", vnfInstanceOperDataBuilder);
 
@@ -1303,21 +1289,16 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         String ackFinal = "Y";
 
         try {
-            if (svcLogicClient.hasGraph(VNF_API, SVC_OPERATION, null, "sync")) {
-
-                try {
-                    respProps = svcLogicClient
-                        .execute(VNF_API, SVC_OPERATION, null, "sync", vfModuleServiceDataBuilder, parms);
-                } catch (Exception e) {
-                    log.error("Caught exception executing service logic on vf-module for " + SVC_OPERATION, e);
-                    errorMessage = e.getMessage();
-                    errorCode = "500";
-                }
-
+            if (svcLogicClient.hasGraph(VNF_API, svcOperation, null, "sync")) {
+                respProps = svcLogicClient.execute(VNF_API, svcOperation, null, "sync", vfModuleServiceDataBuilder, parms);
             } else {
-                errorMessage = "No service logic active for VNF-API: '" + SVC_OPERATION + "'";
+                errorMessage = "No service logic active for VNF-API: '" + svcOperation + "'";
                 errorCode = "503";
             }
+        } catch (SvcLogicException e) {
+            log.error("Caught exception executing service logic for " + svcOperation, e);
+            errorMessage = e.getMessage();
+            errorCode = "500";
         } catch (Exception e) {
             errorCode = "500";
             errorMessage = e.getMessage();
@@ -1334,7 +1315,7 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         serviceStatusBuilder.setRequestStatus(RequestStatus.Synccomplete);
         serviceStatusBuilder.setRpcName(RpcName.VfModuleTopologyOperation);
 
-        if (errorCode != null && errorCode.length() != 0 && !(errorCode.equals("0") || errorCode.equals("200"))) {
+        if (errorCode != null && errorCode.length() != 0 && !("0".equals(errorCode) || "200".equals(errorCode))) {
             responseBuilder.setResponseCode(errorCode);
             responseBuilder.setResponseMessage(errorMessage);
             responseBuilder.setAckFinalIndicator(ackFinal);
@@ -1344,9 +1325,9 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
             try {
                 saveVfModuleList(vfModuleListBuilder.build(), true, LogicalDatastoreType.CONFIGURATION);
             } catch (Exception e) {
-                log.error(CAUGHT_EXCEPTION_STR + SVC_OPERATION + " [" + vfid + "] \n", e);
+                log.error(CAUGHT_EXCEPTION_STR + svcOperation + " [" + vfid + "] \n", e);
             }
-            log.error(RETURNED_FAILED_STR + SVC_OPERATION + " [" + vfid + "] " + responseBuilder.build());
+            log.error(RETURNED_FAILED_STR + svcOperation + " [" + vfid + "] " + responseBuilder.build());
             RpcResult<VfModuleTopologyOperationOutput> rpcResult =
                 RpcResultBuilder.<VfModuleTopologyOperationOutput>status(true).withResult(responseBuilder.build())
                     .build();
@@ -1359,12 +1340,11 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         try {
             vfModuleServiceData = vfModuleServiceDataBuilder.build();
             log.info(
-                UPDATING_MD_SAL_STR + SVC_OPERATION + " [" + vfid + "] VfModuleServiceData: " + vfModuleServiceData);
+                UPDATING_MD_SAL_STR + svcOperation + " [" + vfid + "] VfModuleServiceData: " + vfModuleServiceData);
             // vf-module-list
             VfModuleListBuilder vfModuleListBuilder = new VfModuleListBuilder();
             vfModuleListBuilder.setVfModuleServiceData(vfModuleServiceData);
             vfModuleListBuilder.setVfModuleId(vfModuleServiceData.getVfModuleId());
-            //vfid = vfModuleServiceData.getVfModuleId();
             vfModuleListBuilder.setServiceStatus(serviceStatusBuilder.build());
             saveVfModuleList(vfModuleListBuilder.build(), false, LogicalDatastoreType.CONFIGURATION);
             if (input.getSdncRequestHeader() != null && input.getSdncRequestHeader().getSvcAction() != null) {
@@ -1380,11 +1360,11 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
             responseBuilder.setVfModuleInformation(vfModuleInformationBuilder.build());
             responseBuilder.setServiceInformation(vfModuleServiceData.getServiceInformation());
         } catch (Exception e) {
-            log.error(CAUGHT_EXCEPTION_STR + SVC_OPERATION + " [" + vfid + "] \n", e);
+            log.error(CAUGHT_EXCEPTION_STR + svcOperation + " [" + vfid + "] \n", e);
             responseBuilder.setResponseCode("500");
             responseBuilder.setResponseMessage(e.toString());
             responseBuilder.setAckFinalIndicator("Y");
-            log.error(RETURNED_FAILED_STR + SVC_OPERATION + " [" + vfid + "] " + responseBuilder.build());
+            log.error(RETURNED_FAILED_STR + svcOperation + " [" + vfid + "] " + responseBuilder.build());
             RpcResult<VfModuleTopologyOperationOutput> rpcResult =
                 RpcResultBuilder.<VfModuleTopologyOperationOutput>status(true).withResult(responseBuilder.build())
                     .build();
@@ -1398,8 +1378,8 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         if (errorMessage != null) {
             responseBuilder.setResponseMessage(errorMessage);
         }
-        log.info("Updated vf-module in MD-SAL for " + SVC_OPERATION + " [" + vfid + "] ");
-        log.info(RETURNED_SUCCESS_STR + SVC_OPERATION + " [" + vfid + "] " + responseBuilder.build());
+        log.info("Updated vf-module in MD-SAL for " + svcOperation + " [" + vfid + "] ");
+        log.info(RETURNED_SUCCESS_STR + svcOperation + " [" + vfid + "] " + responseBuilder.build());
 
         RpcResult<VfModuleTopologyOperationOutput> rpcResult =
             RpcResultBuilder.<VfModuleTopologyOperationOutput>status(true).withResult(responseBuilder.build()).build();
@@ -1409,21 +1389,21 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
 
     @Override
     public Future<RpcResult<VnfTopologyOperationOutput>> vnfTopologyOperation(VnfTopologyOperationInput input) {
-        final String SVC_OPERATION = "vnf-topology-operation";
-        ServiceData serviceData = null;
+        final String svcOperation = "vnf-topology-operation";
+        ServiceData serviceData;
         ServiceStatusBuilder serviceStatusBuilder = new ServiceStatusBuilder();
         Properties parms = new Properties();
 
-        log.info(SVC_OPERATION + " called.");
+        log.info(svcOperation + CALLED_STR);
         // create a new response object
         VnfTopologyOperationOutputBuilder responseBuilder = new VnfTopologyOperationOutputBuilder();
 
         if (input == null || input.getServiceInformation() == null
             || input.getServiceInformation().getServiceInstanceId() == null
             || input.getServiceInformation().getServiceInstanceId().length() == 0) {
-            log.debug("exiting " + SVC_OPERATION + " because of invalid input, null or empty service-instance-id");
+            log.debug(EXITING_STR + svcOperation + " because of invalid input, null or empty service-instance-id");
             responseBuilder.setResponseCode("403");
-            responseBuilder.setResponseMessage("invalid input, null or empty service-instance-id");
+            responseBuilder.setResponseMessage(INVALID_INPUT_NULL_OR_EMPTY_SERVICE_INSTANCE_ID);
             responseBuilder.setAckFinalIndicator("Y");
             RpcResult<VnfTopologyOperationOutput> rpcResult =
                 RpcResultBuilder.<VnfTopologyOperationOutput>status(true).withResult(responseBuilder.build()).build();
@@ -1433,7 +1413,7 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
 
         if (input.getVnfRequestInformation() == null || input.getVnfRequestInformation().getVnfId() == null
             || input.getVnfRequestInformation().getVnfId().length() == 0) {
-            log.debug("exiting " + SVC_OPERATION + " because of invalid input, null or empty vf-module-id");
+            log.debug(EXITING_STR + svcOperation + " because of invalid input, null or empty vf-module-id");
             responseBuilder.setResponseCode("403");
             responseBuilder.setResponseMessage("invalid input, null or empty vf-module-id");
             responseBuilder.setAckFinalIndicator("Y");
@@ -1445,8 +1425,8 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
 
         // Grab the service instance ID from the input buffer
         String siid = input.getVnfRequestInformation().getVnfId();
-        String preload_name = input.getVnfRequestInformation().getVnfName();
-        String preload_type = input.getVnfRequestInformation().getVnfType();
+        String preloadName = input.getVnfRequestInformation().getVnfName();
+        String preloadType = input.getVnfRequestInformation().getVnfType();
 
         if (input.getSdncRequestHeader() != null) {
             responseBuilder.setSvcRequestId(input.getSdncRequestHeader().getSvcRequestId());
@@ -1454,7 +1434,7 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         }
 
         PreloadDataBuilder preloadDataBuilder = new PreloadDataBuilder();
-        getPreloadData(preload_name, preload_type, preloadDataBuilder);
+        getPreloadData(preloadName, preloadType, preloadDataBuilder);
 
         ServiceDataBuilder serviceDataBuilder = new ServiceDataBuilder();
         getServiceData(siid, serviceDataBuilder);
@@ -1470,29 +1450,25 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         // setup a service-data object builder
         // ACTION vnf-topology-operation
         // INPUT:
-        //  USES sdnc-request-header;
         //  USES request-information;
-        //  USES service-information;
         //  USES vnf-request-information
         // OUTPUT:
-        //  USES vnf-topology-response-body;
         //  USES vnf-information
         //  USES service-information
         //
         // container service-data
-        //   uses vnf-configuration-information;
         //   uses oper-status;
 
-        log.info("Adding INPUT data for " + SVC_OPERATION + " [" + siid + "] input: " + input);
+        log.info(ADDING_INPUT_DATA_STR + svcOperation + " [" + siid + INPUT_STR + input);
         VnfTopologyOperationInputBuilder inputBuilder = new VnfTopologyOperationInputBuilder(input);
         VnfSdnUtil.toProperties(parms, inputBuilder.build());
 
-        log.info("Adding OPERATIONAL data for " + SVC_OPERATION + " [" + siid + "] operational-data: " + operDataBuilder
+        log.info(ADDING_OPERATIONAL_DATA_STR + svcOperation + " [" + siid + OPERATIONAL_DATA_STR + operDataBuilder
             .build());
-        VnfSdnUtil.toProperties(parms, "operational-data", operDataBuilder);
+        VnfSdnUtil.toProperties(parms, OPERATIONAL_DATA, operDataBuilder);
 
         log.info(
-            "Adding CONFIG data for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] preload-data: "
+            "Adding CONFIG data for " + svcOperation + " [" + preloadName + "," + preloadType + "] preload-data: "
                 + preloadDataBuilder.build());
         VnfSdnUtil.toProperties(parms, "preload-data", preloadDataBuilder);
 
@@ -1504,20 +1480,16 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         String ackFinal = "Y";
 
         try {
-            if (svcLogicClient.hasGraph("VNF-API", SVC_OPERATION, null, "sync")) {
-
-                try {
-                    respProps =
-                        svcLogicClient.execute("VNF-API", SVC_OPERATION, null, "sync", serviceDataBuilder, parms);
-                } catch (Exception e) {
-                    log.error("Caught exception executing service logic for " + SVC_OPERATION, e);
-                    errorMessage = e.getMessage();
-                    errorCode = "500";
-                }
+            if (svcLogicClient.hasGraph(VNF_API, svcOperation, null, "sync")) {
+                respProps = svcLogicClient.execute(VNF_API, svcOperation, null, "sync", serviceDataBuilder, parms);
             } else {
-                errorMessage = "No service logic active for VNF-API: '" + SVC_OPERATION + "'";
+                errorMessage = "No service logic active for VNF-API: '" + svcOperation + "'";
                 errorCode = "503";
             }
+        } catch (SvcLogicException e) {
+            log.error("Caught exception executing service logic for " + siid, e);
+            errorMessage = e.getMessage();
+            errorCode = "500";
         } catch (Exception e) {
             errorCode = "500";
             errorMessage = e.getMessage();
@@ -1534,7 +1506,7 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         serviceStatusBuilder.setRequestStatus(RequestStatus.Synccomplete);
         serviceStatusBuilder.setRpcName(RpcName.VnfTopologyOperation);
 
-        if (errorCode != null && errorCode.length() != 0 && !(errorCode.equals("0") || errorCode.equals("200"))) {
+        if (errorCode != null && errorCode.length() != 0 && !("0".equals(errorCode) || "200".equals(errorCode))) {
             responseBuilder.setResponseCode(errorCode);
             responseBuilder.setResponseMessage(errorMessage);
             responseBuilder.setAckFinalIndicator(ackFinal);
@@ -1544,9 +1516,9 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
             try {
                 saveVnfList(vnfListBuilder.build(), true, LogicalDatastoreType.CONFIGURATION);
             } catch (Exception e) {
-                log.error("Caught Exception updating MD-SAL for " + SVC_OPERATION + " [" + siid + "] \n", e);
+                log.error(CAUGHT_EXCEPTION_STR + svcOperation + " [" + siid + "] \n", e);
             }
-            log.error("Returned FAILED for " + SVC_OPERATION + " [" + siid + "] " + responseBuilder.build());
+            log.error(RETURNED_FAILED_STR + svcOperation + " [" + siid + "] " + responseBuilder.build());
             RpcResult<VnfTopologyOperationOutput> rpcResult =
                 RpcResultBuilder.<VnfTopologyOperationOutput>status(true).withResult(responseBuilder.build()).build();
             // return error
@@ -1556,7 +1528,7 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         // Got success from SLI
         try {
             serviceData = serviceDataBuilder.build();
-            log.info("Updating MD-SAL for " + SVC_OPERATION + " [" + siid + "] ServiceData: " + serviceData);
+            log.info(UPDATING_MD_SAL_STR + svcOperation + " [" + siid + "] ServiceData: " + serviceData);
             // svc-configuration-list
             VnfListBuilder vnfListBuilder = new VnfListBuilder();
             vnfListBuilder.setServiceData(serviceData);
@@ -1567,7 +1539,7 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
             if (input.getSdncRequestHeader() != null && input.getSdncRequestHeader().getSvcAction() != null) {
                 // Only update operational tree on Delete or Activate
                 if (input.getSdncRequestHeader().getSvcAction().equals(SvcAction.Activate)) {
-                    log.info("Updating OPERATIONAL tree.");
+                    log.info(UPDATING_OPERATIONAL_TREE_STR);
                     saveVnfList(vnfListBuilder.build(), false, LogicalDatastoreType.OPERATIONAL);
                 } else if (input.getSdncRequestHeader().getSvcAction().equals(SvcAction.Delete) || input
                     .getSdncRequestHeader().getSvcAction().equals(SvcAction.Rollback)) {
@@ -1581,11 +1553,11 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
             responseBuilder.setVnfInformation(vnfInformationBuilder.build());
             responseBuilder.setServiceInformation(serviceData.getServiceInformation());
         } catch (Exception e) {
-            log.error("Caught Exception updating MD-SAL for " + SVC_OPERATION + " [" + siid + "] \n", e);
+            log.error(CAUGHT_EXCEPTION_STR + svcOperation + " [" + siid + "] \n", e);
             responseBuilder.setResponseCode("500");
             responseBuilder.setResponseMessage(e.toString());
             responseBuilder.setAckFinalIndicator("Y");
-            log.error("Returned FAILED for " + SVC_OPERATION + " [" + siid + "] " + responseBuilder.build());
+            log.error(RETURNED_FAILED_STR + svcOperation + " [" + siid + "] " + responseBuilder.build());
             RpcResult<VnfTopologyOperationOutput> rpcResult =
                 RpcResultBuilder.<VnfTopologyOperationOutput>status(true).withResult(responseBuilder.build()).build();
             // return error
@@ -1598,8 +1570,8 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         if (errorMessage != null) {
             responseBuilder.setResponseMessage(errorMessage);
         }
-        log.info("Updated MD-SAL for " + SVC_OPERATION + " [" + siid + "] ");
-        log.info("Returned SUCCESS for " + SVC_OPERATION + " [" + siid + "] " + responseBuilder.build());
+        log.info(UPDATED_MD_SAL_STR + svcOperation + " [" + siid + "] ");
+        log.info(RETURNED_SUCCESS_STR + svcOperation + " [" + siid + "] " + responseBuilder.build());
 
         RpcResult<VnfTopologyOperationOutput> rpcResult =
             RpcResultBuilder.<VnfTopologyOperationOutput>status(true).withResult(responseBuilder.build()).build();
@@ -1607,24 +1579,25 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         return Futures.immediateFuture(rpcResult);
     }
 
-    @Override public Future<RpcResult<NetworkTopologyOperationOutput>> networkTopologyOperation(
+    @Override
+    public Future<RpcResult<NetworkTopologyOperationOutput>> networkTopologyOperation(
         NetworkTopologyOperationInput input) {
 
-        final String SVC_OPERATION = "network-topology-operation";
-        ServiceData serviceData = null;
+        final String svcOperation = "network-topology-operation";
+        ServiceData serviceData;
         ServiceStatusBuilder serviceStatusBuilder = new ServiceStatusBuilder();
         Properties parms = new Properties();
 
-        log.info(SVC_OPERATION + " called.");
+        log.info(svcOperation + CALLED_STR);
         // create a new response object
         NetworkTopologyOperationOutputBuilder responseBuilder = new NetworkTopologyOperationOutputBuilder();
 
         if (input == null || input.getServiceInformation() == null
             || input.getServiceInformation().getServiceInstanceId() == null
             || input.getServiceInformation().getServiceInstanceId().length() == 0) {
-            log.debug("exiting " + SVC_OPERATION + " because of invalid input, null or empty service-instance-id");
+            log.debug(EXITING_STR + svcOperation + " because of invalid input, null or empty service-instance-id");
             responseBuilder.setResponseCode("403");
-            responseBuilder.setResponseMessage("invalid input, null or empty service-instance-id");
+            responseBuilder.setResponseMessage(INVALID_INPUT_NULL_OR_EMPTY_SERVICE_INSTANCE_ID);
             responseBuilder.setAckFinalIndicator("Y");
             RpcResult<NetworkTopologyOperationOutput> rpcResult =
                 RpcResultBuilder.<NetworkTopologyOperationOutput>status(true).withResult(responseBuilder.build())
@@ -1635,9 +1608,9 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
 
         if (input.getNetworkRequestInformation() == null
             || input.getNetworkRequestInformation().getNetworkName() == null) {
-            log.debug("exiting " + SVC_OPERATION + " because of invalid input, null or empty service-instance-id");
+            log.debug(EXITING_STR + svcOperation + " because of invalid input, null or empty service-instance-id");
             responseBuilder.setResponseCode("403");
-            responseBuilder.setResponseMessage("invalid input, null or empty service-instance-id");
+            responseBuilder.setResponseMessage(INVALID_INPUT_NULL_OR_EMPTY_SERVICE_INSTANCE_ID);
             responseBuilder.setAckFinalIndicator("Y");
             RpcResult<NetworkTopologyOperationOutput> rpcResult =
                 RpcResultBuilder.<NetworkTopologyOperationOutput>status(true).withResult(responseBuilder.build())
@@ -1647,14 +1620,14 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         }
 
         // Grab the service instance ID from the input buffer
-        String siid = null;
+        String siid;
         if (input.getSdncRequestHeader().getSvcAction().equals(SvcAction.Assign)) {
             siid = input.getNetworkRequestInformation().getNetworkName();
         } else {
             siid = input.getNetworkRequestInformation().getNetworkId();
         }
-        String preload_name = input.getNetworkRequestInformation().getNetworkName();
-        String preload_type = input.getNetworkRequestInformation().getNetworkType();
+        String preloadName = input.getNetworkRequestInformation().getNetworkName();
+        String preloadType = input.getNetworkRequestInformation().getNetworkType();
 
         if (input.getSdncRequestHeader() != null) {
             responseBuilder.setSvcRequestId(input.getSdncRequestHeader().getSvcRequestId());
@@ -1662,9 +1635,9 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         }
 
         PreloadDataBuilder preloadDataBuilder = new PreloadDataBuilder();
-        getPreloadData(preload_name, preload_type, preloadDataBuilder);
+        getPreloadData(preloadName, preloadType, preloadDataBuilder);
 
-        log.info("Adding INPUT data for " + SVC_OPERATION + " [" + siid + "] input: " + input);
+        log.info(ADDING_INPUT_DATA_STR + svcOperation + " [" + siid + INPUT_STR + input);
         NetworkTopologyOperationInputBuilder inputBuilder = new NetworkTopologyOperationInputBuilder(input);
         VnfSdnUtil.toProperties(parms, inputBuilder.build());
 
@@ -1677,20 +1650,16 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         String networkId = "error";
 
         try {
-            if (svcLogicClient.hasGraph("VNF-API", SVC_OPERATION, null, "sync")) {
-
-                try {
-                    respProps =
-                        svcLogicClient.execute("VNF-API", SVC_OPERATION, null, "sync", preloadDataBuilder, parms);
-                } catch (Exception e) {
-                    log.error("Caught exception executing service logic for " + SVC_OPERATION, e);
-                    errorMessage = e.getMessage();
-                    errorCode = "500";
-                }
+            if (svcLogicClient.hasGraph(VNF_API, svcOperation, null, "sync")) {
+                respProps =  svcLogicClient.execute(VNF_API, svcOperation, null, "sync", preloadDataBuilder, parms);
             } else {
-                errorMessage = "No service logic active for VNF-API: '" + SVC_OPERATION + "'";
+                errorMessage = "No service logic active for VNF-API: '" + svcOperation + "'";
                 errorCode = "503";
             }
+        } catch (SvcLogicException e) {
+            log.error("Caught exception executing service logic for " + svcOperation, e);
+            errorMessage = e.getMessage();
+            errorCode = "500";
         } catch (Exception e) {
             errorCode = "500";
             errorMessage = e.getMessage();
@@ -1704,12 +1673,12 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
             networkId = respProps.getProperty("networkId", "0");
         }
 
-        if (errorCode != null && errorCode.length() != 0 && !(errorCode.equals("0") || errorCode.equals("200"))) {
+        if (errorCode != null && errorCode.length() != 0 && !("0".equals(errorCode) || "200".equals(errorCode))) {
             responseBuilder.setResponseCode(errorCode);
             responseBuilder.setResponseMessage(errorMessage);
             responseBuilder.setAckFinalIndicator(ackFinal);
 
-            log.error("Returned FAILED for " + SVC_OPERATION + " [" + siid + "] " + responseBuilder.build());
+            log.error(RETURNED_FAILED_STR + svcOperation + " [" + siid + "] " + responseBuilder.build());
 
             RpcResult<NetworkTopologyOperationOutput> rpcResult =
                 RpcResultBuilder.<NetworkTopologyOperationOutput>status(true).withResult(responseBuilder.build())
@@ -1725,11 +1694,11 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
             responseBuilder.setNetworkInformation(networkInformationBuilder.build());
             responseBuilder.setServiceInformation(input.getServiceInformation());
         } catch (IllegalStateException e) {
-            log.error("Caught Exception updating MD-SAL for " + SVC_OPERATION + " [" + siid + "] \n", e);
+            log.error(CAUGHT_EXCEPTION_STR + svcOperation + " [" + siid + "] \n", e);
             responseBuilder.setResponseCode("500");
             responseBuilder.setResponseMessage(e.toString());
             responseBuilder.setAckFinalIndicator("Y");
-            log.error("Returned FAILED for " + SVC_OPERATION + " [" + siid + "] " + responseBuilder.build());
+            log.error(RETURNED_FAILED_STR + svcOperation + " [" + siid + "] " + responseBuilder.build());
             RpcResult<NetworkTopologyOperationOutput> rpcResult =
                 RpcResultBuilder.<NetworkTopologyOperationOutput>status(true).withResult(responseBuilder.build())
                     .build();
@@ -1743,8 +1712,8 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         if (errorMessage != null) {
             responseBuilder.setResponseMessage(errorMessage);
         }
-        log.info("Updated MD-SAL for " + SVC_OPERATION + " [" + siid + "] ");
-        log.info("Returned SUCCESS for " + SVC_OPERATION + " [" + siid + "] " + responseBuilder.build());
+        log.info(UPDATED_MD_SAL_STR + svcOperation + " [" + siid + "] ");
+        log.info(RETURNED_SUCCESS_STR + svcOperation + " [" + siid + "] " + responseBuilder.build());
 
         RpcResult<NetworkTopologyOperationOutput> rpcResult =
             RpcResultBuilder.<NetworkTopologyOperationOutput>status(true).withResult(responseBuilder.build()).build();
@@ -1752,25 +1721,25 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         return Futures.immediateFuture(rpcResult);
     }
 
-    @Override public Future<RpcResult<PreloadVnfTopologyOperationOutput>> preloadVnfTopologyOperation(
+    @Override
+    public Future<RpcResult<PreloadVnfTopologyOperationOutput>> preloadVnfTopologyOperation(
         PreloadVnfTopologyOperationInput input) {
 
-        final String SVC_OPERATION = "preload-vnf-topology-operation";
-        PreloadData preloadData = null;
+        final String svcOperation = "preload-vnf-topology-operation";
+        PreloadData preloadData;
         Properties parms = new Properties();
 
-        log.info(SVC_OPERATION + " called.");
+        log.info(svcOperation + CALLED_STR);
         // create a new response object
         PreloadVnfTopologyOperationOutputBuilder responseBuilder = new PreloadVnfTopologyOperationOutputBuilder();
 
         // Result from savePreloadData
-        final SettableFuture<RpcResult<Void>> futureResult = SettableFuture.create();
 
         if (input == null || input.getVnfTopologyInformation() == null
             || input.getVnfTopologyInformation().getVnfTopologyIdentifier() == null
             || input.getVnfTopologyInformation().getVnfTopologyIdentifier().getVnfName() == null
             || input.getVnfTopologyInformation().getVnfTopologyIdentifier().getVnfType() == null) {
-            log.debug("exiting " + SVC_OPERATION + " because of invalid input, null or empty vnf-name or vnf-type");
+            log.debug(EXITING_STR + svcOperation + " because of invalid input, null or empty vnf-name or vnf-type");
             responseBuilder.setResponseCode("403");
             responseBuilder.setResponseMessage("invalid input, null or empty vnf-name or vnf-type");
             responseBuilder.setAckFinalIndicator("Y");
@@ -1781,24 +1750,25 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         }
 
         // Grab the name and type from the input buffer
-        String preload_name = input.getVnfTopologyInformation().getVnfTopologyIdentifier().getVnfName();
-        String preload_type = input.getVnfTopologyInformation().getVnfTopologyIdentifier().getVnfType();
+        String preloadName = input.getVnfTopologyInformation().getVnfTopologyIdentifier().getVnfName();
+        String preloadType = input.getVnfTopologyInformation().getVnfTopologyIdentifier().getVnfType();
 
         // Make sure we have a preload_name and preload_type
-        if (preload_name == null || preload_name.length() == 0) {
-            log.debug("exiting " + SVC_OPERATION + " because of invalid preload-name");
+        if (preloadName == null || preloadName.length() == 0) {
+            log.debug(EXITING_STR + svcOperation + " because of invalid preload-name");
             responseBuilder.setResponseCode("403");
-            responseBuilder.setResponseMessage("invalid input, invalid preload-name");
+            responseBuilder.setResponseMessage(INVALID_INPUT_INVALID_PRELOAD_TYPE);
             responseBuilder.setAckFinalIndicator("Y");
             RpcResult<PreloadVnfTopologyOperationOutput> rpcResult =
                 RpcResultBuilder.<PreloadVnfTopologyOperationOutput>status(true).withResult(responseBuilder.build())
                     .build();
             return Futures.immediateFuture(rpcResult);
         }
-        if (preload_type == null || preload_type.length() == 0) {
-            log.debug("exiting " + SVC_OPERATION + " because of invalid preload-type");
+
+        if (preloadType == null || preloadType.length() == 0) {
+            log.debug(EXITING_STR + svcOperation + " because of invalid preload-type");
             responseBuilder.setResponseCode("403");
-            responseBuilder.setResponseMessage("invalid input, invalid preload-type");
+            responseBuilder.setResponseMessage(INVALID_INPUT_INVALID_PRELOAD_TYPE);
             responseBuilder.setAckFinalIndicator("Y");
             RpcResult<PreloadVnfTopologyOperationOutput> rpcResult =
                 RpcResultBuilder.<PreloadVnfTopologyOperationOutput>status(true).withResult(responseBuilder.build())
@@ -1812,31 +1782,26 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         }
 
         PreloadDataBuilder preloadDataBuilder = new PreloadDataBuilder();
-        getPreloadData(preload_name, preload_type, preloadDataBuilder);
-        //preloadData = preloadDataBuilder.build();
-
+        getPreloadData(preloadName, preloadType, preloadDataBuilder);
         PreloadDataBuilder operDataBuilder = new PreloadDataBuilder();
-        getPreloadData(preload_name, preload_type, operDataBuilder, LogicalDatastoreType.OPERATIONAL);
+        getPreloadData(preloadName, preloadType, operDataBuilder, LogicalDatastoreType.OPERATIONAL);
 
         //
         // setup a preload-data object builder
         // ACTION vnf-topology-operation
         // INPUT:
-        //  USES sdnc-request-header;
         //  USES request-information;
         //  uses vnf-topology-information;
         // OUTPUT:
-        //  USES vnf-topology-response-body;
         //
         // container preload-data
-        //   uses vnf-configuration-information;
         log.info(
-            "Adding INPUT data for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] input: " + input);
+            ADDING_INPUT_DATA_STR + svcOperation + " [" + preloadName + "," + preloadType + INPUT_STR + input);
         PreloadVnfTopologyOperationInputBuilder inputBuilder = new PreloadVnfTopologyOperationInputBuilder(input);
         VnfSdnUtil.toProperties(parms, inputBuilder.build());
-        log.info("Adding OPERATIONAL data for " + SVC_OPERATION + " [" + preload_name + "," + preload_type
-            + "] operational-data: " + operDataBuilder.build());
-        VnfSdnUtil.toProperties(parms, "operational-data", operDataBuilder);
+        log.info(ADDING_OPERATIONAL_DATA_STR + svcOperation + " [" + preloadName + "," + preloadType
+            + OPERATIONAL_DATA_STR + operDataBuilder.build());
+        VnfSdnUtil.toProperties(parms, OPERATIONAL_DATA, operDataBuilder);
 
         // Call SLI sync method
         // Get SvcLogicService reference
@@ -1846,20 +1811,16 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         String ackFinal = "Y";
 
         try {
-            if (svcLogicClient.hasGraph("VNF-API", SVC_OPERATION, null, "sync")) {
-
-                try {
-                    respProps =
-                        svcLogicClient.execute("VNF-API", SVC_OPERATION, null, "sync", preloadDataBuilder, parms);
-                } catch (Exception e) {
-                    log.error("Caught exception executing service logic for " + SVC_OPERATION, e);
-                    errorMessage = e.getMessage();
-                    errorCode = "500";
-                }
+            if (svcLogicClient.hasGraph(VNF_API, svcOperation, null, "sync")) {
+              respProps = svcLogicClient.execute(VNF_API, svcOperation, null, "sync", preloadDataBuilder, parms);
             } else {
-                errorMessage = "No service logic active for VNF-API: '" + SVC_OPERATION + "'";
+                errorMessage = "No service logic active for VNF-API: '" + svcOperation + "'";
                 errorCode = "503";
             }
+        } catch (SvcLogicException e) {
+            log.error("Caught exception executing service logic for " + svcOperation, e);
+            errorMessage = e.getMessage();
+            errorCode = "500";
         } catch (Exception e) {
             errorCode = "500";
             errorMessage = e.getMessage();
@@ -1870,30 +1831,29 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
             errorCode = respProps.getProperty("error-code");
             errorMessage = respProps.getProperty("error-message");
             ackFinal = respProps.getProperty("ack-final", "Y");
-            // internalError = respProps.getProperty("internal-error", "false");
         }
 
-        if (errorCode != null && errorCode.length() != 0 && !(errorCode.equals("0") || errorCode.equals("200"))) {
+        if (errorCode != null && errorCode.length() != 0 && !("0".equals(errorCode) || "200".equals(errorCode))) {
 
             responseBuilder.setResponseCode(errorCode);
             responseBuilder.setResponseMessage(errorMessage);
             responseBuilder.setAckFinalIndicator(ackFinal);
 
             VnfPreloadListBuilder preloadVnfListBuilder = new VnfPreloadListBuilder();
-            preloadVnfListBuilder.setVnfName(preload_name);
-            preloadVnfListBuilder.setVnfType(preload_type);
+            preloadVnfListBuilder.setVnfName(preloadName);
+            preloadVnfListBuilder.setVnfType(preloadType);
             preloadVnfListBuilder.setPreloadData(preloadDataBuilder.build());
             log.error(
-                "Returned FAILED for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] error code: '"
+                RETURNED_FAILED_STR + svcOperation + " [" + preloadName + "," + preloadType + "] error code: '"
                     + errorCode + "', Reason: '" + errorMessage + "'");
             try {
                 savePreloadList(preloadVnfListBuilder.build(), true, LogicalDatastoreType.CONFIGURATION);
             } catch (Exception e) {
                 log.error(
-                    "Caught Exception updating MD-SAL for " + SVC_OPERATION + " [" + preload_name + "," + preload_type
+                    CAUGHT_EXCEPTION_STR + svcOperation + " [" + preloadName + "," + preloadType
                         + "] \n", e);
             }
-            log.debug("Sending Success rpc result due to external error");
+            log.debug(SENDING_SUCCESS_RPC);
             RpcResult<PreloadVnfTopologyOperationOutput> rpcResult =
                 RpcResultBuilder.<PreloadVnfTopologyOperationOutput>status(true).withResult(responseBuilder.build())
                     .build();
@@ -1904,25 +1864,25 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         try {
             preloadData = preloadDataBuilder.build();
             log.info(
-                "Updating MD-SAL for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] preloadData: "
+                UPDATING_MD_SAL_STR + svcOperation + " [" + preloadName + "," + preloadType + "] preloadData: "
                     + preloadData);
             // svc-configuration-list
             VnfPreloadListBuilder preloadVnfListBuilder = new VnfPreloadListBuilder();
-            preloadVnfListBuilder.setVnfName(preload_name);
-            preloadVnfListBuilder.setVnfType(preload_type);
+            preloadVnfListBuilder.setVnfName(preloadName);
+            preloadVnfListBuilder.setVnfType(preloadType);
             preloadVnfListBuilder.setPreloadData(preloadData);
 
             // SDNGC-989 set merge flag to false
             savePreloadList(preloadVnfListBuilder.build(), false, LogicalDatastoreType.CONFIGURATION);
-            log.info("Updating OPERATIONAL tree.");
+            log.info(UPDATING_OPERATIONAL_TREE_STR);
             savePreloadList(preloadVnfListBuilder.build(), false, LogicalDatastoreType.OPERATIONAL);
         } catch (Exception e) {
-            log.error("Caught Exception updating MD-SAL for " + SVC_OPERATION + " [" + preload_name + "," + preload_type
+            log.error(CAUGHT_EXCEPTION_STR + svcOperation + " [" + preloadName + "," + preloadType
                 + "] \n", e);
             responseBuilder.setResponseCode("500");
             responseBuilder.setResponseMessage(e.toString());
             responseBuilder.setAckFinalIndicator("Y");
-            log.error("Returned FAILED for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] "
+            log.error(RETURNED_FAILED_STR + svcOperation + " [" + preloadName + "," + preloadType + "] "
                 + responseBuilder.build());
             RpcResult<PreloadVnfTopologyOperationOutput> rpcResult =
                 RpcResultBuilder.<PreloadVnfTopologyOperationOutput>status(false).withResult(responseBuilder.build())
@@ -1936,9 +1896,9 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         if (errorMessage != null) {
             responseBuilder.setResponseMessage(errorMessage);
         }
-        log.info("Updated MD-SAL for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] ");
+        log.info(UPDATED_MD_SAL_STR + svcOperation + " [" + preloadName + "," + preloadType + "] ");
         log.info(
-            "Returned SUCCESS for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] " + responseBuilder
+            RETURNED_SUCCESS_STR + svcOperation + " [" + preloadName + "," + preloadType + "] " + responseBuilder
                 .build());
 
         RpcResult<PreloadVnfTopologyOperationOutput> rpcResult =
@@ -1948,25 +1908,23 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
     }
 
     //1610 preload-vnf-instance-topology-operation
-    @Override public Future<RpcResult<PreloadVnfInstanceTopologyOperationOutput>> preloadVnfInstanceTopologyOperation(
+    @Override
+    public Future<RpcResult<PreloadVnfInstanceTopologyOperationOutput>> preloadVnfInstanceTopologyOperation(
         PreloadVnfInstanceTopologyOperationInput input) {
 
-        final String SVC_OPERATION = "preload-vnf-instance-topology-operation";
-        VnfInstancePreloadData vnfInstancePreloadData = null;
+        final String svcOperation = "preload-vnf-instance-topology-operation";
+        VnfInstancePreloadData vnfInstancePreloadData;
         Properties parms = new Properties();
 
-        log.info(SVC_OPERATION + " called.");
+        log.info(svcOperation + CALLED_STR);
         // create a new response object
         PreloadVnfInstanceTopologyOperationOutputBuilder responseBuilder =
             new PreloadVnfInstanceTopologyOperationOutputBuilder();
 
-        // Result from savePreloadData
-        final SettableFuture<RpcResult<Void>> futureResult = SettableFuture.create();
-
         if (input == null || input.getVnfInstanceTopologyInformation() == null
             || input.getVnfInstanceTopologyInformation().getVnfInstanceIdentifiers().getVnfInstanceName() == null
             || input.getVnfInstanceTopologyInformation().getVnfInstanceIdentifiers().getVnfModelId() == null) {
-            log.debug("exiting " + SVC_OPERATION
+            log.debug(EXITING_STR + svcOperation
                 + " because of invalid input, null or empty vnf-instance-name or vnf-model-id");
             responseBuilder.setResponseCode("403");
             responseBuilder.setResponseMessage("invalid input, null or empty vnf-instance-name or vnf-model-id");
@@ -1978,13 +1936,13 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         }
 
         // Grab the name and type from the input buffer
-        String preload_name =
+        String preloadName =
             input.getVnfInstanceTopologyInformation().getVnfInstanceIdentifiers().getVnfInstanceName();
-        String preload_type = input.getVnfInstanceTopologyInformation().getVnfInstanceIdentifiers().getVnfModelId();
+        String preloadType = input.getVnfInstanceTopologyInformation().getVnfInstanceIdentifiers().getVnfModelId();
 
-        // Make sure we have a preload_name and preload_type
-        if (preload_name == null || preload_name.length() == 0) {
-            log.debug("exiting " + SVC_OPERATION + " because of invalid preload-name");
+        // Make sure we have a preloadName and preloadType
+        if (preloadName == null || preloadName.length() == 0) {
+            log.debug(EXITING_STR + svcOperation + " because of invalid preload-name");
             responseBuilder.setResponseCode("403");
             responseBuilder.setResponseMessage("invalid input, invalid preload-name");
             responseBuilder.setAckFinalIndicator("Y");
@@ -1993,8 +1951,9 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
                     .withResult(responseBuilder.build()).build();
             return Futures.immediateFuture(rpcResult);
         }
-        if (preload_type == null || preload_type.length() == 0) {
-            log.debug("exiting " + SVC_OPERATION + " because of invalid preload-type");
+
+        if (preloadType == null || preloadType.length() == 0) {
+            log.debug(EXITING_STR + svcOperation + " because of invalid preload-type");
             responseBuilder.setResponseCode("403");
             responseBuilder.setResponseMessage("invalid input, invalid preload-type");
             responseBuilder.setAckFinalIndicator("Y");
@@ -2010,32 +1969,25 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         }
 
         VnfInstancePreloadDataBuilder vnfInstancePreloadDataBuilder = new VnfInstancePreloadDataBuilder();
-        getVnfInstancePreloadData(preload_name, preload_type, vnfInstancePreloadDataBuilder);
-        //preloadData = preloadDataBuilder.build();
-
+        getVnfInstancePreloadData(preloadName, preloadType, vnfInstancePreloadDataBuilder);
         VnfInstancePreloadDataBuilder operDataBuilder = new VnfInstancePreloadDataBuilder();
-        getVnfInstancePreloadData(preload_name, preload_type, operDataBuilder, LogicalDatastoreType.OPERATIONAL);
+        getVnfInstancePreloadData(preloadName, preloadType, operDataBuilder, LogicalDatastoreType.OPERATIONAL);
 
         //
         // setup a preload-data object builder
         // ACTION vnf-topology-operation
         // INPUT:
-        //  USES sdnc-request-header;
-        //  USES request-information;
         //  uses vnf-topology-information;
         // OUTPUT:
-        //  USES vnf-topology-response-body;
-        //
         // container preload-data
-        //   uses vnf-configuration-information;
         log.info(
-            "Adding INPUT data for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] input: " + input);
+            ADDING_CONFIG_DATA_STR + svcOperation + " [" + preloadName + "," + preloadType + INPUT_STR + input);
         PreloadVnfInstanceTopologyOperationInputBuilder inputBuilder =
             new PreloadVnfInstanceTopologyOperationInputBuilder(input);
         VnfSdnUtil.toProperties(parms, inputBuilder.build());
-        log.info("Adding OPERATIONAL data for " + SVC_OPERATION + " [" + preload_name + "," + preload_type
-            + "] operational-data: " + operDataBuilder.build());
-        VnfSdnUtil.toProperties(parms, "operational-data", operDataBuilder);
+        log.info(ADDING_OPERATIONAL_DATA_STR + svcOperation + " [" + preloadName + "," + preloadType
+            + OPERATIONAL_DATA_STR + operDataBuilder.build());
+        VnfSdnUtil.toProperties(parms, OPERATIONAL_DATA, operDataBuilder);
 
         // Call SLI sync method
         // Get SvcLogicService reference
@@ -2045,20 +1997,16 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         String ackFinal = "Y";
 
         try {
-            if (svcLogicClient.hasGraph("VNF-API", SVC_OPERATION, null, "sync")) {
-
-                try {
-                    respProps = svcLogicClient
-                        .execute("VNF-API", SVC_OPERATION, null, "sync", vnfInstancePreloadDataBuilder, parms);
-                } catch (Exception e) {
-                    log.error("Caught exception executing service logic for " + SVC_OPERATION, e);
-                    errorMessage = e.getMessage();
-                    errorCode = "500";
-                }
+            if (svcLogicClient.hasGraph(VNF_API, svcOperation, null, "sync")) {
+                respProps = svcLogicClient.execute(VNF_API, svcOperation, null, "sync", vnfInstancePreloadDataBuilder, parms);
             } else {
-                errorMessage = "No service logic active for VNF-API: '" + SVC_OPERATION + "'";
+                errorMessage = "No service logic active for VNF-API: '" + svcOperation + "'";
                 errorCode = "503";
             }
+        } catch (SvcLogicException e) {
+            log.error("Caught exception executing service logic for " + svcOperation, e);
+            errorMessage = e.getMessage();
+            errorCode = "500";
         } catch (Exception e) {
             errorCode = "500";
             errorMessage = e.getMessage();
@@ -2069,31 +2017,30 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
             errorCode = respProps.getProperty("error-code");
             errorMessage = respProps.getProperty("error-message");
             ackFinal = respProps.getProperty("ack-final", "Y");
-            // internalError = respProps.getProperty("internal-error", "false");
         }
 
-        if (errorCode != null && errorCode.length() != 0 && !(errorCode.equals("0") || errorCode.equals("200"))) {
+        if (errorCode != null && errorCode.length() != 0 && !("0".equals(errorCode) || "200".equals(errorCode))) {
 
             responseBuilder.setResponseCode(errorCode);
             responseBuilder.setResponseMessage(errorMessage);
             responseBuilder.setAckFinalIndicator(ackFinal);
 
             VnfInstancePreloadListBuilder vnfInstancePreloadListBuilder = new VnfInstancePreloadListBuilder();
-            vnfInstancePreloadListBuilder.setVnfInstanceName(preload_name);
-            vnfInstancePreloadListBuilder.setVnfModelId(preload_type);
+            vnfInstancePreloadListBuilder.setVnfInstanceName(preloadName);
+            vnfInstancePreloadListBuilder.setVnfModelId(preloadType);
             vnfInstancePreloadListBuilder.setVnfInstancePreloadData(vnfInstancePreloadDataBuilder.build());
             log.error(
-                "Returned FAILED for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] error code: '"
+                RETURNED_FAILED_STR + svcOperation + " [" + preloadName + "," + preloadType + "] error code: '"
                     + errorCode + "', Reason: '" + errorMessage + "'");
             try {
                 saveVnfInstancePreloadList(vnfInstancePreloadListBuilder.build(), true,
                     LogicalDatastoreType.CONFIGURATION);
             } catch (Exception e) {
                 log.error(
-                    "Caught Exception updating MD-SAL for " + SVC_OPERATION + " [" + preload_name + "," + preload_type
+                    CAUGHT_EXCEPTION_STR + svcOperation + " [" + preloadName + "," + preloadType
                         + "] \n", e);
             }
-            log.debug("Sending Success rpc result due to external error");
+            log.debug(SENDING_SUCCESS_RPC);
             RpcResult<PreloadVnfInstanceTopologyOperationOutput> rpcResult =
                 RpcResultBuilder.<PreloadVnfInstanceTopologyOperationOutput>status(true)
                     .withResult(responseBuilder.build()).build();
@@ -2104,26 +2051,26 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         try {
             vnfInstancePreloadData = vnfInstancePreloadDataBuilder.build();
             log.info(
-                "Updating MD-SAL for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] preloadData: "
+                UPDATING_MD_SAL_STR + svcOperation + " [" + preloadName + "," + preloadType + "] preloadData: "
                     + vnfInstancePreloadData);
             // svc-configuration-list
             VnfInstancePreloadListBuilder vnfInstancePreloadListBuilder = new VnfInstancePreloadListBuilder();
-            vnfInstancePreloadListBuilder.setVnfInstanceName(preload_name);
-            vnfInstancePreloadListBuilder.setVnfModelId(preload_type);
+            vnfInstancePreloadListBuilder.setVnfInstanceName(preloadName);
+            vnfInstancePreloadListBuilder.setVnfModelId(preloadType);
             vnfInstancePreloadListBuilder.setVnfInstancePreloadData(vnfInstancePreloadData);
 
             // SDNGC-989 set merge flag to false
             saveVnfInstancePreloadList(vnfInstancePreloadListBuilder.build(), false,
                 LogicalDatastoreType.CONFIGURATION);
-            log.info("Updating OPERATIONAL tree.");
+            log.info(UPDATING_OPERATIONAL_TREE_STR);
             saveVnfInstancePreloadList(vnfInstancePreloadListBuilder.build(), false, LogicalDatastoreType.OPERATIONAL);
         } catch (Exception e) {
-            log.error("Caught Exception updating MD-SAL for " + SVC_OPERATION + " [" + preload_name + "," + preload_type
+            log.error(CAUGHT_EXCEPTION_STR + svcOperation + " [" + preloadName + "," + preloadType
                 + "] \n", e);
             responseBuilder.setResponseCode("500");
             responseBuilder.setResponseMessage(e.toString());
             responseBuilder.setAckFinalIndicator("Y");
-            log.error("Returned FAILED for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] "
+            log.error(RETURNED_FAILED_STR + svcOperation + " [" + preloadName + "," + preloadType + "] "
                 + responseBuilder.build());
             RpcResult<PreloadVnfInstanceTopologyOperationOutput> rpcResult =
                 RpcResultBuilder.<PreloadVnfInstanceTopologyOperationOutput>status(false)
@@ -2137,9 +2084,9 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         if (errorMessage != null) {
             responseBuilder.setResponseMessage(errorMessage);
         }
-        log.info("Updated MD-SAL for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] ");
+        log.info(UPDATED_MD_SAL_STR + svcOperation + " [" + preloadName + "," + preloadType + "] ");
         log.info(
-            "Returned SUCCESS for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] " + responseBuilder
+            RETURNED_SUCCESS_STR + svcOperation + " [" + preloadName + "," + preloadType + "] " + responseBuilder
                 .build());
 
         RpcResult<PreloadVnfInstanceTopologyOperationOutput> rpcResult =
@@ -2150,25 +2097,25 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
 
 
     //1610 preload-vf-module-topology-operation
-    @Override public Future<RpcResult<PreloadVfModuleTopologyOperationOutput>> preloadVfModuleTopologyOperation(
+    @Override
+    public Future<RpcResult<PreloadVfModuleTopologyOperationOutput>> preloadVfModuleTopologyOperation(
         PreloadVfModuleTopologyOperationInput input) {
 
-        final String SVC_OPERATION = "preload-vf-module-topology-operation";
-        VfModulePreloadData vfModulePreloadData = null;
+        final String svcOperation = "preload-vf-module-topology-operation";
+        VfModulePreloadData vfModulePreloadData;
         Properties parms = new Properties();
 
-        log.info(SVC_OPERATION + " called.");
+        log.info(svcOperation + CALLED_STR);
         // create a new response object
         PreloadVfModuleTopologyOperationOutputBuilder responseBuilder =
             new PreloadVfModuleTopologyOperationOutputBuilder();
 
         // Result from savePreloadData
-        final SettableFuture<RpcResult<Void>> futureResult = SettableFuture.create();
 
         if (input == null || input.getVfModuleTopologyInformation() == null
             || input.getVfModuleTopologyInformation().getVfModuleIdentifiers().getVfModuleName() == null
             || input.getVfModuleTopologyInformation().getVfModuleIdentifiers().getVfModuleModelId() == null) {
-            log.debug("exiting " + SVC_OPERATION
+            log.debug(EXITING_STR + svcOperation
                 + " because of invalid input, null or empty vf-module-name or vf-module-model-id");
             responseBuilder.setResponseCode("403");
             responseBuilder.setResponseMessage("invalid input, null or empty vf-module-name or vf-module-model-id");
@@ -2180,12 +2127,12 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         }
 
         // Grab the name and type from the input buffer
-        String preload_name = input.getVfModuleTopologyInformation().getVfModuleIdentifiers().getVfModuleName();
-        String preload_type = input.getVfModuleTopologyInformation().getVfModuleIdentifiers().getVfModuleModelId();
+        String preloadName = input.getVfModuleTopologyInformation().getVfModuleIdentifiers().getVfModuleName();
+        String preloadType = input.getVfModuleTopologyInformation().getVfModuleIdentifiers().getVfModuleModelId();
 
-        // Make sure we have a preload_name and preload_type
-        if (preload_name == null || preload_name.length() == 0) {
-            log.debug("exiting " + SVC_OPERATION + " because of invalid preload-name");
+        // Make sure we have a preloadName and preloadType
+        if (preloadName == null || preloadName.length() == 0) {
+            log.debug(EXITING_STR + svcOperation + " because of invalid preload-name");
             responseBuilder.setResponseCode("403");
             responseBuilder.setResponseMessage("invalid input, invalid preload-name");
             responseBuilder.setAckFinalIndicator("Y");
@@ -2194,8 +2141,8 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
                     .withResult(responseBuilder.build()).build();
             return Futures.immediateFuture(rpcResult);
         }
-        if (preload_type == null || preload_type.length() == 0) {
-            log.debug("exiting " + SVC_OPERATION + " because of invalid preload-type");
+        if (preloadType == null || preloadType.length() == 0) {
+            log.debug(EXITING_STR + svcOperation + " because of invalid preload-type");
             responseBuilder.setResponseCode("403");
             responseBuilder.setResponseMessage("invalid input, invalid preload-type");
             responseBuilder.setAckFinalIndicator("Y");
@@ -2211,33 +2158,28 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         }
 
         VfModulePreloadDataBuilder vfModulePreloadDataBuilder = new VfModulePreloadDataBuilder();
-        getVfModulePreloadData(preload_name, preload_type, vfModulePreloadDataBuilder);
-        //preloadData = preloadDataBuilder.build();
-
+        getVfModulePreloadData(preloadName, preloadType, vfModulePreloadDataBuilder);
         VfModulePreloadDataBuilder operDataBuilder = new VfModulePreloadDataBuilder();
-        getVfModulePreloadData(preload_name, preload_type, operDataBuilder, LogicalDatastoreType.OPERATIONAL);
+        getVfModulePreloadData(preloadName, preloadType, operDataBuilder, LogicalDatastoreType.OPERATIONAL);
 
         //
         // setup a preload-data object builder
         // ACTION vnf-topology-operation
         // INPUT:
-        //  USES sdnc-request-header;
         //  USES request-information;
         //  uses vnf-topology-information;
         // OUTPUT:
-        //  USES vnf-topology-response-body;
         //
         // container preload-data
-        //   uses vnf-configuration-information;
 
         log.info(
-            "Adding INPUT data for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] input: " + input);
+            ADDING_INPUT_DATA_STR + svcOperation + " [" + preloadName + "," + preloadType + INPUT_STR + input);
         PreloadVfModuleTopologyOperationInputBuilder inputBuilder =
             new PreloadVfModuleTopologyOperationInputBuilder(input);
         VnfSdnUtil.toProperties(parms, inputBuilder.build());
-        log.info("Adding OPERATIONAL data for " + SVC_OPERATION + " [" + preload_name + "," + preload_type
-            + "] operational-data: " + operDataBuilder.build());
-        VnfSdnUtil.toProperties(parms, "operational-data", operDataBuilder);
+        log.info(ADDING_OPERATIONAL_DATA_STR + svcOperation + " [" + preloadName + "," + preloadType
+            + OPERATIONAL_DATA_STR + operDataBuilder.build());
+        VnfSdnUtil.toProperties(parms, OPERATIONAL_DATA, operDataBuilder);
 
         // Call SLI sync method
         // Get SvcLogicService reference
@@ -2247,19 +2189,17 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         String ackFinal = "Y";
 
         try {
-            if (svcLogicClient.hasGraph("VNF-API", SVC_OPERATION, null, "sync")) {
-                try {
-                    respProps = svcLogicClient
-                        .execute("VNF-API", SVC_OPERATION, null, "sync", vfModulePreloadDataBuilder, parms);
-                } catch (Exception e) {
-                    log.error("Caught exception executing service logic for " + SVC_OPERATION, e);
-                    errorMessage = e.getMessage();
-                    errorCode = "500";
-                }
+            if (svcLogicClient.hasGraph(VNF_API, svcOperation, null, "sync")) {
+                respProps = svcLogicClient.execute(VNF_API, svcOperation, null, "sync", vfModulePreloadDataBuilder, parms);
             } else {
-                errorMessage = "No service logic active for VNF-API: '" + SVC_OPERATION + "'";
+                errorMessage = "No service logic active for VNF-API: '" + svcOperation + "'";
                 errorCode = "503";
             }
+        } catch (SvcLogicException e) {
+            log.error("Caught exception executing service logic for " + svcOperation, e);
+            errorMessage = e.getMessage();
+            errorCode = "500";
+
         } catch (Exception e) {
             errorCode = "500";
             errorMessage = e.getMessage();
@@ -2270,30 +2210,29 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
             errorCode = respProps.getProperty("error-code");
             errorMessage = respProps.getProperty("error-message");
             ackFinal = respProps.getProperty("ack-final", "Y");
-            // internalError = respProps.getProperty("internal-error", "false");
         }
 
-        if (errorCode != null && errorCode.length() != 0 && !(errorCode.equals("0") || errorCode.equals("200"))) {
+        if (errorCode != null && errorCode.length() != 0 && !("0".equals(errorCode) || "200".equals(errorCode))) {
 
             responseBuilder.setResponseCode(errorCode);
             responseBuilder.setResponseMessage(errorMessage);
             responseBuilder.setAckFinalIndicator(ackFinal);
 
             VfModulePreloadListBuilder vfModulePreloadListBuilder = new VfModulePreloadListBuilder();
-            vfModulePreloadListBuilder.setVfModuleName(preload_name);
-            vfModulePreloadListBuilder.setVfModuleModelId(preload_type);
+            vfModulePreloadListBuilder.setVfModuleName(preloadName);
+            vfModulePreloadListBuilder.setVfModuleModelId(preloadType);
             vfModulePreloadListBuilder.setVfModulePreloadData(vfModulePreloadDataBuilder.build());
             log.error(
-                "Returned FAILED for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] error code: '"
+                RETURNED_FAILED_STR + svcOperation + " [" + preloadName + "," + preloadType + "] error code: '"
                     + errorCode + "', Reason: '" + errorMessage + "'");
             try {
                 saveVfModulePreloadList(vfModulePreloadListBuilder.build(), true, LogicalDatastoreType.CONFIGURATION);
             } catch (Exception e) {
                 log.error(
-                    "Caught Exception updating MD-SAL for " + SVC_OPERATION + " [" + preload_name + "," + preload_type
+                    CAUGHT_EXCEPTION_STR + svcOperation + " [" + preloadName + "," + preloadType
                         + "] \n", e);
             }
-            log.debug("Sending Success rpc result due to external error");
+            log.debug(SENDING_SUCCESS_RPC);
             RpcResult<PreloadVfModuleTopologyOperationOutput> rpcResult =
                 RpcResultBuilder.<PreloadVfModuleTopologyOperationOutput>status(true)
                     .withResult(responseBuilder.build()).build();
@@ -2304,25 +2243,25 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         try {
             vfModulePreloadData = vfModulePreloadDataBuilder.build();
             log.info(
-                "Updating MD-SAL for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] preloadData: "
+                UPDATING_MD_SAL_STR + svcOperation + " [" + preloadName + "," + preloadType + "] preloadData: "
                     + vfModulePreloadData);
             // svc-configuration-list
             VfModulePreloadListBuilder vfModulePreloadListBuilder = new VfModulePreloadListBuilder();
-            vfModulePreloadListBuilder.setVfModuleName(preload_name);
-            vfModulePreloadListBuilder.setVfModuleModelId(preload_type);
+            vfModulePreloadListBuilder.setVfModuleName(preloadName);
+            vfModulePreloadListBuilder.setVfModuleModelId(preloadType);
             vfModulePreloadListBuilder.setVfModulePreloadData(vfModulePreloadData);
 
             // SDNGC-989 set merge flag to false
             saveVfModulePreloadList(vfModulePreloadListBuilder.build(), false, LogicalDatastoreType.CONFIGURATION);
-            log.info("Updating OPERATIONAL tree.");
+            log.info(UPDATING_OPERATIONAL_TREE_STR);
             saveVfModulePreloadList(vfModulePreloadListBuilder.build(), false, LogicalDatastoreType.OPERATIONAL);
         } catch (Exception e) {
-            log.error("Caught Exception updating MD-SAL for " + SVC_OPERATION + " [" + preload_name + "," + preload_type
+            log.error(CAUGHT_EXCEPTION_STR + svcOperation + " [" + preloadName + "," + preloadType
                 + "] \n", e);
             responseBuilder.setResponseCode("500");
             responseBuilder.setResponseMessage(e.toString());
             responseBuilder.setAckFinalIndicator("Y");
-            log.error("Returned FAILED for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] "
+            log.error(RETURNED_FAILED_STR + svcOperation + " [" + preloadName + "," + preloadType + "] "
                 + responseBuilder.build());
             RpcResult<PreloadVfModuleTopologyOperationOutput> rpcResult =
                 RpcResultBuilder.<PreloadVfModuleTopologyOperationOutput>status(false)
@@ -2336,9 +2275,9 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         if (errorMessage != null) {
             responseBuilder.setResponseMessage(errorMessage);
         }
-        log.info("Updated MD-SAL for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] ");
+        log.info(UPDATED_MD_SAL_STR + svcOperation + " [" + preloadName + "," + preloadType + "] ");
         log.info(
-            "Returned SUCCESS for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] " + responseBuilder
+            RETURNED_SUCCESS_STR + svcOperation + " [" + preloadName + "," + preloadType + "] " + responseBuilder
                 .build());
 
         RpcResult<PreloadVfModuleTopologyOperationOutput> rpcResult =
@@ -2348,27 +2287,27 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
     }
 
 
-    @Override public Future<RpcResult<PreloadNetworkTopologyOperationOutput>> preloadNetworkTopologyOperation(
+    @Override
+    public Future<RpcResult<PreloadNetworkTopologyOperationOutput>> preloadNetworkTopologyOperation(
         PreloadNetworkTopologyOperationInput input) {
 
-        final String SVC_OPERATION = "preload-network-topology-operation";
+        final String svcOperation = "preload-network-topology-operation";
         PreloadData preloadData = null;
         Properties parms = new Properties();
 
-        log.info(SVC_OPERATION + " called.");
+        log.info(svcOperation + CALLED_STR);
         // create a new response object
         PreloadNetworkTopologyOperationOutputBuilder responseBuilder =
             new PreloadNetworkTopologyOperationOutputBuilder();
 
         // Result from savePreloadData
-        final SettableFuture<RpcResult<Void>> futureResult = SettableFuture.create();
 
         if (input == null || input.getNetworkTopologyInformation() == null
             || input.getNetworkTopologyInformation().getNetworkTopologyIdentifier() == null
             || input.getNetworkTopologyInformation().getNetworkTopologyIdentifier().getNetworkName() == null
             || input.getNetworkTopologyInformation().getNetworkTopologyIdentifier().getNetworkType() == null) {
-            log.debug("exiting " + SVC_OPERATION + " because of invalid input, null or" +
-                    " empty network-name or network-type");
+            log.debug(EXITING_STR + svcOperation + " because of invalid input, null or" +
+                " empty network-name or network-type");
             responseBuilder.setResponseCode("403");
             responseBuilder.setResponseMessage("input, null or empty network-name or network-type");
             responseBuilder.setAckFinalIndicator("Y");
@@ -2379,12 +2318,12 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         }
 
         // Grab the name and type from the input buffer
-        String preload_name = input.getNetworkTopologyInformation().getNetworkTopologyIdentifier().getNetworkName();
-        String preload_type = input.getNetworkTopologyInformation().getNetworkTopologyIdentifier().getNetworkType();
+        String preloadName = input.getNetworkTopologyInformation().getNetworkTopologyIdentifier().getNetworkName();
+        String preloadType = input.getNetworkTopologyInformation().getNetworkTopologyIdentifier().getNetworkType();
 
-        // Make sure we have a preload_name and preload_type
-        if (preload_name == null || preload_name.length() == 0) {
-            log.debug("exiting " + SVC_OPERATION + " because of invalid preload-name");
+        // Make sure we have a preloadName and preloadType
+        if (preloadName == null || preloadName.length() == 0) {
+            log.debug(EXITING_STR + svcOperation + " because of invalid preload-name");
             responseBuilder.setResponseCode("403");
             responseBuilder.setResponseMessage("input, invalid preload-name");
             responseBuilder.setAckFinalIndicator("Y");
@@ -2394,8 +2333,9 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
             return Futures.immediateFuture(rpcResult);
         }
 
-        if (preload_type == null || preload_type.length() == 0) {
-            log.debug("exiting " + SVC_OPERATION + " because of invalid preload-type");
+
+        if (preloadType == null || preloadType.length() == 0) {
+            log.debug(EXITING_STR + svcOperation + " because of invalid preload-type");
             responseBuilder.setResponseCode("403");
             responseBuilder.setResponseMessage("input, invalid preload-type");
             responseBuilder.setAckFinalIndicator("Y");
@@ -2411,31 +2351,28 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         }
 
         PreloadDataBuilder preloadDataBuilder = new PreloadDataBuilder();
-        getPreloadData(preload_name, preload_type, preloadDataBuilder);
+        getPreloadData(preloadName, preloadType, preloadDataBuilder);
 
         PreloadDataBuilder operDataBuilder = new PreloadDataBuilder();
-        getPreloadData(preload_name, preload_type, operDataBuilder, LogicalDatastoreType.OPERATIONAL);
+        getPreloadData(preloadName, preloadType, operDataBuilder, LogicalDatastoreType.OPERATIONAL);
 
         //
         // setup a preload-data object builder
         // ACTION vnf-topology-operation
         // INPUT:
-        //  USES sdnc-request-header;
         //  USES request-information;
         //  uses vnf-topology-information;
         // OUTPUT:
-        //  USES vnf-topology-response-body;
         //
         // container preload-data
-        //   uses vnf-configuration-information;
         log.info(
-            "Adding INPUT data for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] input: " + input);
+            ADDING_INPUT_DATA_STR + svcOperation + " [" + preloadName + "," + preloadType + INPUT_STR + input);
         PreloadNetworkTopologyOperationInputBuilder inputBuilder =
             new PreloadNetworkTopologyOperationInputBuilder(input);
         VnfSdnUtil.toProperties(parms, inputBuilder.build());
-        log.info("Adding OPERATIONAL data for " + SVC_OPERATION + " [" + preload_name + "," + preload_type
-            + "] operational-data: " + operDataBuilder.build());
-        VnfSdnUtil.toProperties(parms, "operational-data", operDataBuilder);
+        log.info(ADDING_OPERATIONAL_DATA_STR + svcOperation + " [" + preloadName + "," + preloadType
+            + OPERATIONAL_DATA_STR + operDataBuilder.build());
+        VnfSdnUtil.toProperties(parms, OPERATIONAL_DATA, operDataBuilder);
 
         // Call SLI sync method
         // Get SvcLogicService reference
@@ -2445,54 +2382,49 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         String ackFinal = "Y";
 
         try {
-            if (svcLogicClient.hasGraph("VNF-API", SVC_OPERATION, null, "sync")) {
-                try {
-                    respProps =
-                        svcLogicClient.execute("VNF-API", SVC_OPERATION, null, "sync", preloadDataBuilder, parms);
-                } catch (Exception e) {
-                    log.error("Caught exception executing service logic for " + SVC_OPERATION, e);
-                    errorMessage = e.getMessage();
-                    errorCode = "500";
-                }
+            if (svcLogicClient.hasGraph(VNF_API, svcOperation, null, "sync")) {
+                respProps = svcLogicClient.execute(VNF_API, svcOperation, null, "sync", preloadDataBuilder, parms);
             } else {
-                errorMessage = "No service logic active for VNF-API: '" + SVC_OPERATION + "'";
+                errorMessage = "No service logic active for VNF-API: '" + svcOperation + "'";
                 errorCode = "503";
             }
+        } catch (SvcLogicException e) {
+            log.error("Caught exception executing service logic for " + svcOperation, e);
+            errorMessage = e.getMessage();
+            errorCode = "500";
         } catch (Exception e) {
             errorCode = "500";
             errorMessage = e.getMessage();
             log.error("Caught exception looking for service logic", e);
         }
 
-
         if (respProps != null) {
             errorCode = respProps.getProperty("error-code");
             errorMessage = respProps.getProperty("error-message");
             ackFinal = respProps.getProperty("ack-final", "Y");
-            // internalError = respProps.getProperty("internal-error", "false");
         }
 
-        if (errorCode != null && errorCode.length() != 0 && !(errorCode.equals("0") || errorCode.equals("200"))) {
+        if (errorCode != null && errorCode.length() != 0 && !("0".equals(errorCode) || "200".equals(errorCode))) {
             responseBuilder.setResponseCode(errorCode);
             responseBuilder.setResponseMessage(errorMessage);
             responseBuilder.setAckFinalIndicator(ackFinal);
 
             VnfPreloadListBuilder preloadVnfListBuilder = new VnfPreloadListBuilder();
-            preloadVnfListBuilder.setVnfName(preload_name);
-            preloadVnfListBuilder.setVnfType(preload_type);
+            preloadVnfListBuilder.setVnfName(preloadName);
+            preloadVnfListBuilder.setVnfType(preloadType);
             preloadVnfListBuilder.setPreloadData(preloadDataBuilder.build());
             log.error(
-                "Returned FAILED for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] error code: '"
+                RETURNED_FAILED_STR + svcOperation + " [" + preloadName + "," + preloadType + "] error code: '"
                     + errorCode + "', Reason: '" + errorMessage + "'");
             try {
                 savePreloadList(preloadVnfListBuilder.build(), true, LogicalDatastoreType.CONFIGURATION);
             } catch (Exception e) {
                 log.error(
-                    "Caught Exception updating MD-SAL for " + SVC_OPERATION + " [" + preload_name + "," + preload_type
+                    CAUGHT_EXCEPTION_STR + svcOperation + " [" + preloadName + "," + preloadType
                         + "] \n", e);
 
             }
-            log.debug("Sending Success rpc result due to external error");
+            log.debug(SENDING_SUCCESS_RPC);
             RpcResult<PreloadNetworkTopologyOperationOutput> rpcResult =
                 RpcResultBuilder.<PreloadNetworkTopologyOperationOutput>status(true).withResult(responseBuilder.build())
                     .build();
@@ -2503,25 +2435,25 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         try {
             preloadData = preloadDataBuilder.build();
             log.info(
-                "Updating MD-SAL for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] preloadData: "
+                UPDATING_MD_SAL_STR + svcOperation + " [" + preloadName + "," + preloadType + "] preloadData: "
                     + preloadData);
             // svc-configuration-list
             VnfPreloadListBuilder preloadVnfListBuilder = new VnfPreloadListBuilder();
-            preloadVnfListBuilder.setVnfName(preload_name);
-            preloadVnfListBuilder.setVnfType(preload_type);
+            preloadVnfListBuilder.setVnfName(preloadName);
+            preloadVnfListBuilder.setVnfType(preloadType);
             preloadVnfListBuilder.setPreloadData(preloadData);
 
             // SDNGC-989 set merge flag to false
             savePreloadList(preloadVnfListBuilder.build(), false, LogicalDatastoreType.CONFIGURATION);
-            log.info("Updating OPERATIONAL tree.");
+            log.info(UPDATING_OPERATIONAL_TREE_STR);
             savePreloadList(preloadVnfListBuilder.build(), false, LogicalDatastoreType.OPERATIONAL);
         } catch (Exception e) {
-            log.error("Caught Exception updating MD-SAL for " + SVC_OPERATION + " [" + preload_name + "," + preload_type
+            log.error(CAUGHT_EXCEPTION_STR + svcOperation + " [" + preloadName + "," + preloadType
                 + "] \n", e);
             responseBuilder.setResponseCode("500");
             responseBuilder.setResponseMessage(e.toString());
             responseBuilder.setAckFinalIndicator("Y");
-            log.error("Returned FAILED for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] "
+            log.error(RETURNED_FAILED_STR + svcOperation + " [" + preloadName + "," + preloadType + "] "
                 + responseBuilder.build());
             RpcResult<PreloadNetworkTopologyOperationOutput> rpcResult =
                 RpcResultBuilder.<PreloadNetworkTopologyOperationOutput>status(false)
@@ -2535,9 +2467,9 @@ public class VnfApiProvider implements AutoCloseable, VNFAPIService, DataChangeL
         if (errorMessage != null) {
             responseBuilder.setResponseMessage(errorMessage);
         }
-        log.info("Updated MD-SAL for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] ");
+        log.info(UPDATED_MD_SAL_STR + svcOperation + " [" + preloadName + "," + preloadType + "] ");
         log.info(
-            "Returned SUCCESS for " + SVC_OPERATION + " [" + preload_name + "," + preload_type + "] " + responseBuilder
+            RETURNED_SUCCESS_STR + svcOperation + " [" + preloadName + "," + preloadType + "] " + responseBuilder
                 .build());
 
         RpcResult<PreloadNetworkTopologyOperationOutput> rpcResult =