use of org.ovirt.engine.core.common.action.gluster.UpdateGlusterVolumeSnapshotConfigParameters in project ovirt-engine by oVirt.
the class VolumeListModel method onConfigureVolumeSnapshotOptions.
public void onConfigureVolumeSnapshotOptions() {
GlusterVolumeSnapshotConfigModel volumeSnapshotConfigModel = (GlusterVolumeSnapshotConfigModel) getWindow();
GlusterVolumeEntity volumeEntity = volumeSnapshotConfigModel.getSelectedVolumeEntity();
List<GlusterVolumeSnapshotConfig> vdsParams = new ArrayList<>();
for (EntityModel<VolumeSnapshotOptionModel> volumeCfg : volumeSnapshotConfigModel.getConfigOptions().getItems()) {
vdsParams.add(new GlusterVolumeSnapshotConfig(volumeEntity.getClusterId(), volumeEntity.getId(), volumeCfg.getEntity().getOptionName(), volumeCfg.getEntity().getOptionValue()));
}
Frontend.getInstance().runAction(ActionType.UpdateGlusterVolumeSnapshotConfig, new UpdateGlusterVolumeSnapshotConfigParameters(volumeEntity.getClusterId(), volumeEntity.getId(), vdsParams), result -> {
if (result.getReturnValue() != null && result.getReturnValue().getSucceeded()) {
cancel();
}
if (getConfirmWindow() != null) {
setConfirmWindow(null);
}
}, this);
}
use of org.ovirt.engine.core.common.action.gluster.UpdateGlusterVolumeSnapshotConfigParameters in project ovirt-engine by oVirt.
the class VolumeListModel method onConfigureClusterSnapshotOptions.
public void onConfigureClusterSnapshotOptions() {
GlusterClusterSnapshotConfigModel clusterSnapshotConfigModel = (GlusterClusterSnapshotConfigModel) getWindow();
Guid clusterId = clusterSnapshotConfigModel.getClusters().getSelectedItem().getId();
List<GlusterVolumeSnapshotConfig> vdsParams = new ArrayList<>();
for (EntityModel<GlusterVolumeSnapshotConfig> clusterCfg : clusterSnapshotConfigModel.getClusterConfigOptions().getItems()) {
vdsParams.add(new GlusterVolumeSnapshotConfig(clusterId, null, clusterCfg.getEntity().getParamName(), clusterCfg.getEntity().getParamValue()));
}
Frontend.getInstance().runAction(ActionType.UpdateGlusterVolumeSnapshotConfig, new UpdateGlusterVolumeSnapshotConfigParameters(clusterId, null, vdsParams), result -> {
if (result.getReturnValue() != null && result.getReturnValue().getSucceeded()) {
cancel();
}
if (getConfirmWindow() != null) {
setConfirmWindow(null);
}
}, this);
}
Aggregations