Replace String Literal with a Constant 32/85832/1
authorSindhuri.A <arcot.sindhuri@huawei.com>
Fri, 19 Apr 2019 16:15:34 +0000 (21:45 +0530)
committerSindhuri.A <arcot.sindhuri@huawei.com>
Fri, 19 Apr 2019 16:15:34 +0000 (21:45 +0530)
Replace String Literals with Constant MsoVnfAdapterAsyncImpl class

Issue-ID: SO-1490

Change-Id: Iaf8519e6ec216bf8e79e56e76856019b50371616
Signed-off-by: Sindhuri.A <arcot.sindhuri@huawei.com>
adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java

index d2dfae4..9236945 100644 (file)
@@ -65,6 +65,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
     private static final String BPEL_AUTH_PROP = "org.onap.so.adapters.vnf.bpelauth";
     private static final String ENCRYPTION_KEY_PROP = "org.onap.so.adapters.network.encryptionKey";
     private static final String UPDATE_VNFA = "{} UpdateVnfA";
+    private static final String EXCEPTION_UPDATEVNF_NOTIFICATION = "{} {} Exception sending updateVnf notification ";
 
     @Autowired
     private Environment environment;
@@ -188,7 +189,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
             vnfAdapter.updateVnf(cloudSiteId, cloudOwner, tenantId, vnfType, vnfVersion, vnfName, requestType,
                     volumeGroupHeatStackId, inputs, msoRequest, outputs, vnfRollback);
         } catch (VnfException e) {
-            logger.error("{} {} Exception sending updateVnf notification ", MessageEnum.RA_UPDATE_VNF_ERR,
+            logger.error(EXCEPTION_UPDATEVNF_NOTIFICATION, MessageEnum.RA_UPDATE_VNF_ERR,
                     ErrorCode.BusinessProcesssError.getValue(), e);
             org.onap.so.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
             String eMsg = null;
@@ -205,7 +206,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
                 VnfAdapterNotify notifyPort = getNotifyEP(notificationUrl);
                 notifyPort.updateVnfNotification(messageId, false, exCat, eMsg, null, null);
             } catch (Exception e1) {
-                logger.error("{} {} Exception sending updateVnf notification ", MessageEnum.RA_SEND_VNF_NOTIF_ERR,
+                logger.error(EXCEPTION_UPDATEVNF_NOTIFICATION, MessageEnum.RA_SEND_VNF_NOTIF_ERR,
                         ErrorCode.BusinessProcesssError.getValue(), e1);
             }
             logger.info(UPDATE_VNFA, MessageEnum.RA_ASYNC_UPDATE_VNF_COMPLETE);
@@ -218,7 +219,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
             notifyPort.updateVnfNotification(messageId, true, null, null, copyUpdateOutputs(outputs),
                     copyVrb(vnfRollback));
         } catch (Exception e) {
-            logger.error("{} {} Exception sending updateVnf notification ", MessageEnum.RA_SEND_VNF_NOTIF_ERR,
+            logger.error(EXCEPTION_UPDATEVNF_NOTIFICATION, MessageEnum.RA_SEND_VNF_NOTIF_ERR,
                     ErrorCode.BusinessProcesssError.getValue(), e);
         }
         logger.info(UPDATE_VNFA, MessageEnum.RA_ASYNC_UPDATE_VNF_COMPLETE);