Maor Lipchuk has uploaded a new change for review.

Change subject: core: Remove redundant task handlers for auditLog at 
ExportRepoImage
......................................................................

core: Remove redundant task handlers for auditLog at ExportRepoImage

Remove redundant use of task handlers in ExportRepoImage, since the
command does not use task handlers in the execute phase but only use the
succeeded indication.

Change-Id: I6ed3037f33247c844a0ba5888cc0ab44a8f069b4
Signed-off-by: Maor Lipchuk <[email protected]>
Bug-Url: https://bugzilla.redhat.com/1021210
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportRepoImageCommand.java
1 file changed, 2 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/73/20773/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportRepoImageCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportRepoImageCommand.java
index 5f36cd0..593235c 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportRepoImageCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportRepoImageCommand.java
@@ -165,13 +165,8 @@
     public AuditLogType getAuditLogTypeValue() {
         switch (getActionState()) {
             case EXECUTE:
-                if (!getParameters().getTaskGroupSuccess()) {
-                    return AuditLogType.USER_EXPORT_IMAGE_FINISHED_FAILURE;
-                }
-                if (getParameters().getExecutionIndex() == 0 && 
getSucceeded()) {
-                    return AuditLogType.USER_EXPORT_IMAGE;
-                }
-                break;
+                return getSucceeded() ? AuditLogType.USER_EXPORT_IMAGE
+                        : AuditLogType.USER_EXPORT_IMAGE_FINISHED_FAILURE;
             case END_SUCCESS:
                 return AuditLogType.USER_EXPORT_IMAGE_FINISHED_SUCCESS;
             case END_FAILURE:


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

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

Reply via email to