本文整理汇总了Java中com.cloud.deploy.DeploymentPlanner.ExcludeList方法的典型用法代码示例。如果您正苦于以下问题:Java DeploymentPlanner.ExcludeList方法的具体用法?Java DeploymentPlanner.ExcludeList怎么用?Java DeploymentPlanner.ExcludeList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.cloud.deploy.DeploymentPlanner
的用法示例。
在下文中一共展示了DeploymentPlanner.ExcludeList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testScaleVM3
import com.cloud.deploy.DeploymentPlanner; //导入方法依赖的package包/类
@Test(expected = CloudRuntimeException.class)
public void testScaleVM3() throws Exception {
/*VirtualMachineProfile profile = new VirtualMachineProfileImpl(vm);
Long srcHostId = vm.getHostId();
Long oldSvcOfferingId = vm.getServiceOfferingId();
if (srcHostId == null) {
throw new CloudRuntimeException("Unable to scale the vm because it doesn't have a host id");
}*/
when(_vmInstance.getHostId()).thenReturn(null);
when(_vmInstanceDao.findById(anyLong())).thenReturn(_vmInstance);
when(_vmInstanceDao.findByUuid(any(String.class))).thenReturn(_vmInstance);
final DeploymentPlanner.ExcludeList excludeHostList = new DeploymentPlanner.ExcludeList();
_vmMgr.findHostAndMigrate(_vmInstance.getUuid(), 2l, excludeHostList);
}
示例2: testScaleVM3
import com.cloud.deploy.DeploymentPlanner; //导入方法依赖的package包/类
@Test(expected = CloudRuntimeException.class)
public void testScaleVM3() throws Exception {
/*VirtualMachineProfile profile = new VirtualMachineProfileImpl(vm);
Long srcHostId = vm.getHostId();
Long oldSvcOfferingId = vm.getServiceOfferingId();
if (srcHostId == null) {
throw new CloudRuntimeException("Unable to scale the vm because it doesn't have a host id");
}*/
when(_vmInstance.getHostId()).thenReturn(null);
when(_vmInstanceDao.findById(anyLong())).thenReturn(_vmInstance);
when(_vmInstanceDao.findByUuid(any(String.class))).thenReturn(_vmInstance);
DeploymentPlanner.ExcludeList excludeHostList = new DeploymentPlanner.ExcludeList();
_vmMgr.findHostAndMigrate(_vmInstance.getUuid(), 2l, excludeHostList);
}
示例3: findHostAndMigrate
import com.cloud.deploy.DeploymentPlanner; //导入方法依赖的package包/类
void findHostAndMigrate(String vmUuid, Long newSvcOfferingId, DeploymentPlanner.ExcludeList excludeHostList) throws InsufficientCapacityException,
ConcurrentOperationException, ResourceUnavailableException;