Search in sources :

Example 61 with Provider

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

the class SyncNetworkProviderCommandTest method testInvalidProviderType.

@Test
public void testInvalidProviderType() {
    Provider imageProvider = new Provider();
    imageProvider.setType(ProviderType.OPENSTACK_IMAGE);
    setupProviderDao(imageProvider);
    ValidateTestUtils.runAndAssertValidateFailure(command, EngineMessage.ACTION_TYPE_FAILED_PROVIDER_NOT_NETWORK);
}
Also used : Provider(org.ovirt.engine.core.common.businessentities.Provider) Test(org.junit.Test) BaseCommandTest(org.ovirt.engine.core.bll.BaseCommandTest)

Example 62 with Provider

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

the class SyncNetworkProviderCommandTest method getProvider.

private Provider getProvider() {
    if (provider == null) {
        provider = new Provider();
        provider.setType(ProviderType.EXTERNAL_NETWORK);
        provider.setId(PROVIDER_ID);
    }
    return provider;
}
Also used : Provider(org.ovirt.engine.core.common.businessentities.Provider)

Example 63 with Provider

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

the class BackendHostExternalNetworkProviderConfigurationsResource method getBackendCollection.

private List<Provider> getBackendCollection() {
    List<Provider> externalNetworkProviders = new ArrayList<>();
    VDS host = getEntity(VDS.class, QueryType.GetVdsByVdsId, new IdQueryParameters(hostId), hostId.toString(), true);
    Guid externalNetworkProviderId = host.getOpenstackNetworkProviderId();
    if (externalNetworkProviderId != null) {
        externalNetworkProviders.add(getEntity(Provider.class, QueryType.GetProviderById, new IdQueryParameters(externalNetworkProviderId), externalNetworkProviderId.toString()));
    }
    return externalNetworkProviders;
}
Also used : IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters) VDS(org.ovirt.engine.core.common.businessentities.VDS) ArrayList(java.util.ArrayList) Guid(org.ovirt.engine.core.compat.Guid) 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