formatting

git-svn-id: http://jclouds.googlecode.com/svn/trunk@2655 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
adrian.f.cole 2010-01-14 20:40:39 +00:00
parent 2e138bebe3
commit 63073ae3f4
1 changed files with 8 additions and 9 deletions

View File

@ -199,15 +199,14 @@ public class EBSBootEC2ClientLiveTest {
while (instance == null) {
try {
System.out.printf("%d: running instance%n", System.currentTimeMillis());
instance = client.getInstanceServices().runInstancesInRegion(
Region.DEFAULT,
null,
imageId,
1,
1,
withKeyName(keyPair.getKeyName()).asType(InstanceType.M1_SMALL)
.withSecurityGroup(securityGroupName)).getRunningInstances()
.iterator().next();
Reservation reservation = client.getInstanceServices().runInstancesInRegion(
Region.DEFAULT, null, // allow ec2 to chose an availability zone
imageId, 1, // minimum instances
1, // maximum instances
withKeyName(keyPair.getKeyName())// key I created above
.asType(InstanceType.M1_SMALL)// smallest instance size
.withSecurityGroup(securityGroupName));// group I created above
instance = Iterables.getOnlyElement(reservation.getRunningInstances());
} catch (HttpResponseException htpe) {
if (htpe.getResponse().getStatusCode() == 400)
continue;