Package org.jclouds.digitalocean.domain

Examples of org.jclouds.digitalocean.domain.Size


      // Resize requires the droplet to be powered off
      int powerOffEvent = api.getDropletApi().powerOff(droplet.getId());
      assertTrue(powerOffEvent > 0, "The event id should be > 0");
      waitForEvent(powerOffEvent);

      Size newSize = sizes.get(1);
      int resizeEvent = api.getDropletApi().resize(droplet.getId(), newSize.getId());
      assertTrue(resizeEvent > 0, "The event id should be > 0");
      waitForEvent(resizeEvent);
   }
View Full Code Here


@Test(groups = "unit", testName = "SizeToHardwareTest")
public class SizeToHardwareTest {

   @Test
   public void testConvertSize() {
      Size size = new Size(1, "Medium", "2gb", 2048, 1, 20, "0.05", "10");
      Hardware expected = new HardwareBuilder().id("2gb").providerId("1").name("Medium")
            .processor(new Processor(1.0, 1.0)).ram(2048)
            .volume(new VolumeBuilder().size(20f).type(Type.LOCAL).build())
            .userMetadata(ImmutableMap.of("costPerHour", "0.05", "costPerMonth", "10")).build();
View Full Code Here

      // Resize requires the droplet to be powered off
      int powerOffEvent = api.getDropletApi().powerOff(droplet.getId());
      assertTrue(powerOffEvent > 0, "The event id should be > 0");
      waitForEvent(powerOffEvent);

      Size newSize = sizes.get(1);
      int resizeEvent = api.getDropletApi().resize(droplet.getId(), newSize.getId());
      assertTrue(resizeEvent > 0, "The event id should be > 0");
      waitForEvent(resizeEvent);
   }
View Full Code Here

@Test(groups = "unit", testName = "SizeToHardwareTest")
public class SizeToHardwareTest {

   @Test
   public void testConvertSize() {
      Size size = new Size(1, "Medium", "2gb", 2048, 1, 20, "0.05", "10");
      Hardware expected = new HardwareBuilder().id("2gb").providerId("1").name("Medium")
            .processor(new Processor(1.0, 1.0)).ram(2048)
            .volume(new VolumeBuilder().size(20f).type(Type.LOCAL).build())
            .userMetadata(ImmutableMap.of("costPerHour", "0.05", "costPerMonth", "10")).build();
View Full Code Here

      // Resize requires the droplet to be powered off
      int powerOffEvent = api.getDropletApi().powerOff(droplet.getId());
      assertTrue(powerOffEvent > 0, "The event id should be > 0");
      waitForEvent(powerOffEvent);

      Size newSize = sizes.get(1);
      int resizeEvent = api.getDropletApi().resize(droplet.getId(), newSize.getId());
      assertTrue(resizeEvent > 0, "The event id should be > 0");
      waitForEvent(resizeEvent);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.digitalocean.domain.Size

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.