Search in sources :

Example 6 with StoragePoolParametersBase

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

the class BackendDataCenterResource method remove.

@Override
public Response remove() {
    get();
    StoragePoolParametersBase params = new StoragePoolParametersBase(asGuid(id));
    boolean force = ParametersHelper.getBooleanParameter(httpHeaders, uriInfo, FORCE, true, false);
    if (force) {
        params.setForceDelete(force);
    }
    return performAction(ActionType.RemoveStoragePool, params);
}
Also used : StoragePoolParametersBase(org.ovirt.engine.core.common.action.StoragePoolParametersBase)

Example 7 with StoragePoolParametersBase

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

the class AddDataCenterRM method rollback5.

private void rollback5() {
    Enlistment enlistment = context.enlistment;
    EnlistmentContext enlistmentContext = (EnlistmentContext) enlistment.getContext();
    // Try to remove data center.
    if (enlistmentContext.getDataCenterId() != null) {
        Frontend.getInstance().runAction(ActionType.RemoveStoragePool, new StoragePoolParametersBase(enlistmentContext.getDataCenterId()));
    }
    // Call done, no matter whether the data center deletion was successful.
    context.enlistment = null;
    enlistment.done();
}
Also used : PreparingEnlistment(org.ovirt.engine.ui.uicompat.PreparingEnlistment) Enlistment(org.ovirt.engine.ui.uicompat.Enlistment) StoragePoolParametersBase(org.ovirt.engine.core.common.action.StoragePoolParametersBase)

Aggregations

StoragePoolParametersBase (org.ovirt.engine.core.common.action.StoragePoolParametersBase)7 ArrayList (java.util.ArrayList)3 Test (org.junit.Test)3 BaseCommandTest (org.ovirt.engine.core.bll.BaseCommandTest)3 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)2 StorageDomain (org.ovirt.engine.core.common.businessentities.StorageDomain)2 ConfirmationModel (org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel)2 Arrays (java.util.Arrays)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 Assert.assertFalse (org.junit.Assert.assertFalse)1 Assert.assertTrue (org.junit.Assert.assertTrue)1 StorageDomainStatus (org.ovirt.engine.core.common.businessentities.StorageDomainStatus)1 StoragePool (org.ovirt.engine.core.common.businessentities.StoragePool)1 Enlistment (org.ovirt.engine.ui.uicompat.Enlistment)1 PreparingEnlistment (org.ovirt.engine.ui.uicompat.PreparingEnlistment)1