Change in ovirt-engine[master]: core: remove redundant checks when running vm

ofrenkel at redhat.com ofrenkel at redhat.com
Wed Dec 18 08:43:11 UTC 2013


Omer Frenkel has submitted this change and it was merged.

Change subject: core: remove redundant checks when running vm
......................................................................


core: remove redundant checks when running vm

Three checks are removed from RunVmCommand#initVm:
1. Check if the VM is null
2. Check if snapshot is being taken for the VM
3. Check if the VM status is not imageLocked or imageIllegal

Those checks are already tested in the canDoAction method (by the
validations that are made by RunVmValidator), and since the VM is
locked in the execute phase, it should be enough.

Change-Id: I396b3322c551af3414268f5fe16a1ccaf5ccf1bd
Signed-off-by: Arik Hadas <ahadas at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllErrors.java
M backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties
M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/VdsmErrors.java
M frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties
M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties
6 files changed, 49 insertions(+), 76 deletions(-)

Approvals:
  Omer Frenkel: Verified; Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I396b3322c551af3414268f5fe16a1ccaf5ccf1bd
Gerrit-PatchSet: 12
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list