Package org.jclouds.compute.domain

Examples of org.jclouds.compute.domain.OperatingSystem


   public void testCentos6() {

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

      OperatingSystem convertedOs = new DatasetToOperatingSystem(ImmutableMap.<OsFamily, Map<String, String>> of(
            OsFamily.CENTOS, ImmutableMap.of("6", "6.0"))).apply(datasetToConvert);

      assertEquals(convertedOs.getName(), datasetToConvert.getName());
      assertEquals(convertedOs.getFamily(), OsFamily.CENTOS);
      assertEquals(convertedOs.getDescription(), datasetToConvert.getUrn());
      assertEquals(convertedOs.getVersion(), "6.0");
      assertEquals(convertedOs.getArch(), null);
      assertTrue(convertedOs.is64Bit());
   }
View Full Code Here


      GroupNamingConvention.Factory namingConvention = Guice.createInjector().getInstance(GroupNamingConvention.Factory.class);

      Supplier<Map<String, ? extends Image>> images = new Supplier<Map<String, ? extends Image>>() {
         @Override
         public Map<String, ? extends Image> get() {
            OperatingSystem os = OperatingSystem.builder()
                    .description("Ubuntu 12.04 64bit")
                    .family(OsFamily.UBUNTU)
                    .version("12.04")
                    .is64Bit(true)
                    .build();
View Full Code Here

         return null;

      IGuestOSType guestOSType = virtualboxManager.get().getVBox().getGuestOSType(from.getOSTypeId());
      OsFamily family = parseOsFamilyOrUnrecognized(guestOSType.getDescription());
      String version = parseVersionOrReturnEmptyString(family, guestOSType.getDescription(), osVersionMap);
      OperatingSystem os = OperatingSystem.builder().description(guestOSType.getDescription()).family(family)
               .version(version).is64Bit(guestOSType.getIs64Bit()).build();

      return new ImageBuilder()
               .id(from.getName().substring(VirtualBoxConstants.VIRTUALBOX_IMAGE_PREFIX.length(),
                        from.getName().length())).name(from.getName()).description(from.getDescription())
View Full Code Here

      nodeMetadataBuilder = getIpAddresses(vm, nodeMetadataBuilder);
     
      IGuestOSType guestOSType = virtualboxManager.get().getVBox().getGuestOSType(vm.getOSTypeId());
      OsFamily family = parseOsFamilyOrUnrecognized(guestOSType.getDescription());
      String version = parseVersionOrReturnEmptyString(family, guestOSType.getDescription(), osVersionMap);
      OperatingSystem os = OperatingSystem.builder().description(guestOSType.getDescription()).family(family)
               .version(version).is64Bit(guestOSType.getIs64Bit()).build();
      nodeMetadataBuilder.operatingSystem(os);

      String guestOsUser = vm.getExtraData(GUEST_OS_USER);
      String guestOsPassword = vm.getExtraData(GUEST_OS_PASSWORD);
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

         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(os.getFamily(), OsFamily.UBUNTU);
         assertEquals(os.getVersion(), "10.04");
         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(os.getFamily(), OsFamily.UBUNTU);
      assertEquals(os.getVersion(), "10.04");
      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(os.getFamily(), OsFamily.UNRECOGNIZED);
      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(os.getFamily(), OsFamily.UNRECOGNIZED);
      assertNull(os.getVersion());
      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.