Package org.jclouds.cim

Examples of org.jclouds.cim.ResourceAllocationSettingData


public class ResourceAllocationSettingDataHandlerTest extends BaseHandlerTest {

   public void testNormal() {
      InputStream is = getClass().getResourceAsStream("/resourceallocation.xml");

      ResourceAllocationSettingData result = factory.create(
               injector.getInstance(ResourceAllocationSettingDataHandler.class)).parse(is);

      ResourceAllocationSettingData expects = ResourceAllocationSettingData.builder().allocationUnits("Gigabytes")
               .caption("1234568").description("Hard Disk").elementName("D:\\").hostResource("data").instanceID("6")
               .resourceType(ResourceAllocationSettingData.ResourceType.PARTITIONABLE_UNIT).virtualQuantity(50l)
               .build();
      assertEquals(result.toString(), expects.toString());
   }
View Full Code Here


   }

   public void testHosting() {
      InputStream is = getClass().getResourceAsStream("/resourceallocation-hosting.xml");

      ResourceAllocationSettingData result = factory.create(
               injector.getInstance(ResourceAllocationSettingDataHandler.class)).parse(is);

      ResourceAllocationSettingData expects = ResourceAllocationSettingData.builder().elementName("1 virtual CPU(s)")
               .allocationUnits("hertz * 10^6").instanceID("1").resourceType(ResourceAllocationSettingData.ResourceType.PROCESSOR)
               .virtualQuantity(1l).description("Number of Virtual CPUs").virtualQuantityUnits("count").build();
      assertEquals(result.toString(), expects.toString());

   }
View Full Code Here

TOP

Related Classes of org.jclouds.cim.ResourceAllocationSettingData

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.