use of com.emc.storageos.model.dr.SiteErrorResponse in project coprhd-controller by CoprHD.
the class DisasterRecoveryService method resumePrecheck.
/**
* This is internal API to do precheck for resume
*/
@POST
@Path("/internal/resumeprecheck")
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public SiteErrorResponse resumePrecheck() {
log.info("Precheck for resume internally");
SiteErrorResponse response = new SiteErrorResponse();
try {
precheckForResumeLocalStandby();
} catch (APIException e) {
log.warn("Failed to precheck switchover", e);
response.setErrorMessage(e.getMessage());
response.setServiceCode(e.getServiceCode().ordinal());
return response;
} catch (Exception e) {
log.error("Failed to precheck switchover", e);
response.setErrorMessage(e.getMessage());
return response;
}
return response;
}
use of com.emc.storageos.model.dr.SiteErrorResponse in project coprhd-controller by CoprHD.
the class SiteError method toResponse.
public SiteErrorResponse toResponse() {
SiteErrorResponse response = new SiteErrorResponse();
response.setCreationTime(this.creationTime);
response.setServiceCode(this.serviceCode.ordinal());
response.setServiceCodeName(this.serviceCode.name());
response.setErrorMessage(this.errorMessage);
response.setOperation(this.operation);
return response;
}
Aggregations