Package org.apache.deltacloud.client.unmarshal

Examples of org.apache.deltacloud.client.unmarshal.InstanceUnmarshaller


  @Test
  public void instanceMayBeUnmarshalled() throws DeltaCloudClientException {
    Instance instance = new Instance();
    ByteArrayInputStream inputStream = new ByteArrayInputStream(InstanceResponse.response.getBytes());
    new InstanceUnmarshaller().unmarshall(inputStream, instance);
    assertNotNull(instance);
    assertEquals(InstanceResponse.id1, instance.getId());
    assertEquals(InstanceResponse.name1, instance.getName());
    assertEquals(InstanceResponse.ownerId1, instance.getOwnerId());
    assertEquals(InstanceResponse.image1Id, instance.getImageId());
View Full Code Here


    return privateAddresses.getAddress();
  }

  @Override
  protected void doUpdate(InputStream in) throws DeltaCloudClientException {
    new InstanceUnmarshaller().unmarshall(in, this);
  }
View Full Code Here

  @Override
  public Instance createInstance(String imageId) throws DeltaCloudClientException {
    try {
      InputStream response = request(new CreateInstanceRequest(baseUrl, imageId));
      return new InstanceUnmarshaller().unmarshall(response, new Instance());
    } catch (DeltaCloudClientException e) {
      throw e;
    } catch (Exception e) {
      throw new DeltaCloudClientException(e);
    }
View Full Code Here

  public Instance createInstance(String name, String imageId, String profileId, String realmId, String keyId,
      String memory, String storage) throws DeltaCloudClientException {
    try {
      InputStream response = request(
          new CreateInstanceRequest(baseUrl, name, imageId, profileId, realmId, keyId, memory, storage));
      Instance instance = new InstanceUnmarshaller().unmarshall(response, new Instance());
      // TODO: WORKAROUND for
      // https://issues.jboss.org/browse/JBIDE-8005
      if (keyId != null) {
        instance.setKeyId(keyId);
      }
View Full Code Here

  @Override
  public Instance listInstances(String instanceId) throws DeltaCloudClientException {
    try {
      InputStream response = request(new ListInstanceRequest(baseUrl, instanceId));
      return new InstanceUnmarshaller().unmarshall(response, new Instance());
    } catch (DeltaCloudClientException e) {
      throw e;
    } catch (Exception e) {
      throw new DeltaCloudClientException(e);
    }
View Full Code Here

TOP

Related Classes of org.apache.deltacloud.client.unmarshal.InstanceUnmarshaller

Copyright © 2018 www.massapicom. 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.