Maor Lipchuk has posted comments on this change.

Change subject: core: remove vm - remove end method code
......................................................................


Patch Set 1: (3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java
Line 98:         if (getParameters().isRemoveDisks() && hasImages) {
Line 99:             Collection<DiskImage> unremovedDisks = 
(Collection<DiskImage>)removeVmImages(diskImages).getActionReturnValue();
Line 100:             if (!unremovedDisks.isEmpty()) {
Line 101:                 processUnremovedDisks(unremovedDisks);
Line 102:                 setSucceeded(false);
No need to set the succeeded to false here, it is false by default.
Line 103:             }
Line 104:         }
Line 105: 
Line 106:         return true;


Line 242: 
Line 243:     @Override
Line 244:     public AuditLogType getAuditLogTypeValue() {
Line 245:         return getSucceeded() ? (disksLeftInVm.isEmpty() ? 
AuditLogType.USER_REMOVE_VM_FINISHED : 
AuditLogType.USER_REMOVE_VM_FINISHED_WITH_ILLEGAL_DISKS)
Line 246:                 : AuditLogType.USER_FAILED_REMOVE_VM;
Remove VM will always take place audit log should be removed
Line 247:     }
Line 248: 
Line 249:     @Override
Line 250:     protected Map<String, Pair<String, String>> getExclusiveLocks() {


Line 273:     }
Line 274: 
Line 275:     @Override
Line 276:     protected void endVmCommand() {
Line 277:         setCommandShouldBeLogged(false);
I think it is good choice to add a comment here why we don't print the log, 
since tasks has no meaning here,
Line 278: 
Line 279:         setSucceeded(true);
Line 280:     }
Line 281: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7a3e497e52471f7255e6c17b59a2e3bf362b8783
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to