use of org.ovirt.engine.core.common.action.AddVmTemplateParameters in project ovirt-engine by oVirt.
the class VmListModel method postNameUniqueCheck.
private void postNameUniqueCheck() {
UnitVmModel model = (UnitVmModel) getWindow();
VM vm = getSelectedItem();
VM newVm = buildVmOnNewTemplate(model, vm);
AddVmTemplateParameters addVmTemplateParameters = new AddVmTemplateParameters(newVm, model.getName().getEntity(), model.getDescription().getEntity());
BuilderExecutor.build(model, addVmTemplateParameters, new UnitToAddVmTemplateParametersBuilder());
model.startProgress();
Frontend.getInstance().runAction(ActionType.AddVmTemplate, addVmTemplateParameters, result -> {
getWindow().stopProgress();
ActionReturnValue returnValueBase = result.getReturnValue();
if (returnValueBase != null && returnValueBase.getSucceeded()) {
cancel();
}
}, this);
}
Aggregations