Roy Golan 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();
> it is in the updateVmCommand params, and it is a non-updatable field, so it
tricky. I think its safer to just use a copy of the VM inside.
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)) {
> yes, because we start in vmStatic, then in line 132 getting superClass (vmB
so for simplicity the signature could be change from Object to BusinessEntity
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 <ofren...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@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

Reply via email to