AT&T 1712 and 1802 release code
[so.git] / adapters / mso-vnf-adapter / src / main / java / org / openecomp / mso / adapters / vnf / MsoVnfAdapterAsyncImpl.java
index 5c65429..df04d1d 100644 (file)
@@ -54,10 +54,11 @@ import org.openecomp.mso.properties.MsoPropertiesFactory;
 @WebService(serviceName = "VnfAdapterAsync", endpointInterface = "org.openecomp.mso.adapters.vnf.MsoVnfAdapterAsync", targetNamespace = "http://org.openecomp.mso/vnfA")
 public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
 
-    MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
-    CloudConfigFactory cloudConfigFactory=new CloudConfigFactory();
+       MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
 
-    public static final String MSO_PROP_VNF_ADAPTER="MSO_PROP_VNF_ADAPTER";
+       CloudConfigFactory cloudConfigFactory=new CloudConfigFactory();
+
+       public static final String MSO_PROP_VNF_ADAPTER="MSO_PROP_VNF_ADAPTER";
     private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
     private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger ();
     private static final String BPEL_AUTH_PROP = "org.openecomp.mso.adapters.vnf.bpelauth";
@@ -154,8 +155,8 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
                                   vnfRollback);
             MsoLogger.setServiceName (serviceName);
         } catch (VnfException e) {
-            MsoLogger.setServiceName (serviceName);
-            LOGGER.error (MessageEnum.RA_CREATE_VNF_ERR,  vnfName, cloudSiteId, tenantId, "", "createVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "VnfException in createVnfA", e);
+               MsoLogger.setServiceName (serviceName);
+               LOGGER.error (MessageEnum.RA_CREATE_VNF_ERR,  vnfName, cloudSiteId, tenantId, "", "createVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "VnfException in createVnfA", e);
             org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
             String eMsg = null;
             try {
@@ -228,8 +229,8 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
             vnfAdapter.updateVnf (cloudSiteId, tenantId, vnfType,vnfVersion, vnfName, requestType, volumeGroupHeatStackId, inputs, msoRequest, outputs, vnfRollback);
             MsoLogger.setServiceName (serviceName);
         } catch (VnfException e) {
-            MsoLogger.setServiceName (serviceName);
-            LOGGER.error (MessageEnum.RA_UPDATE_VNF_ERR,  vnfName, cloudSiteId, tenantId, "", "UpdateVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending updateVnf notification", e);
+               MsoLogger.setServiceName (serviceName);
+               LOGGER.error (MessageEnum.RA_UPDATE_VNF_ERR,  vnfName, cloudSiteId, tenantId, "", "UpdateVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending updateVnf notification", e);
             org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
             String eMsg = null;
             try {
@@ -238,7 +239,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
                                                                                                      .getCategory ()
                                                                                                      .name ());
             } catch (Exception e1) {
-                LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "UpdateVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - fault info", e1);
+               LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "UpdateVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - fault info", e1);
             }
             // Build and send Asynchronous error response
             try {
@@ -310,7 +311,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
             vnfAdapter.queryVnf (cloudSiteId, tenantId, vnfName, msoRequest, vnfExists, vnfId, status, outputs);
             MsoLogger.setServiceName (serviceName);
         } catch (VnfException e) {
-            MsoLogger.setServiceName (serviceName);
+               MsoLogger.setServiceName (serviceName);
             LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR,  vnfName, cloudSiteId, tenantId, "", "queryVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending queryVnfA notification", e);
             org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
             String eMsg = null;
@@ -320,7 +321,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
                                                                                                      .getCategory ()
                                                                                                      .name ());
             } catch (Exception e1) {
-                LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "queryVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - fault info", e1);
+               LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "queryVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - fault info", e1);
             }
             // Build and send Asynchronous error response
             try {
@@ -395,8 +396,8 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
             vnfAdapter.deleteVnf (cloudSiteId, tenantId, vnfName, msoRequest);
             MsoLogger.setServiceName (serviceName);
         } catch (VnfException e) {
-            MsoLogger.setServiceName (serviceName);
-            LOGGER.error (MessageEnum.RA_DELETE_VNF_ERR,  vnfName, cloudSiteId, tenantId, "", "deleteVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending deleteVnfA notification", e);
+               MsoLogger.setServiceName (serviceName);
+               LOGGER.error (MessageEnum.RA_DELETE_VNF_ERR,  vnfName, cloudSiteId, tenantId, "", "deleteVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending deleteVnfA notification", e);
             org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
             String eMsg = null;
             try {
@@ -405,7 +406,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
                                                                                                      .getCategory ()
                                                                                                      .name ());
             } catch (Exception e1) {
-                LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "deleteVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - fault info", e1);
+               LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "deleteVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - fault info", e1);
             }
             // Build and send Asynchronous error response
             try {
@@ -465,8 +466,8 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
             vnfAdapter.rollbackVnf (rollback);
             MsoLogger.setServiceName (serviceName);
         } catch (VnfException e) {
-            MsoLogger.setServiceName (serviceName);
-            LOGGER.error (MessageEnum.RA_ROLLBACK_VNF_ERR, "", "rollbackVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending rollbackVnfA notification", e);
+               MsoLogger.setServiceName (serviceName);
+               LOGGER.error (MessageEnum.RA_ROLLBACK_VNF_ERR, "", "rollbackVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception sending rollbackVnfA notification", e);
             org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory exCat = null;
             String eMsg = null;
             try {
@@ -475,7 +476,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
                                                                                                      .getCategory ()
                                                                                                      .name ());
             } catch (Exception e1) {
-                LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "rollbackVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - fault info", e1);
+               LOGGER.error (MessageEnum.RA_FAULT_INFO_EXC, "", "rollbackVnfA", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - fault info", e1);
             }
             // Build and send Asynchronous error response
             try {
@@ -513,11 +514,11 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
 
             cvrb.setCloudSiteId (hVrb.value.getCloudSiteId ());
             if (hVrb.value.getMsoRequest() != null) {
-                cmr.setRequestId (hVrb.value.getMsoRequest ().getRequestId ());
-                cmr.setServiceInstanceId (hVrb.value.getMsoRequest ().getServiceInstanceId ());
+               cmr.setRequestId (hVrb.value.getMsoRequest ().getRequestId ());
+               cmr.setServiceInstanceId (hVrb.value.getMsoRequest ().getServiceInstanceId ());
             } else {
-                cmr.setRequestId (null);
-                cmr.setServiceInstanceId (null);
+               cmr.setRequestId (null);
+               cmr.setServiceInstanceId (null);
             }
             cvrb.setMsoRequest (cmr);
             cvrb.setVnfId (hVrb.value.getVnfId ());
@@ -556,8 +557,8 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
             UpdateVnfNotification.Outputs.Entry entry = new UpdateVnfNotification.Outputs.Entry ();
 
             for (Map.Entry<String,String> mapEntry : sMap.entrySet ()) {
-                String key = mapEntry.getKey();
-                String value = mapEntry.getValue();
+               String key = mapEntry.getKey();
+               String value = mapEntry.getValue();
                 entry.setKey (key);
                 entry.setValue (value);
                 outputs.getEntry ().add (entry);
@@ -577,8 +578,8 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
             QueryVnfNotification.Outputs.Entry entry = new QueryVnfNotification.Outputs.Entry ();
 
             for (Map.Entry<String,String> mapEntry : sMap.entrySet ()) {
-                String key = mapEntry.getKey();
-                String value = mapEntry.getValue();
+               String key = mapEntry.getKey();
+               String value = mapEntry.getValue();
                 entry.setKey (key);
                 entry.setValue (value);
                 outputs.getEntry ().add (entry);
@@ -596,7 +597,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
             LOGGER.error (MessageEnum.RA_WSDL_NOT_FOUND, "VnfAdapterNotify.wsdl", "", "getNotifyEP", MsoLogger.ErrorCode.BusinessProcesssError, "Exception - WSDL not found", e);
         }
         if (warWsdlLoc == null) {
-            LOGGER.error (MessageEnum.RA_WSDL_NOT_FOUND, "VnfAdapterNotify.wsdl", "", "getNotifyEP", MsoLogger.ErrorCode.BusinessProcesssError, "WSDL not found");
+               LOGGER.error (MessageEnum.RA_WSDL_NOT_FOUND, "VnfAdapterNotify.wsdl", "", "getNotifyEP", MsoLogger.ErrorCode.BusinessProcesssError, "WSDL not found");
         } else {
             try {
                 LOGGER.debug ("VnfAdpaterNotify.wsdl location:" + warWsdlLoc.toURI ().toString ());