Examples of ExcludeList


Examples of com.cloud.deploy.DeploymentPlanner.ExcludeList

            } else {
                plannerName = _configDao.getValue(Config.VmDeploymentPlanner.key());
            }
        }

        String reservationId = vmEntity.reserve(plannerName, plan, new ExcludeList(), new Long(callerUser.getId()).toString());
        vmEntity.deploy(reservationId, new Long(callerUser.getId()).toString(), params);

        Pair<UserVmVO, Map<VirtualMachineProfile.Param, Object>> vmParamPair = new Pair(vm, params);
        if (vm != null && vm.isUpdateParameters()) {
            // this value is not being sent to the backend; need only for api
View Full Code Here

Examples of com.cloud.deploy.DeploymentPlanner.ExcludeList

                    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());
                    foundAcct++;
                }
            }
View Full Code Here

Examples of com.cloud.deploy.DeploymentPlanner.ExcludeList

                    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());
                    foundAcct++;
                }
            }
View Full Code Here

Examples of com.cloud.deploy.DeploymentPlanner.ExcludeList

                    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()) {
                    foundAcct++;
                }
            }
View Full Code Here

Examples of com.cloud.deploy.DeploymentPlanner.ExcludeList

            Mockito.when(storageMgr.storagePoolHasEnoughIops(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());
                    foundAcct++;
                }
            }
View Full Code Here

Examples of com.cloud.deploy.DeploymentPlanner.ExcludeList

          Mockito.when(storageMgr.storagePoolHasEnoughIops(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());
                  foundAcct++;
              }
          }
View Full Code Here

Examples of com.cloud.deploy.DeploymentPlanner.ExcludeList

                    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());
                    foundAcct++;
                }
            }
View Full Code Here

Examples of com.cloud.deploy.DeploymentPlanner.ExcludeList

                    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());
                    foundAcct++;
                }
            }
View Full Code Here

Examples of com.cloud.deploy.DeploymentPlanner.ExcludeList

                    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.size(), 1);
                    foundAcct++;
                }
            }
View Full Code Here

Examples of com.cloud.deploy.DeploymentPlanner.ExcludeList

    }

    @Test
    public void checkWhenDcInAvoidList() throws InsufficientServerCapacityException {
        DataCenterVO mockDc = mock(DataCenterVO.class);
        ExcludeList avoids = mock(ExcludeList.class);
        @SuppressWarnings("unchecked")
        VirtualMachineProfileImpl<VMInstanceVO> vmProfile = mock(VirtualMachineProfileImpl.class);
        VMInstanceVO vm = mock(VMInstanceVO.class);
        DataCenterDeployment plan = mock(DataCenterDeployment.class);

        when(avoids.shouldAvoid(mockDc)).thenReturn(true);
        when(vmProfile.getVirtualMachine()).thenReturn(vm);
        when(vm.getDataCenterId()).thenReturn(1L);
        when(dcDao.findById(1L)).thenReturn(mockDc);

        List<Long> clusterList = planner.orderClusters(vmProfile, plan, avoids);
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.