use of org.ovirt.engine.core.common.action.StorageSyncScheduleParameters in project ovirt-engine by oVirt.
the class StorageDRListModel method onSave.
private void onSave() {
final StorageDRModel model = (StorageDRModel) getWindow();
if (!model.validate()) {
return;
}
StorageDomain storageDomain = getEntity();
final StorageSyncSchedule syncSchedule = new StorageSyncSchedule();
syncSchedule.setFrequency(model.getFrequency().getSelectedItem());
syncSchedule.setHour(model.getHour().getSelectedItem());
syncSchedule.setMins(model.getMins().getSelectedItem());
Guid georepId = model.getGeoRepSession().getSelectedItem() != null ? model.getGeoRepSession().getSelectedItem().getId() : null;
StorageSyncScheduleParameters parameter = new StorageSyncScheduleParameters(syncSchedule, storageDomain.getId(), georepId);
model.startProgress();
Frontend.getInstance().runAction(ActionType.ScheduleGlusterStorageSync, parameter, result -> {
StorageDRListModel localModel = (StorageDRListModel) result.getState();
model.stopProgress();
localModel.postSaveAction(result.getReturnValue());
}, this);
}
Aggregations