use of com.emc.storageos.volumecontroller.impl.plugins.discovery.smis.DataCollectionScanJob in project coprhd-controller by CoprHD.
the class BlockControllerImpl method scanStorageProviders.
/**
* {@inheritDoc}
*/
@Override
public void scanStorageProviders(AsyncTask[] tasks) throws ControllerException {
try {
Map<String, DataCollectionScanJob> scanJobByInterfaceType = new HashMap<String, DataCollectionScanJob>();
for (AsyncTask task : tasks) {
ScanTaskCompleter completer = new ScanTaskCompleter(task);
StorageProvider provider = _dbClient.queryObject(StorageProvider.class, completer.getId());
if (provider != null && !provider.getInactive()) {
if (scanJobByInterfaceType.get(provider.getInterfaceType()) == null) {
scanJobByInterfaceType.put(provider.getInterfaceType(), new DataCollectionScanJob());
}
scanJobByInterfaceType.get(provider.getInterfaceType()).addCompleter(completer);
}
}
for (DataCollectionScanJob job : scanJobByInterfaceType.values()) {
_util.scheduleScanningJobs(job);
}
} catch (Exception e) {
throw ClientControllerException.fatals.unableToScanSMISProviders(tasks, "BlockController", e);
}
}
Aggregations