Search in sources :

Example 11 with CopiesParam

use of com.emc.storageos.model.block.CopiesParam in project coprhd-controller by CoprHD.

the class CreateContinuousCopy method doExecute.

@Override
protected Tasks<VolumeRestRep> doExecute() throws Exception {
    Copy copy = new Copy();
    if (name != null) {
        copy.setName(name);
    }
    copy.setName(name);
    copy.setCount(count);
    copy.setType(type);
    if (copyId != null) {
        copy.setCopyID(copyId);
    }
    CopiesParam param = new CopiesParam();
    param.getCopies().add(copy);
    return getClient().blockVolumes().startContinuousCopies(volumeId, param);
}
Also used : Copy(com.emc.storageos.model.block.Copy) CopiesParam(com.emc.storageos.model.block.CopiesParam)

Example 12 with CopiesParam

use of com.emc.storageos.model.block.CopiesParam in project coprhd-controller by CoprHD.

the class FailoverBlockConsistencyGroup method doExecute.

@Override
protected Tasks<BlockConsistencyGroupRestRep> doExecute() throws Exception {
    Copy copy = new Copy();
    copy.setType(type);
    copy.setCopyID(failoverTarget);
    if (pointInTime != null) {
        copy.setPointInTime(pointInTime);
    }
    CopiesParam param = new CopiesParam();
    param.getCopies().add(copy);
    return getClient().blockConsistencyGroups().failover(consistencyGroupId, param);
}
Also used : Copy(com.emc.storageos.model.block.Copy) CopiesParam(com.emc.storageos.model.block.CopiesParam)

Example 13 with CopiesParam

use of com.emc.storageos.model.block.CopiesParam in project coprhd-controller by CoprHD.

the class PauseContinuousCopy method doExecute.

@Override
protected Tasks<VolumeRestRep> doExecute() throws Exception {
    Copy copy = new Copy();
    copy.setCopyID(continuousCopyId);
    copy.setType(type);
    CopiesParam param = new CopiesParam();
    param.getCopies().add(copy);
    return getClient().blockVolumes().pauseContinuousCopies(volumeId, param);
}
Also used : Copy(com.emc.storageos.model.block.Copy) CopiesParam(com.emc.storageos.model.block.CopiesParam)

Example 14 with CopiesParam

use of com.emc.storageos.model.block.CopiesParam in project coprhd-controller by CoprHD.

the class ResumeContinuousCopy method doExecute.

@Override
protected Tasks<VolumeRestRep> doExecute() throws Exception {
    Copy copy = new Copy();
    copy.setCopyID(continuousCopyId);
    copy.setType(type);
    CopiesParam param = new CopiesParam();
    param.getCopies().add(copy);
    return getClient().blockVolumes().resumeContinuousCopies(volumeId, param);
}
Also used : Copy(com.emc.storageos.model.block.Copy) CopiesParam(com.emc.storageos.model.block.CopiesParam)

Example 15 with CopiesParam

use of com.emc.storageos.model.block.CopiesParam in project coprhd-controller by CoprHD.

the class SwapCGContinuousCopies method doExecute.

@Override
protected Tasks<BlockConsistencyGroupRestRep> doExecute() throws Exception {
    Copy copy = new Copy();
    copy.setType(type);
    copy.setCopyID(failoverTarget);
    CopiesParam param = new CopiesParam();
    param.getCopies().add(copy);
    return getClient().blockConsistencyGroups().swap(consistencyGroupId, param);
}
Also used : Copy(com.emc.storageos.model.block.Copy) CopiesParam(com.emc.storageos.model.block.CopiesParam)

Aggregations

CopiesParam (com.emc.storageos.model.block.CopiesParam)16 Copy (com.emc.storageos.model.block.Copy)12 VolumeRestRep (com.emc.storageos.model.block.VolumeRestRep)5 ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)4 FlashException (controllers.util.FlashException)4 UnManagedVolumeRestRep (com.emc.storageos.model.block.UnManagedVolumeRestRep)1 ServiceErrorException (com.emc.vipr.client.exceptions.ServiceErrorException)1 URI (java.net.URI)1 ArrayList (java.util.ArrayList)1 Util (play.mvc.Util)1 BourneUtil (util.BourneUtil)1