> +
> + @Override
> + public boolean apply(Image input) {
> + String toParse = input.getUserMetadata().get("size");
> + return toParse != null && new Float(toParse) <= size;
> + }
> +
> + @Override
> + public String toString() {
> + return "sizeLessThanOrEqual(" + size + ")";
> + }
> +
> + }).ids(id).ram(ram).processors(ImmutableList.of(new Processor(1,
> cpu))).hypervisor("kvm")
> + .volumes(ImmutableList.<Volume>of(new VolumeImpl(size,
> true, true))).build());
> + }
> + return hardware.build();
Since the list of hardware profiles is fixed, you could refactor it and extract
to an enum, a class, or something like that. This will help users force a
hardware profile using the `TemplateBuilder.fromHardware`. You can take a look
at the EC2 hardware profiles to see what I mean.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/12/files#r5278486