Code example for Function

Methods: apply

0
 
   @Override 
   public Hardware apply(VAppTemplate from) {
      checkNotNull(from, "VAppTemplate");
 
      Envelope ovf = templateToEnvelope.apply(from);
 
      if (ovf.getVirtualSystem().getVirtualHardwareSections().size() > 1) {
         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()));
      builder.hypervisor("VMware");
Contextual code suggestions in your IDE  Get Codota for Java