use of org.ovirt.engine.ui.uicommonweb.models.vms.NewVmFromTemplateModelBehavior in project ovirt-engine by oVirt.
the class TemplateListModel method createVMFromTemplate.
private void createVMFromTemplate() {
VmTemplate template = getSelectedItem();
final List<UICommand> commands = new ArrayList<>();
// $NON-NLS-1$
commands.add(UICommand.createDefaultOkUiCommand("OnSaveVm", this));
// $NON-NLS-1$
commands.add(UICommand.createCancelUiCommand("Cancel", this));
AsyncDataProvider.getInstance().getTemplateById(new AsyncQuery<>(withVmInit -> setupNewVmModel(new UnitVmModel(new NewVmFromTemplateModelBehavior(withVmInit), TemplateListModel.this), withVmInit.getVmType(), commands)), template.getId());
}
Aggregations