> + */
> +@Singleton
> +public class SizeToHardware implements Function<Size, Hardware> {
> +
> + @Override
> + public Hardware apply(Size input) {
> + HardwareBuilder builder = new HardwareBuilder();
> + builder.ids(String.valueOf(input.getId()));
> + builder.name(input.getName());
> + builder.ram(input.getMemory());
> + // DigitalOcean does not provide the processor speed. We configure it
> to
> + // make the bigger template the faster.
> + builder.processor(new Processor(input.getCpu(), input.getCpu()));
> +
> + builder.volume(new VolumeBuilder() //
> + .size(Float.valueOf(input.getDisk())) //
Yes, disk size is always a float in the DigitalOcean api.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/49/files#r9171004