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); }