Vered Volansky has uploaded a new change for review. Change subject: core: Deprecate old storage allocation checks ......................................................................
core: Deprecate old storage allocation checks Change-Id: I05b49b10438db4a09b841e9ce4d572199cc31266 Signed-off-by: Vered Volansky <vvola...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java 1 file changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/90/31190/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java index 416ac7f..9f59d2d 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java @@ -670,7 +670,11 @@ * The free size we need to have in the domain, in gigabytes * @return storage domain in the given pool with at least the required amount of free space, * or null if no such storage domain exists in the pool + * + * This method is deprecated. Instead use findStorageDomainForMemory(Guid storagePoolId, List<DiskImage> disksList), + * and prepare the relevant dikslisk (probably dummies to reflect size). */ + @Deprecated public static StorageDomain findStorageDomainForMemory(Guid storagePoolId, long sizeRequested) { return findStorageDomainForMemory(storagePoolId, sizeRequested, Collections.<StorageDomain, Integer>emptyMap()); } @@ -687,7 +691,11 @@ * Maps storage domain to size we already reserved on it * @return storage domain in the given pool with at least the required amount of free space, * or null if no such storage domain exists in the pool + * + * This method is deprecated. Instead use findStorageDomainForMemory(Guid storagePoolId, List<DiskImage> disksList), + * and prepare the relevant dikslisk (probably dummies to reflect size). */ + @Deprecated public static StorageDomain findStorageDomainForMemory(Guid storagePoolId, long sizeRequested, Map<StorageDomain, Integer> domain2reservedSpaceInDomain) { List<StorageDomain> domainsInPool = DbFacade.getInstance().getStorageDomainDao().getAllForStoragePool(storagePoolId); @@ -704,6 +712,10 @@ return null; } + /** + * This method is deprecated. Instead use doesStorageDomainHaveSpaceForRequest(StorageDomain storageDomain, List<DiskImage> disksList). + */ + @Deprecated protected static boolean doesStorageDomainHaveSpaceForRequest(StorageDomain storageDomain, long sizeRequested) { // not calling validate in order not to add the messages per domain return (new StorageDomainValidator(storageDomain).isDomainHasSpaceForRequest(sizeRequested)).isValid(); @@ -736,8 +748,7 @@ return null; } - protected static boolean doesStorageDomainHaveSpaceForRequest(StorageDomain storageDomain, List<DiskImage> disksList) { - // not calling validate in order not to add the messages per domain + private static boolean doesStorageDomainHaveSpaceForRequest(StorageDomain storageDomain, List<DiskImage> disksList) { return (new StorageDomainValidator(storageDomain).hasSpaceForClonedDisks(disksList)).isValid(); } -- To view, visit http://gerrit.ovirt.org/31190 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I05b49b10438db4a09b841e9ce4d572199cc31266 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Vered Volansky <vvola...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches