@Test public void testNotWorthyReInstantiation() throws SchedulerException { Model mo = new DefaultModel(); Mapping map = mo.getMapping(); final VM vm1 = mo.newVM(); Node n1 = mo.newNode(); Node n2 = mo.newNode(); map.addOnlineNode(n1); map.addOnlineNode(n2); map.addRunningVM(vm1, n1); Parameters ps = new DefaultParameters(); DurationEvaluators dev = ps.getDurationEvaluators(); dev.register(MigrateVM.class, new ConstantActionDuration<>(2)); mo.getAttributes().put(vm1, "template", "small"); mo.getAttributes().put(vm1, "clone", true); ReconfigurationProblem rp = new DefaultReconfigurationProblemBuilder(mo) .setNextVMsStates(Collections.emptySet(), map.getAllVMs(), Collections.emptySet(), Collections.emptySet()) .setParams(ps) .build(); RelocatableVM am = (RelocatableVM) rp.getVMAction(vm1); Assert.assertFalse(am.getRelocationMethod().isInstantiated()); }
public IntVar getRelocationMethod() { return doReinstantiation; }
RelocatableVM implements KeepRunningVM { public IntVar getRelocationMethod() { return doReinstantiation; } }
RelocatableVM implements KeepRunningVM { public IntVar getRelocationMethod() { return doReinstantiation; } RelocatableVM(ReconfigurationProblem p, VM e); }
RelocatableVM implements KeepRunningVM { public IntVar getRelocationMethod() { return doReinstantiation; } RelocatableVM(ReconfigurationProblem p, VM e); Task getMigrationTask(); @Override boolean isManaged(); @Override boolean insertActions(Solution s, ReconfigurationPlan plan); IntVar getBandwidth(); boolean usesPostCopy(); @Override VM getVM(); @Override IntVar getStart(); @Override IntVar getEnd(); @Override IntVar getDuration(); @Override Slice getCSlice(); @Override Slice getDSlice(); @Override BoolVar getState(); @Override BoolVar isStaying(); IntVar getRelocationMethod(); @Override String toString(); @Override VMState getSourceState(); @Override VMState getFutureState(); }
RelocatableVM implements KeepRunningVM { public IntVar getRelocationMethod() { return doReinstantiation; } RelocatableVM(ReconfigurationProblem p, VM e); Task getMigrationTask(); @Override boolean isManaged(); @Override boolean insertActions(Solution s, ReconfigurationPlan plan); IntVar getBandwidth(); boolean usesPostCopy(); @Override VM getVM(); @Override IntVar getStart(); @Override IntVar getEnd(); @Override IntVar getDuration(); @Override Slice getCSlice(); @Override Slice getDSlice(); @Override BoolVar getState(); @Override BoolVar isStaying(); IntVar getRelocationMethod(); @Override String toString(); @Override VMState getSourceState(); @Override VMState getFutureState(); static final String PREFIX; static final String PREFIX_STAY; }