Search in sources :

Example 1 with GetStorageSystems

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

the class DiscoverUnmanagedFilesystemsService method execute.

@Override
public void execute() throws Exception {
    List<URI> uris = uris(storageSystems);
    List<StorageSystemRestRep> systemRestReps = execute(new GetStorageSystems(uris));
    for (StorageSystemRestRep storageSystem : systemRestReps) {
        logInfo("discover.unmanaged.filesystem.service.discovering", storageSystem.getName());
        execute(new DiscoverUnmanagedFilesystems(storageSystem.getId().toString()));
        int postCount = countUnmanagedFileSystems(storageSystem.getId().toString());
        logInfo("discover.unmanaged.filesystem.service.discovered", postCount, storageSystem.getName());
    }
}
Also used : StorageSystemRestRep(com.emc.storageos.model.systems.StorageSystemRestRep) GetStorageSystems(com.emc.sa.service.vipr.tasks.GetStorageSystems) DiscoverUnmanagedFilesystems(com.emc.sa.service.vipr.file.tasks.DiscoverUnmanagedFilesystems) URI(java.net.URI)

Example 2 with GetStorageSystems

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

the class DiscoverUnmanagedVolumesService method execute.

@Override
public void execute() throws Exception {
    List<URI> uris = uris(storageSystems);
    List<StorageSystemRestRep> systemRestReps = execute(new GetStorageSystems(uris));
    // remove any VPLEX systems and add them back at the end of the systems list
    List<StorageSystemRestRep> vplexSystems = new ArrayList<StorageSystemRestRep>();
    Iterator<StorageSystemRestRep> it = systemRestReps.iterator();
    while (it.hasNext()) {
        StorageSystemRestRep system = it.next();
        if (BlockProviderUtils.isVplex(system)) {
            vplexSystems.add(system);
            it.remove();
        }
    }
    systemRestReps.addAll(vplexSystems);
    for (StorageSystemRestRep storageSystem : systemRestReps) {
        logInfo("discover.unmanaged.volume.service.discovering", storageSystem.getName());
        execute(new DiscoverUnmanagedVolumes(storageSystem.getId().toString()));
        int postCount = countUnmanagedVolumes(storageSystem.getId().toString());
        logInfo("discover.unmanaged.volume.service.discovered", postCount, storageSystem.getName());
    }
    List<ProtectionSystemRestRep> protectionSystemRestReps = execute(new GetProtectionSystems());
    for (ProtectionSystemRestRep protectionSystem : protectionSystemRestReps) {
        logInfo("discover.unmanaged.volume.service.discoveringcgs", protectionSystem.getName());
        execute(new DiscoverUnmanagedCGs(protectionSystem.getId().toString(), DiscoverUnmanagedCGs.UnmanagedNamespace.UNMANAGED_CGS));
        logInfo("discover.unmanaged.volume.service.discoveredcgs", protectionSystem.getName());
    }
}
Also used : StorageSystemRestRep(com.emc.storageos.model.systems.StorageSystemRestRep) GetStorageSystems(com.emc.sa.service.vipr.tasks.GetStorageSystems) ArrayList(java.util.ArrayList) DiscoverUnmanagedVolumes(com.emc.sa.service.vipr.block.tasks.DiscoverUnmanagedVolumes) GetProtectionSystems(com.emc.sa.service.vipr.tasks.GetProtectionSystems) URI(java.net.URI) ProtectionSystemRestRep(com.emc.storageos.model.protection.ProtectionSystemRestRep) DiscoverUnmanagedCGs(com.emc.sa.service.vipr.tasks.DiscoverUnmanagedCGs)

Aggregations

GetStorageSystems (com.emc.sa.service.vipr.tasks.GetStorageSystems)2 StorageSystemRestRep (com.emc.storageos.model.systems.StorageSystemRestRep)2 URI (java.net.URI)2 DiscoverUnmanagedVolumes (com.emc.sa.service.vipr.block.tasks.DiscoverUnmanagedVolumes)1 DiscoverUnmanagedFilesystems (com.emc.sa.service.vipr.file.tasks.DiscoverUnmanagedFilesystems)1 DiscoverUnmanagedCGs (com.emc.sa.service.vipr.tasks.DiscoverUnmanagedCGs)1 GetProtectionSystems (com.emc.sa.service.vipr.tasks.GetProtectionSystems)1 ProtectionSystemRestRep (com.emc.storageos.model.protection.ProtectionSystemRestRep)1 ArrayList (java.util.ArrayList)1