@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
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
Closed #146.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/146#event-173498545
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
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
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 b
@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 curre
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:
https://github
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 ha
> + // Optional attributes
> + @Named("status_description")
> + protected final String statusDescription;
> +
> + @ConstructorProperties({ "monitor_id", "status", "status_description" })
> + protected HealthMonitorStatus(String id, LBaaSStatus status, String
> statusDescription) {
> +
> +
> + /**
> +* 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, membe
> + return expectedCodes;
> + }
> +
> + /**
> +* @return the pools for this HealthMonitor.
> +*/
> + @Nullable
> + public ImmutableList getPools() {
> + return pools;
> + }
> +
> + /**
> +* @return the administrative state for this HealthMonitor.
> +*/
> + @N
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
> + /**
> + * Provides the administrative state for this HealthMonitor's Builder.
> + *
> + * @return the Builder.
> + * @see HealthMonitor#getAdminStateUp()
> + */
> + public ParameterizedBuilderType adminStateUp(Boolean adminStateUp) {
> + healthMon
> + /**
> + * Provides the administrative state for this HealthMonitor's Builder.
> + *
> + * @return the Builder.
> + * @see HealthMonitor#getAdminStateUp()
> + */
> + public ParameterizedBuilderType adminStateUp(Boolean adminStateUp) {
> + healthMon
> + /**
> + * Provides the administrative state for this HealthMonitor's Builder.
> + *
> + * @return the Builder.
> + * @see HealthMonitor#getAdminStateUp()
> + */
> + public ParameterizedBuilderType adminStateUp(Boolean adminStateUp) {
> + healthMon
[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:
https://github.com/jclouds/jclouds-labs-openstack/pull/146#issuecomment-57445612
[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:
https://github.com/jclo
> 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
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,
> @@ -103,4 +104,14 @@
> */
> @Delegate
> Optional getSecurityGroupApi(@EndpointParam(parser =
> RegionToEndpoint.class) String region);
> +
> + /**
> +* Provides access to LBaaS version 1 features.
> +*
> +* NOTE
> +* This API is an extension that may or may not be
> @@ -103,4 +104,14 @@
> */
> @Delegate
> Optional getSecurityGroupApi(@EndpointParam(parser =
> RegionToEndpoint.class) String region);
> +
> + /**
> +* Provides access to LBaaS version 1 features.
> +*
> +* NOTE
> +* This API is an extension that may or may not be
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
> + *
> + * 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
> + *
> + * 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
> + *
> + * 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 permission
> + public String getName() {
> + return name;
> + }
> +
> + /**
> +* @return the description of the Pool.
> +*/
> + @Nullable
> + public String getDescription() {
> + return description;
> + }
> +
> + /**
> +* @return the subnet id for this Pool.
> +*/
> +
> + @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
> @@ -103,4 +104,14 @@
> */
> @Delegate
> Optional getSecurityGroupApi(@EndpointParam(parser =
> RegionToEndpoint.class) String region);
> +
> + /**
> +* Provides access to LBaaS version 1 features.
> +*
> +* NOTE
> +* This API is an extension that may or may not be
[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:
https://github.com/jclouds/jclouds-labs-openstack/pull/146#issuecomment-56797586
[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:
https://github.com/jclo
> +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 c
> + *
> + * 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
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
> + *
> + * 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 permission
> + *
> + * 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
> + *
> + * 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
> + *
> + * 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
> 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 so
> + public String getName() {
> + return name;
> + }
> +
> + /**
> +* @return the description of the Pool.
> +*/
> + @Nullable
> + public String getDescription() {
> + return description;
> + }
> +
> + /**
> +* @return the subnet id for this Pool.
> +*/
> +
> + @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
> + @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.
> @@ -103,4 +104,14 @@
> */
> @Delegate
> Optional getSecurityGroupApi(@EndpointParam(parser =
> RegionToEndpoint.class) String region);
> +
> + /**
> +* Provides access to LBaaS version 1 features.
> +*
> +* NOTE
> +* This API is an extension that may or may not be
> + return expectedCodes;
> + }
> +
> + /**
> +* @return the pools for this HealthMonitor.
> +*/
> + @Nullable
> + public ImmutableList getPools() {
> + return pools;
> + }
> +
> + /**
> +* @return the administrative state for this HealthMonitor.
> +*/
> + @N
> + return expectedCodes;
> + }
> +
> + /**
> +* @return the pools for this HealthMonitor.
> +*/
> + @Nullable
> + public ImmutableList getPools() {
> + return pools;
> + }
> +
> + /**
> +* @return the administrative state for this HealthMonitor.
> +*/
> + @N
> @@ -103,4 +104,14 @@
> */
> @Delegate
> Optional getSecurityGroupApi(@EndpointParam(parser =
> RegionToEndpoint.class) String region);
> +
> + /**
> +* Provides access to LBaaS version 1 features.
> +*
> +* NOTE
> +* This API is an extension that may or may not be
> + /**
> + * Provides the administrative state for this HealthMonitor's Builder.
> + *
> + * @return the Builder.
> + * @see HealthMonitor#getAdminStateUp()
> + */
> + public ParameterizedBuilderType adminStateUp(Boolean adminStateUp) {
> + healthMon
> + @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.
> + /**
> + * Provides the administrative state for this HealthMonitor's Builder.
> + *
> + * @return the Builder.
> + * @see HealthMonitor#getAdminStateUp()
> + */
> + public ParameterizedBuilderType adminStateUp(Boolean adminStateUp) {
> + healthMon
> +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 c
> + *
> + * 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
> +"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": {
> +
> @@ -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"
>
> + return expectedCodes;
> + }
> +
> + /**
> +* @return the pools for this HealthMonitor.
> +*/
> + @Nullable
> + public ImmutableList getPools() {
> + return pools;
> + }
> +
> + /**
> +* @return the administrative state for this HealthMonitor.
> +*/
> + @N
> @@ -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";))
>
> @@ -103,4 +104,14 @@
> */
> @Delegate
> Optional getSecurityGroupApi(@EndpointParam(parser =
> RegionToEndpoint.class) String region);
> +
> + /**
> +* Provides access to LBaaS version 1 features.
> +*
> +* NOTE
> +* This API is an extension that may or may not be
> +
> + /*
> +* 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 static Builder builder() {
> + return new Builder();
> + }
> +
> + /**
> +* Gets a Builder configured as this object.
> +*/
> + public Builder toBuilder() {
> + return new Builder().fromPoolStatus(this);
> + }
> +
> + /**
> +* Builder.
> +*
> +{
> +"health_monitor": {
> +"status": "PENDING_CREATE",
> +"admin_state_up": true,
> +"tenant_id": "4fd44f30292945e481c7b8a0c8908869",
> +"delay": 1,
> +"expected_codes": "200",
> +"max_retries": 1,
> +"http_method": "GET",
> +"
[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:
https://github.com/jclo
> +/**
> + * 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 balancin
> +*/
> + public static class CreateBuilder extends Builder {
> + /**
> + * Supply required properties for creating a HealthMonitor's
> CreateBuilder.
> + *
> + * @param type the probe type.
> + * @param delay the delay.
> + * @param timeout the timeout.
>
> + *
> + * 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
> + 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")
> +
> + @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")
> +
> +*/
> + public static Builder builder() {
> + return new Builder();
> + }
> +
> + /**
> +* Gets a Builder configured as this object.
> +*/
> + public Builder toBuilder() {
> + return new Builder().fromHealthMonitorStatus(this);
> + }
> +
> + /**
> +* Builder.
[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:
https://github.com/jclouds/jclouds-labs-openstack/pull/146#issuecomment-56533447
> +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 c
[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 GitHub:
[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:
https://github.com/jclouds/jclouds-labs-openstack/pull/1
I don't agree with you about putiing LBaaSApi on the same directory level as
RouterApi. 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.
---
Reply to this email directly
> + @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
> +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 = "LEA
> + public String getName() {
> + return name;
> + }
> +
> + /**
> +* @return the description of the Pool.
> +*/
> + @Nullable
> + public String getDescription() {
> + return description;
> + }
> +
> + /**
> +* @return the subnet id for this Pool.
> +*/
> +
> + @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
> + @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.
@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 thes
> +{
> +"health_monitor": {
> +"status": "PENDING_CREATE",
> +"admin_state_up": true,
> +"tenant_id": "4fd44f30292945e481c7b8a0c8908869",
> +"delay": 1,
> +"expected_codes": "200",
> +"max_retries": 1,
> +"http_method": "GET",
> +"
> +/**
> + * 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 balancin
> +
> + /*
> +* 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.
> +*/
>
> + *
> + * 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
> +*/
> + public static Builder builder() {
> + return new Builder();
> + }
> +
> + /**
> +* Gets a Builder configured as this object.
> +*/
> + public Builder toBuilder() {
> + return new Builder().fromPoolStatus(this);
> + }
> +
> + /**
> +* Builder.
> +*
> +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 = "LEA
> + public String getName() {
> + return name;
> + }
> +
> + /**
> +* @return the description of the Pool.
> +*/
> + @Nullable
> + public String getDescription() {
> + return description;
> + }
> +
> + /**
> +* @return the subnet id for this Pool.
> +*/
> +
> +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.
> + *
> + * @se
> + @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")
> +
> + *
> + * 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
> +*/
> + public static Builder builder() {
> + return new Builder();
> + }
> +
> + /**
> +* Gets a Builder configured as this object.
> +*/
> + public Builder toBuilder() {
> + return new Builder().fromHealthMonitorStatus(this);
> + }
> +
> + /**
> +* Builder.
> + @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 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 *
> + @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.
> + 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")
> +
> + @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.
> 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 ;
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 and
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 hav
> +*/
> + public static class CreateBuilder extends Builder {
> + /**
> + * Supply required properties for creating a HealthMonitor's
> CreateBuilder.
> + *
> + * @param type the probe type.
> + * @param delay the delay.
> + * @param timeout the timeout.
>
> +*/
> + 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.
> +*/
> + pu
> +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 c
> + 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")
> +
1 - 100 of 104 matches
Mail list logo