Package org.jclouds.compute.domain

Examples of org.jclouds.compute.domain.HardwareBuilder.location()


      }
      VirtualHardwareSection hardware = Iterables.get(ovf.getVirtualSystem().getVirtualHardwareSections(), 0);
      HardwareBuilder builder = rasdToHardwareBuilder.apply(hardware.getItems());
      Link vdc = Iterables.find(checkNotNull(from, "from").getLinks(), LinkPredicates.typeEquals(VCloudDirectorMediaType.VDC));
      if (vdc != null) {
         builder.location(findLocationForResource.apply(vdc));
      } else {
         // otherwise, it could be in a public catalog, which is not assigned to a VDC
      }
      builder.ids(from.getHref().toASCIIString()).name(from.getName()).supportsImage(
               ImagePredicates.idEquals(from.getHref().toASCIIString()));
View Full Code Here


      if (from == null)
         return null;
     
      VirtualHardwareSection hardware = findVirtualHardwareSectionForVm.apply(from);
      HardwareBuilder builder = rasdToHardwareBuilder.apply(hardware.getItems());
      builder.location(findLocationForResource.apply(Iterables.find(checkNotNull(from, "from").getLinks(),
            LinkPredicates.typeEquals(VCloudDirectorMediaType.VDC))));
      builder.ids(from.getHref().toASCIIString()).name(from.getName()).supportsImage(
               ImagePredicates.idEquals(from.getHref().toASCIIString()));
      builder.hypervisor("VMware");
      return builder.build();
View Full Code Here

      builder.name(template.getName());
      builder.processor(new Processor(template.getCpuRequired(), DEFAULT_CORE_SPEED));
      builder.ram(template.getRamRequired());

      // Location information
      builder.location(virtualDatacenterToLocation.apply(virtualDatacenter));
      builder.hypervisor(virtualDatacenter.getHypervisorType().name());
      builder.supportsImage(ImagePredicates.idEquals(template.getId().toString()));

      VolumeBuilder volumeBuilder = new VolumeBuilder();
      volumeBuilder.bootDevice(true);
View Full Code Here

   @Override
   public Hardware apply(VApp from) {
      checkNotNull(from, "VApp");
      try {
         HardwareBuilder builder = rasdToHardwareBuilder.apply(from.getResourceAllocations());
         builder.location(findLocationForResource.apply(checkNotNull(from, "from").getVDC()));
         builder.ids(from.getHref().toASCIIString()).name(from.getName())
               .supportsImage(ImagePredicates.idEquals(from.getHref().toASCIIString()));
         builder.hypervisor("VMware");
         return builder.build();
      } catch (NoSuchElementException e) {
View Full Code Here

      builder.name(template.getName());
      builder.processor(new Processor(template.getCpuRequired(), DEFAULT_CORE_SPEED));
      builder.ram(template.getRamRequired());

      // Location information
      builder.location(virtualDatacenterToLocation.apply(virtualDatacenter));
      builder.hypervisor(virtualDatacenter.getHypervisorType().name());
      builder.supportsImage(ImagePredicates.idEquals(template.getId().toString()));

      VolumeBuilder volumeBuilder = new VolumeBuilder();
      volumeBuilder.bootDevice(true);
View Full Code Here

      }
      VirtualHardwareSection hardware = Iterables.get(ovf.getVirtualSystem().getVirtualHardwareSections(), 0);
      HardwareBuilder builder = rasdToHardwareBuilder.apply(hardware.getItems());
      Link vdc = Iterables.find(checkNotNull(from, "from").getLinks(), LinkPredicates.typeEquals(VCloudDirectorMediaType.VDC));
      if (vdc != null) {
         builder.location(findLocationForResource.apply(vdc));
      } else {
         // otherwise, it could be in a public catalog, which is not assigned to a VDC
      }
      builder.ids(from.getHref().toASCIIString()).name(from.getName()).supportsImage(
               ImagePredicates.idEquals(from.getHref().toASCIIString()));
View Full Code Here

      if (from == null)
         return null;
     
      VirtualHardwareSection hardware = findVirtualHardwareSectionForVm.apply(from);
      HardwareBuilder builder = rasdToHardwareBuilder.apply(hardware.getItems());
      builder.location(findLocationForResource.apply(Iterables.find(checkNotNull(from, "from").getLinks(),
            LinkPredicates.typeEquals(VCloudDirectorMediaType.VDC))));
      builder.ids(from.getHref().toASCIIString()).name(from.getName()).supportsImage(
               ImagePredicates.idEquals(from.getHref().toASCIIString()));
      builder.hypervisor("VMware");
      return builder.build();
View Full Code Here

         logger.warn("multiple hardware choices found. using first", ovf);
      }
      VirtualHardwareSection hardware = Iterables.get(ovf.getVirtualSystem().getVirtualHardwareSections(), 0);
      HardwareBuilder builder = rasdToHardwareBuilder.apply(hardware.getItems());
      if (from.getVDC() != null) {
         builder.location(findLocationForResource.apply(from.getVDC()));
      } else {
         // otherwise, it could be in a public catalog, which is not assigned to a VDC
      }
      builder.ids(from.getHref().toASCIIString()).name(from.getName()).supportsImage(
               ImagePredicates.idEquals(from.getHref().toASCIIString()));
View Full Code Here

      if (vm == null)
         return null;

      VirtualHardwareSection hardware = vm.getVirtualHardwareSection();
      HardwareBuilder builder = rasdToHardwareBuilder.apply(hardware.getItems());
      builder.location(findLocationForResource.apply(checkNotNull(from, "from").getVDC()));
      builder.ids(from.getHref().toASCIIString()).name(from.getName()).supportsImage(
               ImagePredicates.idEquals(from.getHref().toASCIIString()));
      builder.hypervisor("VMware");
      return builder.build();
   }
View Full Code Here

      if (vm == null)
         return null;

      VirtualHardwareSection hardware = vm.getVirtualHardwareSection();
      HardwareBuilder builder = rasdToHardwareBuilder.apply(hardware.getItems());
      builder.location(findLocationForResource.apply(checkNotNull(from, "from").getVDC()));
      builder.ids(from.getHref().toASCIIString()).name(from.getName()).supportsImage(
               ImagePredicates.idEquals(from.getHref().toASCIIString()));
      builder.hypervisor("VMware");
      return builder.build();
   }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.