mirror of
https://github.com/apache/jclouds.git
synced 2025-02-17 15:35:44 +00:00
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.ExecutionException;
|
||||||
import java.util.concurrent.TimeoutException;
|
import java.util.concurrent.TimeoutException;
|
||||||
|
|
||||||
|
import org.jclouds.aws.ec2.domain.InstanceType;
|
||||||
import org.jclouds.aws.ec2.reference.EC2Constants;
|
import org.jclouds.aws.ec2.reference.EC2Constants;
|
||||||
import org.jclouds.compute.ComputeServiceContext;
|
import org.jclouds.compute.ComputeServiceContext;
|
||||||
import org.jclouds.compute.ComputeServiceContextFactory;
|
import org.jclouds.compute.ComputeServiceContextFactory;
|
||||||
@ -55,8 +56,28 @@ public class EC2TemplateBuilderLiveTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testTemplateBuilderCanUseImageId() {
|
public void testTemplateBuilderCanUseImageIdAndSizeId() {
|
||||||
// TODO
|
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
|
@Test
|
||||||
|
2
thirdparty/pom.xml
vendored
2
thirdparty/pom.xml
vendored
@ -42,7 +42,7 @@
|
|||||||
<uniqueVersion>false</uniqueVersion>
|
<uniqueVersion>false</uniqueVersion>
|
||||||
</repository>
|
</repository>
|
||||||
<snapshotRepository>
|
<snapshotRepository>
|
||||||
<id>jclouds-rimu-snapshots-nexus</id>
|
<id>jclouds-snapshots</id>
|
||||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||||
</snapshotRepository>
|
</snapshotRepository>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
|
@ -27,21 +27,21 @@
|
|||||||
|
|
||||||
<mkdir dir="build" />
|
<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
|
<input
|
||||||
message="Which service would you like to use (ec2, cloudservers, vcloud, terremark, rimuhosting)?"
|
message="Which provider would you like to use (ec2, cloudservers, vcloud, terremark, rimuhosting)?"
|
||||||
validargs="ec2,cloudservers,vcloud,terremark,rimuhosting"
|
validargs="ec2,cloudservers,vcloud,trmk-ecloud,trmk-vcloudexpress,ibmdev,eucalyptus,bluelock-vcloudexpress,bluelock-vclouddirector,gogrid,rimuhosting"
|
||||||
addproperty="service"
|
addproperty="provider"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
message="Which driver does ${service} use?"
|
message="Which driver does ${provider} use?"
|
||||||
validargs="aws,rackspace,vcloud,bluelock,gogrid,terremark,rimuhosting"
|
validargs="aws,rackspace,vcloud,bluelock,gogrid,terremark,rimuhosting"
|
||||||
addproperty="driver"
|
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" />
|
<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" />
|
<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" />
|
<typedef name="compute" classname="org.jclouds.tools.ant.taskdefs.compute.ComputeTask" classpathref="jclouds.classpath" />
|
||||||
|
|
||||||
<input
|
<input
|
||||||
message="What is your account on ${service}?"
|
message="What is your identity on ${provider}?"
|
||||||
addproperty="account"
|
addproperty="identity"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
message="What is the key for ${account}?"
|
message="What is the credential for ${identity}?"
|
||||||
addproperty="key"
|
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">
|
<target name="list" description="list the identity of all nodes">
|
||||||
<compute actions="list" provider="${jclouds.compute.url}" />
|
<compute actions="list" provider="${jclouds.compute.url}" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user