Esempio n. 1
0
  @Test
  public void listServers() {

    ServerList servers = compute.servers().get();

    for (Server server : servers.getList()) {
      // Until this is resolved? on compute server api we access throught id
      // NovaImage image = client.target(server.getImage().getLink("bookmark").getHref(),
      // ImageResource.class).get(new HashMap<String, Object>());
      Image image = compute.images().image(server.getImage().getId()).get();
      // rel=self carries the version but rel=bookmark ¿clarify from openstack team?
      // client.target(server.getLink("self").getHref(), ServerResource.class).delete();
    }
  }
Esempio n. 2
0
 @Test(dependsOnMethods = "createServer", priority = 1000)
 public void deleteServer() {
   compute.servers().server(server.getId()).delete();
 }
Esempio n. 3
0
 @Test(
     dependsOnMethods = {"createServer"},
     priority = 2)
 public void unpauseServer() {
   compute.servers().server(server.getId()).action().post(new UnpauseAction(), String.class);
 }
Esempio n. 4
0
 @Test(dependsOnMethods = "createServer", priority = 1)
 public void pauseServer() throws Exception {
   compute.servers().server(server.getId()).action().post(new PauseAction(), String.class);
   waitForState("PAUSED");
 }