Package org.apache.deltacloud.client

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


  public void canDestroy() throws DeltaCloudClientException {
    Image image = testSetup.getFirstImage(testSetup.getClient());
    DeltaCloudClient client = testSetup.getClient();
    Instance instance = client.createInstance(image.getId());
    instance.stop(client);
    instance.destroy(client);
    client.listInstances(instance.getId());
  }

  @Test(expected = DeltaCloudClientException.class)
  public void destroyThrowsExceptionOnUnknowInstanceId() throws DeltaCloudClientException, IllegalArgumentException,
View Full Code Here


  public void cannotDestroyRunningInstance() throws DeltaCloudClientException {
    Instance testInstance = testSetup.getTestInstance();
    DeltaCloudClient client = testSetup.getClient();
    testInstance = client.listInstances(testInstance.getId()); // reload
    assertTrue(testInstance.getState() == State.RUNNING);
    assertFalse(testInstance.destroy(client));
  }

  @Test
  public void cannotRebootStoppedInstance() throws DeltaCloudClientException, InterruptedException,
      ExecutionException {
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.