Search in sources :

Example 6 with ProviderParameters

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

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

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

Example 8 with ProviderParameters

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

the class ProviderModel method actualSave.

protected void actualSave() {
    flush();
    Frontend.getInstance().runAction(action, new ProviderParameters(provider), result -> {
        if (result.getReturnValue() == null || !result.getReturnValue().getSucceeded()) {
            return;
        }
        sourceListModel.getSearchCommand().execute();
        cancel();
    }, this);
}
Also used : ProviderParameters(org.ovirt.engine.core.common.action.ProviderParameters)

Example 9 with ProviderParameters

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

the class RemoveProvidersModel method onRemove.

private void onRemove(boolean force) {
    List<ActionParametersBase> parameterList = new LinkedList<>();
    for (Provider provider : providers) {
        parameterList.add(new ProviderParameters(provider, force));
    }
    Frontend.getInstance().runMultipleActions(ActionType.RemoveProvider, parameterList, result -> sourceListModel.getSearchCommand().execute());
    cancel();
}
Also used : ProviderParameters(org.ovirt.engine.core.common.action.ProviderParameters) ActionParametersBase(org.ovirt.engine.core.common.action.ActionParametersBase) LinkedList(java.util.LinkedList) 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