Tomas Jelinek has posted comments on this change. Change subject: UI: datacenter/cluster running on host behavior ......................................................................
Patch Set 1: (1 comment) http://gerrit.ovirt.org/#/c/35876/1/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java: Line 371: boolean firstRun = true; Line 372: protected void doChangeDefautlHost(Guid hostGuid) { Line 373: // Only set the specific/any host to run on in the first time Line 374: // Second time (when the user change cluster/datacenter we leave the default (which is any host) Line 375: if (hostGuid != null && firstRun) I'd say this will not work in for example this case: - You have a VM on a cluster and pinned to some host - Open the edit VM dialog and change the cluster - The pin to host will stay on the original since the "firstRun" has been called during inicialization phase I'd say a simpler solution would be just to check, if the host you want to be pinned to is present in the list of hosts on this cluster (getModel().getDefaultHosts()). If it is, than continue in this logic. If it is not, set auto assign to true and set the selected item to null. Line 376: { Line 377: Guid vdsId = hostGuid; Line 378: if (getModel().getDefaultHost().getItems() != null) Line 379: { -- To view, visit http://gerrit.ovirt.org/35876 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5ca584e0c98a4e9d3823b0333b92bff93db20872 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shahar Havivi <shav...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches