@Test public void testGetMisplacedAndSatisfied() { Model mo = new DefaultModel(); VM vm1 = mo.newVM(); Node n1 = mo.newNode(); Node n2 = mo.newNode(); Mapping map = mo.getMapping().on(n1, n2); Offline off = new Offline(n1); COffline coff = new COffline(off); Instance i = new Instance(mo, Collections.emptyList(), new MinMTTR()); Assert.assertTrue(coff.getMisPlacedVMs(i).isEmpty()); map.addRunningVM(vm1, n1); Assert.assertEquals(coff.getMisPlacedVMs(i), map.getAllVMs()); }
@Override public Set<VM> getMisPlacedVMs(Instance i) { Mapping mapping = i.getModel().getMapping(); return mapping.getRunningVMs(cstr.getInvolvedNodes().iterator().next()); }
COffline implements ChocoConstraint { @Override public Set<VM> getMisPlacedVMs(Instance i) { Mapping mapping = i.getModel().getMapping(); return mapping.getRunningVMs(cstr.getInvolvedNodes().iterator().next()); } }
COffline implements ChocoConstraint { @Override public Set<VM> getMisPlacedVMs(Instance i) { Mapping mapping = i.getModel().getMapping(); return mapping.getRunningVMs(cstr.getInvolvedNodes().iterator().next()); } COffline(Offline o); }
COffline implements ChocoConstraint { @Override public Set<VM> getMisPlacedVMs(Instance i) { Mapping mapping = i.getModel().getMapping(); return mapping.getRunningVMs(cstr.getInvolvedNodes().iterator().next()); } COffline(Offline o); @Override boolean inject(Parameters ps, ReconfigurationProblem rp); @Override Set<VM> getMisPlacedVMs(Instance i); @Override String toString(); }
COffline implements ChocoConstraint { @Override public Set<VM> getMisPlacedVMs(Instance i) { Mapping mapping = i.getModel().getMapping(); return mapping.getRunningVMs(cstr.getInvolvedNodes().iterator().next()); } COffline(Offline o); @Override boolean inject(Parameters ps, ReconfigurationProblem rp); @Override Set<VM> getMisPlacedVMs(Instance i); @Override String toString();  }