Search in sources :

Example 31 with Provider

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

the class NewHostModel method updateDiscoveredHostList.

private void updateDiscoveredHostList(String searchFilter) {
    Provider provider = getProviders().getSelectedItem();
    if (provider != null) {
        AsyncDataProvider.getInstance().getExternalProviderHostList(new AsyncQuery<>(hosts -> {
            ListModel<VDS> hostNameListModel = getExternalHostName();
            hostNameListModel.setItems(hosts);
            hostNameListModel.setIsChangeable(true);
            setEnableSearchHost(true);
        }), provider.getId(), true, searchFilter);
    } else {
        getExternalHostName().setItems(null);
        getExternalHostName().setIsChangeable(false);
        setEnableSearchHost(false);
    }
}
Also used : ApplicationModeHelper(org.ovirt.engine.ui.uicommonweb.models.ApplicationModeHelper) StoragePool(org.ovirt.engine.core.common.businessentities.StoragePool) List(java.util.List) Cluster(org.ovirt.engine.core.common.businessentities.Cluster) ExternalHostGroup(org.ovirt.engine.core.common.businessentities.ExternalHostGroup) ListModel(org.ovirt.engine.ui.uicommonweb.models.ListModel) ExternalDiscoveredHost(org.ovirt.engine.core.common.businessentities.ExternalDiscoveredHost) Provider(org.ovirt.engine.core.common.businessentities.Provider) ApplicationMode(org.ovirt.engine.core.common.mode.ApplicationMode) VDS(org.ovirt.engine.core.common.businessentities.VDS) AsyncDataProvider(org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider) ArrayList(java.util.ArrayList) ListModel(org.ovirt.engine.ui.uicommonweb.models.ListModel) Provider(org.ovirt.engine.core.common.businessentities.Provider) AsyncDataProvider(org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider)

Example 32 with Provider

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

the class BackendOpenStackNetworkProviderResource method remove.

@Override
public Response remove() {
    Provider provider = BackendExternalProviderHelper.getProvider(this, id);
    ProviderParameters parameters = new ProviderParameters(provider);
    return performAction(ActionType.RemoveProvider, parameters);
}
Also used : ProviderParameters(org.ovirt.engine.core.common.action.ProviderParameters) OpenStackNetworkProvider(org.ovirt.engine.api.model.OpenStackNetworkProvider) Provider(org.ovirt.engine.core.common.businessentities.Provider)

Example 33 with Provider

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

the class BackendOpenStackNetworkProvidersResource method getBackendCollection.

private List<Provider> getBackendCollection() {
    if (isFiltered()) {
        return getBackendCollection(QueryType.GetAllProviders, new GetAllProvidersParameters(ProviderType.OPENSTACK_NETWORK, ProviderType.EXTERNAL_NETWORK));
    } else {
        List<Provider> openstackCollection = getBackendCollection(SearchType.Provider, getConstraint(ProviderType.OPENSTACK_NETWORK.name()));
        List<Provider> externalCollection = getBackendCollection(SearchType.Provider, getConstraint(ProviderType.EXTERNAL_NETWORK.name()));
        openstackCollection.addAll(externalCollection);
        return openstackCollection;
    }
}
Also used : GetAllProvidersParameters(org.ovirt.engine.core.common.queries.GetAllProvidersParameters) OpenStackNetworkProvider(org.ovirt.engine.api.model.OpenStackNetworkProvider) Provider(org.ovirt.engine.core.common.businessentities.Provider)

Example 34 with Provider

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

the class BackendOpenStackVolumeProviderResource method remove.

@Override
public Response remove() {
    Provider provider = BackendExternalProviderHelper.getProvider(this, id);
    ProviderParameters parameters = new ProviderParameters(provider, isForce());
    return performAction(ActionType.RemoveProvider, parameters);
}
Also used : ProviderParameters(org.ovirt.engine.core.common.action.ProviderParameters) Provider(org.ovirt.engine.core.common.businessentities.Provider) OpenStackVolumeProvider(org.ovirt.engine.api.model.OpenStackVolumeProvider)

Example 35 with Provider

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

the class BackendOpenStackVolumeProvidersResource method mapCollection.

private OpenStackVolumeProviders mapCollection(List<Provider> entities) {
    OpenStackVolumeProviders collection = new OpenStackVolumeProviders();
    for (Provider entity : entities) {
        OpenStackVolumeProvider provider = map(entity);
        collection.getOpenStackVolumeProviders().add(addLinks(populate(provider, entity)));
    }
    return collection;
}
Also used : OpenStackVolumeProvider(org.ovirt.engine.api.model.OpenStackVolumeProvider) OpenStackVolumeProviders(org.ovirt.engine.api.model.OpenStackVolumeProviders) Provider(org.ovirt.engine.core.common.businessentities.Provider) OpenStackVolumeProvider(org.ovirt.engine.api.model.OpenStackVolumeProvider)

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