Package org.jclouds.vcloud.director.v1_5.domain.dmtf

Examples of org.jclouds.vcloud.director.v1_5.domain.dmtf.RasdItem$ConcreteBuilder


      return task;
   }

   public static RasdItem getVirtualHardwareSectionCpu() {
      RasdItem cpu = RasdItem.builder()
            .build();

      return cpu;
   }
View Full Code Here


      return media;
   }

   public static RasdItem getVirtualHardwareSectionMemory() {
      RasdItem memory = RasdItem.builder()
            .build();

      return memory;
   }
View Full Code Here

   }

   @Test(description = "GET /vApp/{id}/virtualHardwareSection/cpu", dependsOnMethods = { "testGetVirtualHardwareSection" })
   public void testGetVirtualHardwareSectionCpu() {
      // Method under test
      RasdItem rasd = vmApi.getVirtualHardwareSectionCpu(vmUrn);

      // Check the retrieved object is well formed
      checkResourceAllocationSettingData(rasd);
   }
View Full Code Here

   }

   @Test(description = "PUT /vApp/{id}/virtualHardwareSection/cpu", dependsOnMethods = { "testGetVirtualHardwareSectionCpu" })
   public void testEditVirtualHardwareSectionCpu() {
      // Copy existing section and edit fields
      RasdItem oldItem = vmApi.getVirtualHardwareSectionCpu(vmUrn);
      RasdItem newItem = oldItem.toBuilder().elementName("2 virtual CPU(s)").virtualQuantity(new BigInteger("2"))
               .build();

      // Method under test
      Task editVirtualHardwareSectionCpu = vmApi.editVirtualHardwareSectionCpu(vmUrn, newItem);
      assertTrue(retryTaskSuccess.apply(editVirtualHardwareSectionCpu),
               String.format(TASK_COMPLETE_TIMELY, "editVirtualHardwareSectionCpu"));

      // Retrieve the modified section
      RasdItem modified = vmApi.getVirtualHardwareSectionCpu(vmUrn);

      // Check the retrieved object
      checkResourceAllocationSettingData(modified);

      // Check modified item
      assertEquals(modified.getVirtualQuantity(), new BigInteger("2"), String.format(OBJ_FIELD_EQ,
               "ResourceAllocationSettingData", "VirtualQuantity", "2", modified.getVirtualQuantity().toString()));
      assertEquals(modified, newItem);
   }
View Full Code Here

   }

   @Test(description = "GET /vApp/{id}/virtualHardwareSection/memory", dependsOnMethods = { "testGetVirtualHardwareSection" })
   public void testGetVirtualHardwareSectionMemory() {
      // Method under test
      RasdItem rasd = vmApi.getVirtualHardwareSectionCpu(vmUrn);

      // Check the retrieved object is well formed
      checkResourceAllocationSettingData(rasd);
   }
View Full Code Here

      checkResourceAllocationSettingData(rasd);
   }

   @Test(description = "PUT /vApp/{id}/virtualHardwareSection/memory", dependsOnMethods = { "testGetVirtualHardwareSectionMemory" })
   public void testEditVirtualHardwareSectionMemory() {
      RasdItem origItem = vmApi.getVirtualHardwareSectionMemory(vmUrn);
      RasdItem newItem = origItem.toBuilder().elementName("1024 MB of memory").virtualQuantity(new BigInteger("1024"))
               .build();

      // Method under test
      Task editVirtualHardwareSectionMemory = vmApi.editVirtualHardwareSectionMemory(vmUrn, newItem);
      assertTrue(retryTaskSuccess.apply(editVirtualHardwareSectionMemory),
               String.format(TASK_COMPLETE_TIMELY, "editVirtualHardwareSectionMemory"));

      // Retrieve the modified section
      RasdItem modified = vmApi.getVirtualHardwareSectionMemory(vmUrn);

      // Check the retrieved object
      checkResourceAllocationSettingData(modified);

      // Check modified item
      assertEquals(modified.getVirtualQuantity(), new BigInteger("1024"), String.format(OBJ_FIELD_EQ,
               "ResourceAllocationSettingData", "VirtualQuantity", "1024", modified.getVirtualQuantity().toString()));
      assertEquals(modified, newItem);
   }
View Full Code Here

      return task;
   }

   public static RasdItem getVirtualHardwareSectionCpu() {
      RasdItem cpu = RasdItem.builder()
            .build();

      return cpu;
   }
View Full Code Here

      return media;
   }

   public static RasdItem getVirtualHardwareSectionMemory() {
      RasdItem memory = RasdItem.builder()
            .build();

      return memory;
   }
View Full Code Here

      return task;
   }

   public static RasdItem getVirtualHardwareSectionCpu() {
      RasdItem cpu = RasdItem.builder()
            .build();

      return cpu;
   }
View Full Code Here

      return media;
   }

   public static RasdItem getVirtualHardwareSectionMemory() {
      RasdItem memory = RasdItem.builder()
            .build();

      return memory;
   }
View Full Code Here

TOP

Related Classes of org.jclouds.vcloud.director.v1_5.domain.dmtf.RasdItem$ConcreteBuilder

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.