return Iterables.get(imageApi.list().concat(), 0).getId();
}
protected String flavorRefForZone(String zoneId) {
FlavorApi flavorApi = api.getFlavorApiForZone(zoneId);
return DEFAULT_FLAVOR_ORDERING.min(flavorApi.listInDetail().concat()).getId();
}
static final Ordering<Flavor> DEFAULT_FLAVOR_ORDERING = new Ordering<Flavor>() {
public int compare(Flavor left, Flavor right) {
return ComparisonChain.start().compare(left.getVcpus(), right.getVcpus()).compare(left.getRam(), right.getRam())