From 9c2990201b3827ad02d2db46aa1a738525b6688d Mon Sep 17 00:00:00 2001 From: Everett Toews Date: Thu, 14 Feb 2013 16:13:51 -0600 Subject: [PATCH] Updated Rackspace Cloud Load Balancers doc. --- .../cloudloadbalancers/domain/AccessRule.java | 2 +- .../domain/LoadBalancer.java | 2 +- .../domain/LoadBalancerInfo.java | 4 +- .../cloudloadbalancers/domain/Node.java | 4 +- .../features/AccessRuleApi.java | 2 +- .../features/ConnectionApi.java | 5 +- .../features/ErrorPageApi.java | 4 +- .../features/LoadBalancerApi.java | 45 ++------------ .../cloudloadbalancers/features/NodeApi.java | 60 +++---------------- .../features/ReportApi.java | 4 +- 10 files changed, 28 insertions(+), 104 deletions(-) diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/domain/AccessRule.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/domain/AccessRule.java index 52bc0412f5..6148057b67 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/domain/AccessRule.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/domain/AccessRule.java @@ -27,7 +27,7 @@ import com.google.common.base.Objects.ToStringHelper; * The access rule management feature allows fine-grained network access controls to be applied to the load balancer's * virtual IP address. A single IP address, multiple IP addresses, or entire network subnets can be added as an access * rule. Rules that are configured with the ALLOW type will always take precedence over rules with the DENY type. To - * reject traffic from all rules except for those with the ALLOW type, add an access rules with an address of + * reject traffic from all rules except for those with the ALLOW type, add an access rule with an address of * "0.0.0.0/0" and a DENY type. * * @author Everett Toews diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/domain/LoadBalancer.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/domain/LoadBalancer.java index 914a0d3229..958d7239fe 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/domain/LoadBalancer.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/domain/LoadBalancer.java @@ -131,7 +131,7 @@ public class LoadBalancer extends BaseLoadBalancer { * Broken out as a separate field because when LoadBalancers are returned from * {@link LoadBalancerApi#list()}, no Nodes are returned (so you can't rely on getNodes().size()) * but a nodeCount is returned. When {@link LoadBalancerApi#get(int)} is called, nodes are - * returned by no nodeCount is returned. + * returned but no nodeCount is returned. * * @return The number of Nodes in this LoadBalancer */ diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/domain/LoadBalancerInfo.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/domain/LoadBalancerInfo.java index 785d9ca0a6..4235bebd8d 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/domain/LoadBalancerInfo.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/domain/LoadBalancerInfo.java @@ -33,8 +33,8 @@ public final class LoadBalancerInfo { private Iterable loadBalancerUsageRecords; @ConstructorProperties({ "loadBalancerId", "loadBalancerName", "loadBalancerUsageRecords" }) - protected LoadBalancerInfo(int port, String name, Iterable loadBalancerUsageRecords) { - this.loadBalancerId = port; + protected LoadBalancerInfo(int id, String name, Iterable loadBalancerUsageRecords) { + this.loadBalancerId = id; this.loadBalancerName = checkNotNull(name, "name"); this.loadBalancerUsageRecords = checkNotNull(loadBalancerUsageRecords, "loadBalancerUsageRecords"); } diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/domain/Node.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/domain/Node.java index abd5704fb3..c705155def 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/domain/Node.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/domain/Node.java @@ -118,12 +118,12 @@ public class Node extends BaseNode { ONLINE, /** - * represents a node that cannot accept or service traffic + * Represents a node that cannot accept or service traffic. */ OFFLINE, /** - * represents a node that stops the traffic manager from sending any additional new + * Represents a node that stops the traffic manager from sending any additional new * connections to the node, but honors established sessions. */ DRAINING, diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/AccessRuleApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/AccessRuleApi.java index 6a2562d6c0..3515068c24 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/AccessRuleApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/AccessRuleApi.java @@ -41,7 +41,7 @@ public interface AccessRuleApi { void create(Iterable accessRules); /** - * List the AccessRules + * List the AccessRules. */ Iterable list(); diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/ConnectionApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/ConnectionApi.java index 060509e608..8c7186ac3c 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/ConnectionApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/ConnectionApi.java @@ -30,8 +30,7 @@ import org.jclouds.rackspace.cloudloadbalancers.domain.ConnectionThrottle; public interface ConnectionApi { /** * The connection throttling feature imposes limits on the number of connections per IP address to help mitigate - * malicious or abusive traffic to your applications. The attributes in the table that follows can be configured - * based on the traffic patterns for your sites. + * malicious or abusive traffic to your applications. */ void createOrUpdateConnectionThrottle(ConnectionThrottle connectionThrottle); @@ -43,7 +42,7 @@ public interface ConnectionApi { /** * Delete connection throttle. * - * @return true on a successful delete, false if the connection throttle was not found + * @return true on a successful delete, false if the connection throttle was not found. */ boolean deleteConnectionThrottle(); diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/ErrorPageApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/ErrorPageApi.java index 490d658503..b89b568d75 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/ErrorPageApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/ErrorPageApi.java @@ -21,8 +21,8 @@ package org.jclouds.rackspace.cloudloadbalancers.features; /** * An error page is the html file that is shown to an end user who is attempting to access a load balancer node that * is offline/unavailable. During provisioning, every load balancer is configured with a default error page that gets - * displayed when traffic is requested for an offline node. A single custom error page may be added per account load - * balancer with an HTTP protocol. Page updates will override existing content. + * displayed when traffic is requested for an offline node. A single custom error page may be added to a load + * balancer with an HTTP-based protocol. Page updates will override existing content. *

* * @see ErrorPageAsyncApi diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/LoadBalancerApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/LoadBalancerApi.java index 4de6f56754..7d281886e3 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/LoadBalancerApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/LoadBalancerApi.java @@ -22,7 +22,6 @@ import java.util.Map; import org.jclouds.collect.IterableWithMarker; import org.jclouds.collect.PagedIterable; -import org.jclouds.http.HttpResponseException; import org.jclouds.openstack.v2_0.options.PaginationOptions; import org.jclouds.rackspace.cloudloadbalancers.domain.LoadBalancer; import org.jclouds.rackspace.cloudloadbalancers.domain.LoadBalancerAttributes; @@ -40,70 +39,38 @@ public interface LoadBalancerApi { /** * Create a new load balancer with the configuration defined by the request. * - *

- * This operation asynchronously provisions a new load balancer based on the configuration - * defined in the request object. Once the request is validated and progress has started on the - * provisioning process, a response object will be returned. - * - * - * @param lb - * configuration to create * @return The object will contain a unique identifier and status of the request. Using the * identifier, the caller can check on the progress of the operation by performing a - * {@link LoadBalancerApi#getLoadBalancer}. - * @throws HttpResponseException - * If the corresponding request cannot be fulfilled due to insufficient or invalid - * data - * + * {@link LoadBalancerApi#get}. */ LoadBalancer create(LoadBalancerRequest lb); /** - * * Update the properties of a load balancer. * - *

- * This operation asynchronously updates the attributes of the specified load balancer. Upon - * successful validation of the request, the service will return a 202 (Accepted) response code. - * A caller can poll the load balancer with its ID to wait for the changes to be applied and the - * load balancer to return to an ACTIVE status. - * - * @param id - * id of the loadbalancer to change - * @param attrs - * what to change * @return The object will contain a unique identifier and status of the request. Using the * identifier, the caller can check on the progress of the operation by performing a - * {@link LoadBalancerApi#getLoadBalancer}. - * @see LoadBalancerAttributes#fromLoadBalancer + * {@link LoadBalancerApi#get}. */ void update(int id, LoadBalancerAttributes attrs); /** - * - * @return all load balancers configured for the account, or empty set if none available + * List the load balancers. */ PagedIterable list(); + /** + * List the load balancers with full control of pagination. + */ IterableWithMarker list(PaginationOptions options); /** * Get a load balancer. - * - * @param id - * id of the loadbalancer to retrieve - * @return details of the specified load balancer, or null if not found */ LoadBalancer get(int id); /** * Delete a load balancer. - *

- * Delete the specified load balancer and its associated configuration from the account. Any and all configuration - * data is immediately purged and isnot recoverable. - * - * @param id - * to remove */ void delete(int id); diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/NodeApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/NodeApi.java index af326ff15a..1b96af7d50 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/NodeApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/NodeApi.java @@ -20,11 +20,10 @@ package org.jclouds.rackspace.cloudloadbalancers.features; import java.util.Map; import java.util.Set; + import org.jclouds.collect.IterableWithMarker; import org.jclouds.collect.PagedIterable; -import org.jclouds.http.HttpResponseException; import org.jclouds.openstack.v2_0.options.PaginationOptions; -import org.jclouds.rackspace.cloudloadbalancers.domain.LoadBalancerAttributes; import org.jclouds.rackspace.cloudloadbalancers.domain.Metadata; import org.jclouds.rackspace.cloudloadbalancers.domain.Node; import org.jclouds.rackspace.cloudloadbalancers.domain.NodeAttributes; @@ -40,77 +39,36 @@ import org.jclouds.rackspace.cloudloadbalancers.domain.NodeRequest; public interface NodeApi { /** * Create a new node with the configuration defined by the request. - * - *

- * When a node is added, it is assigned a unique identifier that can be used for mutating operations - * such as changing the condition or removing it. Every load balancer is dual-homed on both the public - * Internet and ServiceNet; as a result, nodes can either be internal ServiceNet addresses or addresses - * on the public Internet. - * - * @param nodes - * configurations to create - * @return created nodes - * @throws HttpResponseException - * If the corresponding request cannot be fulfilled due to insufficient or invalid - * data - * */ Set add(Iterable nodes); /** - * - * Update the properties of a node. - * - *

- * This operation asynchronously updates the attributes of the specified node. Upon - * successful validation of the request, the service will return a 202 (Accepted) response code. - * A caller can poll the load balancer with its ID to wait for the changes to be applied and the - * load balancer to return to an ACTIVE status. - * @param id - * node to get - * @param attrs - * what to change - * - * @see LoadBalancerAttributes#fromLoadBalancer + * Update the attributes of a node. */ void update(int id, NodeAttributes attrs); /** - * @return all nodes for a given loadbalancer, or empty set if none available + * List the nodes. */ PagedIterable list(); + /** + * List the nodes with full control of pagination. + */ IterableWithMarker list(PaginationOptions options); /** - * @param id - * node to get - * @return details of the specified node, or null if not found + * Get a node. */ Node get(int id); /** - * Remove a node from the account. - *

- * The remove load balancer function removes the specified load balancer and its associated - * configuration from the account. Any and all configuration data is immediately purged and is - * not recoverable. - * - * @param id - * node to remove + * Remove a node from the load balancer. */ void remove(int id); /** - * Batch-remove nodes from the account. - *

- * The current default limit is ten ids per request. Any and all configuration data is - * immediately purged and is not recoverable. By chance one of the items in the list - * cannot be removed due to its current status a 400:BadRequest is returned along with the ids - * of the ones the system identified as potential failures for this request - * - * @param ids - * nodes to remove + * Batch remove nodes from the load balancer. */ void remove(Iterable ids); diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/ReportApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/ReportApi.java index 8620598d13..2c4e917981 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/ReportApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/features/ReportApi.java @@ -30,7 +30,7 @@ import org.jclouds.rackspace.cloudloadbalancers.domain.LoadBalancerUsage; import org.jclouds.rackspace.cloudloadbalancers.domain.Protocol; /** - * + * Reporting for load balancers. *

* @see ReportAsyncApi * @author Everett Toews @@ -44,7 +44,7 @@ public interface ReportApi { IterableWithMarker listBillableLoadBalancers(PaginationOptions options); /** - * View of all transfer activity, average number of connections, and number of virtual IPs associated with the load + * View all transfer activity, average number of connections, and number of virtual IPs associated with the load * balancing service. Historical usage data is available for up to 90 days of service activity. */ HistoricalUsage getHistoricalUsage(Date startTime, Date endTime);