use of com.emc.vipr.client.ViPRCoreClient in project coprhd-controller by CoprHD.
the class FileSystems method getStorageSystemJson.
/**
* GEt StorageSystem for given fileSystem
*
* @param fileSystemId
*/
public static void getStorageSystemJson(String fileSystemId) {
ViPRCoreClient client = BourneUtil.getViprClient();
FileShareRestRep fs = client.fileSystems().get(uri(fileSystemId));
StorageSystemRestRep sys = client.storageSystems().get(fs.getStorageSystem());
renderJSON(sys);
}
use of com.emc.vipr.client.ViPRCoreClient 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.vipr.client.ViPRCoreClient in project coprhd-controller by CoprHD.
the class FileSystems method delete.
private static void delete(List<URI> ids, String deleteType) {
if (ids != null) {
ViPRCoreClient client = BourneUtil.getViprClient();
List<Task<FileShareRestRep>> tasks = Lists.newArrayList();
for (URI id : ids) {
boolean forceDelete = false;
Task<FileShareRestRep> task = client.fileSystems().deactivate(id, new FileSystemDeleteParam(forceDelete, deleteType));
tasks.add(task);
}
if (!tasks.isEmpty()) {
flash.put("info", MessagesUtils.get("resources.filesystems.deactivate", tasks.size()));
}
}
fileSystems(null);
}
use of com.emc.vipr.client.ViPRCoreClient in project coprhd-controller by CoprHD.
the class FileSystems method fileSystemSnapshots.
public static void fileSystemSnapshots(String fileSystemId) {
ViPRCoreClient client = BourneUtil.getViprClient();
List<NamedRelatedResourceRep> refs = client.fileSnapshots().listByFileSystem(uri(fileSystemId));
List<FileSnapshotRestRep> snapshots = client.fileSnapshots().getByRefs(refs);
render(snapshots);
}
use of com.emc.vipr.client.ViPRCoreClient in project coprhd-controller by CoprHD.
the class FileSystems method fileSystemShares.
public static void fileSystemShares(String fileSystemId) {
ViPRCoreClient client = BourneUtil.getViprClient();
List<SmbShareResponse> shares = client.fileSystems().getShares(uri(fileSystemId));
render(shares);
}
Aggregations