Search in sources :

Example 1 with GlusterVolumeSnapshotActionParameters

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

the class GlusterVolumeSnapshotListModel method onDeleteSnapshot.

private void onDeleteSnapshot() {
    if (getConfirmWindow() == null) {
        return;
    }
    final ConfirmationModel model = (ConfirmationModel) getConfirmWindow();
    List<ActionParametersBase> paramsList = new ArrayList<>();
    for (GlusterVolumeSnapshotEntity snapshot : getSelectedItems()) {
        GlusterVolumeSnapshotActionParameters param = new GlusterVolumeSnapshotActionParameters(getEntity().getId(), snapshot.getSnapshotName(), true);
        paramsList.add(param);
    }
    model.startProgress();
    Frontend.getInstance().runMultipleAction(ActionType.DeleteGlusterVolumeSnapshot, paramsList, result -> {
        model.stopProgress();
        setConfirmWindow(null);
    }, model);
}
Also used : GlusterVolumeSnapshotEntity(org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity) GlusterVolumeSnapshotActionParameters(org.ovirt.engine.core.common.action.gluster.GlusterVolumeSnapshotActionParameters) ArrayList(java.util.ArrayList) ConfirmationModel(org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel) ActionParametersBase(org.ovirt.engine.core.common.action.ActionParametersBase)

Aggregations

ArrayList (java.util.ArrayList)1 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)1 GlusterVolumeSnapshotActionParameters (org.ovirt.engine.core.common.action.gluster.GlusterVolumeSnapshotActionParameters)1 GlusterVolumeSnapshotEntity (org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity)1 ConfirmationModel (org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel)1