final String imageId = pool.getSoftware().getImageId();
if (!Strings.isNullOrEmpty(imageId)) {
return "default".equals(imageId) ? DEFAULT_AMI_ID : imageId;
}
ImageTable imageTable;
try {
imageTable = ImageTable.fromCsvResource("/org/apache/provisionr/amazon/ubuntu.csv");
} catch (IOException e) {
throw Throwables.propagate(e);
}
final String region = provider.getOptionOr(ProviderOptions.REGION, ProviderOptions.DEFAULT_REGION);
final String version = provider.getOptionOr(SoftwareOptions.BASE_OPERATING_SYSTEM_VERSION,
SoftwareOptions.DEFAULT_BASE_OPERATING_SYSTEM_VERSION);
ImageTableQuery query = imageTable.query()
.filterBy("region", region)
.filterBy("version", version)
.filterBy("arch", DEFAULT_ARCH);
if (instanceType.equals("t1.micro")) {