Omer Frenkel has posted comments on this change.

Change subject: core: Move status check methods from VM to VMStatus
......................................................................


Patch Set 5: (2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
Line 221:                 decrementVdsPendingVmsCount();
Line 222:             }
Line 223:             setActionReturnValue(status);
Line 224: 
Line 225:             if (status.isRunning() || status == 
VMStatus.RestoringState) {
status can be null here
Line 226:                 setSucceeded(true);
Line 227:             } else {
Line 228:                 // Try to rerun Vm on different vds
Line 229:                 // no need to log the command because it is being 
logged inside


....................................................
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/SetVmStatusVDSCommand.java
Line 20:     protected void ExecuteVDSCommand() {
Line 21:         SetVmStatusVDSCommandParameters parameters = getParameters();
Line 22:         VmDynamic vmDynamic = 
DbFacade.getInstance().getVmDynamicDao().get(parameters.getVmId());
Line 23:         vmDynamic.setstatus(parameters.getStatus());
Line 24:         if (parameters.getStatus().isNotRunning()) {
need to think if can be null here, maybe add a check just to be safe
Line 25:             
ResourceManager.getInstance().RemoveAsyncRunningVm(parameters.getVmId());
Line 26:             VmStatistics vmStatistics = 
DbFacade.getInstance().getVmStatisticsDao().get(parameters.getVmId());
Line 27:             VM vm = new VM(null, vmDynamic, vmStatistics);
Line 28:             ResourceManager.getInstance().InternalSetVmStatus(vm, 
parameters.getStatus());


--
To view, visit http://gerrit.ovirt.org/10795
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I82b4f109751773ff2d46407ccea26ea0be2661f5
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to