Package org.apache.deltacloud.client.unmarshal

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


  @Test
  public void HardwareProfilesCanBeUnmarshalled() throws MalformedURLException, JAXBException,
      DeltaCloudClientException {
    List<HardwareProfile> profiles = new ArrayList<HardwareProfile>();
    ByteArrayInputStream inputStream = new ByteArrayInputStream(HardwareProfilesResponse.response.getBytes());
    new HardwareProfilesUnmarshaller().unmarshall(inputStream, profiles);
    assertEquals(2, profiles.size());
  }
View Full Code Here


  @Override
  public List<HardwareProfile> listProfiles() throws DeltaCloudClientException {
    try {
      InputStream response = request(new ListHardwareProfilesRequest(baseUrl));
      List<HardwareProfile> profiles = new ArrayList<HardwareProfile>();
      new HardwareProfilesUnmarshaller().unmarshall(response, profiles);
      return profiles;
    } catch (Exception e) {
      throw new DeltaCloudClientException(MessageFormat.format("could not get realms on cloud at \"{0}\"",
          baseUrl), e);
    }
View Full Code Here

TOP

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

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.