Source:
<code>public void initialize(SystemTreeItemModel systemTreeSelectedItem) { super.initialize(systemTreeSelectedItem); getModel().getTemplate().setIsChangable(false); getModel().getVmType().setIsChangable(true); DisksAllocationModel disksAllocationModel = getModel().getDisksAllocationModel(); disksAllocationModel.setIsAliasChangable(true); AsyncDataProvider.getDataCenterById(new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object target, Object returnValue) { NewTemplateVmModelBehavior behavior = (NewTemplateVmModelBehavior) target; final StoragePool dataCenter = (StoragePool) returnValue; if (dataCenter == null) { disableNewTemplateModel(ConstantsManager.getInstance() .getConstants() .dataCenterIsNotAccessibleMsg()); } else { AsyncDataProvider.getClusterListByService( new AsyncQuery(getModel(), new INewAsyncCallback() { @Override public void onSuccess(Object target, Object returnValue) { UnitVmModel model = (UnitVmModel) target; List<VDSGroup> clusters = (List<VDSGroup>) returnValue; model.setDataCentersAndClusters(model, Arrays.asList(dataCenter), clusters, vm.getVdsGroupId().getValue()); <START> AsyncDataProvider.isSoundcardEnabled(new AsyncQuery(getModel(), <END> new INewAsyncCallback() { @Override public void onSuccess(Object model, Object returnValue) { getModel().getIsSoundcardEnabled().setEntity(returnValue); initTemplate(); } }, getModel().getHash()), vm.getId()); } }, getModel().getHash()), true, false); } } }, getModel().getHash()), vm.getStoragePoolId()); }</code><technical_language>* - relevant unification, sound card extracted a separate patch. * if dependent, isSoundcardEnabled called in parallel of getClusterListByService</technical_language>

Target:
public void initialize(SystemTreeItemModel systemTreeSelectedItem) { super.initialize(systemTreeSelectedItem); getModel().getTemplate().setIsChangable(false); getModel().getVmType().setIsChangable(true); DisksAllocationModel disksAllocationModel = getModel().getDisksAllocationModel(); disksAllocationModel.setIsAliasChangable(true); AsyncDataProvider.getDataCenterById(new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object target, Object returnValue) { NewTemplateVmModelBehavior behavior = (NewTemplateVmModelBehavior) target; final StoragePool dataCenter = (StoragePool) returnValue; if (dataCenter == null) { disableNewTemplateModel(ConstantsManager.getInstance() .getConstants() .dataCenterIsNotAccessibleMsg()); } else { AsyncDataProvider.getClusterListByService( new AsyncQuery(getModel(), new INewAsyncCallback() { @Override public void onSuccess(Object target, Object returnValue) { UnitVmModel model = (UnitVmModel) target; List<VDSGroup> clusters = (List<VDSGroup>) returnValue; model.setDataCentersAndClusters(model, Arrays.asList(dataCenter), clusters, vm.getVdsGroupId().getValue()); initTemplate(); } }, getModel().getHash()), true, false); AsyncDataProvider.isSoundcardEnabled(new AsyncQuery(getModel(), new INewAsyncCallback() { @Override public void onSuccess(Object model, Object returnValue) { getModel().getIsSoundcardEnabled().setEntity(returnValue); } }, getModel().getHash()), vm.getId()); } } }, getModel().getHash()), vm.getStoragePoolId()); }