Eli Mesika has uploaded a new change for review.

Change subject: [WIP] core: CommandBase modifications
......................................................................

[WIP] core: CommandBase modifications

Adding handling of external step & sub-step

Change-Id: Ic6350853f66e8f117dc3ebf8ff3e346bb9b241ad
Signed-off-by: Eli Mesika <emes...@redhat.com>
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=872719
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
1 file changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/20/15220/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
index 7562a89..25c55fc 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
@@ -305,13 +305,18 @@
         String tempVar = getDescription();
         getReturnValue().setDescription((tempVar != null) ? tempVar : 
getReturnValue().getDescription());
         setActionMessageParameters();
-
+        Step validatingStep=null;
         boolean actionAllowed = false;
-        Step validatingStep = ExecutionHandler.addStep(getExecutionContext(), 
StepEnum.VALIDATING, null);
+        boolean isExternal = this.getParameters().getJobId() != null || 
this.getParameters().getStepId() != null;
+        if (!isExternal) {
+            validatingStep = ExecutionHandler.addStep(getExecutionContext(), 
StepEnum.VALIDATING, null);
+        }
 
         try {
             actionAllowed = getReturnValue().getCanDoAction() || 
internalCanDoAction();
-            ExecutionHandler.endStep(getExecutionContext(), validatingStep, 
actionAllowed);
+            if (!isExternal) {
+                ExecutionHandler.endStep(getExecutionContext(), 
validatingStep, actionAllowed);
+            }
 
             if (actionAllowed) {
                 execute();


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

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

Reply via email to