Package org.jclouds.cim

Examples of org.jclouds.cim.VirtualSystemSettingData


      assertEquals(vApp.getOperatingSystemDescription(), "Ubuntu Linux (32-bit)");

      assertEquals(vApp.getHref(), URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/vapp/15639"));
      assertEquals(vApp.getVDC(), new ReferenceTypeImpl(null, TerremarkVCloudMediaType.VDC_XML, URI
               .create("https://services.vcloudexpress.terremark.com/api/v0.8/vdc/32")));
      VirtualSystemSettingData system = VirtualSystemSettingData.builder().instanceID("0").elementName(
               "Virtual Hardware Family").virtualSystemIdentifier("eduardo").virtualSystemType("vmx-07").build();
      assertEquals(vApp.getSystem().toString(), system.toString());

      assertEquals(vApp.getNetworkToAddresses().get("Internal"), ImmutableList.of("10.114.34.131"));

      ResourceAllocationSettingData cpu = ResourceAllocationSettingData.builder().instanceID("1").elementName(
               "2 virtual CPU(s)").description("Number of Virtual CPUs").resourceType(ResourceType.PROCESSOR)
View Full Code Here


      VApp result = factory.create(injector.getInstance(VAppHandler.class)).parse(is);

      ListMultimap<String, String> networkToAddresses = ImmutableListMultimap.<String, String> of("Public Network",
               "10.150.4.93");

      VirtualSystemSettingData system = VirtualSystemSettingData.builder().instanceID("0").elementName(
               "Virtual Hardware Family").virtualSystemIdentifier("centos53").virtualSystemType("vmx-07").build();

      Set<ResourceAllocationSettingData> resourceAllocations = ImmutableSet.<ResourceAllocationSettingData> of(
               ResourceAllocationSettingData.builder().instanceID("1").elementName("1 virtual CPU(s)").description(
                        "Number of Virtual CPUs").resourceType(ResourceType.PROCESSOR).virtualQuantity(1l)
View Full Code Here

      VApp result = factory.create(injector.getInstance(VAppHandler.class)).parse(is);

      ListMultimap<String, String> networkToAddresses = ImmutableListMultimap.<String, String> of("Public Network",
               "10.23.119.221");
      VirtualSystemSettingData system = VirtualSystemSettingData.builder().instanceID("0").elementName(
               "Virtual Hardware Family").virtualSystemIdentifier("m1").virtualSystemType("vmx-07").build();

      Set<ResourceAllocationSettingData> resourceAllocations = ImmutableSet.<ResourceAllocationSettingData> of(
               ResourceAllocationSettingData.builder().instanceID("1").elementName("1 virtual CPU(s)").description(
                        "Number of Virtual CPUs").resourceType(ResourceType.PROCESSOR).virtualQuantity(1l)
View Full Code Here

   }

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

      VirtualSystemSettingData result = factory.create(injector.getInstance(VirtualSystemSettingDataHandler.class))
               .parse(is);
      assertEquals(result.getElementName(), "Virtual Hardware Family");
      assertEquals(result.getInstanceID(), "0");
      assertEquals(result.getVirtualSystemIdentifier(), "adriantest1");
      assertEquals(result.getVirtualSystemTypes(), ImmutableSet.of("vmx-07"));
   }
View Full Code Here

   }

   @Test(enabled = false)
   public static void checkHardware(VCloudVirtualHardwareSection result) {
      VirtualSystemSettingData system = VirtualSystemSettingData.builder().instanceID("0").elementName(
               "Virtual Hardware Family").virtualSystemIdentifier("RHEL5").virtualSystemType("vmx-07").build();

      assertEquals(result.getHref(), URI
               .create("https://vcenterprise.bluelock.com/api/v1.0/vApp/vm-2087535248/virtualHardwareSection/"));
      assertEquals(result.getType(), "application/vnd.vmware.vcloud.virtualHardwareSection+xml");
      assertEquals(result.getSystem().toString(), system.toString());
      assertEquals(result.getInfo(), "Virtual hardware requirements");

      assertEquals(Iterables.get(result.getItems(), 0).toString(), VCloudNetworkAdapter.builder()
               .instanceID("1").elementName("Network adapter 0").description("PCNet32 ethernet adapter").resourceType(
                        ResourceType.ETHERNET_ADAPTER).resourceSubType("PCNet32").automaticAllocation(true).connection(
View Full Code Here

   }

   @Test(enabled = false)
   public static void checkHardware(VCloudVirtualHardwareSection result) {
      VirtualSystemSettingData system = VirtualSystemSettingData.builder().instanceID("0").elementName(
               "Virtual Hardware Family").virtualSystemIdentifier("RHEL5").virtualSystemType("vmx-07").build();

      assertEquals(result.getHref(), URI
               .create("https://vcenterprise.bluelock.com/api/v1.0/vApp/vm-2087535248/virtualHardwareSection/"));
      assertEquals(result.getType(), "application/vnd.vmware.vcloud.virtualHardwareSection+xml");
      assertEquals(result.getSystem().toString(), system.toString());
      assertEquals(result.getInfo(), "Virtual hardware requirements");

      assertEquals(Iterables.get(result.getItems(), 0).toString(), VCloudNetworkAdapter.builder()
               .instanceID("1").elementName("Network adapter 0").description("PCNet32 ethernet adapter").resourceType(
                        ResourceType.ETHERNET_ADAPTER).resourceSubType("PCNet32").automaticAllocation(true).connection(
View Full Code Here

public class VirtualSystemSettingDataHandlerTest extends BaseHandlerTest {

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

      VirtualSystemSettingData result = factory.create(injector.getInstance(VirtualSystemSettingDataHandler.class))
               .parse(is);

      VirtualSystemSettingData expects = VirtualSystemSettingData.builder().instanceID("0").elementName(
               "Virtual Hardware Family").virtualSystemIdentifier("SimpleVM").virtualSystemType("vmx-04").build();
      assertEquals(result, expects);

   }
View Full Code Here

TOP

Related Classes of org.jclouds.cim.VirtualSystemSettingData

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.