You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Andrew Bayer <no...@github.com> on 2014/02/04 19:56:16 UTC

[jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Note - no live test for this, because it&#39;s very hard to guarantee a
situation where it would be relevant.
You can merge this Pull Request by running:

  git pull https://github.com/abayer/jclouds-1 jclouds-450

Or you can view, comment on it, or merge it online at:

  https://github.com/jclouds/jclouds/pull/277

-- Commit Summary --

  * JCLOUDS-450. Adding support for EC2 MaxCount option.

-- File Changes --

    M apis/ec2/src/main/java/org/jclouds/ec2/compute/options/EC2TemplateOptions.java (27)
    M apis/ec2/src/main/java/org/jclouds/ec2/compute/strategy/EC2CreateNodesInGroupThenAddToSet.java (74)
    M apis/ec2/src/test/java/org/jclouds/ec2/compute/EC2ComputeServiceExpectTest.java (106)
    M apis/ec2/src/test/java/org/jclouds/ec2/compute/internal/BaseEC2ComputeServiceExpectTest.java (62)
    M apis/ec2/src/test/java/org/jclouds/ec2/compute/options/EC2TemplateOptionsTest.java (30)
    M apis/ec2/src/test/java/org/jclouds/ec2/compute/strategy/EC2CreateNodesInGroupThenAddToSetTest.java (41)
    A apis/ec2/src/test/resources/describe_instances_three_ids.xml (74)
    A apis/ec2/src/test/resources/run_instances_three.xml (74)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/277.patch
https://github.com/jclouds/jclouds/pull/277.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #567](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/567/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277#issuecomment-34123917

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Bayer <no...@github.com>.
>        int countStarted = 0;
>        int tries = 0;
>        Set<RunningInstance> started = ImmutableSet.<RunningInstance> of();
>  
> +      int maxCount = EC2TemplateOptions.class.cast(template.getOptions()).getMaxCount();
> +      int provCount;

Okiedokie.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9472320

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Bayer <no...@github.com>.
> @@ -200,6 +213,16 @@ public EC2TemplateOptions blockDeviceMappings(Iterable<? extends BlockDeviceMapp
>        return this;
>     }
>  
> +   public EC2TemplateOptions maxCount(Integer maxCount) {
> +      this.maxCount = maxCount;

Not really. If we get null or 0, we just ignore the value anyway.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9471959

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Bayer <no...@github.com>.
> @@ -41,12 +34,15 @@
>  import org.jclouds.ec2.options.RunInstancesOptions;
>  import org.jclouds.javax.annotation.Nullable;
>  
> -import com.google.common.annotations.VisibleForTesting;
> -import com.google.common.base.Function;
> -import com.google.common.cache.LoadingCache;
> -import com.google.common.collect.ImmutableSet;
> -import com.google.common.collect.ImmutableSet.Builder;
> -import com.google.inject.Inject;
> +import javax.inject.Named;
> +import javax.inject.Provider;
> +import javax.inject.Singleton;
> +import java.util.Set;
> +import java.util.concurrent.ConcurrentMap;
> +
> +import static com.google.common.base.Preconditions.*;
> +import static org.jclouds.ssh.SshKeys.fingerprintPrivateKey;
> +import static org.jclouds.ssh.SshKeys.sha1PrivateKey;

My intellij setup went weird. Fixing.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9471795

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Phillips <no...@github.com>.
> @@ -200,6 +213,16 @@ public EC2TemplateOptions blockDeviceMappings(Iterable<? extends BlockDeviceMapp
>        return this;
>     }
>  
> +   public EC2TemplateOptions maxCount(Integer maxCount) {
> +      this.maxCount = maxCount;

Any checks needed? Not null or `> 0`?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9452237

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds #803](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/803/) UNSTABLE
Looks like there's a problem with this pull request
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277#issuecomment-34098313

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #576](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/576/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277#issuecomment-34230626

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Phillips <no...@github.com>.
>        int countStarted = 0;
>        int tries = 0;
>        Set<RunningInstance> started = ImmutableSet.<RunningInstance> of();
>  
> +      int maxCount = EC2TemplateOptions.class.cast(template.getOptions()).getMaxCount();
> +      int provCount;

Could you call it `countInstancesToProvision` (urgh) or `countToProvision` or something like that? Thanks for the explanation - makes more sense now.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9472077

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Jeremy Daggett <no...@github.com>.
@abayer Is this ready to be merged?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277#issuecomment-47951576

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Phillips <no...@github.com>.
> @@ -41,12 +34,15 @@
>  import org.jclouds.ec2.options.RunInstancesOptions;
>  import org.jclouds.javax.annotation.Nullable;
>  
> -import com.google.common.annotations.VisibleForTesting;
> -import com.google.common.base.Function;
> -import com.google.common.cache.LoadingCache;
> -import com.google.common.collect.ImmutableSet;
> -import com.google.common.collect.ImmutableSet.Builder;
> -import com.google.inject.Inject;
> +import javax.inject.Named;
> +import javax.inject.Provider;
> +import javax.inject.Singleton;
> +import java.util.Set;
> +import java.util.concurrent.ConcurrentMap;
> +
> +import static com.google.common.base.Preconditions.*;
> +import static org.jclouds.ssh.SshKeys.fingerprintPrivateKey;
> +import static org.jclouds.ssh.SshKeys.sha1PrivateKey;

Intentional import re-ordering?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9452260

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Bayer <no...@github.com>.
> -import com.google.common.util.concurrent.ListenableFuture;
> +import javax.annotation.Resource;
> +import javax.inject.Inject;
> +import javax.inject.Named;
> +import javax.inject.Singleton;
> +import java.util.Map;
> +import java.util.Set;
> +import java.util.concurrent.atomic.AtomicReference;
> +
> +import static com.google.common.base.Preconditions.checkNotNull;
> +import static com.google.common.collect.Iterables.*;
> +import static com.google.common.collect.Sets.difference;
> +import static com.google.common.util.concurrent.Atomics.newReference;
> +import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_RUNNING;
> +import static org.jclouds.compute.functions.DefaultCredentialsFromImageOrOverridingCredentials.overrideDefaultCredentialsWithOptionsIfPresent;
> +import static org.jclouds.ec2.compute.util.EC2ComputeUtils.getZoneFromLocationOrNull;

See above, fixing.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9471826

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Phillips <no...@github.com>.
> @@ -82,6 +82,10 @@ public void copyTo(TemplateOptions to) {
>              eTo.noKeyPair();
>           if (getUserData() != null)
>              eTo.userData(getUserData());
> +         if (getMaxCount() != 0)

Do we need a null check here too, or can this never be null?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9452226

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #1032](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/1032/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277#issuecomment-34097540

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Bayer <no...@github.com>.
> @@ -122,6 +131,10 @@ public ToStringHelper string() {
>        ImmutableSet<BlockDeviceMapping> mappings = blockDeviceMappings.build();
>        if (mappings.size() != 0)
>           toString.add("blockDeviceMappings", mappings);
> +      if (maxCount != null)

Ah, gotcha. Not sure how much of an actual difference it'll make here in the toString method, but ok!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9472256

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Bayer <no...@github.com>.
> @@ -145,6 +145,15 @@ public RunInstancesOptions withBlockDeviceMappings(Set<? extends BlockDeviceMapp
>        return this;
>     }
>  
> +   /**
> +    * Specifies the optional ClientToken field, which triggers idempotent RunInstances calls.
> +    * See <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">here</a> for more details.
> +    */
> +   public RunInstancesOptions withClientToken(String clientToken) {
> +      formParameters.put("ClientToken", checkNotNull(clientToken, "clientToken"));

Yup.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9471998

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds #815](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/815/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277#issuecomment-34240769

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Bayer <no...@github.com>.
Oops, buggered that up. Fix incoming momentarily.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277#issuecomment-34094807

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #1039](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/1039/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277#issuecomment-34123923

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Phillips <no...@github.com>.
>        int countStarted = 0;
>        int tries = 0;
>        Set<RunningInstance> started = ImmutableSet.<RunningInstance> of();
>  
> +      int maxCount = EC2TemplateOptions.class.cast(template.getOptions()).getMaxCount();
> +      int provCount;

What is "provCount" supposed to stand for? Was just trying to figure out the logic for setting it below... ;-)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9452284

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #578](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/578/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277#issuecomment-34236066

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #1050](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/1050/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277#issuecomment-34236148

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Phillips <no...@github.com>.
> @@ -285,4 +279,36 @@ public void testinboundPortsStatic() {
>        assertEquals(options.getInboundPorts()[0], 22);
>        assertEquals(options.getInboundPorts()[1], 30);
>     }
> +
> +   @Test
> +   public void testMaxCountDefault() {
> +      EC2TemplateOptions options = new EC2TemplateOptions();
> +      assertEquals(options.getMaxCount(), 0);
> +   }
> +
> +   @Test
> +   public void testMaxCount() {
> +      EC2TemplateOptions options = new EC2TemplateOptions();
> +      options.maxCount(2);
> +      assertEquals(options.getMaxCount(), 2);
> +   }

Seeing the NPE test for client token below, also add a test here to show null -> 0 for maxCount?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9452344

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Bayer <no...@github.com>.
> @@ -285,4 +279,36 @@ public void testinboundPortsStatic() {
>        assertEquals(options.getInboundPorts()[0], 22);
>        assertEquals(options.getInboundPorts()[1], 30);
>     }
> +
> +   @Test
> +   public void testMaxCountDefault() {
> +      EC2TemplateOptions options = new EC2TemplateOptions();
> +      assertEquals(options.getMaxCount(), 0);
> +   }
> +
> +   @Test
> +   public void testMaxCount() {
> +      EC2TemplateOptions options = new EC2TemplateOptions();
> +      options.maxCount(2);
> +      assertEquals(options.getMaxCount(), 2);
> +   }

That's kind of implicit in testMaxCountDefault(), isn't it?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9472022

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Bayer <no...@github.com>.
>        int countStarted = 0;
>        int tries = 0;
>        Set<RunningInstance> started = ImmutableSet.<RunningInstance> of();
>  
> +      int maxCount = EC2TemplateOptions.class.cast(template.getOptions()).getMaxCount();
> +      int provCount;

Provision count. Shorthand I end up using in my own tooling. =) Basically, the minimum number of instances to provision in this call - trying to retain backwards compat in case someone actually deliberately relies on the old behavior.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9471991

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Phillips <no...@github.com>.
> -
> -import javax.annotation.Resource;
> -import javax.inject.Inject;
> -import javax.inject.Named;
> -import javax.inject.Singleton;
> -
> +import com.google.common.annotations.VisibleForTesting;
> +import com.google.common.base.Function;
> +import com.google.common.base.Optional;
> +import com.google.common.base.Predicate;
> +import com.google.common.cache.LoadingCache;
> +import com.google.common.collect.ImmutableMap;
> +import com.google.common.collect.ImmutableSet;
> +import com.google.common.collect.Maps;
> +import com.google.common.collect.Multimap;
> +import com.google.common.util.concurrent.ListenableFuture;

Intentional import re-ordering?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9452263

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Everett Toews <no...@github.com>.
During release week we like to do a little house cleaning in the jclouds world. That means sweeping out the pull request queue.

This PR is *almost* over 6 months old. Please update us on its status here. If we don't hear anything, we will take that as lazy consensus that the PR is no longer relevant and it will be closed on Friday, Aug 8.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277#issuecomment-50782586

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Bayer <no...@github.com>.
> @@ -82,6 +82,10 @@ public void copyTo(TemplateOptions to) {
>              eTo.noKeyPair();
>           if (getUserData() != null)
>              eTo.userData(getUserData());
> +         if (getMaxCount() != 0)

No - to save an intValue call in a bunch of places, I have getMaxCount() return an int, 0 if maxCount is null.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9471924

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Phillips <no...@github.com>.
> @@ -285,4 +279,36 @@ public void testinboundPortsStatic() {
>        assertEquals(options.getInboundPorts()[0], 22);
>        assertEquals(options.getInboundPorts()[1], 30);
>     }
> +
> +   @Test
> +   public void testMaxCountDefault() {
> +      EC2TemplateOptions options = new EC2TemplateOptions();
> +      assertEquals(options.getMaxCount(), 0);
> +   }
> +
> +   @Test
> +   public void testMaxCount() {
> +      EC2TemplateOptions options = new EC2TemplateOptions();
> +      options.maxCount(2);
> +      assertEquals(options.getMaxCount(), 2);
> +   }

> That's kind of implicit in testMaxCountDefault(), isn't it?

I see what you mean, but there's a difference between just seeing what happens if the user does _nothing_ vs. when the user explicitly tries to set `null`. After all, in the latter case we could throw an NPE. But also fine with not adding a test case if you feel it's unnecessary.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9472208

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Phillips <no...@github.com>.
> @@ -122,6 +131,10 @@ public ToStringHelper string() {
>        ImmutableSet<BlockDeviceMapping> mappings = blockDeviceMappings.build();
>        if (mappings.size() != 0)
>           toString.add("blockDeviceMappings", mappings);
> +      if (maxCount != null)

Do we need a `> 0` check here..?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9452232

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Bayer <no...@github.com>.
> @@ -122,6 +131,10 @@ public ToStringHelper string() {
>        ImmutableSet<BlockDeviceMapping> mappings = blockDeviceMappings.build();
>        if (mappings.size() != 0)
>           toString.add("blockDeviceMappings", mappings);
> +      if (maxCount != null)

Yeah, it's a bit confusing - maxCount is an Integer, but getMaxCount() returns an int.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9471940

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #561](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/561/) UNSTABLE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277#issuecomment-34096498

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #1038](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/1038/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277#issuecomment-34122543

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Bayer <no...@github.com>.
> @@ -82,6 +82,10 @@ public void copyTo(TemplateOptions to) {
>              eTo.noKeyPair();
>           if (getUserData() != null)
>              eTo.userData(getUserData());
> +         if (getMaxCount() != 0)

Changing this to > 0 to deal with the below.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9472292

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #562](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/562/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277#issuecomment-34097422

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Bayer <no...@github.com>.
> -
> -import javax.annotation.Resource;
> -import javax.inject.Inject;
> -import javax.inject.Named;
> -import javax.inject.Singleton;
> -
> +import com.google.common.annotations.VisibleForTesting;
> +import com.google.common.base.Function;
> +import com.google.common.base.Optional;
> +import com.google.common.base.Predicate;
> +import com.google.common.cache.LoadingCache;
> +import com.google.common.collect.ImmutableMap;
> +import com.google.common.collect.ImmutableSet;
> +import com.google.common.collect.Maps;
> +import com.google.common.collect.Multimap;
> +import com.google.common.util.concurrent.ListenableFuture;

See above. Fixing.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9471807

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Phillips <no...@github.com>.
> jclouds-java-7-pull-requests #1048 UNSTABLE

[Test failure](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/org.apache.jclouds$jclouds-compute/1048/testReport/junit/org.jclouds.compute.util/ConcurrentOpenSocketFinderTest/testChecksSocketsConcurrently/) is unrelated. There is one new Checkstyle warning, though: an [import](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/1048/org.apache.jclouds.api$ec2/violations/file/src/test/java/org/jclouds/ec2/options/RunInstancesOptionsTest.java/) in RunInstancesOptionsTest.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277#issuecomment-34228626

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Phillips <no...@github.com>.
> @@ -122,6 +131,10 @@ public ToStringHelper string() {
>        ImmutableSet<BlockDeviceMapping> mappings = blockDeviceMappings.build();
>        if (mappings.size() != 0)
>           toString.add("blockDeviceMappings", mappings);
> +      if (maxCount != null)

> Yeah, it's a bit confusing - maxCount is an Integer, but getMaxCount() returns an int.

I think you may have seen the old version of my comment ;-) I was asking not about null, but about possible negative values here. What if someone sets this to -10?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9472128

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #566](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/566/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277#issuecomment-34122482

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #1031](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/1031/) UNSTABLE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277#issuecomment-34096565

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds #807](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/807/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277#issuecomment-34123527

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Phillips <no...@github.com>.
> -import com.google.common.util.concurrent.ListenableFuture;
> +import javax.annotation.Resource;
> +import javax.inject.Inject;
> +import javax.inject.Named;
> +import javax.inject.Singleton;
> +import java.util.Map;
> +import java.util.Set;
> +import java.util.concurrent.atomic.AtomicReference;
> +
> +import static com.google.common.base.Preconditions.checkNotNull;
> +import static com.google.common.collect.Iterables.*;
> +import static com.google.common.collect.Sets.difference;
> +import static com.google.common.util.concurrent.Atomics.newReference;
> +import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_RUNNING;
> +import static org.jclouds.compute.functions.DefaultCredentialsFromImageOrOverridingCredentials.overrideDefaultCredentialsWithOptionsIfPresent;
> +import static org.jclouds.ec2.compute.util.EC2ComputeUtils.getZoneFromLocationOrNull;

Intentional import re-ordering?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277/files#r9452266

Re: [jclouds] JCLOUDS-450. Adding support for EC2 MaxCount option. (#277)

Posted by Andrew Phillips <no...@github.com>.
Just a couple of minor comments and questions...thanks, @abayer!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/277#issuecomment-34142810