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);
}
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);
}
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);
}
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);
}
Aggregations