added constant for image-id

This commit is contained in:
Adrian Cole 2012-01-06 09:51:36 -08:00
parent 013c0eaf83
commit 29f32cc6c2
2 changed files with 5 additions and 1 deletions

View File

@ -176,7 +176,7 @@ public abstract class BaseComputeServiceContextModule extends AbstractModule {
template = provideTemplate(injector, template);
String imageId = config.apply(provider + ".image-id");
if (imageId == null)
imageId = config.apply("jclouds.image-id");
imageId = config.apply(ComputeServiceConstants.PROPERTY_IMAGE_ID);
if (imageId != null)
template.imageId(imageId);
return template;

View File

@ -39,6 +39,10 @@ public interface ComputeServiceConstants {
public static final String PROPERTY_INIT_STATUS_INITIAL_PERIOD = "jclouds.compute.init-status.initial-period";
public static final String PROPERTY_INIT_STATUS_MAX_PERIOD = "jclouds.compute.init-status.max-period";
/**
* overrides the image specified in the subclass of {@link BaseComputeServiceContextModule#provideTemplate}
*/
public static final String PROPERTY_IMAGE_ID = "jclouds.image-id";
/**
* comma-separated nodes that we shouldn't attempt to list as they are dead