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:/
Closed #143.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/143#event-279601647
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
> 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
@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
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
@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
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
@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
> +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
> +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
> + public abstract String lanId();
> +
> + @Nullable
> + public abstract ProvisioningState state();
> +
> + @Nullable
> + public abstract Date creationTime();
> +
> + @Nullable
> + public abstract Date lastModificationTime();
> +
> + @Nullable
> + public abstract List balancedSer
> + public abstract String lanId();
> +
> + @Nullable
> + public abstract ProvisioningState state();
> +
> + @Nullable
> + public abstract Date creationTime();
> +
> + @Nullable
> + public abstract Date lastModificationTime();
> +
> + @Nullable
> + public abstract List balancedSer
> + .lanId("1")
> + .serverIds(serverIds)
> + .build();
> +
> + LoadBalancer loadBalancer =
> api.loadBalancerApi().createLoadBalancer(payload);
> +
> + System.out.println(loadBalancer);
> + assertNotNull(loadBalancer);
> +
> + }
> +
> + @T
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/
> + public void testCreateLoadBalancer() {
> + List serverIds =
> com.google.common.collect.Lists.newArrayList();
> + serverIds.add("server-ids");
> +
> + LoadBalancer.Request.CreatePayload payload =
> LoadBalancer.Request.creatingBuilder()
> + .dataCenterId(dataCent
> +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
> +
> +@Test(groups = "unit", testName = "LoadbalancerApiMockTest")
> +public class LoadbalancerApiMockTest extends BaseProfitBricksMockTest {
> +
> + @Test
> + public void testGetAllLoadBalancers() throws Exception {
> + MockWebServer server = mockWebServer();
> + server.enqueue(new
> + LoadBalancerApi api = pbApi.loadBalancerApi();
> +
> + String id = "----";
> +
> + String content = "" + id +
> "";
> + try {
> + LoadBalancer loadBalancer = api.getLoadBalancer(id);
> +
> + assertRequestHasCommonProperties(se
> +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
> +
> + }
> +
> + @Test
> + public void testGetAllLoadBalancers() {
> + List loadBalancers =
> api.loadBalancerApi().getAllLoadBalancers();
> +
> + assertNotNull(loadBalancers);
> + assertFalse(loadBalancers.isEmpty());
> + }
> +
> + @Test(dependsOnMethods = "testCreateLoa
> +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
> +
> +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
> @@ -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
> +
> +public Builder serverIds(List serverIds) {
> + this.serverIds = serverIds;
> + return this;
> +}
> +
> +public CreatePayload build() {
> + return CreatePayload.create(dataCenterId, loadBalancerName,
> loadBalancer
> +
> + @AutoValue
> + public abstract static class CreatePayload {
> +
> + public abstract String dataCenterId();
> +
> + public abstract String loadBalancerName();
> +
> + public abstract LoadbalancerAlgorithm loadBalancerAlgorithm();
> +
> + public abstr
> +
> + public LoadbalancerAlgorithm loadBalancerAlgorithm;
> +
> + public String dataCenterId;
> +
> + public String dataCenterVersion;
> +
> + public boolean internetAccess;
> +
> + public String ip;
> +
> + public String lanId;
> +
> + public ProvisioningState
> +
> +public Builder id(String id) {
> + this.id = id;
> + return this;
> +}
> +
> +public RegisterPayload build() {
> + return RegisterPayload.create(serverIds, id);
> +}
> + }
> + }
> +
> +
> + public abstract String lanId();
> +
> + @Nullable
> + public abstract ProvisioningState state();
> +
> + @Nullable
> + public abstract Date creationTime();
> +
> + @Nullable
> + public abstract Date lastModificationTime();
> +
> + @Nullable
> + public abstract List balancedSer
> + public abstract String id();
> +
> + @Nullable
> + public abstract String name();
> +
> + @Nullable
> + public abstract LoadbalancerAlgorithm loadBalancerAlgorithm();
> +
> + @Nullable
> + public abstract String dataCenterId();
> +
> + @Nullable
> + public abstract String data
> +import java.util.List;
> +
> +@AutoValue
> +public abstract class LoadBalancer {
> +
> + public enum LoadbalancerAlgorithm {
> +
> + ROUND_ROBIN, UNRECOGNIZED;
> +
> + public static LoadbalancerAlgorithm
> + fromValue(String value) {
> + try {
> +retu
> + super("loadbalancer");
> + this.requestBuilder = new StringBuilder(128 * 4);
> + }
> +
> + @Override
> + protected String createPayload(LoadBalancer.Request.DeregisterPayload
> payload) {
> + requestBuilder.append("")
> + .append("");
> + for (String s :
Ping
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/143#issuecomment-77446964
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 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/
35 matches
Mail list logo