Search in sources :

Example 1 with GlusterVolumeResetBrickActionParameters

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

the class VolumeBrickListModel method onResetBrick.

private void onResetBrick() {
    ResetBrickModel resetBrickModel = (ResetBrickModel) getWindow();
    GlusterVolumeEntity volumeEntity = getEntity();
    GlusterBrickEntity existingBrick = getSelectedItem();
    if (resetBrickModel == null || volumeEntity == null || existingBrick == null || !resetBrickModel.validate()) {
        return;
    }
    resetBrickModel.startProgress();
    GlusterVolumeResetBrickActionParameters parameter = new GlusterVolumeResetBrickActionParameters(volumeEntity.getId(), existingBrick);
    Frontend.getInstance().runAction(ActionType.ResetGlusterVolumeBrick, parameter, result -> {
        ResetBrickModel localModel = (ResetBrickModel) result.getState();
        localModel.stopProgress();
        setWindow(null);
    }, resetBrickModel);
}
Also used : GlusterBrickEntity(org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity) GlusterVolumeEntity(org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity) GlusterVolumeResetBrickActionParameters(org.ovirt.engine.core.common.action.gluster.GlusterVolumeResetBrickActionParameters)

Aggregations

GlusterVolumeResetBrickActionParameters (org.ovirt.engine.core.common.action.gluster.GlusterVolumeResetBrickActionParameters)1 GlusterBrickEntity (org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity)1 GlusterVolumeEntity (org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity)1