import org.onap.so.adapters.network.async.client.UpdateNetworkNotification;
import org.onap.so.adapters.network.exceptions.NetworkException;
import org.onap.so.entity.MsoRequest;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.openstack.beans.NetworkRollback;
import org.onap.so.openstack.beans.NetworkStatus;
import org.onap.so.openstack.beans.Subnet;
exCat = MsoExceptionCategory.fromValue (e.getFaultInfo ().getCategory ().name ());
} catch (Exception e1) {
logger.error(FAULT_INFO_ERROR_LOGMSG, MessageEnum.RA_FAULT_INFO_EXC,
- MsoLogger.ErrorCode.DataError.getValue(), e1);
+ ErrorCode.DataError.getValue(), e1);
}
// Build and send Asynchronous error response
try {
notifyPort.createNetworkNotification (messageId, false, exCat, eMsg, null, null, null, null);
} catch (Exception e1) {
logger.error(CREATE_NETWORK_ERROR_LOGMSG, MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC,
- MsoLogger.ErrorCode.DataError.getValue(), e1.getMessage(), e1);
+ ErrorCode.DataError.getValue(), e1.getMessage(), e1);
}
return;
copyNrb (networkRollback));
} catch (Exception e) {
logger.error(CREATE_NETWORK_ERROR_LOGMSG, MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC,
- MsoLogger.ErrorCode.DataError.getValue(), e.getMessage(), e);
+ ErrorCode.DataError.getValue(), e.getMessage(), e);
}
return;
exCat = MsoExceptionCategory.fromValue (e.getFaultInfo ().getCategory ().name ());
} catch (Exception e1) {
logger.error(FAULT_INFO_ERROR_LOGMSG, MessageEnum.RA_FAULT_INFO_EXC,
- MsoLogger.ErrorCode.DataError.getValue(), e1);
+ ErrorCode.DataError.getValue(), e1);
}
// Build and send Asynchronous error response
try {
notifyPort.updateNetworkNotification (messageId, false, exCat, eMsg, null, copyNrb (networkRollback));
} catch (Exception e1) {
logger.error("{} {} Error sending updateNetwork notification {} ",
- MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC, MsoLogger.ErrorCode.DataError.getValue(), e1.getMessage(),
+ MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC, ErrorCode.DataError.getValue(), e1.getMessage(),
e1);
}
copyNrb (networkRollback));
} catch (Exception e) {
logger.error("{} {} Error sending updateNotification request {} ", MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC,
- MsoLogger.ErrorCode.DataError.getValue(), e.getMessage(), e);
+ ErrorCode.DataError.getValue(), e.getMessage(), e);
}
return;
}
exCat = MsoExceptionCategory.fromValue (e.getFaultInfo ().getCategory ().name ());
} catch (Exception e1) {
logger.error(FAULT_INFO_ERROR_LOGMSG, MessageEnum.RA_FAULT_INFO_EXC,
- MsoLogger.ErrorCode.DataError.getValue(), e1);
+ ErrorCode.DataError.getValue(), e1);
}
// Build and send Asynchronous error response
try {
notifyPort.queryNetworkNotification (messageId, false, exCat, eMsg, null, null, null, null, null, null);
} catch (Exception e1) {
logger.error(errorCreateNetworkMessage, MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC,
- MsoLogger.ErrorCode.DataError.getValue(), e1.getMessage(), e1);
+ ErrorCode.DataError.getValue(), e1.getMessage(), e1);
}
return;
}
copyQuerySubnetIdMap (subnetIdMap));
} catch (Exception e) {
logger.error(errorCreateNetworkMessage, MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC,
- MsoLogger.ErrorCode.DataError.getValue(), e.getMessage(), e);
+ ErrorCode.DataError.getValue(), e.getMessage(), e);
}
return;
}
exCat = MsoExceptionCategory.fromValue (e.getFaultInfo ().getCategory ().name ());
} catch (Exception e1) {
logger.error(FAULT_INFO_ERROR_LOGMSG, MessageEnum.RA_FAULT_INFO_EXC,
- MsoLogger.ErrorCode.DataError.getValue(), e1);
+ ErrorCode.DataError.getValue(), e1);
}
// Build and send Asynchronous error response
try {
notifyPort.deleteNetworkNotification (messageId, false, exCat, eMsg, null);
} catch (Exception e1) {
logger.error("{} {} Error sending createNetwork notification {} ",
- MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC, MsoLogger.ErrorCode.DataError.getValue(), e1.getMessage(),
+ MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC, ErrorCode.DataError.getValue(), e1.getMessage(),
e1);
}
notifyPort.deleteNetworkNotification (messageId, true, null, null, networkDeleted.value);
} catch (Exception e) {
logger.error("{} {} Error sending deleteNetwork notification {} ", MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC,
- MsoLogger.ErrorCode.DataError.getValue(), e.getMessage(), e);
+ ErrorCode.DataError.getValue(), e.getMessage(), e);
}
return;
// rollback may be null (e.g. if network already existed when Create was called)
if (rollback == null) {
logger.warn("{} {} Rollback is null", MessageEnum.RA_ROLLBACK_NULL,
- MsoLogger.ErrorCode.SchemaError.getValue());
+ ErrorCode.SchemaError.getValue());
return;
}
exCat = MsoExceptionCategory.fromValue (e.getFaultInfo ().getCategory ().name ());
} catch (Exception e1) {
logger.error("{} {} Exception in get fault info ", MessageEnum.RA_FAULT_INFO_EXC,
- MsoLogger.ErrorCode.DataError.getValue(), e1);
+ ErrorCode.DataError.getValue(), e1);
}
// Build and send Asynchronous error response
try {
notifyPort.rollbackNetworkNotification (rollback.getMsoRequest ().getRequestId (), false, exCat, eMsg);
} catch (Exception e1) {
logger.error(CREATE_NETWORK_ERROR_LOGMSG, MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC,
- MsoLogger.ErrorCode.DataError.getValue(), e1.getMessage(), e1);
+ ErrorCode.DataError.getValue(), e1.getMessage(), e1);
}
return;
} catch (Exception e) {
logger
.error("{} {} Error sending rollbackNetwork notification {} ", MessageEnum.RA_CREATE_NETWORK_NOTIF_EXC,
- MsoLogger.ErrorCode.DataError.getValue(), e.getMessage(), e);
+ ErrorCode.DataError.getValue(), e.getMessage(), e);
}
return;
warWsdlLoc = Thread.currentThread ().getContextClassLoader ().getResource ("NetworkAdapterNotify.wsdl");
} catch (Exception e) {
logger.error("{} {} Exception - WSDL not found ", MessageEnum.RA_WSDL_NOT_FOUND,
- MsoLogger.ErrorCode.DataError.getValue(), e);
+ ErrorCode.DataError.getValue(), e);
}
if (warWsdlLoc == null) {
logger
- .error("{} {} WSDL not found", MessageEnum.RA_WSDL_NOT_FOUND, MsoLogger.ErrorCode.DataError.getValue());
+ .error("{} {} WSDL not found", MessageEnum.RA_WSDL_NOT_FOUND, ErrorCode.DataError.getValue());
} else {
try {
logger.debug("NetworkAdpaterNotify.wsdl location: {}", warWsdlLoc.toURI().toString());
} catch (Exception e) {
logger.error("{} {} Exception - WSDL URL convention ", MessageEnum.RA_WSDL_URL_CONVENTION_EXC,
- MsoLogger.ErrorCode.SchemaError.getValue(), e);
+ ErrorCode.SchemaError.getValue(), e);
}
}
epUrl = new URL (notificationUrl);
} catch (MalformedURLException e1) {
logger.error("{} {} Exception - init notification ", MessageEnum.RA_INIT_NOTIF_EXC,
- MsoLogger.ErrorCode.DataError.getValue(), e1);
+ ErrorCode.DataError.getValue(), e1);
}
if(null != epUrl) {
headers.put ("Authorization", Collections.singletonList (basicAuth));
} catch (Exception e) {
logger.error("{} {} Unable to set authorization in callback request {} ",
- MessageEnum.RA_SET_CALLBACK_AUTH_EXC, MsoLogger.ErrorCode.DataError.getValue(), e.getMessage(), e);
+ MessageEnum.RA_SET_CALLBACK_AUTH_EXC, ErrorCode.DataError.getValue(), e.getMessage(), e);
}
return notifyPort;