use of org.ovirt.engine.core.utils.ISingleAsyncOperation in project ovirt-engine by oVirt.
the class RemoveStoragePoolCommand method connectAllHostToPoolAndDomain.
/**
* @param masterDomain
* Connect all hosts to the pool and to the domains
*/
protected void connectAllHostToPoolAndDomain(final StorageDomain masterDomain) {
final List<VDS> vdsList = getAllRunningVdssInPool();
final StoragePool storagePool = getStoragePool();
SynchronizeNumberOfAsyncOperations sync = new SynchronizeNumberOfAsyncOperations(vdsList.size(), null, new ActivateDeactivateSingleAsyncOperationFactory() {
@Override
public ISingleAsyncOperation createSingleAsyncOperation() {
return Injector.injectMembers(new ConnectVDSToPoolAndDomains(vdsList, masterDomain, storagePool));
}
@Override
public void initialize(List parameters) {
// no need to initilalize params
}
});
sync.execute();
}
Aggregations