Package org.jclouds.compute.domain

Examples of org.jclouds.compute.domain.OperatingSystem$Builder


   @Test
   public void test64BitsNoSpace() {
      DiskImage image = DiskImage.builder().osName("a (64bit) os").build();

      OperatingSystem os = new DiskImageToOperatingSystem().apply(image);

      assertNotNull(os);
      assertTrue(os.is64Bit());
   }
View Full Code Here


   @Test
   public void test32BitsNoSpace() {
      DiskImage image = DiskImage.builder().osName("a (32bit) os").build();

      OperatingSystem os = new DiskImageToOperatingSystem().apply(image);

      assertNotNull(os);
      assertFalse(os.is64Bit());
   }
View Full Code Here

   @Test
   public void testx64NoSpace() {
      DiskImage image = DiskImage.builder().osName("a (x64) os").build();

      OperatingSystem os = new DiskImageToOperatingSystem().apply(image);

      assertNotNull(os);
      assertTrue(os.is64Bit());
   }
View Full Code Here

   @Test
   public void testWindowsVersion() {
      DiskImage image = DiskImage.builder()
            .osName("Windows Server 2008 R2 SE 64 bit").build();

      OperatingSystem os = new DiskImageToOperatingSystem().apply(image);

      assertNotNull(os);
      assertEquals(os.getVersion(), "2008 R2 SE");
   }
View Full Code Here

   @Test
   public void testCentOSVersion() {
      DiskImage image = DiskImage.builder()
            .osName("CentOS 6.2 64bit (English)").build();

      OperatingSystem os = new DiskImageToOperatingSystem().apply(image);

      assertNotNull(os);
      assertEquals(os.getVersion(), "6.2");
   }
View Full Code Here

   @Test
   public void testUnrecognizedOsVersion() {
      DiskImage image = DiskImage.builder()
            .osName("Windows Server 2099 (256 bit)").build();

      OperatingSystem os = new DiskImageToOperatingSystem().apply(image);

      assertNotNull(os);
      assertNull(os.getVersion());
   }
View Full Code Here

   @Test
   public void testOsVersionMissing() {
      DiskImage image = DiskImage.builder().osName("asd Server").build();

      OperatingSystem os = new DiskImageToOperatingSystem().apply(image);
      assertNotNull(os);
      assertNull(os.getVersion(), "os.getVersion(): \'" + os.getVersion()
            + "\'");
   }
View Full Code Here

      builder.ids(from.getId());
      builder.name(from.getName());
      builder.description(from.getDescription());
      // in fgcp, if the image is listed it is available
      builder.status(Status.AVAILABLE);
      OperatingSystem os = diskImageToOperatingSystem.apply(from);
      builder.operatingSystem(os);
      String user = os.getFamily() == OsFamily.WINDOWS ? "Administrator" : "root";
      builder.defaultCredentials(LoginCredentials.builder().identity(user).noPassword().build());
      return builder.build();
   }
View Full Code Here

   Dataset datasetToConvert = new ParseDatasetTest().expected();

   @Test
   public void testConversionWhereLocationFound() {
      OperatingSystem operatingSystem = new OperatingSystem(OsFamily.UBUNTU, "My Test OS", "My Test Version", "x86",
            "My Test OS", true);
      DatasetInDatacenterToImage converter = new DatasetInDatacenterToImage(constant(operatingSystem), locationIndex);

      DatasetInDatacenter datasetInZoneToConvert = new DatasetInDatacenter(datasetToConvert, "us-sw-1");
View Full Code Here

      assertEquals(convertedImage.getVersion(), datasetToConvert.getVersion());
   }

   @Test(expectedExceptions = IllegalStateException.class)
   public void testConversionWhereLocationNotFound() {
      OperatingSystem operatingSystem = new OperatingSystem(OsFamily.UBUNTU, "My Test OS", "My Test Version", "x86",
            "My Test OS", true);
      DatasetInDatacenterToImage converter = new DatasetInDatacenterToImage(constant(operatingSystem), locationIndex);

      DatasetInDatacenter datasetInZoneToConvert = new DatasetInDatacenter(datasetToConvert, "South");
View Full Code Here

TOP

Related Classes of org.jclouds.compute.domain.OperatingSystem$Builder

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.