Daniel Erez has uploaded a new change for review.

Change subject: core: register RemoveSnapshotCommandCallback only for a running 
VM
......................................................................

core: register RemoveSnapshotCommandCallback only for a running VM

RemoveSnapshotCommand - registering RemoveSnapshotCommandCallback
for a non running VM is redundant and lead to an exception as described
in the bug. Hence, adding the callback only for a running VM.

Change-Id: I1f2440a6860dbdd5ece5c3979c710e90ccaa3929
Bug-Url: https://bugzilla.redhat.com/1148710
Signed-off-by: Daniel Erez <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveSnapshotCommand.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/09/33709/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveSnapshotCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveSnapshotCommand.java
index 9b9ff16..2c62002 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveSnapshotCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveSnapshotCommand.java
@@ -445,6 +445,6 @@
 
     @Override
     public CommandCallBack getCallBack() {
-        return new RemoveSnapshotCommandCallback();
+        return getVm().isDown() ? null : new RemoveSnapshotCommandCallback();
     }
 }


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f2440a6860dbdd5ece5c3979c710e90ccaa3929
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to