@Test public void testSimpleConstraint() { final String allVmsGoToPm3 = "create view constraint_simple as " + "select * from virtual_machine " + "check controllable__physical_machine = 'pm3'"; final LoadBalance lb = new LoadBalance(Collections.singletonList(allVmsGoToPm3)); addInventory(lb); final Result<? extends Record> results = lb.run(); System.out.println(results); results.forEach(e -> assertEquals("pm3", e.get("CONTROLLABLE__PHYSICAL_MACHINE"))); }
Result<? extends Record> run() { model.updateData(); return model.solve(VIRTUAL_MACHINES_TABLE); }
LoadBalance { Result<? extends Record> run() { model.updateData(); return model.solve(VIRTUAL_MACHINES_TABLE); } }
LoadBalance { Result<? extends Record> run() { model.updateData(); return model.solve(VIRTUAL_MACHINES_TABLE); } LoadBalance(final List<String> constraints); }
LoadBalance { Result<? extends Record> run() { model.updateData(); return model.solve(VIRTUAL_MACHINES_TABLE); } LoadBalance(final List<String> constraints);  }
LoadBalance { Result<? extends Record> run() { model.updateData(); return model.solve(VIRTUAL_MACHINES_TABLE); } LoadBalance(final List<String> constraints);   }