Search in sources :

Example 1 with IsilonSyncPolicyReport

use of com.emc.storageos.isilon.restapi.IsilonSyncPolicyReport in project coprhd-controller by CoprHD.

the class IsilonFileStorageDevice method getSyncPolicyErrorReport.

/**
 * get the error reports from device
 *
 * @param device - storage system
 * @param syncPolicy - synciq policy name
 * @return
 */
private BiosCommandResult getSyncPolicyErrorReport(StorageSystem device, IsilonSyncTargetPolicy policy) {
    List<IsilonSyncPolicyReport> listMirrorPolicyReports = null;
    StringBuffer errorMsgBuff = new StringBuffer();
    errorMsgBuff.append(String.format("Policy details  - failback-failover state : [%s] and policy status: [%s] ", policy.getFoFbState().toString(), policy.getLastJobState()));
    // get policy reports from device.
    IsilonApi isi = getIsilonDevice(device);
    listMirrorPolicyReports = isi.getReplicationPolicyReports(policy.getName()).getList();
    String errorMsg = mirrorOperations.isiGetReportErrMsg(listMirrorPolicyReports);
    errorMsgBuff.append(String.format("Policy Error Report details: %s", errorMsg));
    ServiceError serviceError = DeviceControllerErrors.isilon.unableToResyncPrepPolicy(device.getIpAddress(), policy.getName(), errorMsgBuff.toString());
    _log.error(errorMsgBuff.toString());
    return BiosCommandResult.createErrorResult(serviceError);
}
Also used : ServiceError(com.emc.storageos.svcs.errorhandling.model.ServiceError) IsilonApi(com.emc.storageos.isilon.restapi.IsilonApi) IsilonSyncPolicyReport(com.emc.storageos.isilon.restapi.IsilonSyncPolicyReport)

Aggregations

IsilonApi (com.emc.storageos.isilon.restapi.IsilonApi)1 IsilonSyncPolicyReport (com.emc.storageos.isilon.restapi.IsilonSyncPolicyReport)1 ServiceError (com.emc.storageos.svcs.errorhandling.model.ServiceError)1