use of org.ovirt.engine.core.common.businessentities.Provider in project ovirt-engine by oVirt.
the class ProviderNetworkListModel method syncSearch.
@Override
protected void syncSearch() {
Provider provider = getEntity();
if (provider == null) {
return;
}
super.syncSearch(QueryType.GetAllNetworksForProvider, new IdQueryParameters(provider.getId()));
}
use of org.ovirt.engine.core.common.businessentities.Provider in project ovirt-engine by oVirt.
the class HostNetworkProviderModel method selectProviderById.
public void selectProviderById(Guid providerId) {
if (getNetworkProviders().getItems() != null) {
Provider provider = getNetworkProviders().getItems().stream().filter(candidate -> Objects.equals(candidate.getId(), providerId)).findFirst().orElse(getNoExternalNetworkProvider());
getNetworkProviders().setSelectedItem(provider);
}
}
use of org.ovirt.engine.core.common.businessentities.Provider in project ovirt-engine by oVirt.
the class UpdateHostValidatorTest method hostProviderTypeDoesNotMatch.
@SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void hostProviderTypeDoesNotMatch() {
when(host.getHostProviderId()).thenReturn(Guid.newGuid());
Provider provider = mock(Provider.class);
when(provider.getType()).thenReturn(ProviderType.OPENSTACK_IMAGE);
when(providerDao.get(any())).thenReturn(provider);
assertThat(validator.hostProviderTypeMatches(), failsWith(EngineMessage.ACTION_TYPE_FAILED_HOST_PROVIDER_TYPE_MISMATCH));
}
use of org.ovirt.engine.core.common.businessentities.Provider in project ovirt-engine by oVirt.
the class AbstractBackendExternalProviderResource method importCertificates.
@Override
public Response importCertificates(Action action) {
Provider provider = BackendExternalProviderHelper.getProvider(this, id);
validateParameters(action, "certificates.content");
String content = null;
Certificates certificates = action.getCertificates();
if (certificates != null) {
List<Certificate> list = certificates.getCertificates();
if (!CollectionUtils.isEmpty(list)) {
content = list.get(0).getContent();
}
}
return performAction(ActionType.ImportProviderCertificate, new ImportProviderCertificateParameters(provider, content));
}
use of org.ovirt.engine.core.common.businessentities.Provider in project ovirt-engine by oVirt.
the class AbstractBackendExternalProviderResource method testConnectivity.
@Override
public Response testConnectivity(Action action) {
Provider provider = BackendExternalProviderHelper.getProvider(this, id);
ProviderParameters parameters = new ProviderParameters(provider);
return performAction(ActionType.TestProviderConnectivity, parameters);
}
Aggregations