diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/LoadBalancerRequest.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/LoadBalancerCreate.java similarity index 87% rename from apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/LoadBalancerRequest.java rename to apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/LoadBalancerCreate.java index 578423dab6..6d9eb8e8f1 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/LoadBalancerRequest.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/LoadBalancerCreate.java @@ -37,30 +37,30 @@ import com.google.common.collect.ImmutableSet; * * @author Adrian Cole */ -public class LoadBalancerRequest extends BaseLoadBalancer { +public class LoadBalancerCreate extends BaseLoadBalancer { private final Set> virtualIps; private final Set accessRules; private final Map metadata; - public LoadBalancerRequest(String name, String protocol, @Nullable Integer port, Set nodes, + public LoadBalancerCreate(String name, String protocol, @Nullable Integer port, Set nodeAdds, @Nullable Algorithm algorithm, @Nullable Integer timeout, @Nullable Boolean halfClosed, @Nullable Map sessionPersistenceType, @Nullable Map connectionLogging, @Nullable ConnectionThrottle connectionThrottle, @Nullable HealthMonitor healthMonitor, @Nullable Set accessRules, @Nullable Map metadata, VirtualIP.Type virtualIPType, Integer virtualIPId) { - this(name, protocol, port, nodes, algorithm, timeout, halfClosed, sessionPersistenceType, connectionLogging, + this(name, protocol, port, nodeAdds, algorithm, timeout, halfClosed, sessionPersistenceType, connectionLogging, connectionThrottle, healthMonitor, accessRules, metadata, getVirtualIPsFromOptions(virtualIPType, virtualIPId)); } - public LoadBalancerRequest(String name, String protocol, @Nullable Integer port, Set nodes, + public LoadBalancerCreate(String name, String protocol, @Nullable Integer port, Set nodeAdds, @Nullable Algorithm algorithm, @Nullable Integer timeout, @Nullable Boolean halfClosed, @Nullable Map sessionPersistenceType, @Nullable Map connectionLogging, @Nullable ConnectionThrottle connectionThrottle, @Nullable HealthMonitor healthMonitor, @Nullable Set accessRules, @Nullable Map metadata, Set> virtualIPsFromOptions) { - super(name, protocol, port, nodes, algorithm, timeout, halfClosed, sessionPersistenceType, connectionLogging, + super(name, protocol, port, nodeAdds, algorithm, timeout, halfClosed, sessionPersistenceType, connectionLogging, connectionThrottle, healthMonitor); this.virtualIps = checkNotNull(virtualIPsFromOptions, "virtualIPsFromOptions"); this.accessRules = accessRules; @@ -100,7 +100,7 @@ public class LoadBalancerRequest extends BaseLoadBalancer { + public static class Builder extends BaseLoadBalancer.Builder { private VirtualIP.Type virtualIPType; private Integer virtualIPId; private Set> virtualIps; @@ -150,14 +150,14 @@ public class LoadBalancerRequest extends BaseLoadBalancer nodes) { - this.nodes = ImmutableSet. copyOf(checkNotNull(nodes, "nodes")); + public Builder nodes(Iterable nodeAdds) { + this.nodes = ImmutableSet. copyOf(checkNotNull(nodeAdds, "nodes")); return this; } @@ -176,7 +176,7 @@ public class LoadBalancerRequest extends BaseLoadBalancer> LoadBalancerAttributes fromLoadBalancer(T lb) { + public static > LoadBalancerUpdate fromLoadBalancer(T lb) { return Builder.name(lb.getName()).port(lb.getPort()).protocol(lb.getProtocol()).algorithm(lb.getAlgorithm()) .timeout(lb.getTimeout()).halfClosed(lb.isHalfClosed()); } diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/NodeRequest.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/NodeAdd.java similarity index 91% rename from apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/NodeRequest.java rename to apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/NodeAdd.java index 5142492ff5..8ab085d3af 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/NodeRequest.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/NodeAdd.java @@ -49,13 +49,13 @@ import com.google.common.base.Objects.ToStringHelper; * * @author Adrian Cole */ -public class NodeRequest extends BaseNode { +public class NodeAdd extends BaseNode { // for serialization only - NodeRequest() { + NodeAdd() { } - public NodeRequest(String address, int port, Condition condition, Type type, Integer weight) { + public NodeAdd(String address, int port, Condition condition, Type type, Integer weight) { super(address, port, condition, type, weight); } @@ -79,16 +79,16 @@ public class NodeRequest extends BaseNode { if (this == obj) return true; if (obj == null || getClass() != obj.getClass()) return false; - NodeRequest that = NodeRequest.class.cast(obj); + NodeAdd that = NodeAdd.class.cast(obj); return Objects.equal(this.address, that.address) && Objects.equal(this.port, that.port); } - public static class Builder extends BaseNode.Builder { + public static class Builder extends BaseNode.Builder { @Override - public NodeRequest build() { - return new NodeRequest(address, port, condition, type, weight); + public NodeAdd build() { + return new NodeAdd(address, port, condition, type, weight); } /** @@ -131,7 +131,7 @@ public class NodeRequest extends BaseNode { return Builder.class.cast(super.weight(weight)); } @Override - public Builder from(NodeRequest in) { + public Builder from(NodeAdd in) { return Builder.class.cast(super.from(in)); } } diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/NodeAttributes.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/NodeUpdate.java similarity index 79% rename from apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/NodeAttributes.java rename to apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/NodeUpdate.java index b5366114ee..4036a8bdd5 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/NodeAttributes.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/NodeUpdate.java @@ -30,23 +30,23 @@ import com.google.common.base.Objects.ToStringHelper; * * @author Dan Lo Bianco */ -public class NodeAttributes { +public class NodeUpdate { protected Condition condition; protected Type type; protected Integer weight; - public NodeAttributes condition(Condition condition) { + public NodeUpdate condition(Condition condition) { this.condition = condition; return this; } - public NodeAttributes type(Type type) { + public NodeUpdate type(Type type) { this.type = type; return this; } - public NodeAttributes weight(Integer weight) { + public NodeUpdate weight(Integer weight) { this.weight = weight; return this; } @@ -71,7 +71,7 @@ public class NodeAttributes { if (this == obj) return true; if (obj == null || getClass() != obj.getClass()) return false; - NodeAttributes that = NodeAttributes.class.cast(obj); + NodeUpdate that = NodeUpdate.class.cast(obj); return Objects.equal(this.condition, that.condition) && Objects.equal(this.type, that.type) && Objects.equal(this.weight, that.weight); @@ -81,26 +81,26 @@ public class NodeAttributes { /** * @see BaseNode.Builder#condition(Condition) */ - public static NodeAttributes condition(Condition condition) { - return new NodeAttributes().condition(condition); + public static NodeUpdate condition(Condition condition) { + return new NodeUpdate().condition(condition); } /** * @see BaseNode.Builder#type(Type) */ - public static NodeAttributes type(Type type) { - return new NodeAttributes().type(type); + public static NodeUpdate type(Type type) { + return new NodeUpdate().type(type); } /** * @see BaseNode.Builder#weight(Integer) */ - public static NodeAttributes weight(Integer weight) { - return new NodeAttributes().weight(weight); + public static NodeUpdate weight(Integer weight) { + return new NodeUpdate().weight(weight); } } - public static > NodeAttributes fromNode(T n) { + public static > NodeUpdate fromNode(T n) { return Builder.condition(n.getCondition()).type(n.getType()).weight(n.getWeight()); } } diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/LoadBalancerApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/LoadBalancerApi.java index e8c8a420ba..b0ca139df4 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/LoadBalancerApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/LoadBalancerApi.java @@ -24,8 +24,8 @@ import org.jclouds.collect.IterableWithMarker; import org.jclouds.collect.PagedIterable; import org.jclouds.openstack.v2_0.options.PaginationOptions; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancer; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerAttributes; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerRequest; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerUpdate; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerCreate; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.Metadata; /** @@ -43,7 +43,7 @@ public interface LoadBalancerApi { * identifier, the caller can check on the progress of the operation by performing a * {@link LoadBalancerApi#get}. */ - LoadBalancer create(LoadBalancerRequest lb); + LoadBalancer create(LoadBalancerCreate lbCreate); /** * Update the properties of a load balancer. @@ -52,7 +52,7 @@ public interface LoadBalancerApi { * identifier, the caller can check on the progress of the operation by performing a * {@link LoadBalancerApi#get}. */ - void update(int id, LoadBalancerAttributes attrs); + void update(int id, LoadBalancerUpdate lbUpdate); /** * List the load balancers. diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/LoadBalancerAsyncApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/LoadBalancerAsyncApi.java index 9034ebef2f..a1f67f49eb 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/LoadBalancerAsyncApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/LoadBalancerAsyncApi.java @@ -44,8 +44,8 @@ import org.jclouds.openstack.keystone.v2_0.filters.AuthenticateRequest; import org.jclouds.openstack.v2_0.options.PaginationOptions; import org.jclouds.rackspace.cloudloadbalancers.v1.binders.BindMetadataToJsonPayload; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancer; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerAttributes; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerRequest; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerUpdate; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerCreate; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.Metadata; import org.jclouds.rackspace.cloudloadbalancers.v1.functions.ParseLoadBalancer; import org.jclouds.rackspace.cloudloadbalancers.v1.functions.ParseLoadBalancers; @@ -72,7 +72,7 @@ import com.google.common.util.concurrent.ListenableFuture; public interface LoadBalancerAsyncApi { /** - * @see LoadBalancerApi#create(LoadBalancerRequest) + * @see LoadBalancerApi#create(LoadBalancerCreate) */ @Named("lb:create") @POST @@ -80,17 +80,17 @@ public interface LoadBalancerAsyncApi { @Consumes(MediaType.APPLICATION_JSON) @Fallback(NullOnNotFoundOr404.class) @Path("/loadbalancers") - ListenableFuture create(@WrapWith("loadBalancer") LoadBalancerRequest lb); + ListenableFuture create(@WrapWith("loadBalancer") LoadBalancerCreate lbCreate); /** - * @see LoadBalancerApi#update(int, LoadBalancerAttributes) + * @see LoadBalancerApi#update(int, LoadBalancerUpdate) */ @Named("lb:update") @PUT @ResponseParser(ParseLoadBalancer.class) @Consumes(MediaType.APPLICATION_JSON) @Path("/loadbalancers/{id}") - ListenableFuture update(@PathParam("id") int id, @WrapWith("loadBalancer") LoadBalancerAttributes attrs); + ListenableFuture update(@PathParam("id") int id, @WrapWith("loadBalancer") LoadBalancerUpdate lbUpdate); /** * @see LoadBalancerApi#list() diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/NodeApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/NodeApi.java index d83808a7a1..0c5c7e207e 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/NodeApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/NodeApi.java @@ -26,8 +26,8 @@ import org.jclouds.collect.PagedIterable; import org.jclouds.openstack.v2_0.options.PaginationOptions; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.Metadata; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.Node; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeAttributes; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeRequest; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeUpdate; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeAdd; /** * Provides synchronous access to CloudLoadBalancers Node features. @@ -40,12 +40,12 @@ public interface NodeApi { /** * Create a new node with the configuration defined by the request. */ - Set add(Iterable nodes); + Set add(Iterable nodeAdds); /** * Update the attributes of a node. */ - void update(int id, NodeAttributes attrs); + void update(int id, NodeUpdate nodeUpdate); /** * List the nodes. diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/NodeAsyncApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/NodeAsyncApi.java index 30995b2656..c160ea7aaa 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/NodeAsyncApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/NodeAsyncApi.java @@ -47,8 +47,8 @@ import org.jclouds.rackspace.cloudloadbalancers.v1.binders.BindMetadataToJsonPay import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancer; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.Metadata; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.Node; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeAttributes; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeRequest; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeUpdate; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeAdd; import org.jclouds.rackspace.cloudloadbalancers.v1.functions.ParseMetadata; import org.jclouds.rackspace.cloudloadbalancers.v1.functions.ParseNode; import org.jclouds.rackspace.cloudloadbalancers.v1.functions.ParseNodes; @@ -83,16 +83,16 @@ public interface NodeAsyncApi { @Consumes(MediaType.APPLICATION_JSON) @Fallback(NullOnNotFoundOr404.class) @Path("/nodes") - ListenableFuture> add(@WrapWith("nodes") Iterable nodes); + ListenableFuture> add(@WrapWith("nodes") Iterable nodeAdds); /** - * @see NodeApi#update(int, NodeAttributes) + * @see NodeApi#update(int, NodeUpdate) */ @Named("node:update") @PUT @Consumes(MediaType.APPLICATION_JSON) @Path("/nodes/{id}") - ListenableFuture update(@PathParam("id") int id, @WrapWith("node") NodeAttributes attrs); + ListenableFuture update(@PathParam("id") int id, @WrapWith("node") NodeUpdate nodeUpdate); /** * @see NodeApi#list() diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/loadbalancer/strategy/CloudLoadBalancersLoadBalanceNodesStrategy.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/loadbalancer/strategy/CloudLoadBalancersLoadBalanceNodesStrategy.java index 8fc07ed84f..03e2b7f07e 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/loadbalancer/strategy/CloudLoadBalancersLoadBalanceNodesStrategy.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/loadbalancer/strategy/CloudLoadBalancersLoadBalanceNodesStrategy.java @@ -34,8 +34,8 @@ import org.jclouds.loadbalancer.strategy.LoadBalanceNodesStrategy; import org.jclouds.logging.Logger; import org.jclouds.rackspace.cloudloadbalancers.v1.CloudLoadBalancersApi; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancer; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerRequest; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeRequest; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerCreate; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeAdd; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.VirtualIP.Type; import com.google.common.base.Function; @@ -67,13 +67,13 @@ public class CloudLoadBalancersLoadBalanceNodesStrategy implements LoadBalanceNo // TODO need to query and update the LB per current design. LoadBalancer lb = client.getLoadBalancerApiForZone(region).create( - LoadBalancerRequest.builder().name(name).protocol(protocol.toUpperCase()).port(loadBalancerPort) + LoadBalancerCreate.builder().name(name).protocol(protocol.toUpperCase()).port(loadBalancerPort) .virtualIPType(Type.PUBLIC).nodes( - Iterables.transform(nodes, new Function() { + Iterables.transform(nodes, new Function() { @Override - public NodeRequest apply(NodeMetadata arg0) { - return NodeRequest.builder().address( + public NodeAdd apply(NodeMetadata arg0) { + return NodeAdd.builder().address( Iterables.get(arg0.getPrivateAddresses(), 0)).port(instancePort) .build(); diff --git a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/AccessRuleApiLiveTest.java b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/AccessRuleApiLiveTest.java index e5b086cba9..6ac2051c1a 100644 --- a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/AccessRuleApiLiveTest.java +++ b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/AccessRuleApiLiveTest.java @@ -30,8 +30,8 @@ import java.util.Map; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.AccessRule; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.AccessRuleWithId; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancer; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerRequest; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeRequest; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerCreate; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeAdd; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.VirtualIP.Type; import org.jclouds.rackspace.cloudloadbalancers.v1.internal.BaseCloudLoadBalancersApiLiveTest; import org.testng.annotations.AfterGroups; @@ -72,12 +72,12 @@ public class AccessRuleApiLiveTest extends BaseCloudLoadBalancersApiLiveTest { } public void testCreateLoadBalancer() { - NodeRequest nodeRequest = NodeRequest.builder().address("192.168.1.1").port(8080).build(); - LoadBalancerRequest lbRequest = LoadBalancerRequest.builder() - .name(prefix+"-jclouds").protocol("HTTP").port(80).virtualIPType(Type.PUBLIC).node(nodeRequest).build(); + NodeAdd nodeAdd = NodeAdd.builder().address("192.168.1.1").port(8080).build(); + LoadBalancerCreate lbCreate = LoadBalancerCreate.builder() + .name(prefix+"-jclouds").protocol("HTTP").port(80).virtualIPType(Type.PUBLIC).node(nodeAdd).build(); zone = "ORD";//Iterables.getFirst(clbApi.getConfiguredZones(), null); - lb = clbApi.getLoadBalancerApiForZone(zone).create(lbRequest); + lb = clbApi.getLoadBalancerApiForZone(zone).create(lbCreate); assertTrue(awaitAvailable(clbApi.getLoadBalancerApiForZone(zone)).apply(lb)); } diff --git a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ConnectionApiLiveTest.java b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ConnectionApiLiveTest.java index 75acc292bb..79a409a381 100644 --- a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ConnectionApiLiveTest.java +++ b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ConnectionApiLiveTest.java @@ -27,8 +27,8 @@ import static org.testng.Assert.assertTrue; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.ConnectionThrottle; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancer; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerRequest; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeRequest; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerCreate; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeAdd; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.VirtualIP.Type; import org.jclouds.rackspace.cloudloadbalancers.v1.internal.BaseCloudLoadBalancersApiLiveTest; import org.testng.annotations.AfterGroups; @@ -45,12 +45,12 @@ public class ConnectionApiLiveTest extends BaseCloudLoadBalancersApiLiveTest { private String zone; public void testCreateLoadBalancer() { - NodeRequest nodeRequest = NodeRequest.builder().address("192.168.1.1").port(8080).build(); - LoadBalancerRequest lbRequest = LoadBalancerRequest.builder() - .name(prefix+"-jclouds").protocol("HTTP").port(80).virtualIPType(Type.PUBLIC).node(nodeRequest).build(); + NodeAdd nodeAdd = NodeAdd.builder().address("192.168.1.1").port(8080).build(); + LoadBalancerCreate lbCreate = LoadBalancerCreate.builder() + .name(prefix+"-jclouds").protocol("HTTP").port(80).virtualIPType(Type.PUBLIC).node(nodeAdd).build(); zone = Iterables.getFirst(clbApi.getConfiguredZones(), null); - lb = clbApi.getLoadBalancerApiForZone(zone).create(lbRequest); + lb = clbApi.getLoadBalancerApiForZone(zone).create(lbCreate); assertTrue(awaitAvailable(clbApi.getLoadBalancerApiForZone(zone)).apply(lb)); } diff --git a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ContentCachingApiLiveTest.java b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ContentCachingApiLiveTest.java index cc94b9797e..ce08591498 100644 --- a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ContentCachingApiLiveTest.java +++ b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ContentCachingApiLiveTest.java @@ -24,8 +24,8 @@ import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancer; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerRequest; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeRequest; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerCreate; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeAdd; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.VirtualIP.Type; import org.jclouds.rackspace.cloudloadbalancers.v1.internal.BaseCloudLoadBalancersApiLiveTest; import org.testng.annotations.AfterGroups; @@ -42,12 +42,12 @@ public class ContentCachingApiLiveTest extends BaseCloudLoadBalancersApiLiveTest private String zone; public void testCreateLoadBalancer() { - NodeRequest nodeRequest = NodeRequest.builder().address("192.168.1.1").port(8080).build(); - LoadBalancerRequest lbRequest = LoadBalancerRequest.builder() - .name(prefix+"-jclouds").protocol("HTTP").port(80).virtualIPType(Type.PUBLIC).node(nodeRequest).build(); + NodeAdd nodeAdd = NodeAdd.builder().address("192.168.1.1").port(8080).build(); + LoadBalancerCreate lbCreate = LoadBalancerCreate.builder() + .name(prefix+"-jclouds").protocol("HTTP").port(80).virtualIPType(Type.PUBLIC).node(nodeAdd).build(); zone = Iterables.getFirst(clbApi.getConfiguredZones(), null); - lb = clbApi.getLoadBalancerApiForZone(zone).create(lbRequest); + lb = clbApi.getLoadBalancerApiForZone(zone).create(lbCreate); assertTrue(awaitAvailable(clbApi.getLoadBalancerApiForZone(zone)).apply(lb)); } diff --git a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ErrorPageApiLiveTest.java b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ErrorPageApiLiveTest.java index cd2529d077..d00066200a 100644 --- a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ErrorPageApiLiveTest.java +++ b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ErrorPageApiLiveTest.java @@ -24,8 +24,8 @@ import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancer; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerRequest; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeRequest; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerCreate; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeAdd; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.VirtualIP.Type; import org.jclouds.rackspace.cloudloadbalancers.v1.internal.BaseCloudLoadBalancersApiLiveTest; import org.testng.annotations.AfterGroups; @@ -54,12 +54,12 @@ public class ErrorPageApiLiveTest extends BaseCloudLoadBalancersApiLiveTest { } public void testCreateLoadBalancer() { - NodeRequest nodeRequest = NodeRequest.builder().address("192.168.1.1").port(8080).build(); - LoadBalancerRequest lbRequest = LoadBalancerRequest.builder() - .name(prefix+"-jclouds").protocol("HTTP").port(80).virtualIPType(Type.PUBLIC).node(nodeRequest).build(); + NodeAdd nodeAdd = NodeAdd.builder().address("192.168.1.1").port(8080).build(); + LoadBalancerCreate lbCreate = LoadBalancerCreate.builder() + .name(prefix+"-jclouds").protocol("HTTP").port(80).virtualIPType(Type.PUBLIC).node(nodeAdd).build(); zone = Iterables.getFirst(clbApi.getConfiguredZones(), null); - lb = clbApi.getLoadBalancerApiForZone(zone).create(lbRequest); + lb = clbApi.getLoadBalancerApiForZone(zone).create(lbCreate); assertTrue(awaitAvailable(clbApi.getLoadBalancerApiForZone(zone)).apply(lb)); } diff --git a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/HealthMonitorApiLiveTest.java b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/HealthMonitorApiLiveTest.java index f30bb433c7..12b200239f 100644 --- a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/HealthMonitorApiLiveTest.java +++ b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/HealthMonitorApiLiveTest.java @@ -26,8 +26,8 @@ import static org.testng.Assert.assertTrue; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.HealthMonitor; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancer; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerRequest; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeRequest; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerCreate; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeAdd; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.VirtualIP.Type; import org.jclouds.rackspace.cloudloadbalancers.v1.internal.BaseCloudLoadBalancersApiLiveTest; import org.testng.annotations.AfterGroups; @@ -44,12 +44,12 @@ public class HealthMonitorApiLiveTest extends BaseCloudLoadBalancersApiLiveTest private String zone; public void testCreateLoadBalancer() { - NodeRequest nodeRequest = NodeRequest.builder().address("192.168.1.1").port(8080).build(); - LoadBalancerRequest lbRequest = LoadBalancerRequest.builder() - .name(prefix+"-jclouds").protocol("HTTP").port(80).virtualIPType(Type.PUBLIC).node(nodeRequest).build(); + NodeAdd nodeAdd = NodeAdd.builder().address("192.168.1.1").port(8080).build(); + LoadBalancerCreate lbCreate = LoadBalancerCreate.builder() + .name(prefix+"-jclouds").protocol("HTTP").port(80).virtualIPType(Type.PUBLIC).node(nodeAdd).build(); zone = Iterables.getFirst(clbApi.getConfiguredZones(), null); - lb = clbApi.getLoadBalancerApiForZone(zone).create(lbRequest); + lb = clbApi.getLoadBalancerApiForZone(zone).create(lbCreate); assertTrue(awaitAvailable(clbApi.getLoadBalancerApiForZone(zone)).apply(lb)); } diff --git a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/LoadBalancerApiExpectTest.java b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/LoadBalancerApiExpectTest.java index 2094b48f3d..5c296994b6 100644 --- a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/LoadBalancerApiExpectTest.java +++ b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/LoadBalancerApiExpectTest.java @@ -29,10 +29,11 @@ import javax.ws.rs.core.MediaType; import org.jclouds.http.HttpResponse; import org.jclouds.rackspace.cloudloadbalancers.v1.CloudLoadBalancersApi; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancer; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerAttributes; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerRequest; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerUpdate; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerCreate; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.Metadata; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeRequest; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeAdd; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.Node; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.VirtualIP; import org.jclouds.rackspace.cloudloadbalancers.v1.features.LoadBalancerApi; import org.jclouds.rackspace.cloudloadbalancers.v1.functions.ParseLoadBalancerTest; @@ -88,30 +89,30 @@ public class LoadBalancerApiExpectTest extends BaseCloudLoadBalancerApiExpectTes HttpResponse.builder().statusCode(200).payload(payloadFromResource("/loadbalancer-get.json")).build() ).getLoadBalancerApiForZone("DFW"); - NodeRequest nodeRequest1 = NodeRequest.builder() + NodeAdd nodeAdd1 = NodeAdd.builder() .address("10.1.1.1") - .condition(NodeRequest.Condition.ENABLED) + .condition(Node.Condition.ENABLED) .port(80) .build(); - NodeRequest nodeRequest2 = NodeRequest.builder() + NodeAdd nodeAdd2 = NodeAdd.builder() .address("10.1.1.2") - .condition(NodeRequest.Condition.ENABLED) + .condition(Node.Condition.ENABLED) .port(80) .build(); - Set nodeRequests = Sets.newHashSet(nodeRequest1, nodeRequest2); + Set nodeAdds = Sets.newHashSet(nodeAdd1, nodeAdd2); - LoadBalancerRequest lbRequest = LoadBalancerRequest.builder() + LoadBalancerCreate lbCreate = LoadBalancerCreate.builder() .name("sample-loadbalancer") .protocol("HTTP") .port(80) .algorithm(LoadBalancer.Algorithm.RANDOM) .virtualIPType(VirtualIP.Type.PUBLIC) - .nodes(nodeRequests) + .nodes(nodeAdds) .build(); - LoadBalancer loadBalancer = api.create(lbRequest); + LoadBalancer loadBalancer = api.create(lbCreate); assertEquals(loadBalancer, getExpectedLoadBalancer()); } @@ -125,13 +126,13 @@ public class LoadBalancerApiExpectTest extends BaseCloudLoadBalancerApiExpectTes HttpResponse.builder().statusCode(202).payload("").build() ).getLoadBalancerApiForZone("DFW"); - LoadBalancerAttributes lbAttrs = LoadBalancerAttributes.Builder + LoadBalancerUpdate lbUpdate = LoadBalancerUpdate.Builder .name("foo") .protocol("HTTPS") .port(443) .algorithm(LoadBalancer.Algorithm.RANDOM); - api.update(2000, lbAttrs); + api.update(2000, lbUpdate); } public void testRemoveLoadBalancer() { diff --git a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/LoadBalancerApiLiveTest.java b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/LoadBalancerApiLiveTest.java index fcf5a1ceb4..12f1b6f863 100644 --- a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/LoadBalancerApiLiveTest.java +++ b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/LoadBalancerApiLiveTest.java @@ -30,10 +30,10 @@ import java.util.Set; import java.util.logging.Logger; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancer; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerAttributes; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerRequest; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerUpdate; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerCreate; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.Metadata; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeRequest; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeAdd; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.VirtualIP.Type; import org.jclouds.rackspace.cloudloadbalancers.v1.internal.BaseCloudLoadBalancersApiLiveTest; import org.testng.annotations.AfterGroups; @@ -67,12 +67,12 @@ public class LoadBalancerApiLiveTest extends BaseCloudLoadBalancersApiLiveTest { Logger.getAnonymousLogger().info("starting lb in region " + zone); LoadBalancer lb = clbApi.getLoadBalancerApiForZone(zone).create( - LoadBalancerRequest.builder() + LoadBalancerCreate.builder() .name(prefix + "-" + zone) .protocol("HTTP") .port(80) .virtualIPType(Type.PUBLIC) - .node(NodeRequest.builder() + .node(NodeAdd.builder() .address("192.168.1.1") .port(8080) .build()) @@ -96,7 +96,7 @@ public class LoadBalancerApiLiveTest extends BaseCloudLoadBalancersApiLiveTest { public void testUpdateLoadBalancer() throws Exception { for (LoadBalancer lb: lbs) { clbApi.getLoadBalancerApiForZone(lb.getRegion()).update(lb.getId(), - LoadBalancerAttributes.Builder.name("foo" + "-" + lb.getRegion())); + LoadBalancerUpdate.Builder.name("foo" + "-" + lb.getRegion())); assertTrue(awaitAvailable(clbApi.getLoadBalancerApiForZone(lb.getRegion())).apply(lb)); diff --git a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/NodeApiExpectTest.java b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/NodeApiExpectTest.java index 8ad1848c79..0fc1a268a9 100644 --- a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/NodeApiExpectTest.java +++ b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/NodeApiExpectTest.java @@ -30,8 +30,8 @@ import org.jclouds.http.HttpResponse; import org.jclouds.rackspace.cloudloadbalancers.v1.CloudLoadBalancersApi; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.Metadata; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.Node; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeAttributes; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeRequest; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeUpdate; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeAdd; import org.jclouds.rackspace.cloudloadbalancers.v1.features.NodeApi; import org.jclouds.rackspace.cloudloadbalancers.v1.internal.BaseCloudLoadBalancerApiExpectTest; import org.testng.annotations.Test; @@ -84,31 +84,31 @@ public class NodeApiExpectTest extends BaseCloudLoadBalancerApiExpectTest nodeRequests = ImmutableSortedSet. of(nodeRequest1, nodeRequest2, nodeRequest3); + Set nodeAdds = ImmutableSortedSet. of(nodeAdd1, nodeAdd2, nodeAdd3); - Set nodes = api.add(nodeRequests); + Set nodes = api.add(nodeAdds); assertEquals(nodes, getExpectedNodes()); } @@ -121,12 +121,12 @@ public class NodeApiExpectTest extends BaseCloudLoadBalancerApiExpectTest()); assertTrue(awaitAvailable(clbApi.getLoadBalancerApiForZone(lb.getRegion())).apply(lb)); @@ -78,7 +78,7 @@ public class NodeApiLiveTest extends BaseCloudLoadBalancersApiLiveTest { String region = lb.getRegion(); Logger.getAnonymousLogger().info("starting node on loadbalancer " + lb.getId() + " in region " + region); Set newNodes = clbApi.getNodeApiForZoneAndLoadBalancer(region, lb.getId()).add( - ImmutableSet. of(NodeRequest.builder().address("192.168.1.2").port(8080).build())); + ImmutableSet. of(NodeAdd.builder().address("192.168.1.2").port(8080).build())); for (Node n : newNodes) { assertEquals(n.getStatus(), Node.Status.ONLINE); @@ -97,7 +97,7 @@ public class NodeApiLiveTest extends BaseCloudLoadBalancersApiLiveTest { for (Node n : entry.getValue()) { String region = entry.getKey().getRegion(); clbApi.getNodeApiForZoneAndLoadBalancer(region, entry.getKey().getId()).update(n.getId(), - NodeAttributes.Builder.weight(23)); + NodeUpdate.Builder.weight(23)); assertEquals(clbApi.getNodeApiForZoneAndLoadBalancer(region, entry.getKey().getId()).get(n.getId()) .getStatus(), Node.Status.ONLINE); diff --git a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ReportApiLiveTest.java b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ReportApiLiveTest.java index f72f28e042..f5d2f657bf 100644 --- a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ReportApiLiveTest.java +++ b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ReportApiLiveTest.java @@ -30,10 +30,10 @@ import java.util.Date; import org.jclouds.http.HttpResponseException; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.HistoricalUsage; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancer; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerRequest; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerCreate; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerStats; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerUsage; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeRequest; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeAdd; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.Protocol; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.VirtualIP.Type; import org.jclouds.rackspace.cloudloadbalancers.v1.internal.BaseCloudLoadBalancersApiLiveTest; @@ -52,12 +52,12 @@ public class ReportApiLiveTest extends BaseCloudLoadBalancersApiLiveTest { private String zone; public void testCreateLoadBalancer() { - NodeRequest nodeRequest = NodeRequest.builder().address("192.168.1.1").port(8080).build(); - LoadBalancerRequest lbRequest = LoadBalancerRequest.builder() - .name(prefix+"-jclouds").protocol("HTTP").port(80).virtualIPType(Type.PUBLIC).node(nodeRequest).build(); + NodeAdd nodeAdd = NodeAdd.builder().address("192.168.1.1").port(8080).build(); + LoadBalancerCreate lbCreate = LoadBalancerCreate.builder() + .name(prefix+"-jclouds").protocol("HTTP").port(80).virtualIPType(Type.PUBLIC).node(nodeAdd).build(); zone = Iterables.getFirst(clbApi.getConfiguredZones(), null); - lb = clbApi.getLoadBalancerApiForZone(zone).create(lbRequest); + lb = clbApi.getLoadBalancerApiForZone(zone).create(lbCreate); assertTrue(awaitAvailable(clbApi.getLoadBalancerApiForZone(zone)).apply(lb)); } diff --git a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/SSLTerminationApiLiveTest.java b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/SSLTerminationApiLiveTest.java index 1ad43b9c9d..e053a583f2 100644 --- a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/SSLTerminationApiLiveTest.java +++ b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/SSLTerminationApiLiveTest.java @@ -25,8 +25,8 @@ import static org.testng.Assert.assertNull; import static org.testng.Assert.assertTrue; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancer; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerRequest; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeRequest; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerCreate; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeAdd; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.SSLTermination; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.VirtualIP.Type; import org.jclouds.rackspace.cloudloadbalancers.v1.internal.BaseCloudLoadBalancersApiLiveTest; @@ -44,12 +44,12 @@ public class SSLTerminationApiLiveTest extends BaseCloudLoadBalancersApiLiveTest private String zone; public void testCreateLoadBalancer() { - NodeRequest nodeRequest = NodeRequest.builder().address("192.168.1.1").port(8080).build(); - LoadBalancerRequest lbRequest = LoadBalancerRequest.builder() - .name(prefix+"-jclouds").protocol("HTTP").port(80).virtualIPType(Type.PUBLIC).node(nodeRequest).build(); + NodeAdd nodeAdd = NodeAdd.builder().address("192.168.1.1").port(8080).build(); + LoadBalancerCreate lbCreate = LoadBalancerCreate.builder() + .name(prefix+"-jclouds").protocol("HTTP").port(80).virtualIPType(Type.PUBLIC).node(nodeAdd).build(); zone = Iterables.getFirst(clbApi.getConfiguredZones(), null); - lb = clbApi.getLoadBalancerApiForZone(zone).create(lbRequest); + lb = clbApi.getLoadBalancerApiForZone(zone).create(lbCreate); assertTrue(awaitAvailable(clbApi.getLoadBalancerApiForZone(zone)).apply(lb)); } diff --git a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/SessionPersistenceApiLiveTest.java b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/SessionPersistenceApiLiveTest.java index bedd2fae01..1e8be080f6 100644 --- a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/SessionPersistenceApiLiveTest.java +++ b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/SessionPersistenceApiLiveTest.java @@ -25,8 +25,8 @@ import static org.testng.Assert.assertNull; import static org.testng.Assert.assertTrue; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancer; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerRequest; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeRequest; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerCreate; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeAdd; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.SessionPersistence; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.VirtualIP.Type; import org.jclouds.rackspace.cloudloadbalancers.v1.internal.BaseCloudLoadBalancersApiLiveTest; @@ -44,12 +44,12 @@ public class SessionPersistenceApiLiveTest extends BaseCloudLoadBalancersApiLive private String zone; public void testCreateLoadBalancer() { - NodeRequest nodeRequest = NodeRequest.builder().address("192.168.1.1").port(8080).build(); - LoadBalancerRequest lbRequest = LoadBalancerRequest.builder() - .name(prefix+"-jclouds").protocol("HTTP").port(80).virtualIPType(Type.PUBLIC).node(nodeRequest).build(); + NodeAdd nodeAdd = NodeAdd.builder().address("192.168.1.1").port(8080).build(); + LoadBalancerCreate lbCreate = LoadBalancerCreate.builder() + .name(prefix+"-jclouds").protocol("HTTP").port(80).virtualIPType(Type.PUBLIC).node(nodeAdd).build(); zone = Iterables.getFirst(clbApi.getConfiguredZones(), null); - lb = clbApi.getLoadBalancerApiForZone(zone).create(lbRequest); + lb = clbApi.getLoadBalancerApiForZone(zone).create(lbCreate); assertTrue(awaitAvailable(clbApi.getLoadBalancerApiForZone(zone)).apply(lb)); } diff --git a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/VirtualIPApiLiveTest.java b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/VirtualIPApiLiveTest.java index cee12ae83b..95614027ac 100644 --- a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/VirtualIPApiLiveTest.java +++ b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/VirtualIPApiLiveTest.java @@ -26,8 +26,8 @@ import static org.testng.Assert.assertTrue; import java.util.List; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancer; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerRequest; -import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeRequest; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancerCreate; +import org.jclouds.rackspace.cloudloadbalancers.v1.domain.NodeAdd; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.VirtualIP; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.VirtualIPWithId; import org.jclouds.rackspace.cloudloadbalancers.v1.domain.VirtualIP.Type; @@ -48,12 +48,12 @@ public class VirtualIPApiLiveTest extends BaseCloudLoadBalancersApiLiveTest { private String zone; public void testCreateLoadBalancer() { - NodeRequest nodeRequest = NodeRequest.builder().address("192.168.1.1").port(8080).build(); - LoadBalancerRequest lbRequest = LoadBalancerRequest.builder() - .name(prefix+"-jclouds").protocol("HTTP").port(80).virtualIPType(Type.PUBLIC).node(nodeRequest).build(); + NodeAdd nodeAdd = NodeAdd.builder().address("192.168.1.1").port(8080).build(); + LoadBalancerCreate lbCreate = LoadBalancerCreate.builder() + .name(prefix+"-jclouds").protocol("HTTP").port(80).virtualIPType(Type.PUBLIC).node(nodeAdd).build(); zone = Iterables.getFirst(clbApi.getConfiguredZones(), null); - lb = clbApi.getLoadBalancerApiForZone(zone).create(lbRequest); + lb = clbApi.getLoadBalancerApiForZone(zone).create(lbCreate); assertTrue(awaitAvailable(clbApi.getLoadBalancerApiForZone(zone)).apply(lb)); }