return newNode;
}
public ComputeService getComputeService(ConnectionResponseDTO cloud) {
CloudProvider provider = (CloudProvider) ConnectionUtils.getProviderFromId(CloudProvider.TYPE,
cloud.getProviderId());
Properties overrides = new Properties();
// Choose from only Amazon provided AMIs
overrides.setProperty(AWSEC2Constants.PROPERTY_EC2_AMI_QUERY,
"owner-id=137112412989;state=available;image-type=machine");
overrides.setProperty(AWSEC2Constants.PROPERTY_EC2_CC_AMI_QUERY, "");
// Inject the SSH implementation
Iterable<Module> modules = ImmutableSet.<Module>of(new SshjSshClientModule());
return new ComputeServiceContextFactory().createContext(provider.getComputeId(),
cloudProperties.getString("nodeable.aws.accessKeyId"), cloudProperties.getString("nodeable.aws.secretKey"), modules,
overrides).getComputeService();
}