Examples of StoragePoolAllocator


Examples of com.cloud.storage.allocator.StoragePoolAllocator

    protected StoragePoolVO findStoragePool(DiskProfile dskCh, final DataCenterVO dc, HostPodVO pod, Long clusterId, Long hostId, VMInstanceVO vm, final Set<StoragePool> avoid) {

        VirtualMachineProfile<VMInstanceVO> profile = new VirtualMachineProfileImpl<VMInstanceVO>(vm);
        Enumeration<StoragePoolAllocator> en = _storagePoolAllocators.enumeration();
        while (en.hasMoreElements()) {
            final StoragePoolAllocator allocator = en.nextElement();
            final List<StoragePool> poolList = allocator.allocateToPool(dskCh, profile, dc.getId(), pod.getId(), clusterId, hostId, avoid, 1);
            if (poolList != null && !poolList.isEmpty()) {
                return (StoragePoolVO) poolList.get(0);
            }
        }
        return null;
View Full Code Here

Examples of com.cloud.storage.allocator.StoragePoolAllocator

    protected StoragePoolVO findStoragePool(DiskProfile dskCh, final DataCenterVO dc, HostPodVO pod, Long clusterId, Long hostId, VMInstanceVO vm, final Set<StoragePool> avoid) {

        VirtualMachineProfile<VMInstanceVO> profile = new VirtualMachineProfileImpl<VMInstanceVO>(vm);
        Enumeration<StoragePoolAllocator> en = _storagePoolAllocators.enumeration();
        while (en.hasMoreElements()) {
            final StoragePoolAllocator allocator = en.nextElement();
            final List<StoragePool> poolList = allocator.allocateToPool(dskCh, profile, dc.getId(), pod.getId(), clusterId, hostId, avoid, 1);
            if (poolList != null && !poolList.isEmpty()) {
                return (StoragePoolVO) poolList.get(0);
            }
        }
        return null;
View Full Code Here

Examples of com.cloud.storage.allocator.StoragePoolAllocator

            boolean foundPotentialPools = false;

            Enumeration<StoragePoolAllocator> enPool = _storagePoolAllocators.enumeration();
            while (enPool.hasMoreElements()) {
                final StoragePoolAllocator allocator = enPool.nextElement();
                final List<StoragePool> suitablePools = allocator.allocateToPool(diskProfile, vmProfile, plan, avoid, returnUpTo);
                if (suitablePools != null && !suitablePools.isEmpty()) {
                    suitableVolumeStoragePools.put(toBeCreated, suitablePools);
                    foundPotentialPools = true;
                    break;
                }
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator

        }

        // Clean up all storage pools
        storageMgr.cleanupStorage(false);
        // Determine what allocator to use
        StoragePoolAllocator allocator;
        if (dskCh.useLocalStorage()) {
            allocator = _localStoragePoolAllocator;
        } else {
            allocator = _firstFitStoragePoolAllocator;
        }

        // Try to find a storage pool after cleanup
        ExcludeList myAvoids = new ExcludeList(avoid.getDataCentersToAvoid(), avoid.getPodsToAvoid(),
                avoid.getClustersToAvoid(), avoid.getHostsToAvoid(), avoid.getPoolsToAvoid());

        return allocator.allocateToPool(dskCh, vmProfile, plan, myAvoids, returnUpTo);
    }
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator

        }

        // Clean up all storage pools
        storageMgr.cleanupStorage(false);
        // Determine what allocator to use
        StoragePoolAllocator allocator;
        if (dskCh.useLocalStorage()) {
            allocator = _localStoragePoolAllocator;
        } else {
            allocator = _firstFitStoragePoolAllocator;
        }

        // Try to find a storage pool after cleanup
        ExcludeList myAvoids =
            new ExcludeList(avoid.getDataCentersToAvoid(), avoid.getPodsToAvoid(), avoid.getClustersToAvoid(), avoid.getHostsToAvoid(), avoid.getPoolsToAvoid());

        return allocator.allocateToPool(dskCh, vmProfile, plan, myAvoids, returnUpTo);
    }
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator

        }

        // Clean up all storage pools
        storageMgr.cleanupStorage(false);
        // Determine what allocator to use
        StoragePoolAllocator allocator;
        if (dskCh.useLocalStorage()) {
            allocator = _localStoragePoolAllocator;
        } else {
            allocator = _firstFitStoragePoolAllocator;
        }

        // Try to find a storage pool after cleanup
        ExcludeList myAvoids = new ExcludeList(avoid.getDataCentersToAvoid(), avoid.getPodsToAvoid(),
                avoid.getClustersToAvoid(), avoid.getHostsToAvoid(), avoid.getPoolsToAvoid());

        return allocator.allocateToPool(dskCh, vmProfile, plan, myAvoids, returnUpTo);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.