use of org.ovirt.engine.ui.uicommonweb.models.vms.instancetypes.ExistingVmInstanceTypeManager in project ovirt-engine by oVirt.
the class ExistingVmModelBehavior method initialize.
@Override
public void initialize() {
super.initialize();
toggleAutoSetVmHostname();
getModel().getVmInitEnabled().setEntity(getVm().getVmInit() != null);
getModel().getVmInitModel().init(getVm().getStaticData());
getModel().getVmType().setIsChangeable(true);
getModel().getIsSoundcardEnabled().setIsChangeable(true);
getModel().getInstanceTypes().setIsChangeable(!vm.isRunning());
getModel().getLabelList().setIsAvailable(true);
getModel().getVmId().setIsAvailable(true);
getModel().getVmId().setIsChangeable(false);
loadDataCenter();
instanceTypeManager = new ExistingVmInstanceTypeManager(getModel(), vm);
if (vm.getVmPoolId() != null) {
instanceTypeManager.setAlwaysEnabledFieldUpdate(true);
}
Frontend.getInstance().runQuery(QueryType.GetVmNumaNodesByVmId, new IdQueryParameters(vm.getId()), new AsyncQuery<QueryReturnValue>(returnValue -> {
List<VmNumaNode> nodes = returnValue.getReturnValue();
getModel().setVmNumaNodes(nodes);
getModel().updateNodeCount(nodes.size());
}));
// load dedicated host names into host names list
if (getVm().getDedicatedVmForVdsList().size() > 0) {
Frontend.getInstance().runQuery(QueryType.GetAllHostNamesPinnedToVmById, new IdQueryParameters(vm.getId()), asyncQuery((QueryReturnValue returnValue) -> setDedicatedHostsNames((List<String>) returnValue.getReturnValue())));
}
}
Aggregations