use of org.ovirt.engine.core.common.action.ConnectHostToStoragePoolServersParameters in project ovirt-engine by oVirt.
the class InitVdsOnUpCommand method initializeStorage.
private boolean initializeStorage() {
boolean returnValue = false;
// connect any storage
if (getStoragePool() == null || StoragePoolStatus.Uninitialized == getStoragePool().getStatus() || StoragePoolStatus.Maintenance == getStoragePool().getStatus()) {
returnValue = true;
connectPoolSucceeded = true;
} else {
ConnectHostToStoragePoolServersParameters params = new ConnectHostToStoragePoolServersParameters(getStoragePool(), getVds());
CommandContext ctx = cloneContext();
ctx.getExecutionContext().setJobRequired(false);
runInternalAction(ActionType.ConnectHostToStoragePoolServers, params, ctx);
EventResult connectResult = connectHostToPool();
if (connectResult != null) {
returnValue = connectResult.isSuccess();
problematicDomains = (List<StorageDomainStatic>) connectResult.getResultData();
}
connectPoolSucceeded = returnValue;
}
return returnValue;
}
use of org.ovirt.engine.core.common.action.ConnectHostToStoragePoolServersParameters in project ovirt-engine by oVirt.
the class VdsEventListener method connectHostToDomainsInActiveOrUnknownStatus.
@Override
public boolean connectHostToDomainsInActiveOrUnknownStatus(VDS vds) {
StoragePool sp = storagePoolDao.get(vds.getStoragePoolId());
ConnectHostToStoragePoolServersParameters params = new ConnectHostToStoragePoolServersParameters(sp, vds, false);
return backend.runInternalAction(ActionType.ConnectHostToStoragePoolServers, params).getSucceeded();
}
Aggregations