Updated Rackspace Cloud Load Balancers doc.

This commit is contained in:
Everett Toews 2013-02-14 16:13:51 -06:00
parent 49990d97e4
commit 9c2990201b
10 changed files with 28 additions and 104 deletions

View File

@ -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

View File

@ -131,7 +131,7 @@ public class LoadBalancer extends BaseLoadBalancer<Node, LoadBalancer> {
* 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
*/

View File

@ -33,8 +33,8 @@ public final class LoadBalancerInfo {
private Iterable<LoadBalancerUsage> loadBalancerUsageRecords;
@ConstructorProperties({ "loadBalancerId", "loadBalancerName", "loadBalancerUsageRecords" })
protected LoadBalancerInfo(int port, String name, Iterable<LoadBalancerUsage> loadBalancerUsageRecords) {
this.loadBalancerId = port;
protected LoadBalancerInfo(int id, String name, Iterable<LoadBalancerUsage> loadBalancerUsageRecords) {
this.loadBalancerId = id;
this.loadBalancerName = checkNotNull(name, "name");
this.loadBalancerUsageRecords = checkNotNull(loadBalancerUsageRecords, "loadBalancerUsageRecords");
}

View File

@ -118,12 +118,12 @@ public class Node extends BaseNode<Node> {
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,

View File

@ -41,7 +41,7 @@ public interface AccessRuleApi {
void create(Iterable<AccessRule> accessRules);
/**
* List the AccessRules
* List the AccessRules.
*/
Iterable<AccessRuleWithId> list();

View File

@ -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();

View File

@ -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.
* <p/>
*
* @see ErrorPageAsyncApi

View File

@ -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.
*
* <p/>
* 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.
*
* <p/>
* 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<LoadBalancer> list();
/**
* List the load balancers with full control of pagination.
*/
IterableWithMarker<LoadBalancer> 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.
* <p/>
* 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);

View File

@ -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.
*
* <p/>
* 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<Node> add(Iterable<NodeRequest> nodes);
/**
*
* Update the properties of a node.
*
* <p/>
* 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<Node> list();
/**
* List the nodes with full control of pagination.
*/
IterableWithMarker<Node> 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.
* <p/>
* 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.
* <p/>
* 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<Integer> ids);

View File

@ -30,7 +30,7 @@ import org.jclouds.rackspace.cloudloadbalancers.domain.LoadBalancerUsage;
import org.jclouds.rackspace.cloudloadbalancers.domain.Protocol;
/**
*
* Reporting for load balancers.
* <p/>
* @see ReportAsyncApi
* @author Everett Toews
@ -44,7 +44,7 @@ public interface ReportApi {
IterableWithMarker<LoadBalancer> 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);