Examples of VAppImpl


Examples of org.jclouds.trmk.vcloud_0_8.domain.internal.VAppImpl

      Map<String, Object> map = Maps.newHashMap();
      assertEquals(binder.bindToRequest(request, map).getPayload().getRawContent(), expected);
   }

   public void testRemoveDisk() throws IOException {
      VAppImpl vApp = new VAppImpl("MyAppServer6", URI
               .create("https://services.vcloudexpress/terremark.com/api/v0.8/vapp/4213"), Status.OFF, 4194304l, null,
               ImmutableListMultimap.<String, String> of(), null, null, null, ImmutableSet.of(
                        ResourceAllocationSettingData.builder().instanceID("1").elementName("foo").resourceType(
                                 ResourceType.PROCESSOR).virtualQuantity(2l).build(),//
                        ResourceAllocationSettingData.builder().instanceID("2").elementName("foo").resourceType(
View Full Code Here

Examples of org.jclouds.trmk.vcloud_0_8.domain.internal.VAppImpl

      Map<String, Object> map = Maps.newHashMap();
      assertEquals(binder.bindToRequest(request, map).getPayload().getRawContent(), expected);
   }

   public void testChangeAll() throws IOException {
      VAppImpl vApp = new VAppImpl("MyAppServer6", URI
               .create("https://services.vcloudexpress/terremark.com/api/v0.8/vapp/4213"), Status.OFF, 4194304l, null,
               ImmutableListMultimap.<String, String> of(), null, null, null, ImmutableSet.of(
                        ResourceAllocationSettingData.builder().instanceID("1").elementName("foo").resourceType(
                                 ResourceType.PROCESSOR).virtualQuantity(2l).build(), ResourceAllocationSettingData
                                 .builder().instanceID("2").elementName("foo").resourceType(ResourceType.MEMORY)
View Full Code Here

Examples of org.jclouds.trmk.vcloud_0_8.domain.internal.VAppImpl

      Map<String, Object> map = Maps.newHashMap();
      assertEquals(binder.bindToRequest(request, map).getPayload().getRawContent(), expected);
   }

   public void testChangeCPUCountTo4() throws IOException {
      VAppImpl vApp = new VAppImpl("eduardo", URI
               .create("https://services.vcloudexpress/terremark.com/api/v0.8/vapp/4213"), Status.OFF, 4194304l, null,
               ImmutableListMultimap.<String, String> of(), null, null, null, ImmutableSet.of(
                        ResourceAllocationSettingData.builder().instanceID("1").elementName("foo").resourceType(
                                 ResourceType.PROCESSOR).virtualQuantity(4l).build(), ResourceAllocationSettingData
                                 .builder().instanceID("2").elementName("foo").resourceType(ResourceType.MEMORY)
View Full Code Here

Examples of org.jclouds.trmk.vcloud_0_8.domain.internal.VAppImpl

      Map<String, Object> map = Maps.newHashMap();
      assertEquals(binder.bindToRequest(request, map).getPayload().getRawContent(), expected);
   }

   public void testChangeMemoryTo1536() throws IOException {
      VAppImpl vApp = new VAppImpl("MyAppServer6", URI
               .create("https://services.vcloudexpress/terremark.com/api/v0.8/vapp/4213"), Status.OFF, 4194304l, null,
               ImmutableListMultimap.<String, String> of(), null, null, null, ImmutableSet.of(
                        ResourceAllocationSettingData.builder().instanceID("1").elementName("foo").resourceType(
                                 ResourceType.PROCESSOR).virtualQuantity(2l).build(), ResourceAllocationSettingData
                                 .builder().instanceID("2").elementName("foo").resourceType(ResourceType.MEMORY)
View Full Code Here

Examples of org.jclouds.trmk.vcloud_0_8.domain.internal.VAppImpl

   protected Long size;
   protected ReferenceType vDC;
   protected Set<ReferenceType> extendedInfo = Sets.newLinkedHashSet();

   public VApp getResult() {
      return new VAppImpl(name, location, status, size, vDC, networkToAddresses, osType, operatingSystemDescription,
            system, allocations, extendedInfo);
   }
View Full Code Here

Examples of org.jclouds.trmk.vcloud_0_8.domain.internal.VAppImpl

   public void testInstantiated() throws UnknownHostException {
      InputStream is = getClass().getResourceAsStream("/instantiatedvapp.xml");

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

      VApp expects = new VAppImpl("centos53", URI
               .create("http://10.150.4.49/api/v0.8/vApp/10"), Status.RESOLVED, 123456789l, new ReferenceTypeImpl(null,
               "application/vnd.vmware.vcloud.vdc+xml", URI.create("http://10.150.4.49/api/v0.8/vdc/4")),
               ImmutableListMultimap.<String, String> of(), null, null, null, ImmutableSet
                        .<ResourceAllocationSettingData> of());
      assertEquals(result, expects);
View Full Code Here

Examples of org.jclouds.trmk.vcloud_0_8.domain.internal.VAppImpl

               ResourceAllocationSettingData.builder().instanceID("9").elementName("Hard Disk 1").resourceType(
                        ResourceType.DISK_DRIVE).hostResource("104857").addressOnParent("0").parent("3")
                        .virtualQuantity(104857l).build());

      VApp expects = new VAppImpl("centos53", URI
               .create("http://10.150.4.49/api/v0.8/vApp/10"), Status.ON, Long.valueOf(104857), new ReferenceTypeImpl(null,
               "application/vnd.vmware.vcloud.vdc+xml", URI.create("http://10.150.4.49/api/v0.8/vdc/4")),
               networkToAddresses, null, "Other Linux (32-bit)", system, resourceAllocations);
      assertEquals(result.getHref(), expects.getHref());
      assertEquals(result.getName(), expects.getName());
      assertEquals(result.getNetworkToAddresses(), expects.getNetworkToAddresses());
      assertEquals(result.getOperatingSystemDescription(), expects.getOperatingSystemDescription());
      assertEquals(result.getResourceAllocations().toString(), expects.getResourceAllocations().toString());
      assertEquals(result.getSize(), expects.getSize());
      assertEquals(result.getStatus(), expects.getStatus());
      assertEquals(result.getSystem().toString(), expects.getSystem().toString());
      assertEquals(result.getType(), expects.getType());
      assertEquals(result.getVDC(), expects.getVDC());
   }
View Full Code Here

Examples of org.jclouds.trmk.vcloud_0_8.domain.internal.VAppImpl

               ResourceAllocationSettingData.builder().instanceID("9").elementName("Hard Disk 1").resourceType(
                        ResourceType.DISK_DRIVE).hostResource("10485760").addressOnParent("0").parent("3")
                        .virtualQuantity(10485760l).build());

      VApp expects = new VAppImpl("m1", URI.create("http://localhost:8000/api/v0.8/vApp/80"),
               Status.ON, Long.valueOf(10485760), new ReferenceTypeImpl(null, "application/vnd.vmware.vcloud.vdc+xml", URI
                        .create("http://localhost:8000/api/v0.8/vdc/28")), networkToAddresses, null,
               "Microsoft Windows XP Professional (32-bit)", system, resourceAllocations);
      assertEquals(result.getHref(), expects.getHref());
      assertEquals(result.getName(), expects.getName());
      assertEquals(result.getNetworkToAddresses(), expects.getNetworkToAddresses());
      assertEquals(result.getOperatingSystemDescription(), expects.getOperatingSystemDescription());
      assertEquals(result.getResourceAllocations().toString(), expects.getResourceAllocations().toString());
      assertEquals(result.getSize(), expects.getSize());
      assertEquals(result.getStatus(), expects.getStatus());
      assertEquals(result.getSystem().toString(), expects.getSystem().toString());
      assertEquals(result.getType(), expects.getType());
      assertEquals(result.getVDC(), expects.getVDC());
   }
View Full Code Here

Examples of org.jclouds.vcloud.domain.internal.VAppImpl

   private boolean inNetworkSection;
   protected Set<Vm> children = Sets.newLinkedHashSet();
   private VCloudNetworkSection networkSection;

   public VApp getResult() {
      return new VAppImpl(template.getName(), template.getType(), template.getHref(), status, vdc, description, tasks,
            ovfDescriptorUploaded, children, networkSection);
   }
View Full Code Here

Examples of org.jclouds.vcloud.domain.internal.VAppImpl

      ImmutableMap<String, String> metadata = ImmutableMap.<String, String>of();
      ImmutableSet<String> tags = ImmutableSet.<String>of();

      String description = " user=user_ssoid_1\nuid=3b7bb605-bb30-4e62-a3de-9076b052dee7 label='foo-DEVELOPMENT' date=2013-01-22 17:39:28.252";

      result = new VAppImpl(result.getName(), result.getType(), result.getHref(), result.getStatus(), result.getVDC(),
         description, result.getTasks(), result.isOvfDescriptorUploaded(), result.getChildren(),
         result.getNetworkSection());

      NodeMetadata node = converter.apply(result);
      assertNotNull(node);
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.