Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-10-03 Thread Frédéric Brouillé
Who is supposed to close the issue in JIRA? (https://issues.apache.org/jira/browse/JCLOUDS-611) me or someone else? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/146#issuecomment-57797789

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-10-03 Thread Jeremy Daggett
@fbrouille Personally, I close them once the work is pushed. I just resolved the issue in JIRA, so not to worry. We really appreciate the contribution, thanks! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/146#issuecomment-57810495

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-10-02 Thread Frédéric Brouillé
+ /** + * Provides the administrative state for this HealthMonitor's Builder. + * + * @return the Builder. + * @see HealthMonitor#getAdminStateUp() + */ + public ParameterizedBuilderType adminStateUp(Boolean adminStateUp) { +

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-10-02 Thread Zack Shoylev
+ /** + * Provides the administrative state for this HealthMonitor's Builder. + * + * @return the Builder. + * @see HealthMonitor#getAdminStateUp() + */ + public ParameterizedBuilderType adminStateUp(Boolean adminStateUp) { +

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-10-02 Thread Zack Shoylev
Alright anything else? If not, let's merge and backport. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/146#issuecomment-57656568

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-10-02 Thread Adrian Cole
+ return expectedCodes; + } + + /** +* @return the pools for this HealthMonitor. +*/ + @Nullable + public ImmutableListPoolStatus getPools() { + return pools; + } + + /** +* @return the administrative state for this HealthMonitor. +*/ +

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-10-02 Thread Adrian Cole
+ + /** +* Copy constructor. +* +* @param member the Member to copy from. +*/ + private Member(Member member) { + this(member.id, member.tenantId, member.poolId, member.address, member.protocolPort, member.weight, +member.adminStateUp, member.status,

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-10-02 Thread Adrian Cole
+ // Optional attributes + @Named(status_description) + protected final String statusDescription; + + @ConstructorProperties({ monitor_id, status, status_description }) + protected HealthMonitorStatus(String id, LBaaSStatus status, String statusDescription) { + this.id =

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-10-02 Thread Adrian Cole
general commentary. I wouldn't want to use this api. It is laden with danger as everything is marked nullable, even booleans. If in the last couple years we've gotten away from making null-safe objects, forgive the late commentary, but yeah, this codebase is a NPE waiting to happen, and I'd

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-10-02 Thread Adrian Cole
ps in case it doesn't go without saying, don't consider my commentary binding. I've been awol and don't expect I have full enough understanding of how things are. In other words, take my notes as advise, not anything blocking. --- Reply to this email directly or view it on GitHub:

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-10-02 Thread Zack Shoylev
@adriancole there is also a thread about potentially using Optional instead of all the boxed types in this API on the dev list, if you want to chime in there? I am also very much in favor of any way to eliminate more boilerplate - but we will have to address that in separate PRs. Neutron is

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-10-02 Thread Adrian Cole
sounds good, zach. I have noticed that folks are using jackson w/auto, so I think it is possible w/gson. Since we have our own instance creators, this may require work, but who knows.. may end up worth it. Will catch up later and yeah I agree labs providers shift anyway, so this sort of thing can

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-10-02 Thread Zack Shoylev
About to merge and backport --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/146#issuecomment-57696129

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-10-02 Thread Zack Shoylev
Merged to master and backported to 1.8.x with compatibility changes for java 1.6 --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/146#issuecomment-57703775

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-10-02 Thread Zack Shoylev
Closed #146. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/146#event-173498545

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-10-01 Thread BuildHive
[jclouds » jclouds-labs-openstack #1762](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1762/) 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:

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-10-01 Thread CloudBees pull request builder plugin
[jclouds-labs-openstack-pull-requests #440](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/440/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub:

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-10-01 Thread Zack Shoylev
+ /** + * Provides the administrative state for this HealthMonitor's Builder. + * + * @return the Builder. + * @see HealthMonitor#getAdminStateUp() + */ + public ParameterizedBuilderType adminStateUp(Boolean adminStateUp) { +

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-30 Thread Andrew Phillips
Here is a somewhat different suggestion: keep v1 directory structures as they are right now. When v2 comes around, implement it without using lbaas.v2 in package and class names. Then deprecate v1. Makes sense to me. Assuming we don't expect a `v3` to come along, that is ;-) --- Reply to

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-25 Thread fbrouille
+ * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-25 Thread fbrouille
+package org.jclouds.openstack.neutron.v2.domain.lbaas.v1; + +import java.beans.ConstructorProperties; + +import javax.inject.Named; + +import org.jclouds.javax.annotation.Nullable; + +import com.google.common.base.MoreObjects; +import com.google.common.base.Objects; +import

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-25 Thread BuildHive
[jclouds » jclouds-labs-openstack #1754](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1754/) 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:

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-25 Thread CloudBees pull request builder plugin
[jclouds-labs-openstack-pull-requests #436](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/436/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub:

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-25 Thread fbrouille
@@ -103,4 +104,14 @@ */ @Delegate OptionalSecurityGroupApi getSecurityGroupApi(@EndpointParam(parser = RegionToEndpoint.class) String region); + + /** +* Provides access to LBaaS version 1 features. +* +* h3NOTE/h3 +* This API is an extension that may or

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-25 Thread fbrouille
+ @Path(/health_monitors/{id}) + @Fallback(FalseOnNotFoundOr404.class) + boolean deleteHealthMonitor(@PathParam(id) String id); + + /** +* Associate a HealthMonitor to a Pool. +* +* @param poolId the id of the Pool to associate. +* @param healthMonitor the

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-25 Thread fbrouille
+ public String getName() { + return name; + } + + /** +* @return the description of the Pool. +*/ + @Nullable + public String getDescription() { + return description; + } + + /** +* @return the subnet id for this Pool. +*/ + public String

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-25 Thread fbrouille
+ * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-25 Thread fbrouille
+ * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-25 Thread fbrouille
Dear all, first of all, thanks for your review everybody! I have changed the PR to fix some issues you have pointed. Before merge, I think there is still some points to clarify: - Version in method name: Because in future, 2 versions of LBaaS API will coexist (v1 and v2), I simply decided to put

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-25 Thread Jeremy Daggett
@@ -103,4 +104,14 @@ */ @Delegate OptionalSecurityGroupApi getSecurityGroupApi(@EndpointParam(parser = RegionToEndpoint.class) String region); + + /** +* Provides access to LBaaS version 1 features. +* +* h3NOTE/h3 +* This API is an extension that may or

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-25 Thread fbrouille
@@ -103,4 +104,14 @@ */ @Delegate OptionalSecurityGroupApi getSecurityGroupApi(@EndpointParam(parser = RegionToEndpoint.class) String region); + + /** +* Provides access to LBaaS version 1 features. +* +* h3NOTE/h3 +* This API is an extension that may or

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-25 Thread Zack Shoylev
Version in packages: maybe it is preferable to simply ignore it and remove version in package names and in classnames It is difficult to say. Here is something to consider: right now, neutron is marked as Beta, which means we can still modify the API and introduce breaking changes. However,

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-24 Thread fbrouille
+ /** + * Provides the administrative state for this HealthMonitor's Builder. + * + * @return the Builder. + * @see HealthMonitor#getAdminStateUp() + */ + public ParameterizedBuilderType adminStateUp(Boolean adminStateUp) { +

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-24 Thread fbrouille
+ return expectedCodes; + } + + /** +* @return the pools for this HealthMonitor. +*/ + @Nullable + public ImmutableListPoolStatus getPools() { + return pools; + } + + /** +* @return the administrative state for this HealthMonitor. +*/ +

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-24 Thread Jeremy Daggett
+ return expectedCodes; + } + + /** +* @return the pools for this HealthMonitor. +*/ + @Nullable + public ImmutableListPoolStatus getPools() { + return pools; + } + + /** +* @return the administrative state for this HealthMonitor. +*/ +

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-24 Thread Zack Shoylev
@@ -103,4 +104,14 @@ */ @Delegate OptionalSecurityGroupApi getSecurityGroupApi(@EndpointParam(parser = RegionToEndpoint.class) String region); + + /** +* Provides access to LBaaS version 1 features. +* +* h3NOTE/h3 +* This API is an extension that may or

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-24 Thread Zack Shoylev
+ @Path(/vips) + @SelectJson(vip) + VIP createVIP(@WrapWith(vip) VIP.CreateVIP vip); + + /** +* Update a VIP. +* +* @param id the id of the VIP to update. +* @param vip the VIP's attributes to update. +* @return a reference of the updated VIP. +*/ +

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-24 Thread Zack Shoylev
+ @Path(/health_monitors/{id}) + @Fallback(FalseOnNotFoundOr404.class) + boolean deleteHealthMonitor(@PathParam(id) String id); + + /** +* Associate a HealthMonitor to a Pool. +* +* @param poolId the id of the Pool to associate. +* @param healthMonitor the

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-24 Thread Zack Shoylev
+ public String getName() { + return name; + } + + /** +* @return the description of the Pool. +*/ + @Nullable + public String getDescription() { + return description; + } + + /** +* @return the subnet id for this Pool. +*/ + public String

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-24 Thread Zack Shoylev
I would like to do it, but this will be a problem when support of LBaaS v2 will be added. As mentioned previously, LBaaS v1 and LBaaS v2 differ on domain objects and on API. I see. I had a look at the v1 vs v2 issues. I am fine with keeping the structure as it is for now. Question: At some

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-24 Thread Zack Shoylev
+ * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-24 Thread Zack Shoylev
+ * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-24 Thread Zack Shoylev
+ * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-24 Thread Zack Shoylev
+ * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-24 Thread Zack Shoylev
Looks almost ready to merge! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/146#issuecomment-5674

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread fbrouille
+ @Path(/vips) + @SelectJson(vip) + VIP createVIP(@WrapWith(vip) VIP.CreateVIP vip); + + /** +* Update a VIP. +* +* @param id the id of the VIP to update. +* @param vip the VIP's attributes to update. +* @return a reference of the updated VIP. +*/ +

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread fbrouille
+ @Path(/health_monitors/{id}) + @Fallback(FalseOnNotFoundOr404.class) + boolean deleteHealthMonitor(@PathParam(id) String id); + + /** +* Associate a HealthMonitor to a Pool. +* +* @param poolId the id of the Pool to associate. +* @param healthMonitor the

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread fbrouille
+ public String getName() { + return name; + } + + /** +* @return the description of the Pool. +*/ + @Nullable + public String getDescription() { + return description; + } + + /** +* @return the subnet id for this Pool. +*/ + public String

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread fbrouille
+public class Pool { + + // Load balancing methods that must be supported by all providers. + // Not an enum type because any provider may support additional balancing methods. + public static String ROUND_ROBIN = ROUND_ROBIN; + public static String LEAST_CONNECTIONS =

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread CloudBees pull request builder plugin
[jclouds-labs-openstack-pull-requests #432](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/432/) UNSTABLE Looks like there's a problem with this pull request --- Reply to this email directly or view it on GitHub:

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread BuildHive
[jclouds » jclouds-labs-openstack #1747](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1747/) 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

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread fbrouille
+package org.jclouds.openstack.neutron.v2.domain.lbaas.v1; + +import java.beans.ConstructorProperties; + +import javax.inject.Named; + +import org.jclouds.javax.annotation.Nullable; + +import com.google.common.base.MoreObjects; +import com.google.common.base.Objects; +import

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread CloudBees pull request builder plugin
[jclouds-labs-openstack-pull-requests #433](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/433/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub:

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread fbrouille
+ @Named(address) + private String address; + @Named(protocol_port) + private Integer protocolPort; + // Mandatory attributes that can be updated + @Named(pool_id) + private String poolId; + // Optional attributes that can be updated + @Named(weight) + private Integer

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread fbrouille
+*/ + public static Builder builder() { + return new Builder(); + } + + /** +* Gets a Builder configured as this object. +*/ + public Builder toBuilder() { + return new Builder().fromHealthMonitorStatus(this); + } + + /** +* Builder. +*/ +

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread fbrouille
+ private Integer timeout; + @Named(max_retries) + private Integer maxRetries; + // Optional attributes that can be updated + @Named(http_method) + private HttpMethod httpMethod; + @Named(url_path) + private String urlPath; + @Named(expected_codes) + private String

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread fbrouille
+ * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread fbrouille
+*/ + public static class CreateBuilder extends BuilderCreateBuilder { + /** + * Supply required properties for creating a HealthMonitor's CreateBuilder. + * + * @param type the probe type. + * @param delay the delay. + * @param timeout the

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread BuildHive
[jclouds » jclouds-labs-openstack #1748](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1748/) 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:

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread fbrouille
+/** + * Enumerates supported SessionPersistence types. + */ +public enum SessionPersistenceType { + /** +* All connections that originate from the same source IP address are handled by the same member of the pool. +*/ + SOURCE_IP, + /** +* The load balancing function

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread fbrouille
+*/ + public static Builder builder() { + return new Builder(); + } + + /** +* Gets a Builder configured as this object. +*/ + public Builder toBuilder() { + return new Builder().fromPoolStatus(this); + } + + /** +* Builder. +*/ + public

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread fbrouille
+ + /* +* Methods to get the builder follow. +*/ + + /** +* @return the Builder for SessionPersistence. +*/ + public static Builder builder() { + return new Builder(); + } + + /** +* Gets a Builder configured as this object. +*/ + public

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread Jeremy Daggett
@@ -103,4 +104,14 @@ */ @Delegate OptionalSecurityGroupApi getSecurityGroupApi(@EndpointParam(parser = RegionToEndpoint.class) String region); + + /** +* Provides access to LBaaS version 1 features. +* +* h3NOTE/h3 +* This API is an extension that may or

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread Jeremy Daggett
@@ -67,6 +67,8 @@ protected void configure() { URI.create(http://docs.openstack.org/ext/neutron/router/api/v1.0;)) .put(URI.create(ExtensionNamespaces.SECURITY_GROUPS), URI.create(http://docs.openstack.org/ext/securitygroups/api/v2.0;)) +

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread Jeremy Daggett
+ return expectedCodes; + } + + /** +* @return the pools for this HealthMonitor. +*/ + @Nullable + public ImmutableListPoolStatus getPools() { + return pools; + } + + /** +* @return the administrative state for this HealthMonitor. +*/ +

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread Jeremy Daggett
@@ -0,0 +1,13 @@ +{ +vip: { +name: new-name, +description: new description, +pool_id: 61b1f87a-7a21-4ad3-9dda-7f81d249944f, +session_persistence: { +cookie_name: MyNewAppCookie, +type: APP_COOKIE +}, +

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread Jeremy Daggett
+admin_state_up: false, +subnet_id: 8032909d-47a1-4715-90af-5153ffe39861, +tenant_id: 83657cfcdfe44cd5920adaf26c48ceea, +connection_limit: 50, +pool_id: 61b1f87a-7a21-4ad3-9dda-7f81d249944f, +session_persistence: { +cookie_name:

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread Jeremy Daggett
+ * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread Jeremy Daggett
+package org.jclouds.openstack.neutron.v2.domain.lbaas.v1; + +import java.beans.ConstructorProperties; + +import javax.inject.Named; + +import org.jclouds.javax.annotation.Nullable; + +import com.google.common.base.MoreObjects; +import com.google.common.base.Objects; +import

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread Jeremy Daggett
+ /** + * Provides the administrative state for this HealthMonitor's Builder. + * + * @return the Builder. + * @see HealthMonitor#getAdminStateUp() + */ + public ParameterizedBuilderType adminStateUp(Boolean adminStateUp) { +

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-23 Thread Ignasi Barrera
+ @Path(/vips) + @SelectJson(vip) + VIP createVIP(@WrapWith(vip) VIP.CreateVIP vip); + + /** +* Update a VIP. +* +* @param id the id of the VIP to update. +* @param vip the VIP's attributes to update. +* @return a reference of the updated VIP. +*/ +

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-22 Thread Zack Shoylev
+ private Integer timeout; + @Named(max_retries) + private Integer maxRetries; + // Optional attributes that can be updated + @Named(http_method) + private HttpMethod httpMethod; + @Named(url_path) + private String urlPath; + @Named(expected_codes) + private String

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-22 Thread Zack Shoylev
+ @Path(/vips) + @SelectJson(vip) + VIP createVIP(@WrapWith(vip) VIP.CreateVIP vip); + + /** +* Update a VIP. +* +* @param id the id of the VIP to update. +* @param vip the VIP's attributes to update. +* @return a reference of the updated VIP. +*/ +

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-22 Thread Everett Toews
The way the versioning was handled was the first thing I looked at and was comfortable with the approach. But thinking about it a bit more I could use an example. @fbrouille Can you provide us with an example here in the PR comments that shows how a user would write some code against v1 LBaaS

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-22 Thread Zack Shoylev
+ @Path(/health_monitors/{id}) + @Fallback(FalseOnNotFoundOr404.class) + boolean deleteHealthMonitor(@PathParam(id) String id); + + /** +* Associate a HealthMonitor to a Pool. +* +* @param poolId the id of the Pool to associate. +* @param healthMonitor the

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-22 Thread Zack Shoylev
+*/ + public static Builder builder() { + return new Builder(); + } + + /** +* Gets a Builder configured as this object. +*/ + public Builder toBuilder() { + return new Builder().fromHealthMonitorStatus(this); + } + + /** +* Builder. +*/ +

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-22 Thread Zack Shoylev
+ * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-22 Thread Zack Shoylev
+ @Named(address) + private String address; + @Named(protocol_port) + private Integer protocolPort; + // Mandatory attributes that can be updated + @Named(pool_id) + private String poolId; + // Optional attributes that can be updated + @Named(weight) + private Integer

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-22 Thread Zack Shoylev
+import org.jclouds.javax.annotation.Nullable; + +import com.google.common.base.MoreObjects; +import com.google.common.base.Objects; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableSet; + +/** + * A Neutron LBaaS v1 Pool. + * + * @see a

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-22 Thread Zack Shoylev
+public class Pool { + + // Load balancing methods that must be supported by all providers. + // Not an enum type because any provider may support additional balancing methods. + public static String ROUND_ROBIN = ROUND_ROBIN; + public static String LEAST_CONNECTIONS =

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-22 Thread Zack Shoylev
+*/ + public static Builder builder() { + return new Builder(); + } + + /** +* Gets a Builder configured as this object. +*/ + public Builder toBuilder() { + return new Builder().fromPoolStatus(this); + } + + /** +* Builder. +*/ + public

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-22 Thread Zack Shoylev
+ * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-22 Thread Zack Shoylev
+ + /* +* Methods to get the builder follow. +*/ + + /** +* @return the Builder for SessionPersistence. +*/ + public static Builder builder() { + return new Builder(); + } + + /** +* Gets a Builder configured as this object. +*/ + public

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-22 Thread Zack Shoylev
+/** + * Enumerates supported SessionPersistence types. + */ +public enum SessionPersistenceType { + /** +* All connections that originate from the same source IP address are handled by the same member of the pool. +*/ + SOURCE_IP, + /** +* The load balancing function

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-22 Thread Zack Shoylev
+{ +health_monitor: { +status: PENDING_CREATE, +admin_state_up: true, +tenant_id: 4fd44f30292945e481c7b8a0c8908869, +delay: 1, +expected_codes: 200, +max_retries: 1, +http_method: GET, +timeout: 1, +pools: [],

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-22 Thread Zack Shoylev
@fbrouille Thanks for this PR! Overall it looks very good to me. I have a few comments, but they all seem pretty minor. It would also be nice if we can add some more docs to some of these enums and getters and builder setters for users. Some notes on structure and style differences: most of

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-21 Thread Ignasi Barrera
+ @Path(/vips) + @SelectJson(vip) + VIP createVIP(@WrapWith(vip) VIP.CreateVIP vip); + + /** +* Update a VIP. +* +* @param id the id of the VIP to update. +* @param vip the VIP's attributes to update. +* @return a reference of the updated VIP. +*/ +

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-20 Thread fbrouille
Thanks for your review @demobox, - should domain objects have private or protected constructors and fields? I wrote the domain objects in order to be coherent with the rest of the code. Others domain objects were written in the same way: e.g. Pool has private fileds and constructors as Subnet

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-20 Thread Andrew Phillips
es, LBaaS v1 association method takes a health_monitor as parameter (even if only the id must be specified) OK, then the AssociateBuilder is consistent with the pattern. As regards the naming of the API and how to represent the version, I'll defer to @jdaggett @zack-shoylev @everett-toews

[jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-19 Thread fbrouille
https://issues.apache.org/jira/browse/JCLOUDS-611 main: - Added getLBaaSv1Api in NeutronApi interface - Added LBaaS v1 alias in NeutronHttpApiModule class - Added LBaaS v1 extension in ExtensionNamespaces class - Added domain/lbaas/v1 package - Added extensions/lbaas/v1 package - Added

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-19 Thread Jeremy Daggett
@fbrouille Thank you so much for this contribution! I can start reviewing this PR this weekend. :+1: --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/146#issuecomment-56204409

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-19 Thread BuildHive
[jclouds » jclouds-labs-openstack #1737](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1737/) 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:

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-19 Thread CloudBees pull request builder plugin
[jclouds-labs-openstack-pull-requests #431](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/431/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub:

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-19 Thread Andrew Phillips
@@ -103,4 +104,14 @@ */ @Delegate OptionalSecurityGroupApi getSecurityGroupApi(@EndpointParam(parser = RegionToEndpoint.class) String region); + + /** +* Provides access to LBaaS version 1 features. +* +* h3NOTE/h3 +* This API is an extension that may or

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-19 Thread Andrew Phillips
+ private Integer timeout; + @Named(max_retries) + private Integer maxRetries; + // Optional attributes that can be updated + @Named(http_method) + private HttpMethod httpMethod; + @Named(url_path) + private String urlPath; + @Named(expected_codes) + private String

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-19 Thread Andrew Phillips
+package org.jclouds.openstack.neutron.v2.domain.lbaas.v1; + +import java.beans.ConstructorProperties; + +import javax.inject.Named; + +import org.jclouds.javax.annotation.Nullable; + +import com.google.common.base.MoreObjects; +import com.google.common.base.Objects; +import

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-19 Thread Andrew Phillips
+*/ + public static CreateBuilder createBuilder(ProbeType type, Integer delay, Integer timeout, Integer maxRetries) { + return new CreateBuilder(type, delay, timeout, maxRetries); + } + + /** +* @return the Builder for updating a HealthMonitor. +*/ + public

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-19 Thread Andrew Phillips
+*/ + public static class CreateBuilder extends BuilderCreateBuilder { + /** + * Supply required properties for creating a HealthMonitor's CreateBuilder. + * + * @param type the probe type. + * @param delay the delay. + * @param timeout the

Re: [jclouds-labs-openstack] JCLOUDS-611: Neutron LBaaS (version 1) extension request (#146)

2014-09-19 Thread Andrew Phillips
Only just started, but some general comments/questions to check: * should domain objects have `private` or `protected` constructors and fields? I think the PR includes a mix of both * stupid question: do we need `@Named` even if the field name matches the value of the annotation? * should we