}
/** Test requires a custom disk offering to be available */
public void testCreateVolumeFromCustomDiskOffering() {
final int size = 1;
DiskOffering offering = null;
for (DiskOffering candidate : client.getOfferingApi().listDiskOfferings()) {
if (candidate.isCustomized()) {
offering = candidate;
break;
}
}
assertNotNull("No custom disk offering found!", offering);
AsyncCreateResponse job = client.getVolumeApi().createVolumeFromCustomDiskOfferingInZone(
prefix + "-jclouds-volume", offering.getId(), zoneId, size);
assertTrue(jobComplete.apply(job.getJobId()));
logger.info("created volume " + job.getId());
Volume volume = findVolumeWithId(job.getId());
try {