Package org.jclouds.compute.domain

Examples of org.jclouds.compute.domain.OperatingSystem


         ProductItem item = ProductItem.builder()
                                       .description(description)
                                       .prices(ProductItemPrice.builder().id(1234).build())
                                       .build();
         Image i = new ProductItemToImage().apply(item);
         OperatingSystem os = i.getOperatingSystem();
         assertNotNull(os);
         assertNotNull(os.getFamily());
         assertFalse(os.getFamily().equals(OsFamily.UNRECOGNIZED));
         assertNotNull(os.getVersion());
      }
   }
View Full Code Here


         ProductItem item = ProductItem.builder()
                                       .description("Ubuntu Linux 10.04 LTS Lucid Lynx - Minimal Install (64 bit)")
                                       .prices(ProductItemPrice.builder().id(1234).build())
                                       .build();
         Image i = new ProductItemToImage().apply(item);
         OperatingSystem os = i.getOperatingSystem();
         assertNotNull(os);
         assertEquals(OsFamily.UBUNTU, os.getFamily());
         assertEquals("10.04",os.getVersion());
         assertTrue(os.is64Bit());
   }
View Full Code Here

      ProductItem item = ProductItem.builder()
            .description("Ubuntu Linux 10.04 LTS Lucid Lynx - Minimal Install")
            .prices(ProductItemPrice.builder().id(1234).build())
            .build();
      Image i = new ProductItemToImage().apply(item);
      OperatingSystem os = i.getOperatingSystem();
      assertNotNull(os);
      assertEquals(OsFamily.UBUNTU, os.getFamily());
      assertEquals("10.04",os.getVersion());
      assertFalse(os.is64Bit());
   }
View Full Code Here

      ProductItem item = ProductItem.builder()
            .description("This fails to match anything!!!")
            .prices(ProductItemPrice.builder().id(1234).build())
            .build();
      Image i = new ProductItemToImage().apply(item);
      OperatingSystem os = i.getOperatingSystem();
      assertNotNull(os);
      assertEquals(OsFamily.UNRECOGNIZED, os.getFamily());
      assertNull(os.getVersion());
      assertFalse(os.is64Bit());
   }
View Full Code Here

      ProductItem item = ProductItem.builder()
            .description("This only has the bit-count (64 bit)")
            .prices(ProductItemPrice.builder().id(1234).build())
            .build();
      Image i = new ProductItemToImage().apply(item);
      OperatingSystem os = i.getOperatingSystem();
      assertNotNull(os);
      assertEquals(OsFamily.UNRECOGNIZED, os.getFamily());
      assertNull(os.getVersion());
      assertTrue(os.is64Bit());
   }
View Full Code Here

          LOG.info("{} - Node failing to start: {}", roles, nodeMeta.getId());
        }
      }
      if (failedNodes.size() > 0) {
        Image image = new ImageImpl("ec2", "test", "testId", location, new URI("http://node"),
            userMetadata, ImmutableSet.<String>of(), new OperatingSystem(null, null, null, null, "op", true),
            "description", null, null, loginCredentials);
        Hardware hardware = new HardwareImpl("ec2", "test", "testId", location, new URI("http://node"),
                userMetadata, ImmutableSet.<String>of(), new ArrayList<Processor>(), 1,
                new ArrayList<Volume>(), null);
        Template template = new TemplateImpl(image, hardware, location, TemplateOptions.NONE);
View Full Code Here

      String description = checkNotNull(Iterables.getFirst(from.getRepoTags(), "image must have at least one repo tag"));

      OsFamily osFamily = osFamily().apply(description);
      String osVersion = parseVersion(description);

      OperatingSystem os = OperatingSystem.builder()
              .description(description)
              .family(osFamily)
              .version(osVersion)
              .is64Bit(is64bit(from))
              .build();
View Full Code Here

         builder.registrant("registrant");
         builder.description("description");
         builder.id("ABCDEFGH");
         DiskImage image = builder.build();

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

         assertNotNull(os, description);
         assertNotNull(os.getFamily(), description);
         assertNotEquals(OsFamily.UNRECOGNIZED, os.getFamily(),
               "OsFamily not recognised: " + description);
         assertNotNull(os.getVersion(), "Version not recognised: "
               + description);
         assertEquals(os.getName(), description);
         assertEquals(os.getDescription(), description);
         assertNotNull(os.getArch(), description);
      }
   }
View Full Code Here

   @Test
   public void testOsFamilyUnrecognized() {
      DiskImage image = DiskImage.builder()
            .osName("not a known operating system").build();

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

      assertNotNull(os);
      assertEquals(os.getFamily(), OsFamily.UNRECOGNIZED);
   }
View Full Code Here

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

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

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

TOP

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

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.