if ("aws-ec2".equals(spec.getProvider()) && spec.getTemplate().getImageId() != null) {
enableAWSEC2LazyImageFetching(spec);
}
if ("stub".equals(spec.getProvider())) {
modules = ImmutableSet.<Module>of(new SLF4JLoggingModule(), new DryRunModule());
} else if ("byon".equals(spec.getProvider()) && !spec.getByonNodes().isEmpty()) {
overrideApiMetadata = new BYONApiMetadata()
.toBuilder()
.defaultModule(BYONComputeServiceContextModule.class)
.build();
modules = ImmutableSet.<Module>of(new SLF4JLoggingModule(),
new EnterpriseConfigurationModule(),
new SshjSshClientModule(),
new CacheNodeStoreModule(ImmutableMap.<String,Node>copyOf(spec.getByonNodes())));
} else {
modules = ImmutableSet.<Module>of(new SLF4JLoggingModule(),
new EnterpriseConfigurationModule(), new SshjSshClientModule());
}
}