use of com.emc.storageos.volumecontroller.impl.plugins.discovery.smis.ArrayAffinityDataCollectionTaskCompleter in project coprhd-controller by CoprHD.
the class ControllerServiceImpl method createDiscoverJobsForTasks.
private static ArrayList<DataCollectionJob> createDiscoverJobsForTasks(AsyncTask[] tasks, String jobType) {
ArrayList<DataCollectionJob> jobs = new ArrayList<DataCollectionJob>();
for (AsyncTask task : tasks) {
if (task instanceof ArrayAffinityAsyncTask) {
List<URI> hostIds = ((ArrayAffinityAsyncTask) task).getHostIds();
List<URI> systemIds = ((ArrayAffinityAsyncTask) task).getSystemIds();
ArrayAffinityDataCollectionTaskCompleter completer = new ArrayAffinityDataCollectionTaskCompleter(task._clazz, systemIds, task._opId, jobType);
DataCollectionJob job = new DataCollectionArrayAffinityJob(hostIds, systemIds, completer, task._namespace);
jobs.add(job);
} else {
DiscoverTaskCompleter completer = new DiscoverTaskCompleter(task, jobType);
if (null == task._namespace) {
task._namespace = Discovery_Namespaces.ALL.toString();
}
DataCollectionJob job = new DataCollectionDiscoverJob(completer, task._namespace);
jobs.add(job);
}
}
return jobs;
}
Aggregations