Search in sources :

Example 51 with Provider

use of org.ovirt.engine.core.common.businessentities.Provider in project ovirt-engine by oVirt.

the class ProviderListModel method updateDetailsAvailability.

@Override
protected void updateDetailsAvailability() {
    super.updateDetailsAvailability();
    Provider provider = getSelectedItem();
    if (provider != null) {
        networkListModel.setIsAvailable(provider.getType().getProvidedTypes().contains(VdcObjectType.Network));
        secretListModel.setIsAvailable(provider.getType() == ProviderType.OPENSTACK_VOLUME);
    }
}
Also used : Provider(org.ovirt.engine.core.common.businessentities.Provider)

Example 52 with Provider

use of org.ovirt.engine.core.common.businessentities.Provider in project ovirt-engine by oVirt.

the class ProviderSecretListModel method syncSearch.

@Override
protected void syncSearch() {
    Provider provider = getEntity();
    if (provider == null) {
        return;
    }
    super.syncSearch(QueryType.GetAllLibvirtSecretsByProviderId, new IdQueryParameters(provider.getId()));
}
Also used : IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters) Provider(org.ovirt.engine.core.common.businessentities.Provider)

Example 53 with Provider

use of org.ovirt.engine.core.common.businessentities.Provider in project ovirt-engine by oVirt.

the class RemoveProvidersModel method onRemove.

private void onRemove(boolean force) {
    List<ActionParametersBase> parameterList = new LinkedList<>();
    for (Provider provider : providers) {
        parameterList.add(new ProviderParameters(provider, force));
    }
    Frontend.getInstance().runMultipleActions(ActionType.RemoveProvider, parameterList, result -> sourceListModel.getSearchCommand().execute());
    cancel();
}
Also used : ProviderParameters(org.ovirt.engine.core.common.action.ProviderParameters) ActionParametersBase(org.ovirt.engine.core.common.action.ActionParametersBase) LinkedList(java.util.LinkedList) Provider(org.ovirt.engine.core.common.businessentities.Provider)

Example 54 with Provider

use of org.ovirt.engine.core.common.businessentities.Provider in project ovirt-engine by oVirt.

the class HostNetworkProviderModel method getNoExternalNetworkProvider.

private Provider getNoExternalNetworkProvider() {
    Provider provider = new Provider();
    provider.setName(ConstantsManager.getInstance().getConstants().hostNoExternalNetworkProvider());
    return provider;
}
Also used : Provider(org.ovirt.engine.core.common.businessentities.Provider) AsyncDataProvider(org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider)

Example 55 with Provider

use of org.ovirt.engine.core.common.businessentities.Provider in project ovirt-engine by oVirt.

the class ExternalNetworkSyncService method synchronize.

private void synchronize() {
    List<Provider<?>> networkProviders = providerDao.getAllByTypes(ProviderType.EXTERNAL_NETWORK, ProviderType.OPENSTACK_NETWORK);
    networkProviders.stream().filter(provider -> {
        OpenstackNetworkProviderProperties networkProperties = (OpenstackNetworkProviderProperties) provider.getAdditionalProperties();
        return networkProperties.getAutoSync();
    }).map(Provider::getId).distinct().forEach(providerId -> {
        backendInternal.runInternalAction(ActionType.SyncNetworkProvider, new IdParameters(providerId));
    });
}
Also used : OpenstackNetworkProviderProperties(org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties) Logger(org.slf4j.Logger) ProviderDao(org.ovirt.engine.core.dao.provider.ProviderDao) LoggerFactory(org.slf4j.LoggerFactory) Provider(org.ovirt.engine.core.common.businessentities.Provider) ConfigValues(org.ovirt.engine.core.common.config.ConfigValues) ThreadPools(org.ovirt.engine.core.utils.threadpool.ThreadPools) TimeUnit(java.util.concurrent.TimeUnit) Inject(javax.inject.Inject) ActionType(org.ovirt.engine.core.common.action.ActionType) List(java.util.List) BackendInternal(org.ovirt.engine.core.bll.interfaces.BackendInternal) PostConstruct(javax.annotation.PostConstruct) ProviderType(org.ovirt.engine.core.common.businessentities.ProviderType) ApplicationScoped(javax.enterprise.context.ApplicationScoped) BackendService(org.ovirt.engine.core.common.BackendService) IdParameters(org.ovirt.engine.core.common.action.IdParameters) ManagedScheduledExecutorService(javax.enterprise.concurrent.ManagedScheduledExecutorService) Config(org.ovirt.engine.core.common.config.Config) IdParameters(org.ovirt.engine.core.common.action.IdParameters) OpenstackNetworkProviderProperties(org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties) Provider(org.ovirt.engine.core.common.businessentities.Provider)

Aggregations

Provider (org.ovirt.engine.core.common.businessentities.Provider)63 ExternalHostProvider (org.ovirt.engine.api.model.ExternalHostProvider)10 ArrayList (java.util.ArrayList)7 ProviderQueryParameters (org.ovirt.engine.core.common.queries.ProviderQueryParameters)7 AsyncDataProvider (org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider)7 ProviderParameters (org.ovirt.engine.core.common.action.ProviderParameters)6 Test (org.junit.Test)5 VDS (org.ovirt.engine.core.common.businessentities.VDS)5 IdQueryParameters (org.ovirt.engine.core.common.queries.IdQueryParameters)5 Guid (org.ovirt.engine.core.compat.Guid)5 List (java.util.List)4 OpenStackNetworkProvider (org.ovirt.engine.api.model.OpenStackNetworkProvider)4 OpenStackVolumeProvider (org.ovirt.engine.api.model.OpenStackVolumeProvider)4 Cluster (org.ovirt.engine.core.common.businessentities.Cluster)4 ExternalDiscoveredHost (org.ovirt.engine.core.common.businessentities.ExternalDiscoveredHost)4 ExternalHostGroup (org.ovirt.engine.core.common.businessentities.ExternalHostGroup)4 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)4 ExternalProvider (org.ovirt.engine.api.model.ExternalProvider)3 OpenstackNetworkProviderProperties (org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties)3 ApplicationMode (org.ovirt.engine.core.common.mode.ApplicationMode)3