Package org.jclouds.ibm.smartcloud.domain

Examples of org.jclouds.ibm.smartcloud.domain.Location


public class LocationHandlerTest extends BaseHandlerTest {

   public void testApplyInputStream() {
      InputStream is = getClass().getResourceAsStream("/location.xml");

      Location result = factory.create(injector.getInstance(LocationHandler.class)).parse(is);

      Location expects = Location.builder().id("41").name("RTP").description("RTP usrdtsa0a1ccxra").location("RTP")
               .state(Location.State.ONLINE).capability(Capabilities.CAPABILITY_FORMAT,
                        ImmutableMap.<String, String> of("EXT3", "ext3", "RAW", "raw")).capability(
                        Capabilities.CAPABILITY_I386).capability(Capabilities.CAPABILITY_x86_64)
               .capability(Capabilities.CAPABILITY_AVAILABILITYAREA).build();

      assertEquals(result.toString(), expects.toString());
   }
View Full Code Here


         state = State.fromValue(Integer.parseInt(currentText.toString().trim()));
      } else if (qName.equalsIgnoreCase("Value")) {
         capabilities.get(capabilityName).put(capabilityKey, currentText.toString().trim());
      } else if (qName.equalsIgnoreCase("Location")) {
         if (currentText.toString().trim().equals("")) {
            this.loc = new Location(id, name, description, location, state, capabilities);
            id = null;
            name = null;
            description = null;
            location = null;
            state = null;
View Full Code Here

TOP

Related Classes of org.jclouds.ibm.smartcloud.domain.Location

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.