Search in sources :

Example 1 with FileSystemShareParam

use of com.emc.storageos.model.file.FileSystemShareParam in project coprhd-controller by CoprHD.

the class CreateFileSnapshotShare method doExecute.

@Override
protected Task<FileSnapshotRestRep> doExecute() throws Exception {
    FileSystemShareParam fileShare = new FileSystemShareParam();
    fileShare.setShareName(shareName);
    if (StringUtils.isNotBlank(shareComment)) {
        fileShare.setDescription(shareComment);
    }
    return getClient().fileSnapshots().share(snapshotId, fileShare);
}
Also used : FileSystemShareParam(com.emc.storageos.model.file.FileSystemShareParam)

Example 2 with FileSystemShareParam

use of com.emc.storageos.model.file.FileSystemShareParam in project coprhd-controller by CoprHD.

the class FileSystems method addSubDirectory.

/**
 * This method called when user adds sub directory.
 *
 * @param id
 *            id of the file system.
 * @param shareName
 *            shareName of the sub directory.
 * @param subDirectory
 *            name of the sub directory.
 * @param description
 *            Given description during creation of sub directory.
 */
@FlashException(referrer = { "fileSystem" })
public static void addSubDirectory(String id, String shareName, String subDirectroy, String description) {
    ViPRCoreClient client = BourneUtil.getViprClient();
    FileSystemShareParam param = new FileSystemShareParam();
    param.setShareName(shareName);
    if (subDirectroy != null && !"".equals(subDirectroy)) {
        param.setSubDirectory(subDirectroy);
    }
    if (description != null && !"".equals(description)) {
        param.setDescription(description);
    }
    client.fileSystems().share(uri(id), param);
    flash.put("info", MessagesUtils.get("resources.filesystem.subdir.add"));
    fileSystem(id);
}
Also used : ViPRCoreClient(com.emc.vipr.client.ViPRCoreClient) FileSystemShareParam(com.emc.storageos.model.file.FileSystemShareParam) FlashException(controllers.util.FlashException)

Example 3 with FileSystemShareParam

use of com.emc.storageos.model.file.FileSystemShareParam in project coprhd-controller by CoprHD.

the class CreateFileSystemShare method doExecute.

@Override
protected Task<FileShareRestRep> doExecute() throws Exception {
    FileSystemShareParam fileShare = new FileSystemShareParam();
    fileShare.setShareName(shareName);
    if (StringUtils.isNotBlank(shareComment)) {
        fileShare.setDescription(shareComment);
    }
    if (StringUtils.isNotBlank(subDirectory)) {
        fileShare.setSubDirectory(subDirectory);
    }
    return getClient().fileSystems().share(fileSystemId, fileShare);
}
Also used : FileSystemShareParam(com.emc.storageos.model.file.FileSystemShareParam)

Example 4 with FileSystemShareParam

use of com.emc.storageos.model.file.FileSystemShareParam in project coprhd-controller by CoprHD.

the class FileSnapshots method addSnapShotSubDir.

/**
 * This method called when user adds sub directory.
 *
 * @param id
 *            id of the file system.
 * @param shareName
 *            shareName of the sub directory.
 * @param subDirectory
 *            name of the sub directory.
 * @param description
 *            Given description during creation of sub directory.
 */
@FlashException(referrer = { "snapshot" })
public static void addSnapShotSubDir(String id, String shareName, String subDirectroy, String description) {
    ViPRCoreClient client = BourneUtil.getViprClient();
    FileSystemShareParam param = new FileSystemShareParam();
    param.setShareName(shareName);
    if (subDirectroy != null && !"".equals(subDirectroy)) {
        param.setSubDirectory(subDirectroy);
    }
    if (description != null && !"".equals(description)) {
        param.setDescription(description);
    }
    client.fileSnapshots().share(uri(id), param);
    flash.put("info", MessagesUtils.get("resources.filesystem.subdir.add"));
    snapshot(id);
}
Also used : ViPRCoreClient(com.emc.vipr.client.ViPRCoreClient) FileSystemShareParam(com.emc.storageos.model.file.FileSystemShareParam) FlashException(controllers.util.FlashException)

Aggregations

FileSystemShareParam (com.emc.storageos.model.file.FileSystemShareParam)4 ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)2 FlashException (controllers.util.FlashException)2