Search in sources :

Example 1 with ProviderParameters

use of org.ovirt.engine.core.common.action.ProviderParameters in project ovirt-engine by oVirt.

the class ProviderModel method testProviderConnectivity.

private void testProviderConnectivity() {
    Frontend.getInstance().runAction(ActionType.TestProviderConnectivity, new ProviderParameters(provider), result -> {
        ActionReturnValue res = result.getReturnValue();
        // If the connection failed on SSL issues, we try to fetch the provider
        // certificate chain, and import it to the engine
        stopProgress();
        setTestResultValue(res);
    }, null, false);
}
Also used : ProviderParameters(org.ovirt.engine.core.common.action.ProviderParameters) ActionReturnValue(org.ovirt.engine.core.common.action.ActionReturnValue)

Example 2 with ProviderParameters

use of org.ovirt.engine.core.common.action.ProviderParameters 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);
}
Also used : ProviderParameters(org.ovirt.engine.core.common.action.ProviderParameters) Provider(org.ovirt.engine.core.common.businessentities.Provider) ExternalProvider(org.ovirt.engine.api.model.ExternalProvider)

Example 3 with ProviderParameters

use of org.ovirt.engine.core.common.action.ProviderParameters in project ovirt-engine by oVirt.

the class BackendOpenStackImageProviderResource 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) OpenStackImageProvider(org.ovirt.engine.api.model.OpenStackImageProvider) Provider(org.ovirt.engine.core.common.businessentities.Provider)

Example 4 with ProviderParameters

use of org.ovirt.engine.core.common.action.ProviderParameters in project ovirt-engine by oVirt.

the class BackendOpenStackVolumeProvidersResource method add.

@Override
public Response add(OpenStackVolumeProvider provider) {
    validateParameters(provider, "name");
    if (provider.isSetDataCenter()) {
        StoragePool storagePool = getStoragePool(provider.getDataCenter());
        provider.setDataCenter(DataCenterMapper.map(storagePool, null));
    }
    return performCreate(ActionType.AddProvider, new ProviderParameters(map(provider)), new QueryIdResolver<Guid>(QueryType.GetProviderById, IdQueryParameters.class));
}
Also used : ProviderParameters(org.ovirt.engine.core.common.action.ProviderParameters) StoragePool(org.ovirt.engine.core.common.businessentities.StoragePool) IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters) Guid(org.ovirt.engine.core.compat.Guid)

Example 5 with ProviderParameters

use of org.ovirt.engine.core.common.action.ProviderParameters 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)

Aggregations

ProviderParameters (org.ovirt.engine.core.common.action.ProviderParameters)9 Provider (org.ovirt.engine.core.common.businessentities.Provider)6 LinkedList (java.util.LinkedList)1 ExternalHostProvider (org.ovirt.engine.api.model.ExternalHostProvider)1 ExternalProvider (org.ovirt.engine.api.model.ExternalProvider)1 OpenStackImageProvider (org.ovirt.engine.api.model.OpenStackImageProvider)1 OpenStackNetworkProvider (org.ovirt.engine.api.model.OpenStackNetworkProvider)1 OpenStackVolumeProvider (org.ovirt.engine.api.model.OpenStackVolumeProvider)1 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)1 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)1 StoragePool (org.ovirt.engine.core.common.businessentities.StoragePool)1 IdQueryParameters (org.ovirt.engine.core.common.queries.IdQueryParameters)1 Guid (org.ovirt.engine.core.compat.Guid)1