Alissa Bonas has posted comments on this change.

Change subject: core: Extract code to methods in ImagesHandler
......................................................................


Patch Set 1: (2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java
Line 437:                 break;
Line 438:         }
Line 439:         return result;
Line 440:     }
Line 441: 
The dao call is always performed , it's based on id passed from external call - 
this is what was happening in the original method as well, I just extracted it 
to a separate method.
Line 442: 
Line 443:     public static boolean isVmDown(VM vm) {
Line 444:         return vm.getStatus() == VMStatus.Down;
Line 445:     }


Line 444:         return vm.getStatus() == VMStatus.Down;
Line 445:     }
Line 446: 
Line 447: 
Line 448:     public static boolean isStoragePoolValid(Guid storagePoolId) {
the agenda is an easier debugging. when you have isValid, you can evaluate it 
pretty easily when debugging.
Line 449:         boolean isValid =  true;
Line 450:         storage_pool pool = 
DbFacade.getInstance().getStoragePoolDao().get(storagePoolId);
Line 451:         if (pool == null || pool.getstatus() != StoragePoolStatus.Up) 
{
Line 452:              isValid = false;


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I363f7bf24ca9b5d408a61ba9159b6e5f2a5c46e0
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to