diff --git a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/EC2ComputeService.java b/aws/core/src/main/java/org/jclouds/aws/ec2/compute/EC2ComputeService.java index a5a2ad9863..2ce8810163 100644 --- a/aws/core/src/main/java/org/jclouds/aws/ec2/compute/EC2ComputeService.java +++ b/aws/core/src/main/java/org/jclouds/aws/ec2/compute/EC2ComputeService.java @@ -83,7 +83,7 @@ public class EC2ComputeService implements ComputeService { } private Map imageAmiIdMap = ImmutableMap. builder().put( - Image.UMBUNTU_90, "ami-7e28ca17").put(Image.RHEL_53, "ami-368b685f").build();// todo ami + Image.UBUNTU_90, "ami-7e28ca17").put(Image.RHEL_53, "ami-368b685f").build();// todo ami // matrix of // region // 32/64 bit @@ -107,8 +107,11 @@ public class EC2ComputeService implements ComputeService { createSecurityGroup(securityGroupName, 22, 80, 8080, 443); String script = new ScriptBuilder() // update and install jdk - .addStatement(exec("runurl run.alestic.com/apt/upgrade"))// + .addStatement(exec("apt-get update"))// + .addStatement(exec("apt-get upgrade -y"))// .addStatement(exec("apt-get install -y openjdk-6-jdk"))// + .addStatement(exec("wget -qO/usr/bin/runurl run.alestic.com/runurl"))// + .addStatement(exec("chmod 755 /usr/bin/runurl"))// .build(OsFamily.UNIX); logger.debug(">> running instance ami(%s) type(%s) keyPair(%s) securityGroup(%s)", ami, type, diff --git a/aws/demos/speedtest-sqs/src/main/java/org/jclouds/aws/sqs/SpeedTest.java b/aws/demos/speedtest-sqs/src/main/java/org/jclouds/aws/sqs/SpeedTest.java index 2859d83d9b..83fc910860 100755 --- a/aws/demos/speedtest-sqs/src/main/java/org/jclouds/aws/sqs/SpeedTest.java +++ b/aws/demos/speedtest-sqs/src/main/java/org/jclouds/aws/sqs/SpeedTest.java @@ -22,7 +22,6 @@ import static org.jclouds.aws.sqs.options.ListQueuesOptions.Builder.queuePrefix; import java.util.Set; import java.util.SortedSet; -import java.util.Map.Entry; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; @@ -33,7 +32,6 @@ import org.jclouds.enterprise.config.EnterpriseConfigurationModule; import org.jclouds.logging.config.NullLoggingModule; import org.jclouds.rest.RestContext; -import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; import com.google.common.util.concurrent.ListenableFuture; @@ -56,86 +54,78 @@ public class SpeedTest { if (args.length < PARAMETERS) throw new IllegalArgumentException(INVALID_SYNTAX); + boolean isEnterprise = System.getProperties().containsKey("jclouds.enterprise"); // Args String accesskeyid = args[0]; String secretkey = args[1]; String queueName = args[2]; int messageCount = Integer.parseInt(args[3]); - RestContext nullLoggingDefaultContext = SQSContextFactory + RestContext context = isEnterprise ? SQSContextFactory .createContext(System.getProperties(), accesskeyid, secretkey, + new NullLoggingModule(), new EnterpriseConfigurationModule()) + : SQSContextFactory.createContext(System.getProperties(), accesskeyid, secretkey, new NullLoggingModule()); - RestContext nullLoggingEnterpriseContext = SQSContextFactory - .createContext(System.getProperties(), accesskeyid, secretkey, - new NullLoggingModule(), new EnterpriseConfigurationModule()); try { Set queues = Sets.newHashSet(); - if (purgeQueues(queueName, nullLoggingDefaultContext)) { + if (purgeQueues(queueName, context)) { System.out.printf("pausing 60 seconds before recreating queues%n"); Thread.sleep(60 * 1000); } - createQueues(queueName, nullLoggingDefaultContext, queues); - runTests(messageCount, nullLoggingDefaultContext, nullLoggingEnterpriseContext, queues); + createQueues(queueName, context, queues); + runTests(messageCount, isEnterprise ? "enterprise" : "default", context, queues); } finally { - purgeQueues(queueName, nullLoggingDefaultContext); + purgeQueues(queueName, context); // Close connectons - nullLoggingDefaultContext.close(); - nullLoggingEnterpriseContext.close(); + context.close(); System.exit(0); } } - private static void runTests(int messageCount, - RestContext nullLoggingDefaultContext, - RestContext nullLoggingEnterpriseContext, Set queues) + private static void runTests(int messageCount, String contextName, + RestContext context, Set queues) throws InterruptedException { String message = "1"; long timeOut = messageCount * 200; // minimum rate should be at least 5/second - for (Entry> entry : ImmutableMap - .> of("enterprise", - nullLoggingEnterpriseContext, "default", nullLoggingDefaultContext) - .entrySet()) { - for (Queue queue : queues) { + for (Queue queue : queues) { + int complete = 0; + int errors = 0; + long start = System.currentTimeMillis(); - int complete = 0; - int errors = 0; - Set> responses = Sets.newHashSet(); - - long start = System.currentTimeMillis(); - for (int i = 0; i < messageCount; i++) { - responses.add(entry.getValue().getAsyncApi().sendMessage(queue, message)); - } - do { - Set> retries = Sets.newHashSet(); - for (ListenableFuture response : responses) { - try { - response.get(100, TimeUnit.MILLISECONDS); - complete++; - } catch (ExecutionException e) { - System.err.println(e.getMessage()); - errors++; - } catch (TimeoutException e) { - retries.add(response); - } - } - responses = Sets.newHashSet(retries); - } while (responses.size() > 0 && System.currentTimeMillis() < start + timeOut); - long duration = System.currentTimeMillis() - start; - if (duration > timeOut) - System.out.printf("TIMEOUT: context: %s, region: %s, rate: %f messages/second%n", - entry.getKey(), queue.getRegion(), ((double) complete) - / (duration / 1000.0)); - else - System.out.printf("COMPLETE: context: %s, region: %s, rate: %f messages/second%n", - entry.getKey(), queue.getRegion(), ((double) complete) - / (duration / 1000.0)); - System.out.println("pausing 5 seconds before the next run"); - System.gc(); - Thread.sleep(5000);// let the network quiet down + // fire off all the messages for the test + Set> responses = Sets.newHashSet(); + for (int i = 0; i < messageCount; i++) { + responses.add(context.getAsyncApi().sendMessage(queue, message)); } + + do { + Set> retries = Sets.newHashSet(); + for (ListenableFuture response : responses) { + try { + response.get(100, TimeUnit.MILLISECONDS); + complete++; + } catch (ExecutionException e) { + System.err.println(e.getMessage()); + errors++; + } catch (TimeoutException e) { + retries.add(response); + } + } + responses = Sets.newHashSet(retries); + } while (responses.size() > 0 && System.currentTimeMillis() < start + timeOut); + long duration = System.currentTimeMillis() - start; + if (duration > timeOut) + System.out.printf("TIMEOUT: context: %s, region: %s, rate: %f messages/second%n", + contextName, queue.getRegion(), ((double) complete) / (duration / 1000.0)); + else + System.out.printf("COMPLETE: context: %s, region: %s, rate: %f messages/second%n", + contextName, queue.getRegion(), ((double) complete) / (duration / 1000.0)); + System.gc(); + System.out.println("pausing 5 seconds before the next run"); + Thread.sleep(5000);// let the network quiet down } } diff --git a/core/src/main/java/org/jclouds/compute/domain/Image.java b/core/src/main/java/org/jclouds/compute/domain/Image.java index 9e43df6ef3..96a4388204 100644 --- a/core/src/main/java/org/jclouds/compute/domain/Image.java +++ b/core/src/main/java/org/jclouds/compute/domain/Image.java @@ -22,5 +22,5 @@ package org.jclouds.compute.domain; * @author Adrian Cole */ public enum Image { - CENTOS_53, RHEL_53, UMBUNTU_90, UMBUNTU_JEOS + CENTOS_53, RHEL_53, UBUNTU_90, UBUNTU_JEOS } \ No newline at end of file diff --git a/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/servers/RimuHostingComputeService.java b/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/servers/RimuHostingComputeService.java index cb0c96d78a..5dc8052f88 100644 --- a/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/servers/RimuHostingComputeService.java +++ b/rimuhosting/src/main/java/org/jclouds/rimuhosting/miro/servers/RimuHostingComputeService.java @@ -51,7 +51,7 @@ public class RimuHostingComputeService implements ComputeService { } private Map imageNameMap = ImmutableMap. builder().put( - Image.CENTOS_53, "centos53").put(Image.UMBUNTU_90, "ubuntu904").build(); + Image.CENTOS_53, "centos53").put(Image.UBUNTU_90, "ubuntu904").build(); private Map profileNameMap = ImmutableMap. builder().put( Profile.SMALLEST, "MIRO1B").build(); diff --git a/tools/ant-plugin/build.xml b/tools/ant-plugin/build.xml index dbc127ac3b..28653747fb 100644 --- a/tools/ant-plugin/build.xml +++ b/tools/ant-plugin/build.xml @@ -63,7 +63,7 @@ - + diff --git a/tools/antcontrib/samples/cargooverssh/build.properties.example b/tools/antcontrib/samples/cargooverssh/build.properties.example new file mode 100644 index 0000000000..7e3f6ecee4 --- /dev/null +++ b/tools/antcontrib/samples/cargooverssh/build.properties.example @@ -0,0 +1,5 @@ +host=localhost +username=${user.name} +keyfile=${user.home}/.ssh/id_dsa +account=email@registered.with.terremark.org +key=your_password diff --git a/tools/antcontrib/samples/cargooverssh/build.xml b/tools/antcontrib/samples/cargooverssh/build.xml new file mode 100644 index 0000000000..854edadf9e --- /dev/null +++ b/tools/antcontrib/samples/cargooverssh/build.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/antcontrib/src/main/java/org/jclouds/tools/ant/taskdefs/sshjava/SSHJava.java b/tools/antcontrib/src/main/java/org/jclouds/tools/ant/taskdefs/sshjava/SSHJava.java index 4e2f6a3387..b426f924aa 100644 --- a/tools/antcontrib/src/main/java/org/jclouds/tools/ant/taskdefs/sshjava/SSHJava.java +++ b/tools/antcontrib/src/main/java/org/jclouds/tools/ant/taskdefs/sshjava/SSHJava.java @@ -51,7 +51,6 @@ import org.jclouds.scriptbuilder.domain.Statement; import org.jclouds.scriptbuilder.domain.StatementList; import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; @@ -70,18 +69,21 @@ public class SSHJava extends Java { private File localDirectory; private File remotebase; private File remotedir; - private Environment env = new Environment(); + @VisibleForTesting + Environment env = new Environment(); private OsFamily osFamily = OsFamily.UNIX; private File errorFile; private String errorProperty; private File outputFile; private String outputProperty; - private String id = "javassh" + new SecureRandom().nextLong(); - + private String id = "sshjava" + new SecureRandom().nextLong(); private boolean append; + @VisibleForTesting final Map shiftMap = Maps.newHashMap(); + @VisibleForTesting + final Map replace = Maps.newHashMap(); public SSHJava() { super(); @@ -114,9 +116,12 @@ public class SSHJava extends Java { throw new BuildException(e); } } + if (remotedir == null) remotedir = new File(remotebase, id); + replace.put(localDirectory.getAbsolutePath(), remotedir.getAbsolutePath()); + if (osFamily == OsFamily.UNIX) { log("removing old contents: " + remotedir.getAbsolutePath(), Project.MSG_VERBOSE); sshexec(exec("rm -rf " + remotedir.getAbsolutePath()).render(osFamily)); @@ -266,11 +271,21 @@ public class SSHJava extends Java { } String reprefix(String in) { + log("comparing: " + in, Project.MSG_DEBUG); for (Entry entry : shiftMap.entrySet()) { - if (in.startsWith(entry.getKey())) + if (in.startsWith(entry.getKey())) { + log("match shift map: " + entry.getKey(), Project.MSG_DEBUG); in = remotebase + ShellToken.FS.to(osFamily) + entry.getValue() + in.substring(entry.getKey().length()); + } } + for (Entry entry : replace.entrySet()) { + if (in.startsWith(entry.getKey())) { + log("match replaceMap: " + entry.getKey(), Project.MSG_DEBUG); + in = entry.getValue() + in.substring(entry.getKey().length()); + } + } + log("now: " + in, Project.MSG_DEBUG); return in; } @@ -283,7 +298,7 @@ public class SSHJava extends Java { for (int i = 0; i < environment.length; i++) { log("Setting environment variable: " + environment[i], Project.MSG_DEBUG); String[] keyValue = environment[i].split("="); - envVariables.put(keyValue[0], keyValue[1]); + envVariables.put(keyValue[0], reprefix(keyValue[1])); } } @@ -296,8 +311,7 @@ public class SSHJava extends Java { if (commandLine.getVmCommand().getArguments() != null && commandLine.getVmCommand().getArguments().length > 0) { - commandBuilder.append(" ").append( - Joiner.on(' ').join(commandLine.getVmCommand().getArguments())); + reprefixArgs(commandLine.getVmCommand().getArguments(), commandBuilder); } commandBuilder.append(" -cp classpath"); resetPathToUnderPrefixIfExistsAndIsFileIfNotExistsAddAsIs(commandLine.getClasspath(), @@ -306,22 +320,38 @@ public class SSHJava extends Java { if (commandLine.getSystemProperties() != null && commandLine.getSystemProperties().getVariables() != null && commandLine.getSystemProperties().getVariables().length > 0) { - commandBuilder.append(" ").append( - Joiner.on(' ').join(commandLine.getSystemProperties().getVariables())); + reprefixValues(commandLine.getSystemProperties().getVariables(), commandBuilder); } commandBuilder.append(" ").append(commandLine.getClassname()); if (commandLine.getJavaCommand().getArguments() != null && commandLine.getJavaCommand().getArguments().length > 0) { - commandBuilder.append(" ").append( - Joiner.on(' ').join(commandLine.getJavaCommand().getArguments())); + reprefixArgs(commandLine.getJavaCommand().getArguments(), commandBuilder); } InitBuilder testInitBuilder = new InitBuilder(id, basedir, basedir, envVariables, commandBuilder.toString()); - String script = testInitBuilder.build(osFamily); - return reprefix(script); + return testInitBuilder.build(osFamily); + } + + private void reprefixValues(String[] variables, StringBuilder commandBuilder) { + for (String variable : variables) { + commandBuilder.append(" "); + String[] keyValue = variable.split("="); + if (keyValue.length == 2) { + String newVariable = keyValue[0] + '=' + reprefix(keyValue[1]); + commandBuilder.append(newVariable); + } else { + commandBuilder.append(variable); + } + } + } + + private void reprefixArgs(String[] args, StringBuilder commandBuilder) { + for (String arg : args) { + commandBuilder.append(" ").append(reprefix(arg)); + } } @Override @@ -508,8 +538,10 @@ public class SSHJava extends Java { @Override public void addSysproperty(Variable sysp) { - if (sysp.getKey().startsWith("sshjava.map.")) { - shiftMap.put(sysp.getKey().replaceFirst("sshjava.map.", ""), sysp.getValue()); + if (sysp.getKey().startsWith("sshjava.shift.")) { + shiftMap.put(sysp.getKey().replaceFirst("sshjava.shift.", ""), sysp.getValue()); + } else if (sysp.getKey().startsWith("sshjava.replace.")) { + replace.put(sysp.getKey().replaceFirst("sshjava.replace.", ""), sysp.getValue()); } else if (sysp.getKey().equals("sshjava.id")) { setId(sysp.getValue()); } else if (sysp.getKey().equals("sshjava.remotebase")) { diff --git a/tools/antcontrib/src/test/java/org/jclouds/tools/ant/taskdefs/sshjava/SSHJavaTest.java b/tools/antcontrib/src/test/java/org/jclouds/tools/ant/taskdefs/sshjava/SSHJavaTest.java index 067b3de85d..4ba2017634 100644 --- a/tools/antcontrib/src/test/java/org/jclouds/tools/ant/taskdefs/sshjava/SSHJavaTest.java +++ b/tools/antcontrib/src/test/java/org/jclouds/tools/ant/taskdefs/sshjava/SSHJavaTest.java @@ -32,11 +32,15 @@ import org.apache.tools.ant.taskdefs.Java; import org.apache.tools.ant.types.Environment; import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.Environment.Variable; +import org.jclouds.scriptbuilder.domain.OsFamily; import org.jclouds.tools.ant.TestClass; import org.testng.annotations.Test; +import com.google.common.base.Charsets; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; +import com.google.common.io.CharStreams; +import com.google.common.io.Resources; /** * @author Adrian Cole @@ -47,11 +51,17 @@ public class SSHJavaTest { .entrySet()); // TODO, this test will break in windows - public void testShift() throws SecurityException, NoSuchMethodException { + @Test(enabled = false, groups = { "live" }) + public void testShift() throws SecurityException, NoSuchMethodException, IOException { SSHJava task = makeSSHJava(); task = directoryShift(task); assertEquals(task.shiftMap, ImmutableMap. of(System.getProperty("user.home") + "/apache-maven-2.2.1", "maven")); + assertEquals(task.replace, ImmutableMap. of(System.getProperty("user.name"), + "root")); + assertEquals(task.createInitScript(OsFamily.UNIX, "1", "remotedir", task.env, task + .getCommandLine()), CharStreams.toString(Resources.newReaderSupplier(Resources + .getResource("init.sh"), Charsets.UTF_8))); } private Java populateTask(Java task) { @@ -155,7 +165,7 @@ public class SSHJavaTest { private T directoryShift(T java) { Variable prop1 = new Environment.Variable(); - prop1.setKey("sshjava.map." + System.getProperty("user.home") + "/apache-maven-2.2.1"); + prop1.setKey("sshjava.shift." + System.getProperty("user.home") + "/apache-maven-2.2.1"); prop1.setValue("maven"); java.addSysproperty(prop1); Variable prop2 = new Environment.Variable(); @@ -166,6 +176,14 @@ public class SSHJavaTest { prop3.setKey("appHome"); prop3.setValue(System.getProperty("user.home") + "/apache-maven-2.2.1"); java.addSysproperty(prop3); + Variable prop4 = new Environment.Variable(); + prop4.setKey("sshjava.replace." + System.getProperty("user.name")); + prop4.setValue("root"); + java.addSysproperty(prop4); + Variable prop5 = new Environment.Variable(); + prop5.setKey("username"); + prop5.setValue(System.getProperty("user.name")); + java.addSysproperty(prop5); return java; } } diff --git a/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudComputeClient.java b/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudComputeClient.java index a32ae6fd11..d0a58b7531 100644 --- a/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudComputeClient.java +++ b/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudComputeClient.java @@ -56,8 +56,8 @@ public class VCloudComputeClient { } private Map imageCatalogIdMap = ImmutableMap. builder().put( - Image.CENTOS_53, "3").put(Image.RHEL_53, "8").put(Image.UMBUNTU_90, "10").put( - Image.UMBUNTU_JEOS, "11").build(); + Image.CENTOS_53, "3").put(Image.RHEL_53, "8").put(Image.UBUNTU_90, "10").put( + Image.UBUNTU_JEOS, "11").build(); public Map start(String name, Image image, int minCores, int minMegs, long diskSize, Map properties) { diff --git a/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudComputeClientLiveTest.java b/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudComputeClientLiveTest.java index 7de7a2a9b0..d0853efa1f 100644 --- a/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudComputeClientLiveTest.java +++ b/vcloud/core/src/test/java/org/jclouds/vcloud/VCloudComputeClientLiveTest.java @@ -76,8 +76,8 @@ public class VCloudComputeClientLiveTest { new Expectation(4194304 / 2 * 10, "Red Hat Enterprise Linux 5 (64-bit)")).put( Image.RHEL_53, new Expectation(4194304 / 2 * 10, "Red Hat Enterprise Linux 5 (64-bit)")).put( - Image.UMBUNTU_90, new Expectation(4194304, "Ubuntu Linux (64-bit)")).put( - Image.UMBUNTU_JEOS, new Expectation(4194304, "Ubuntu Linux (32-bit)")).build(); + Image.UBUNTU_90, new Expectation(4194304, "Ubuntu Linux (64-bit)")).put( + Image.UBUNTU_JEOS, new Expectation(4194304, "Ubuntu Linux (32-bit)")).build(); private Predicate addressTester; diff --git a/vcloud/hostingdotcom/src/main/java/org/jclouds/vcloud/hostingdotcom/compute/HostingDotComVCloudComputeClient.java b/vcloud/hostingdotcom/src/main/java/org/jclouds/vcloud/hostingdotcom/compute/HostingDotComVCloudComputeClient.java index 68c461cc74..4b50e78740 100644 --- a/vcloud/hostingdotcom/src/main/java/org/jclouds/vcloud/hostingdotcom/compute/HostingDotComVCloudComputeClient.java +++ b/vcloud/hostingdotcom/src/main/java/org/jclouds/vcloud/hostingdotcom/compute/HostingDotComVCloudComputeClient.java @@ -58,8 +58,8 @@ public class HostingDotComVCloudComputeClient { } private Map imageCatalogIdMap = ImmutableMap. builder().put( - Image.CENTOS_53, "3").put(Image.RHEL_53, "8").put(Image.UMBUNTU_90, "10").put( - Image.UMBUNTU_JEOS, "11").build(); + Image.CENTOS_53, "3").put(Image.RHEL_53, "8").put(Image.UBUNTU_90, "10").put( + Image.UBUNTU_JEOS, "11").build(); public Map start(String name, Image image, int minCores, int minMegs, long diskSize, Map properties) { diff --git a/vcloud/hostingdotcom/src/test/java/org/jclouds/vcloud/hostingdotcom/compute/HostingDotComVCloudComputeClientLiveTest.java b/vcloud/hostingdotcom/src/test/java/org/jclouds/vcloud/hostingdotcom/compute/HostingDotComVCloudComputeClientLiveTest.java index 4cb66a93a7..42caf61df1 100644 --- a/vcloud/hostingdotcom/src/test/java/org/jclouds/vcloud/hostingdotcom/compute/HostingDotComVCloudComputeClientLiveTest.java +++ b/vcloud/hostingdotcom/src/test/java/org/jclouds/vcloud/hostingdotcom/compute/HostingDotComVCloudComputeClientLiveTest.java @@ -78,8 +78,8 @@ public class HostingDotComVCloudComputeClientLiveTest { new Expectation(4194304 / 2 * 10, "Red Hat Enterprise Linux 5 (64-bit)")).put( Image.RHEL_53, new Expectation(4194304 / 2 * 10, "Red Hat Enterprise Linux 5 (64-bit)")).put( - Image.UMBUNTU_90, new Expectation(4194304, "Ubuntu Linux (64-bit)")).put( - Image.UMBUNTU_JEOS, new Expectation(4194304, "Ubuntu Linux (32-bit)")).build(); + Image.UBUNTU_90, new Expectation(4194304, "Ubuntu Linux (64-bit)")).put( + Image.UBUNTU_JEOS, new Expectation(4194304, "Ubuntu Linux (32-bit)")).build(); private Predicate addressTester; diff --git a/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/compute/TerremarkVCloudComputeClient.java b/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/compute/TerremarkVCloudComputeClient.java index 85d5661853..05900d57db 100644 --- a/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/compute/TerremarkVCloudComputeClient.java +++ b/vcloud/terremark/src/main/java/org/jclouds/vcloud/terremark/compute/TerremarkVCloudComputeClient.java @@ -66,8 +66,8 @@ public class TerremarkVCloudComputeClient { } private Map imageCatalogIdMap = ImmutableMap. builder().put( - Image.CENTOS_53, "6").put(Image.RHEL_53, "8").put(Image.UMBUNTU_90, "10").put( - Image.UMBUNTU_JEOS, "11").build(); + Image.CENTOS_53, "6").put(Image.RHEL_53, "8").put(Image.UBUNTU_90, "10").put( + Image.UBUNTU_JEOS, "11").build(); public String start(String name, Image image, int minCores, int minMegs, Map properties) { diff --git a/vcloud/terremark/src/test/java/org/jclouds/vcloud/terremark/compute/TerremarkVCloudComputeClientLiveTest.java b/vcloud/terremark/src/test/java/org/jclouds/vcloud/terremark/compute/TerremarkVCloudComputeClientLiveTest.java index f3532b44bb..7711ac0d55 100644 --- a/vcloud/terremark/src/test/java/org/jclouds/vcloud/terremark/compute/TerremarkVCloudComputeClientLiveTest.java +++ b/vcloud/terremark/src/test/java/org/jclouds/vcloud/terremark/compute/TerremarkVCloudComputeClientLiveTest.java @@ -76,8 +76,8 @@ public class TerremarkVCloudComputeClientLiveTest { private Map expectationMap = ImmutableMap. builder() .put(Image.CENTOS_53, new Expectation(10485760, "Red Hat Enterprise Linux 5 (64-bit)")) .put(Image.RHEL_53, new Expectation(10485760, "Red Hat Enterprise Linux 5 (64-bit)")) - .put(Image.UMBUNTU_90, new Expectation(4194304, "Ubuntu Linux (64-bit)")).put( - Image.UMBUNTU_JEOS, new Expectation(4194304, "Ubuntu Linux (32-bit)")).build(); + .put(Image.UBUNTU_90, new Expectation(4194304, "Ubuntu Linux (64-bit)")).put( + Image.UBUNTU_JEOS, new Expectation(4194304, "Ubuntu Linux (32-bit)")).build(); private Predicate addressTester;