Search in sources :

Example 1 with FileReplicationParam

use of com.emc.storageos.model.file.FileReplicationParam 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);
}
Also used : FileReplicationParam(com.emc.storageos.model.file.FileReplicationParam) FileCopy(com.emc.storageos.model.file.FileCopy)

Example 2 with FileReplicationParam

use of com.emc.storageos.model.file.FileReplicationParam 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);
}
Also used : ViPRCoreClient(com.emc.vipr.client.ViPRCoreClient) FileReplicationParam(com.emc.storageos.model.file.FileReplicationParam) ArrayList(java.util.ArrayList) FileCopy(com.emc.storageos.model.file.FileCopy) URI(java.net.URI) FlashException(controllers.util.FlashException)

Example 3 with FileReplicationParam

use of com.emc.storageos.model.file.FileReplicationParam 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);
}
Also used : FileReplicationParam(com.emc.storageos.model.file.FileReplicationParam) FileCopy(com.emc.storageos.model.file.FileCopy)

Example 4 with FileReplicationParam

use of com.emc.storageos.model.file.FileReplicationParam 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);
}
Also used : FileReplicationParam(com.emc.storageos.model.file.FileReplicationParam) FileCopy(com.emc.storageos.model.file.FileCopy)

Example 5 with FileReplicationParam

use of com.emc.storageos.model.file.FileReplicationParam 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);
}
Also used : FileReplicationParam(com.emc.storageos.model.file.FileReplicationParam) FileCopy(com.emc.storageos.model.file.FileCopy)

Aggregations

FileCopy (com.emc.storageos.model.file.FileCopy)5 FileReplicationParam (com.emc.storageos.model.file.FileReplicationParam)5 ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)1 FlashException (controllers.util.FlashException)1 URI (java.net.URI)1 ArrayList (java.util.ArrayList)1