Daniel Erez has uploaded a new change for review.

Change subject: core: RemoveAllVmCinderDisks - handle command statuses
......................................................................

core: RemoveAllVmCinderDisks - handle command statuses

Handle NOT_STARTED and SUCCEEDED command statuses on
RemoveAllVmCinderDisksCommandCallBack.

Change-Id: I1ead34e33f11ff5667b02522c6fb16d00e354ea6
Bug-Url: https://bugzilla.redhat.com/1185826
Signed-off-by: Daniel Erez <de...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveAllVmCinderDisksCommandCallBack.java
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/24/42324/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveAllVmCinderDisksCommandCallBack.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveAllVmCinderDisksCommandCallBack.java
index a4316af..acc575e 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveAllVmCinderDisksCommandCallBack.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveAllVmCinderDisksCommandCallBack.java
@@ -18,16 +18,21 @@
 
         boolean anyFailed = false;
         for (Guid childCmdId : childCmdIds) {
-            switch (CommandCoordinatorUtil.getCommandStatus(childCmdId)) {
+            CommandStatus commandStatus = 
CommandCoordinatorUtil.getCommandStatus(childCmdId);
+            switch (commandStatus) {
+                case NOT_STARTED:
                 case ACTIVE:
                     log.info("Waiting for child commands to complete");
                     return;
+                case SUCCEEDED:
+                    break;
                 case FAILED:
                 case FAILED_RESTARTED:
                 case UNKNOWN:
                     anyFailed = true;
                     break;
                 default:
+                    log.error("Invalid command status: '{}", commandStatus);
                     break;
             }
         }


-- 
To view, visit https://gerrit.ovirt.org/42324
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ead34e33f11ff5667b02522c6fb16d00e354ea6
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <de...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to