예제 #1
0
  @Test
  public void delete() {
    res = vrouter.delete();
    assertTrue(res.getErrorMessage(), !res.isError());

    res = vrouter.info();
    assertTrue(res.isError());
  }
예제 #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);
  }
예제 #3
0
 /** @throws java.lang.Exception */
 @After
 public void tearDown() throws Exception {
   vrouter.delete();
 }