> +            List<? extends Volume> volumes2 = h2.getVolumes();
> +            ComparisonChain comparisonChain = 
> ComparisonChain.start().compare(getCores(h1), getCores(h2))
> +                    .compare(h1.getRam(), h2.getRam())
> +                    .compare(getSpace(h1), getSpace(h2))
> +                    .compare(getBootableDeviceType(h1), 
> getBootableDeviceType(h2));
> +            if(!volumes1.isEmpty() && !volumes2.isEmpty() && volumes1.size() 
> == volumes2.size()) {
> +               for (int i = 0; i < volumes1.size(); i++) {
> +                  comparisonChain.compare(volumes1.get(i).getType(), 
> volumes2.get(i).getType());
> +               }
> +            }
> +            return comparisonChain.result();
> +         }
> +      });
> +      for (Integer cpus : virtualGuestConfiguration.getCpusOfProcessors()) {
> +         for (Integer memory : virtualGuestConfiguration.getMemories()) {
> +            for (VirtualGuestBlockDevice blockDevice : 
> virtualGuestConfiguration.getVirtualGuestBlockDevices()) {

yeah looks like a good optimization

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/296/files#r11150878

Reply via email to