use of org.ovirt.engine.core.common.businessentities.Provider in project ovirt-engine by oVirt.
the class BackendExternalComputeResourcesResourceTest method getProvider.
private Provider getProvider() {
Provider provider = mock(Provider.class);
when(provider.getId()).thenReturn(GUIDS[0]);
when(provider.getName()).thenReturn(NAMES[0]);
return provider;
}
use of org.ovirt.engine.core.common.businessentities.Provider in project ovirt-engine by oVirt.
the class BackendExternalHostGroupsResourceTest method getProvider.
private Provider getProvider() {
Provider provider = mock(Provider.class);
when(provider.getId()).thenReturn(GUIDS[0]);
when(provider.getName()).thenReturn(NAMES[0]);
return provider;
}
use of org.ovirt.engine.core.common.businessentities.Provider in project ovirt-engine by oVirt.
the class BackendExternalHostProvidersResourceTest method getEntity.
@Override
protected Provider getEntity(int index) {
Provider provider = mock(Provider.class);
when(provider.getId()).thenReturn(GUIDS[index]);
when(provider.getName()).thenReturn(NAMES[index]);
when(provider.getDescription()).thenReturn(DESCRIPTIONS[index]);
return provider;
}
use of org.ovirt.engine.core.common.businessentities.Provider in project ovirt-engine by oVirt.
the class EngineForemanProviderFinder method findEngineProvider.
public HostProviderProxy findEngineProvider() {
engineHostName = resolveEngineHostName();
if (engineHostName == null) {
return null;
}
List<Provider<?>> hostProviders = dbFacade.getProviderDao().getAllByTypes(ProviderType.FOREMAN);
HostProviderProxy proxy;
for (Provider<?> provider : hostProviders) {
proxy = providerProxyFactory.create(provider);
if (proxy.isContentHostExist(engineHostName)) {
return proxy;
}
}
log.error("Failed to find host on any provider by host name '{}' ", engineHostName);
return null;
}
use of org.ovirt.engine.core.common.businessentities.Provider in project ovirt-engine by oVirt.
the class HostListModel method onInstall.
public void onInstall() {
final VDS host = getSelectedItem();
InstallModel model = (InstallModel) getWindow();
if (!model.validate(host.isOvirtVintageNode())) {
model.setValidationFailed(new EntityModel<>(true));
return;
}
final UpdateVdsActionParameters param = new UpdateVdsActionParameters();
param.setvds(host);
param.setVdsId(host.getId());
param.setPassword(model.getUserPassword().getEntity());
param.setReinstallOrUpgrade(true);
param.setInstallHost(true);
param.setoVirtIsoFile(null);
param.setOverrideFirewall(model.getOverrideIpTables().getEntity());
param.setActivateHost(model.getActivateHostAfterInstall().getEntity());
param.setAuthMethod(model.getAuthenticationMethod());
// Explicitly set null, to be clear we don't want to update fence agents.
param.setFenceAgents(null);
param.setHostedEngineDeployConfiguration(new HostedEngineDeployConfiguration(model.getHostedEngineHostModel().getSelectedItem()));
Provider<?> networkProvider = (Provider<?>) model.getNetworkProviders().getSelectedItem();
if (networkProvider == null) {
param.getVdsStaticData().setOpenstackNetworkProviderId(null);
} else {
param.getVdsStaticData().setOpenstackNetworkProviderId(networkProvider.getId());
param.setNetworkMappings((String) model.getInterfaceMappings().getEntity());
}
AsyncDataProvider.getInstance().getClusterById(new AsyncQuery<>(returnValue -> Frontend.getInstance().runAction(ActionType.InstallVds, param, result -> {
ActionReturnValue returnValue1 = result.getReturnValue();
if (returnValue1 != null && returnValue1.getSucceeded()) {
cancel();
}
})), host.getClusterId());
}
Aggregations