Search in sources :

Example 1 with GetUnmanagedFilesystems

use of com.emc.sa.service.vipr.file.tasks.GetUnmanagedFilesystems in project coprhd-controller by CoprHD.

the class IngestUnmanagedFilesystemsService method execute.

@Override
public void execute() throws Exception {
    List<UnManagedFileSystemRestRep> unmanaged = execute(new GetUnmanagedFilesystems(storageSystem, virtualPool, type));
    List<URI> filesystems = Lists.newArrayList();
    for (UnManagedFileSystemRestRep fileSystem : unmanaged) {
        filesystems.add(fileSystem.getId());
    }
    execute(new IngestUnmanagedFilesystems(virtualPool, virtualArray, project, filesystems));
    // Requery and produce a log of what was ingested or not
    int failed = execute(new GetUnmanagedFilesystems(storageSystem, virtualPool, type)).size();
    logInfo("ingest.unmanaged.filesystems.service.ingested", unmanaged.size() - failed);
    logInfo("ingest.unmanaged.filesystems.service.skipped", failed);
}
Also used : UnManagedFileSystemRestRep(com.emc.storageos.model.file.UnManagedFileSystemRestRep) GetUnmanagedFilesystems(com.emc.sa.service.vipr.file.tasks.GetUnmanagedFilesystems) IngestUnmanagedFilesystems(com.emc.sa.service.vipr.file.tasks.IngestUnmanagedFilesystems) URI(java.net.URI)

Aggregations

GetUnmanagedFilesystems (com.emc.sa.service.vipr.file.tasks.GetUnmanagedFilesystems)1 IngestUnmanagedFilesystems (com.emc.sa.service.vipr.file.tasks.IngestUnmanagedFilesystems)1 UnManagedFileSystemRestRep (com.emc.storageos.model.file.UnManagedFileSystemRestRep)1 URI (java.net.URI)1