use of com.emc.storageos.model.file.FileCopy in project coprhd-controller by CoprHD.
the class PauseFileContinuousCopy method doExecute.
@Override
protected Tasks<FileShareRestRep> doExecute() throws Exception {
FileCopy copy = new FileCopy();
copy.setCopyID(continuousCopyId);
copy.setType(type);
FileReplicationParam param = new FileReplicationParam();
param.getCopies().add(copy);
return getClient().fileSystems().pauseFileContinuousCopies(fileId, param);
}
use of com.emc.storageos.model.file.FileCopy in project coprhd-controller by CoprHD.
the class FileSystems method mirrorOperationFileSystem.
@FlashException(referrer = { "fileSystem" })
public static void mirrorOperationFileSystem(String fileSystemId, String mirrorOperation) {
ViPRCoreClient client = BourneUtil.getViprClient();
FileCopy copy = new FileCopy();
copy.setType(LOCAL_MIRROR);
FileReplicationParam param = new FileReplicationParam();
List<FileCopy> listCopy = new ArrayList();
listCopy.add(copy);
param.setCopies(listCopy);
URI fileSystemUri = URI.create(fileSystemId);
if ("refresh".equalsIgnoreCase(mirrorOperation)) {
client.fileSystems().refreshFileContinuousCopies(fileSystemUri, param);
}
if ("stop".equalsIgnoreCase(mirrorOperation)) {
client.fileSystems().stopFileContinuousCopies(fileSystemUri, param);
}
if ("pause".equalsIgnoreCase(mirrorOperation)) {
client.fileSystems().pauseFileContinuousCopies(fileSystemUri, param);
}
if ("resume".equalsIgnoreCase(mirrorOperation)) {
client.fileSystems().resumeContinousCopies(fileSystemUri, param);
}
fileSystem(fileSystemId);
}
use of com.emc.storageos.model.file.FileCopy in project coprhd-controller by CoprHD.
the class FailbackFileSystem method doExecute.
@Override
protected Tasks<FileShareRestRep> doExecute() throws Exception {
FileCopy copy = new FileCopy();
copy.setType(type);
copy.setCopyID(failbackTarget);
FileReplicationParam param = new FileReplicationParam();
param.setReplicateConfiguration(replicationConf);
param.getCopies().add(copy);
return getClient().fileSystems().failBackContinousCopies(failbackSource, param);
}
use of com.emc.storageos.model.file.FileCopy in project coprhd-controller by CoprHD.
the class FailoverFileSystem method doExecute.
@Override
protected Tasks<FileShareRestRep> doExecute() throws Exception {
FileCopy copy = new FileCopy();
copy.setType(type);
copy.setCopyID(failoverTarget);
FileReplicationParam param = new FileReplicationParam();
param.getCopies().add(copy);
param.setReplicateConfiguration(replicationConf);
return getClient().fileSystems().failover(failoverSource, param);
}
use of com.emc.storageos.model.file.FileCopy in project coprhd-controller by CoprHD.
the class StopFileContinuousCopy method doExecute.
@Override
protected Tasks<FileShareRestRep> doExecute() throws Exception {
FileCopy copy = new FileCopy();
copy.setCopyID(continuousCopyId);
copy.setType(type);
FileReplicationParam param = new FileReplicationParam();
param.getCopies().add(copy);
return getClient().fileSystems().stopFileContinuousCopies(fileId, param);
}
Aggregations