use of com.emc.sa.service.vipr.block.tasks.DiscoverUnmanagedVolumes 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());
}
}
Aggregations