Examples of HardwareProfile


Examples of org.apache.deltacloud.client.HardwareProfile

  }

  @Test
  public void fixedPropertyHardwareProfileMayBeUnmarshalled() throws MalformedURLException, JAXBException,
      DeltaCloudClientException {
    HardwareProfile profile = new HardwareProfile();
    ByteArrayInputStream inputStream = new ByteArrayInputStream(HardwareProfile1Response.response.getBytes());
    new HardwareProfileUnmarshaller().unmarshall(inputStream, profile);
    assertNotNull(profile);
    assertEquals(HardwareProfile1Response.id, profile.getId());
    assertEquals(HardwareProfile1Response.propMemValue + ' ' + HardwareProfile1Response.propMemUnit,
        profile.getMemory());
    assertEquals(HardwareProfile1Response.propStorageValue + ' ' + HardwareProfile1Response.propStorageUnit,
        profile.getStorage());
    assertEquals(HardwareProfile1Response.propCPUValue, profile.getCPU());
    assertEquals(HardwareProfile1Response.propArchValue, profile.getArchitecture());
  }
View Full Code Here

Examples of org.apache.deltacloud.client.HardwareProfile

  }

  @Test
  public void mixedPropertiesHardwareProfileMayBeUnmarshalled() throws MalformedURLException, JAXBException,
      DeltaCloudClientException {
    HardwareProfile profile = new HardwareProfile();
    ByteArrayInputStream inputStream = new ByteArrayInputStream(HardwareProfile2Response.response.getBytes());
    new HardwareProfileUnmarshaller().unmarshall(inputStream, profile);
    assertNotNull(profile);
    assertEquals(HardwareProfile2Response.id, profile.getId());
    assertEquals(HardwareProfile2Response.propMemValue + ' ' + HardwareProfile2Response.propMemUnit,
        profile.getMemory());
    Property property = profile.getNamedProperty(Property.Names.MEMORY);
    assertNotNull(property);
    assertEquals(HardwareProfile2Response.propMemRangeFirst, property.getRange().getFirst());
    assertEquals(HardwareProfile2Response.propMemRangeLast, property.getRange().getLast());
    assertEquals(HardwareProfile2Response.propStorageValue + ' ' + HardwareProfile2Response.propStorageUnit,
        profile.getStorage());
    property = profile.getNamedProperty(Property.Names.STORAGE);
    assertNotNull(property);
    assertNotNull(property.getEnums());
    assertEquals(2, property.getEnums().size());
    assertEquals(HardwareProfile2Response.propStorageEnum1, property.getEnums().get(0));
    assertEquals(HardwareProfile2Response.propStorageEnum2, property.getEnums().get(1));
    assertEquals(HardwareProfile2Response.propCPUValue, profile.getCPU());
    assertEquals(HardwareProfile2Response.propArchValue, profile.getArchitecture());
  }
View Full Code Here

Examples of org.apache.deltacloud.client.HardwareProfile

  }

  @Test
  public void canGetProfile() throws DeltaCloudClientException {
    // get a profile seen in the web UI
    HardwareProfile profile = testSetup.getClient().listProfile("m1-small");
    assertNotNull(profile);
    assertHardWareProfile("i386", "1740.8 MB", "160 GB", "1", profile);
  }
View Full Code Here

Examples of org.apache.deltacloud.client.HardwareProfile

    super("hardware_profiles", "hardware_profile");
  }

  @Override
  protected HardwareProfile unmarshallChild(Node node) throws DeltaCloudClientException {
    return new HardwareProfileUnmarshaller().unmarshall((Element) node, new HardwareProfile());
  }
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.