options.backupsEnabled(templateOptions.getBackupsEnabled());
}
// Find the location where the Droplet has to be created
final String locationId = template.getLocation().getId();
Region region = find(api.getRegionApi().list(), new Predicate<Region>() {
@Override
public boolean apply(Region input) {
return input.getSlug().equals(locationId);
}
});
DropletCreation dropletCreation = api.getDropletApi().create(name,
Integer.parseInt(template.getImage().getProviderId()),
Integer.parseInt(template.getHardware().getProviderId()), region.getId(), options.build());
// We have to actively wait until the droplet has been provisioned until
// we can build the entire Droplet object we want to return
nodeRunningPredicate.apply(dropletCreation.getEventId());
Droplet droplet = api.getDropletApi().get(dropletCreation.getId());