Search in sources :

Example 6 with Enlistment

use of org.ovirt.engine.ui.uicompat.Enlistment 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

Enlistment (org.ovirt.engine.ui.uicompat.Enlistment)6 PreparingEnlistment (org.ovirt.engine.ui.uicompat.PreparingEnlistment)6 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)5 VDS (org.ovirt.engine.core.common.businessentities.VDS)4 ActionType (org.ovirt.engine.core.common.action.ActionType)3 ChangeVDSClusterParameters (org.ovirt.engine.core.common.action.ChangeVDSClusterParameters)3 ClusterParametersBase (org.ovirt.engine.core.common.action.ClusterParametersBase)3 StoragePoolParametersBase (org.ovirt.engine.core.common.action.StoragePoolParametersBase)3 StoragePool (org.ovirt.engine.core.common.businessentities.StoragePool)3 VDSStatus (org.ovirt.engine.core.common.businessentities.VDSStatus)3 AsyncQuery (org.ovirt.engine.ui.frontend.AsyncQuery)3 Frontend (org.ovirt.engine.ui.frontend.Frontend)3 AsyncDataProvider (org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider)3 IEnlistmentNotification (org.ovirt.engine.ui.uicompat.IEnlistmentNotification)3 Objects (java.util.Objects)2 StoragePoolManagementParameter (org.ovirt.engine.core.common.action.StoragePoolManagementParameter)2 StoragePoolStatus (org.ovirt.engine.core.common.businessentities.StoragePoolStatus)2 Guid (org.ovirt.engine.core.compat.Guid)2 StringHelper (org.ovirt.engine.core.compat.StringHelper)2 Linq (org.ovirt.engine.ui.uicommonweb.Linq)2