mirror of https://github.com/apache/jclouds.git
updated delta to be consistent with ids
This commit is contained in:
parent
d169658c65
commit
99ac814d51
|
@ -42,7 +42,8 @@ public class DeltacloudImageToImage implements Function<org.jclouds.deltacloud.d
|
|||
@Override
|
||||
public Image apply(org.jclouds.deltacloud.domain.Image from) {
|
||||
ImageBuilder builder = new ImageBuilder();
|
||||
builder.ids(from.getId());
|
||||
builder.id(from.getHref().toASCIIString());
|
||||
builder.providerId(from.getId());
|
||||
builder.uri(from.getHref());
|
||||
builder.name(from.getName());
|
||||
builder.description(from.getDescription());
|
||||
|
|
|
@ -86,8 +86,8 @@ public class DeltacloudComputeServiceAdapter implements
|
|||
@Override
|
||||
public Instance createNodeWithGroupEncodedIntoNameThenStoreCredentials(String tag, String name, Template template,
|
||||
Map<String, Credentials> credentialStore) {
|
||||
Instance instance = client.createInstance(template.getImage().getId(), CreateInstanceOptions.Builder.named(name)
|
||||
.hardwareProfile(template.getHardware().getId()).realm(template.getLocation().getId()));
|
||||
Instance instance = client.createInstance(template.getImage().getProviderId(), CreateInstanceOptions.Builder
|
||||
.named(name).hardwareProfile(template.getHardware().getId()).realm(template.getLocation().getId()));
|
||||
if (instance.getAuthentication() != null && instance.getAuthentication() instanceof PasswordAuthentication) {
|
||||
Credentials creds = PasswordAuthentication.class.cast(instance.getAuthentication()).getLoginCredentials();
|
||||
// store the credentials so that later functions can use them
|
||||
|
|
|
@ -72,7 +72,7 @@ public class DeltacloudTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTe
|
|||
assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true);
|
||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "10.04");
|
||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
|
||||
assertEquals(defaultTemplate.getLocation().getId(), "us");
|
||||
assertEquals(defaultTemplate.getLocation().getId(), "http://localhost:3001/api/realms/us");
|
||||
assertEquals(getCores(defaultTemplate.getHardware()), 1.0d);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue