use of com.emc.storageos.model.file.FileShareRestRep 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.storageos.model.file.FileShareRestRep 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.storageos.model.file.FileShareRestRep in project coprhd-controller by CoprHD.
the class FileSystems method listPolicySnapshot.
public static void listPolicySnapshot(String fileSystemId, String policyId, String policyName) {
renderArgs.put("dataTable", new FilePolicySnapshotsDataTable());
renderArgs.put("fileSystemId", uri(fileSystemId));
renderArgs.put("policyId", uri(policyId));
ViPRCoreClient client = BourneUtil.getViprClient();
FileShareRestRep restRep = client.fileSystems().get(uri(fileSystemId));
renderArgs.put("filePolicyName", policyName);
renderArgs.put("fileSystemName", restRep.getName());
renderArgs.put("fileSystemAndpolicyId", fileSystemId + "~~~" + policyId);
render();
}
use of com.emc.storageos.model.file.FileShareRestRep in project coprhd-controller by CoprHD.
the class FileSystems method deleteFileSystemShare.
@FlashException(referrer = { "fileSystem" })
public static void deleteFileSystemShare(String fileSystemId, String shareName) {
ViPRCoreClient client = BourneUtil.getViprClient();
Task<FileShareRestRep> task = client.fileSystems().removeShare(uri(fileSystemId), shareName);
flash.put("info", MessagesUtils.get("resources.filesystem.share.deactivate"));
fileSystem(fileSystemId);
}
use of com.emc.storageos.model.file.FileShareRestRep in project coprhd-controller by CoprHD.
the class FileSystems method listAcl.
/**
* This method called when Access Control List page is loaded.
*
* @param fileSystem
* File System id of the provided File System.
* @param shareName
* Name of the file share.
*/
public static void listAcl(String fileSystem, String shareName) {
renderArgs.put("dataTable", new ShareACLDataTable());
renderArgs.put("fileSystem", uri(fileSystem));
renderArgs.put("shareName", shareName);
renderArgs.put("aclURL", "/file/filesystems/" + uri(fileSystem) + "/shares/" + shareName + "/acl");
renderArgs.put("permissionOptions", StringOption.options(new String[] { "Read", "Change", "FullControl" }));
renderArgs.put("fileSystemId", uri(fileSystem));
ViPRCoreClient client = BourneUtil.getViprClient();
FileShareRestRep restRep = client.fileSystems().get(uri(fileSystem));
renderArgs.put("fileSystemName", restRep.getName());
ShareACLForm shareACL = new ShareACLForm();
render(shareACL);
}
Aggregations