Esempio n. 1
0
  /** @throws java.lang.Exception */
  @Before
  public void setUp() throws Exception {
    res = Host.allocate(client, name, "dummy", "dummy");

    int hid = !res.isError() ? Integer.parseInt(res.getMessage()) : -1;
    host = new Host(hid, client);
  }
Esempio n. 2
0
  @Test
  public void allocate() {
    String name = "allocate_test";

    res = Host.allocate(client, name, "im_dummy", "vmm_dummy");
    assertTrue(res.getErrorMessage(), !res.isError());
    //        assertTrue( res.getMessage().equals("0") );

    hostPool.info();

    boolean found = false;
    for (Host h : hostPool) {
      found = found || h.getName().equals(name);
    }

    assertTrue(found);
  }