Beispiel #1
0
  /** @throws java.lang.Exception */
  @Before
  public void setUp() throws Exception {
    res = VirtualRouter.allocate(client, template_str);

    int oid = res.isError() ? -1 : Integer.parseInt(res.getMessage());
    vrouter = new VirtualRouter(oid, client);
  }
Beispiel #2
0
  @Test
  public void allocate() {
    vrouter.delete();

    res = VirtualRouter.allocate(client, template_str);
    assertTrue(res.getErrorMessage(), !res.isError());

    int oid = res.isError() ? -1 : Integer.parseInt(res.getMessage());
    vrouter = new VirtualRouter(oid, client);

    vrouterPool.info();

    boolean found = false;
    for (VirtualRouter temp : vrouterPool) {
      found = found || temp.getName().equals(name);
    }

    assertTrue(found);
  }