Package org.jclouds.softlayer.domain

Examples of org.jclouds.softlayer.domain.VirtualGuest


      assertNotNull(configurationOption);
   }

   @Test
   public void testCreateVirtualGuest() throws Exception {
      VirtualGuest virtualGuestRequest = VirtualGuest.builder()
              .domain("jclouds.org")
              .hostname("virtualGuestApiLiveTest")
              .startCpus(1)
              .maxMemory(1024)
              .operatingSystem(OperatingSystem.builder().id("CENTOS_6_64").operatingSystemReferenceCode("CENTOS_6_64").build())
View Full Code Here


      assertNotNull(virtualGuest.getPrimaryBackendIpAddress(), "backendIpAddress must be not null");
   }

   @Test(dependsOnMethods = "testCreateVirtualGuest")
   public void testGetVirtualGuest() throws Exception {
      VirtualGuest found = virtualGuestApi.getVirtualGuest(virtualGuest.getId());
      assertEquals(found, virtualGuest);
   }
View Full Code Here

   @Test(dependsOnMethods = "testGetVirtualGuest")
   public void testSetTagsOnVirtualGuest() throws Exception {
      ImmutableSet<String> tags = ImmutableSet.of("test", "jclouds");
      assertTrue(virtualGuestApi.setTags(virtualGuest.getId(), tags));
      VirtualGuest found = virtualGuestApi.getVirtualGuest(virtualGuest.getId());
      Set<TagReference> tagReferences = found.getTagReferences();
      assertNotNull(tagReferences);
      for (String tag : tags) {
         Iterables.contains(tagReferences, tag);
      }
   }
View Full Code Here

         public boolean apply(VirtualGuest guest) {
            guest = api().getVirtualGuest(virtualGuest.getId());
            return guest.getPowerState().getKeyName() == VirtualGuest.State.PAUSED;
         }
      }, 5 * 60 * 1000).apply(virtualGuest), "%s still not paused!", virtualGuest);
      VirtualGuest found = virtualGuestApi.getVirtualGuest(virtualGuest.getId());
      assertTrue(found.getPowerState().getKeyName() == VirtualGuest.State.PAUSED);
   }
View Full Code Here

         public boolean apply(VirtualGuest guest) {
            guest = api().getVirtualGuest(virtualGuest.getId());
            return guest.getPowerState().getKeyName() == VirtualGuest.State.RUNNING;
         }
      }, 5 * 60 * 1000).apply(virtualGuest), "%s still not running!", virtualGuest);
      VirtualGuest found = virtualGuestApi.getVirtualGuest(virtualGuest.getId());
      assertTrue(found.getPowerState().getKeyName() == VirtualGuest.State.RUNNING);
   }
View Full Code Here

   OperatingSystemToImage operatingSystemToImage = Guice.createInjector().getInstance(OperatingSystemToImage.class);

   @Test
   public void testVirtualGuestToImageWhenOperatingSystemIsNull() {
      VirtualGuest virtualGuest = createVirtualGuestWithoutOperatingSystem();
      Image image = new VirtualGuestToImage(operatingSystemToImage).apply(virtualGuest);
      assertNotNull(image);
      assertEquals(image.getStatus(), Image.Status.UNRECOGNIZED);
      assertEquals(image.getOperatingSystem().getFamily(), OsFamily.UNRECOGNIZED);
      assertEquals(image.getOperatingSystem().getVersion(), "UNRECOGNIZED");
View Full Code Here

      assertEquals(image.getOperatingSystem().getVersion(), "UNRECOGNIZED");
   }

   @Test
   public void testVirtualGuestToImageWhenVirtualGuestIsSoftwareLicense() {
      VirtualGuest virtualGuest = createVirtualGuestWithoutSoftwareLicenseDetails();
      Image image = new VirtualGuestToImage(operatingSystemToImage).apply(virtualGuest);
      assertNotNull(image);
      assertEquals(image.getOperatingSystem().getFamily(), OsFamily.UNRECOGNIZED);
      assertEquals(image.getOperatingSystem().getVersion(), "UNRECOGNIZED");
   }
View Full Code Here

      assertEquals(image.getOperatingSystem().getVersion(), "UNRECOGNIZED");
   }

   @Test
   public void testVirtualGuestToImageWithSoftwareLicense() {
      VirtualGuest virtualGuest = createVirtualGuestWithSoftwareLicenseDetails();
      Image image = new VirtualGuestToImage(operatingSystemToImage).apply(virtualGuest);
      assertNotNull(image);
      assertEquals(image.getOperatingSystem().getFamily(), OsFamily.UBUNTU);
      assertEquals(image.getOperatingSystem().getVersion(), "12.04");
      assertEquals(image.getOperatingSystem().is64Bit(), true);
View Full Code Here

   @Test
   public void testVirtualGuestWithOperatingSystem() {
      HttpRequest request = HttpRequest.builder().method("POST").endpoint("https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest").build();
      VirtualGuestToJson binder = new VirtualGuestToJson(json);
      VirtualGuest virtualGuestWithOS = VirtualGuest.builder()
              .hostname("hostname")
              .domain("domain")
              .startCpus(1)
              .maxMemory(1024)
              .datacenter(Datacenter.builder()
View Full Code Here

   @Test
   public void testVirtualGuestWithVirtualGuestBlockDeviceTemplateGroup() {
      HttpRequest request = HttpRequest.builder().method("POST").endpoint("https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest").build();
      VirtualGuestToJson binder = new VirtualGuestToJson(json);
      VirtualGuest virtualGuestWithVirtualGuestBlockDeviceTemplateGroup = VirtualGuest.builder()
              .hostname("hostname")
              .domain("domain")
              .startCpus(1)
              .maxMemory(1024)
              .datacenter(Datacenter.builder()
View Full Code Here

TOP

Related Classes of org.jclouds.softlayer.domain.VirtualGuest

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.