From 99ac814d51d49bb189b0a663a67bf7a19fe7913d Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Mon, 4 Apr 2011 03:43:53 -0700 Subject: [PATCH] updated delta to be consistent with ids --- .../deltacloud/compute/functions/DeltacloudImageToImage.java | 3 ++- .../compute/strategy/DeltacloudComputeServiceAdapter.java | 4 ++-- .../deltacloud/compute/DeltacloudTemplateBuilderLiveTest.java | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apis/deltacloud/src/main/java/org/jclouds/deltacloud/compute/functions/DeltacloudImageToImage.java b/apis/deltacloud/src/main/java/org/jclouds/deltacloud/compute/functions/DeltacloudImageToImage.java index edd28bcb1a..874ec191e6 100644 --- a/apis/deltacloud/src/main/java/org/jclouds/deltacloud/compute/functions/DeltacloudImageToImage.java +++ b/apis/deltacloud/src/main/java/org/jclouds/deltacloud/compute/functions/DeltacloudImageToImage.java @@ -42,7 +42,8 @@ public class DeltacloudImageToImage implements Function 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 diff --git a/apis/deltacloud/src/test/java/org/jclouds/deltacloud/compute/DeltacloudTemplateBuilderLiveTest.java b/apis/deltacloud/src/test/java/org/jclouds/deltacloud/compute/DeltacloudTemplateBuilderLiveTest.java index a6e4b76805..02644b9d0d 100644 --- a/apis/deltacloud/src/test/java/org/jclouds/deltacloud/compute/DeltacloudTemplateBuilderLiveTest.java +++ b/apis/deltacloud/src/test/java/org/jclouds/deltacloud/compute/DeltacloudTemplateBuilderLiveTest.java @@ -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); }