Lior Vernia has posted comments on this change. Change subject: webadmin: Wrong vnics when creating vm from blank template ......................................................................
Patch Set 1: (1 comment) http://gerrit.ovirt.org/#/c/30637/1//COMMIT_MSG Commit Message: Line 13: Line 14: This override happens in EditProfileBehavior->initSelectedProfile, but Line 15: since it is called before the registration of ProfileInstanceTypeEditor Line 16: to SelectedItemChangedEvent of VnicInstanceType the new selection of Line 17: 'Empty' profile isn't reflected on VnicInstanceType.NetworkInterface. I disagree with this analysis. When talking about the new VM dialog, to my understanding the first time its NICs are updated with profiles is following the selectedItemChangedEvent of the VM's template, which is triggered as part of UnitVmModel.initialize() - which is called after VmListModel.setWindow() is called (in VmListModel.newVm()). So the registration had already happened at that point. Also, I think that before the registration to the event, each VnicInstanceType is already initialized to hold the correct VmNetworkInterface data, including profileId etc., as it was created around the VmNetworkInterface entities returned from the backend. This supposedly happens in VmInstanceTypeManager.updateNetworkInterfaces(). If your fix works, then I don't understand why. I will want to hear your explanation of the flow. I think the real issue is the cluster ID passed to ProfileBehavior.initProfiles() from VmInstanceTypeManager.updateNetworkInterfaces() - it should probably be the cluster ID of the template rather than that selected in the dialog (they would usually be equal, except for the case where Blank is selected and then you'd want to fetch the profiles that exist in Blank's cluster). Line 18: Line 19: This patch fixes it by calling syncSelectedItemWithNetworkInterface(..) Line 20: also before the registration and not just from the eventRaised(..). Line 21: -- To view, visit http://gerrit.ovirt.org/30637 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I60be6b21050c43bb004e56688f8e306b5b943d24 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alona Kaplan <[email protected]> Gerrit-Reviewer: Alona Kaplan <[email protected]> Gerrit-Reviewer: Lior Vernia <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
