Package org.apache.deltacloud.client

Examples of org.apache.deltacloud.client.Instance.start()


      testInstance.stop(client);
      testInstance = client.listInstances(testInstance.getId()); // reload
      assertTrue(testInstance.getState() == State.STOPPED);
      assertFalse(testInstance.reboot(client));
    } finally {
      testInstance.start(client);
      client.listInstances(testInstance.getId()); // reload
    }
  }
}
View Full Code Here


    Instance testInstance = testSetup.getTestInstance();
    DeltaCloudClient client = testSetup.getClient();
    if (testInstance.getState() == State.RUNNING) {
      testInstance.stop(client);
    }
    testInstance.start(client);
    testInstance = client.listInstances(testInstance.getId()); // reload!
    assertEquals(State.RUNNING, testInstance.getState());
  }

  @Test
View Full Code Here

    Instance testInstance = testSetup.getTestInstance();
    DeltaCloudClient client = testSetup.getClient();
    if (testInstance.getState() == State.RUNNING) {
      testInstance.stop(client);
    }
    assertTrue(testInstance.start(client));
    testInstance = client.listInstances(testInstance.getId()); // reload!
    assertEquals(State.RUNNING, testInstance.getState());
  }

  @Test
View Full Code Here

  @Test
  public void cannotStartRunningInstance() throws DeltaCloudClientException {
    Instance testInstance = testSetup.getTestInstance();
    DeltaCloudClient client = testSetup.getClient();
    testInstance.start(client);
    assertFalse(testInstance.start(client));
  }

  @Test
  public void cannotStopStoppedInstance() throws DeltaCloudClientException {
View Full Code Here

  @Test
  public void cannotStartRunningInstance() throws DeltaCloudClientException {
    Instance testInstance = testSetup.getTestInstance();
    DeltaCloudClient client = testSetup.getClient();
    testInstance.start(client);
    assertFalse(testInstance.start(client));
  }

  @Test
  public void cannotStopStoppedInstance() throws DeltaCloudClientException {
    Instance testInstance = testSetup.getTestInstance();
View Full Code Here

    DeltaCloudClient client = testSetup.getClient();
    try {
      testInstance.stop(client);
      assertFalse(testInstance.stop(client));
    } finally {
      testInstance.start(client);
    }
  }

  @Test
  public void cannotDestroyRunningInstance() throws DeltaCloudClientException {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.