use of org.ovirt.engine.core.common.action.ClusterParametersBase in project ovirt-engine by oVirt.
the class AddDataCenterRM method rollback4.
private void rollback4() {
Enlistment enlistment = context.enlistment;
EnlistmentContext enlistmentContext = (EnlistmentContext) enlistment.getContext();
ActionReturnValue returnValue = context.changeVDSClusterReturnValue;
if (returnValue != null && returnValue.getSucceeded()) {
// Remove cluster.
if (enlistmentContext.getClusterId() != null) {
Frontend.getInstance().runAction(ActionType.RemoveCluster, new ClusterParametersBase(enlistmentContext.getClusterId()), result -> rollback5());
}
} else {
context.enlistment = null;
enlistment.done();
}
}
use of org.ovirt.engine.core.common.action.ClusterParametersBase in project ovirt-engine by oVirt.
the class ClusterListModel method onRemove.
public void onRemove() {
ConfirmationModel model = (ConfirmationModel) getWindow();
if (model.getProgress() != null) {
return;
}
ArrayList<ActionParametersBase> prms = new ArrayList<>();
for (Object a : getSelectedItems()) {
prms.add(new ClusterParametersBase(((Cluster) a).getId()));
}
model.startProgress();
Frontend.getInstance().runMultipleAction(ActionType.RemoveCluster, prms, result -> {
ConfirmationModel localModel = (ConfirmationModel) result.getState();
localModel.stopProgress();
cancel();
}, model);
}
Aggregations