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);
}
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;
}
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;
}
Aggregations