use of com.emc.storageos.model.block.CopiesParam in project coprhd-controller by CoprHD.
the class FailoverBlockVolume method doExecute.
@Override
protected Tasks<VolumeRestRep> 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().blockVolumes().failover(volumeId, param);
}
use of com.emc.storageos.model.block.CopiesParam in project coprhd-controller by CoprHD.
the class SwapContinuousCopies method doExecute.
@Override
protected Tasks<VolumeRestRep> doExecute() throws Exception {
Copy copy = new Copy();
copy.setCopyID(targetVolumeId);
copy.setType(type);
CopiesParam param = new CopiesParam();
param.getCopies().add(copy);
return getClient().blockVolumes().swapContinuousCopies(targetVolumeId, param);
}
use of com.emc.storageos.model.block.CopiesParam in project coprhd-controller by CoprHD.
the class UpdateBlockVolumeAccessMode method doExecute.
@Override
protected Tasks<VolumeRestRep> doExecute() throws Exception {
Copy copy = new Copy();
copy.setType(type);
copy.setCopyID(failoverTarget);
copy.setAccessMode(accessMode);
CopiesParam param = new CopiesParam();
param.getCopies().add(copy);
return getClient().blockVolumes().updateCopyAccessMode(volumeId, param);
}
use of com.emc.storageos.model.block.CopiesParam in project coprhd-controller by CoprHD.
the class BlockVolumes method createCopiesParam.
@Util
private static CopiesParam createCopiesParam(String continuousCopyId) {
Copy copy = new Copy();
copy.setType(COPY_NATIVE);
copy.setCopyID(uri(continuousCopyId));
List<Copy> copies = Lists.newArrayList();
copies.add(copy);
CopiesParam input = new CopiesParam(copies);
return input;
}
use of com.emc.storageos.model.block.CopiesParam in project coprhd-controller by CoprHD.
the class BlockVolumes method stopContinuousCopy.
@FlashException(referrer = { "volume" })
public static void stopContinuousCopy(String volumeId, String continuousCopyId) {
if (StringUtils.isNotBlank(volumeId) && StringUtils.isNotBlank(continuousCopyId)) {
ViPRCoreClient client = BourneUtil.getViprClient();
CopiesParam input = createCopiesParam(continuousCopyId);
Tasks<VolumeRestRep> tasks = client.blockVolumes().stopContinuousCopies(uri(volumeId), input);
flash.put("info", MessagesUtils.get("resources.continuouscopy.stop"));
}
volume(volumeId, null);
}
Aggregations