jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds-labs] JClouds Profitbricks provider - LoadBalancer API (#143)
Date Mon, 09 Mar 2015 16:55:41 GMT
> +      super("loadbalancer");
> +      this.requestBuilder = new StringBuilder(128 * 4);
> +   }
> +
> +   @Override
> +   protected String createPayload(LoadBalancer.Request.DeregisterPayload payload) {
> +      requestBuilder.append("<ws:deregisterServersOnLoadBalancer>")
> +              .append("<request>");
> +      for (String s : payload.serverIds()) {
> +         requestBuilder.append(format("<serverIds>%s</serverIds>", s));
> +      }
> +      requestBuilder.append(format("<loadBalancerId>%s</loadBalancerId>",
payload.id()))
> +              .append("</request>")
> +              .append("</ws:deregisterServersOnLoadBalancer>");
> +
> +      return requestBuilder.toString().replaceAll("\\s+", "");

Is this really needed?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/143/files#r26053349
Mime
View raw message