use of com.emc.storageos.fileorchestrationcontroller.FileOrchestrationController in project coprhd-controller by CoprHD.
the class AbstractFileServiceApiImpl method export.
@Override
public void export(URI storage, URI fsURI, List<FileShareExport> exports, String opId) throws InternalException {
FileOrchestrationController controller = getController(FileOrchestrationController.class, FileOrchestrationController.FILE_ORCHESTRATION_DEVICE);
controller.createNFSExport(storage, fsURI, exports, opId);
}
use of com.emc.storageos.fileorchestrationcontroller.FileOrchestrationController in project coprhd-controller by CoprHD.
the class AbstractFileServiceApiImpl method reduceFileShareQuota.
/**
* Reduce fileshare provision capacity
* @param fileshare file share object
* @param newSize - new fileshare size
* @param taskId - task id
* return
*/
@Override
public void reduceFileShareQuota(FileShare fileshare, Long newSize, String taskId) throws InternalException {
FileOrchestrationController controller = getController(FileOrchestrationController.class, FileOrchestrationController.FILE_ORCHESTRATION_DEVICE);
final List<FileDescriptor> fileDescriptors = new ArrayList<FileDescriptor>();
if (fileshare.getParentFileShare() != null && fileshare.getPersonality().equals(FileShare.PersonalityTypes.TARGET.name())) {
throw APIException.badRequests.reduceMirrorFileSupportedOnlyOnSource(fileshare.getId());
} else {
List<String> targetfileUris = new ArrayList<String>();
// if filesystem is target then throw exception
if (fileshare.getMirrorfsTargets() != null && !fileshare.getMirrorfsTargets().isEmpty()) {
targetfileUris.addAll(fileshare.getMirrorfsTargets());
}
FileDescriptor descriptor = new FileDescriptor(FileDescriptor.Type.FILE_DATA, fileshare.getStorageDevice(), fileshare.getId(), fileshare.getPool(), "", false, newSize);
fileDescriptors.add(descriptor);
// Prepare the descriptor for targets
for (String target : targetfileUris) {
FileShare targetFileShare = _dbClient.queryObject(FileShare.class, URI.create(target));
descriptor = new FileDescriptor(FileDescriptor.Type.FILE_DATA, targetFileShare.getStorageDevice(), targetFileShare.getId(), targetFileShare.getPool(), "", false, newSize);
fileDescriptors.add(descriptor);
}
}
// place the reduce filesystem call in queue
controller.reduceFileSystem(fileDescriptors, taskId);
}
use of com.emc.storageos.fileorchestrationcontroller.FileOrchestrationController in project coprhd-controller by CoprHD.
the class AbstractFileServiceApiImpl method failoverFileShare.
@Override
public void failoverFileShare(URI fsURI, StoragePort nfsPort, StoragePort cifsPort, boolean replicateConfiguration, String taskId) {
FileOrchestrationController controller = getController(FileOrchestrationController.class, FileOrchestrationController.FILE_ORCHESTRATION_DEVICE);
controller.failoverFileSystem(fsURI, nfsPort, cifsPort, replicateConfiguration, taskId);
}
use of com.emc.storageos.fileorchestrationcontroller.FileOrchestrationController in project coprhd-controller by CoprHD.
the class AbstractFileServiceApiImpl method deleteExportRules.
@Override
public void deleteExportRules(URI storage, URI uri, boolean allDirs, String subDirs, boolean unmountExport, String taskId) {
FileOrchestrationController controller = getController(FileOrchestrationController.class, FileOrchestrationController.FILE_ORCHESTRATION_DEVICE);
controller.deleteExportRules(storage, uri, allDirs, subDirs, unmountExport, taskId);
}
use of com.emc.storageos.fileorchestrationcontroller.FileOrchestrationController in project coprhd-controller by CoprHD.
the class AbstractFileServiceApiImpl method deleteShareACLs.
@Override
public void deleteShareACLs(URI storage, URI uri, String shareName, String taskId) {
FileOrchestrationController controller = getController(FileOrchestrationController.class, FileOrchestrationController.FILE_ORCHESTRATION_DEVICE);
controller.deleteShareACLs(storage, uri, shareName, taskId);
}
Aggregations