Omer Frenkel has posted comments on this change. Change subject: core: add support to update running vm ......................................................................
Patch Set 11: (2 comments) http://gerrit.ovirt.org/#/c/26758/11/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmPoolHandler.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmPoolHandler.java: Line 83: vm.setExportDate(null); Line 84: vm.setOvfVersion(null); Line 85: Line 86: VmManagementParametersBase updateVmParams = createUpdateVmParameters(vm); Line 87: vm.getManagedVmDeviceMap().clear(); > tricky. I think its safer to just use a copy of the VM inside. not sure i understand how it would help? Line 88: vm.getVmUnamagedDeviceList().clear(); Line 89: Backend.getInstance().runInternalAction(VdcActionType.UpdateVm, updateVmParams); Line 90: } Line 91: } http://gerrit.ovirt.org/#/c/26758/11/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ObjectIdentityChecker.java File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ObjectIdentityChecker.java: Line 111: * @param destination object to copy the non editable to it Line 112: */ Line 113: public boolean copyNonEditableFieldsToDestination(Object source, Object destination) { Line 114: Class<?> cls = source.getClass(); Line 115: while (!cls.equals(Object.class)) { > so for simplicity the signature could be change from Object to BusinessEnti i dont mind changing this, but how will it help? i will still need to go to superClass until i hit Object class Line 116: for (Field srcFld : cls.getDeclaredFields()) { Line 117: try { Line 118: if (!Modifier.isFinal(srcFld.getModifiers()) && !IsFieldUpdatable(srcFld.getName())) { Line 119: srcFld.setAccessible(true); -- To view, visit http://gerrit.ovirt.org/26758 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie433352852f53f62e58349ce85475ee89e37ce89 Gerrit-PatchSet: 11 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Omer Frenkel <[email protected]> Gerrit-Reviewer: Arik Hadas <[email protected]> Gerrit-Reviewer: Michal Skrivanek <[email protected]> Gerrit-Reviewer: Omer Frenkel <[email protected]> Gerrit-Reviewer: Roy Golan <[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
