Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-04-13 Thread Ignasi Barrera
Looked at it again and it was only the Server object. Pushed to [master](http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/823df74f) and [1.9.x](http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/c607a19a). Thanks! --- Reply to this email directly or view it on GitHub: https:/

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-04-13 Thread Ignasi Barrera
Closed #143. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/143#event-279601647

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-04-08 Thread Ignasi Barrera
Just that minor and it will be ready to be merged. Apologies for the delay in the reviews! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/143#issuecomment-91041514

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-04-08 Thread Ignasi Barrera
> and update the Firewall and Server list handler tests to properly test the > new elements introduced in this commit The server object now seems to have nested load balancers, and the handler was updated to handle that. Update the handler tests to exercise that path too. --- Reply to this ema

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-04-06 Thread jasminSPC
@nacx Last week I fixed those line endings. Is there something I missed or should I squash it? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/143#issuecomment-90199315

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-31 Thread Ignasi Barrera
Hi! 1.9.0 is out and we're back to reviewing PRs. I've seen there are several files with Windows line endings. Mind fixing that? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/143#issuecomment-88236951

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-24 Thread Matt Baldwin
@nacx No worries. Thanks. Good luck with the 1.9.0 release! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/143#issuecomment-85589488

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-23 Thread Ignasi Barrera
Apologies for the absence of feedback. We are about to release jclouds 1.9.0, and the master branch are under code freeze. We are fixing an issue spotted while testing the first release candidate, and expect to have the release out by the end of this week. Once that happens I'll be back to the P

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-23 Thread Matt Baldwin
@nacx Just following up on this PR. Is there any outstanding work on our end we should do? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/143#issuecomment-85134772

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-10 Thread Ignasi Barrera
> +import org.jclouds.profitbricks.http.parser.server.ServerListResponseHandler; > +import org.xml.sax.Attributes; > +import org.xml.sax.SAXException; > + > +public abstract class BaseLoadBalancerResponseHandler extends > BaseProfitBricksResponseHandler { > + > + protected final ServerListRespon

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-10 Thread jasminSPC
> +import org.jclouds.profitbricks.http.parser.server.ServerListResponseHandler; > +import org.xml.sax.Attributes; > +import org.xml.sax.SAXException; > + > +public abstract class BaseLoadBalancerResponseHandler extends > BaseProfitBricksResponseHandler { > + > + protected final ServerListRespon

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-10 Thread Ignasi Barrera
> + public abstract String lanId(); > + > + @Nullable > + public abstract ProvisioningState state(); > + > + @Nullable > + public abstract Date creationTime(); > + > + @Nullable > + public abstract Date lastModificationTime(); > + > + @Nullable > + public abstract List balancedSer

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-10 Thread jasminSPC
> + public abstract String lanId(); > + > + @Nullable > + public abstract ProvisioningState state(); > + > + @Nullable > + public abstract Date creationTime(); > + > + @Nullable > + public abstract Date lastModificationTime(); > + > + @Nullable > + public abstract List balancedSer

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-09 Thread Ignasi Barrera
> + .lanId("1") > + .serverIds(serverIds) > + .build(); > + > + LoadBalancer loadBalancer = > api.loadBalancerApi().createLoadBalancer(payload); > + > + System.out.println(loadBalancer); > + assertNotNull(loadBalancer); > + > + } > + > + @T

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-09 Thread Ignasi Barrera
Add the missing tests for the `DeregisterLoadBalancerRequestBinder` and `UpdateLoadBalancerRequestBinder`, and update the Firewall and Server list handler tests to properly test the new elements introduced in this commit. --- Reply to this email directly or view it on GitHub: https://github.com/

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-09 Thread Ignasi Barrera
> + public void testCreateLoadBalancer() { > + List serverIds = > com.google.common.collect.Lists.newArrayList(); > + serverIds.add("server-ids"); > + > + LoadBalancer.Request.CreatePayload payload = > LoadBalancer.Request.creatingBuilder() > + .dataCenterId(dataCent

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-09 Thread Ignasi Barrera
> +import com.google.common.collect.ImmutableList; > +import java.util.List; > +import org.jclouds.date.DateCodec; > +import org.jclouds.date.DateCodecFactory; > +import org.jclouds.http.functions.ParseSax; > +import org.jclouds.profitbricks.domain.Firewall; > +import org.jclouds.profitbricks.domai

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-09 Thread Ignasi Barrera
> + > +@Test(groups = "unit", testName = "LoadbalancerApiMockTest") > +public class LoadbalancerApiMockTest extends BaseProfitBricksMockTest { > + > + @Test > + public void testGetAllLoadBalancers() throws Exception { > + MockWebServer server = mockWebServer(); > + server.enqueue(new

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-09 Thread Ignasi Barrera
> + LoadBalancerApi api = pbApi.loadBalancerApi(); > + > + String id = "----"; > + > + String content = "" + id + > ""; > + try { > + LoadBalancer loadBalancer = api.getLoadBalancer(id); > + > + assertRequestHasCommonProperties(se

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-09 Thread Ignasi Barrera
> +import org.jclouds.profitbricks.domain.DataCenter; > +import org.jclouds.profitbricks.domain.LoadBalancer; > +import org.jclouds.profitbricks.domain.LoadBalancer.LoadbalancerAlgorithm; > +import org.jclouds.profitbricks.domain.Server; > +import org.testng.Assert; > +import static org.testng.Asse

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-09 Thread Ignasi Barrera
> + > + } > + > + @Test > + public void testGetAllLoadBalancers() { > + List loadBalancers = > api.loadBalancerApi().getAllLoadBalancers(); > + > + assertNotNull(loadBalancers); > + assertFalse(loadBalancers.isEmpty()); > + } > + > + @Test(dependsOnMethods = "testCreateLoa

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-09 Thread Ignasi Barrera
> +import org.jclouds.profitbricks.http.parser.server.ServerListResponseHandler; > +import org.xml.sax.Attributes; > +import org.xml.sax.SAXException; > + > +public abstract class BaseLoadBalancerResponseHandler extends > BaseProfitBricksResponseHandler { > + > + protected final ServerListRespon

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-09 Thread Ignasi Barrera
> + > +import autovalue.shaded.com.google.common.common.collect.Lists; > +import com.google.inject.Inject; > +import java.util.List; > +import org.jclouds.date.DateCodecFactory; > +import org.jclouds.profitbricks.domain.LoadBalancer; > +import > org.jclouds.profitbricks.http.parser.firewall.Firewa

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-09 Thread Ignasi Barrera
> @@ -84,14 +85,20 @@ public static Status fromValue(String v) { > @Nullable > public abstract List nics(); > > + @Nullable > + public abstract String balancedNicId(); > + > + @Nullable > + public abstract boolean activate(); Primitives can't be null. --- Reply to this email dir

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-09 Thread Ignasi Barrera
> + > +public Builder serverIds(List serverIds) { > + this.serverIds = serverIds; > + return this; > +} > + > +public CreatePayload build() { > + return CreatePayload.create(dataCenterId, loadBalancerName, > loadBalancer

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-09 Thread Ignasi Barrera
> + > + @AutoValue > + public abstract static class CreatePayload { > + > + public abstract String dataCenterId(); > + > + public abstract String loadBalancerName(); > + > + public abstract LoadbalancerAlgorithm loadBalancerAlgorithm(); > + > + public abstr

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-09 Thread Ignasi Barrera
> + > + public LoadbalancerAlgorithm loadBalancerAlgorithm; > + > + public String dataCenterId; > + > + public String dataCenterVersion; > + > + public boolean internetAccess; > + > + public String ip; > + > + public String lanId; > + > + public ProvisioningState

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-09 Thread Ignasi Barrera
> + > +public Builder id(String id) { > + this.id = id; > + return this; > +} > + > +public RegisterPayload build() { > + return RegisterPayload.create(serverIds, id); > +} > + } > + } > + > +

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-09 Thread Ignasi Barrera
> + public abstract String lanId(); > + > + @Nullable > + public abstract ProvisioningState state(); > + > + @Nullable > + public abstract Date creationTime(); > + > + @Nullable > + public abstract Date lastModificationTime(); > + > + @Nullable > + public abstract List balancedSer

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-09 Thread Ignasi Barrera
> + public abstract String id(); > + > + @Nullable > + public abstract String name(); > + > + @Nullable > + public abstract LoadbalancerAlgorithm loadBalancerAlgorithm(); > + > + @Nullable > + public abstract String dataCenterId(); > + > + @Nullable > + public abstract String data

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-09 Thread Ignasi Barrera
> +import java.util.List; > + > +@AutoValue > +public abstract class LoadBalancer { > + > + public enum LoadbalancerAlgorithm { > + > + ROUND_ROBIN, UNRECOGNIZED; > + > + public static LoadbalancerAlgorithm > + fromValue(String value) { > + try { > +retu

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-09 Thread Ignasi Barrera
> + super("loadbalancer"); > + this.requestBuilder = new StringBuilder(128 * 4); > + } > + > + @Override > + protected String createPayload(LoadBalancer.Request.DeregisterPayload > payload) { > + requestBuilder.append("") > + .append(""); > + for (String s :

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-05 Thread jasminSPC
Ping --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/143#issuecomment-77446964

Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-03-02 Thread Ignasi Barrera
This PR has several commits, including a merge commit that will make it difficult to merge. Before we start reviewing (and adding commits that address the review comments), could you cleanup the PR so it has only the necessary commits, and does not have any merge commit? This will facilitate the

[jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)

2015-02-27 Thread jasminSPC
JClouds Profitbricks provider - LoadBalancer API You can view, comment on, or merge this pull request online at: https://github.com/jclouds/jclouds-labs/pull/143 -- Commit Summary -- * JClouds Profitbricks provider - LoadBalancer API -- File Changes -- M profitbricks/src/main/java/org/