mirror of https://github.com/apache/jclouds.git
fixed poms
This commit is contained in:
commit
b1c146b5b0
|
@ -27,6 +27,7 @@ import java.util.Properties;
|
|||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
import org.jclouds.aws.ec2.domain.InstanceType;
|
||||
import org.jclouds.aws.ec2.reference.EC2Constants;
|
||||
import org.jclouds.compute.ComputeServiceContext;
|
||||
import org.jclouds.compute.ComputeServiceContextFactory;
|
||||
|
@ -55,8 +56,28 @@ public class EC2TemplateBuilderLiveTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testTemplateBuilderCanUseImageId() {
|
||||
// TODO
|
||||
public void testTemplateBuilderCanUseImageIdAndSizeId() {
|
||||
ComputeServiceContext newContext = null;
|
||||
try {
|
||||
newContext = new ComputeServiceContextFactory().createContext("ec2", user, password, ImmutableSet
|
||||
.of(new Log4JLoggingModule()));
|
||||
|
||||
Template template = newContext.getComputeService().templateBuilder().imageId("us-east-1/ami-ccb35ea5").sizeId(InstanceType.M2_2XLARGE).build();
|
||||
|
||||
System.out.println(template.getImage());
|
||||
assert (template.getImage().getProviderId().startsWith("ami-")) : template;
|
||||
assertEquals(template.getImage().getOperatingSystem().getVersion(), "5.4");
|
||||
assertEquals(template.getImage().getOperatingSystem().is64Bit(), true);
|
||||
assertEquals(template.getImage().getOperatingSystem().getFamily(), OsFamily.CENTOS);
|
||||
assertEquals(template.getImage().getVersion(), "4.4.10");
|
||||
assertEquals(template.getLocation().getId(), "us-east-1");
|
||||
assertEquals(template.getSize().getCores(), 13.0d); // because it is m2 2xl
|
||||
assertEquals(template.getSize().getId(), InstanceType.M2_2XLARGE);
|
||||
|
||||
} finally {
|
||||
if (newContext != null)
|
||||
newContext.close();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<uniqueVersion>false</uniqueVersion>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>jclouds-rimu-snapshots-nexus</id>
|
||||
<id>jclouds-snapshots</id>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
|
|
@ -27,21 +27,21 @@
|
|||
|
||||
<mkdir dir="build" />
|
||||
|
||||
<get src="http://apache.imghat.com/maven/binaries/maven-ant-tasks-2.1.0.jar" dest="build/maven-ant-tasks-2.1.0.jar"/>
|
||||
<get src="http://opensource.become.com/apache//maven/binaries/maven-ant-tasks-2.1.1.jar" dest="build/maven-ant-tasks.jar"/>
|
||||
|
||||
<input
|
||||
message="Which service would you like to use (ec2, cloudservers, vcloud, terremark, rimuhosting)?"
|
||||
validargs="ec2,cloudservers,vcloud,terremark,rimuhosting"
|
||||
addproperty="service"
|
||||
message="Which provider would you like to use (ec2, cloudservers, vcloud, terremark, rimuhosting)?"
|
||||
validargs="ec2,cloudservers,vcloud,trmk-ecloud,trmk-vcloudexpress,ibmdev,eucalyptus,bluelock-vcloudexpress,bluelock-vclouddirector,gogrid,rimuhosting"
|
||||
addproperty="provider"
|
||||
/>
|
||||
|
||||
<input
|
||||
message="Which driver does ${service} use?"
|
||||
message="Which driver does ${provider} use?"
|
||||
validargs="aws,rackspace,vcloud,bluelock,gogrid,terremark,rimuhosting"
|
||||
addproperty="driver"
|
||||
/>
|
||||
|
||||
<path id="maven-ant-tasks.classpath" path="build/maven-ant-tasks-2.1.0.jar" />
|
||||
<path id="maven-ant-tasks.classpath" path="build/maven-ant-tasks.jar" />
|
||||
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.classpath" />
|
||||
|
||||
<artifact:localRepository id="local.repository" path="${user.home}/.m2/repository" />
|
||||
|
@ -59,16 +59,16 @@
|
|||
<typedef name="compute" classname="org.jclouds.tools.ant.taskdefs.compute.ComputeTask" classpathref="jclouds.classpath" />
|
||||
|
||||
<input
|
||||
message="What is your account on ${service}?"
|
||||
addproperty="account"
|
||||
message="What is your identity on ${provider}?"
|
||||
addproperty="identity"
|
||||
/>
|
||||
|
||||
<input
|
||||
message="What is the key for ${account}?"
|
||||
addproperty="key"
|
||||
message="What is the credential for ${identity}?"
|
||||
addproperty="credential"
|
||||
/>
|
||||
|
||||
<property name="jclouds.compute.url" value="compute://${account}:${key}@${service}" />
|
||||
<property name="jclouds.compute.url" value="compute://${identity}:${credential}@${provider}" />
|
||||
|
||||
<target name="list" description="list the identity of all nodes">
|
||||
<compute actions="list" provider="${jclouds.compute.url}" />
|
||||
|
|
Loading…
Reference in New Issue