Package com.cloud.deploy

Examples of com.cloud.deploy.DeploymentPlan


            DiskProfile profile = new DiskProfile(volume, diskOffering, HypervisorType.XenServer);
            VirtualMachineProfile vmProfile = Mockito.mock(VirtualMachineProfile.class);
            Mockito.when(
                    storageMgr.storagePoolHasEnoughSpace(Matchers.anyListOf(Volume.class),
                            Matchers.any(StoragePool.class))).thenReturn(true);
            DeploymentPlan plan = new DataCenterDeployment(dcId, podId, clusterId, null, null, null);
            int foundAcct = 0;
            for (StoragePoolAllocator allocator : allocators) {
                List<StoragePool> pools = allocator.allocateToPool(profile, vmProfile, plan, new ExcludeList(), 1);
                if (!pools.isEmpty()) {
                    Assert.assertEquals(pools.get(0).getId(), storage.getId());
View Full Code Here


            DiskProfile profile = new DiskProfile(volume, diskOff, HypervisorType.XenServer);
            VirtualMachineProfile vmProfile = Mockito.mock(VirtualMachineProfile.class);
            Mockito.when(
                    storageMgr.storagePoolHasEnoughSpace(Matchers.anyListOf(Volume.class),
                            Matchers.any(StoragePool.class))).thenReturn(true);
            DeploymentPlan plan = new DataCenterDeployment(dcId, podId, clusterId, null, null, null);
            int foundAcct = 0;
            for (StoragePoolAllocator allocator : allocators) {
                List<StoragePool> pools = allocator.allocateToPool(profile, vmProfile, plan, new ExcludeList(), 1);
                if (!pools.isEmpty()) {
                    Assert.assertEquals(pools.get(0).getId(), storage.getId());
View Full Code Here

            throw new ConcurrentOperationException("Unable to lock vpc " + vpc.getId());
        }
       
        //1) Get deployment plan and find out the list of routers    
        Pair<DeploymentPlan, List<DomainRouterVO>> planAndRouters = getDeploymentPlanAndRouters(vpc.getId(), dest);
        DeploymentPlan plan = planAndRouters.first();
        List<DomainRouterVO> routers = planAndRouters.second();
        try {
            //2) Return routers if exist
            if (routers.size() >= 1) {
                return routers;
View Full Code Here

    }
   
    protected Pair<DeploymentPlan, List<DomainRouterVO>> getDeploymentPlanAndRouters(long vpcId, DeployDestination dest) {
        long dcId = dest.getDataCenter().getId();
       
        DeploymentPlan plan = new DataCenterDeployment(dcId);
        List<DomainRouterVO> routers = _routerDao.listByVpcId(vpcId);
       
        return new Pair<DeploymentPlan, List<DomainRouterVO>>(plan, routers);
    }
View Full Code Here

TOP

Related Classes of com.cloud.deploy.DeploymentPlan

Copyright © 2018 www.massapicom. 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.