You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ab...@apache.org on 2013/07/01 21:15:06 UTC

[19/24] JCLOUDS-151 - CloudStack refactored to remove async, *Client renamed to *Api.

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LoadBalancerApi.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LoadBalancerApi.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LoadBalancerApi.java
new file mode 100644
index 0000000..85d1f32
--- /dev/null
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LoadBalancerApi.java
@@ -0,0 +1,248 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.cloudstack.features;
+
+import java.util.Set;
+
+import javax.inject.Named;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+
+import org.jclouds.Fallbacks.EmptySetOnNotFoundOr404;
+import org.jclouds.Fallbacks.NullOnNotFoundOr404;
+import org.jclouds.cloudstack.domain.LoadBalancerRule;
+import org.jclouds.cloudstack.domain.LoadBalancerRule.Algorithm;
+import org.jclouds.cloudstack.domain.VirtualMachine;
+import org.jclouds.cloudstack.filters.AuthenticationFilter;
+import org.jclouds.cloudstack.options.CreateLoadBalancerRuleOptions;
+import org.jclouds.cloudstack.options.ListLoadBalancerRulesOptions;
+import org.jclouds.cloudstack.options.UpdateLoadBalancerRuleOptions;
+import org.jclouds.functions.JoinOnComma;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.OnlyElement;
+import org.jclouds.rest.annotations.ParamParser;
+import org.jclouds.rest.annotations.QueryParams;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.SelectJson;
+
+/**
+ * Provides synchronous access to cloudstack via their REST API.
+ * <p/>
+ * 
+ * @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html" />
+ * @author Adrian Cole
+ */
+@RequestFilters(AuthenticationFilter.class)
+@QueryParams(keys = "response", values = "json")
+public interface LoadBalancerApi {
+
+   /**
+    * List the load balancer rules
+    * 
+    * @param options
+    *           if present, how to constrain the list.
+    * @return load balancer rules matching query, or empty set, if no load
+    *         balancer rules are found
+    */
+   @Named("listLoadBalancerRules")
+   @GET
+   @QueryParams(keys = { "command", "listAll" }, values = { "listLoadBalancerRules", "true" })
+   @SelectJson("loadbalancerrule")
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Fallback(EmptySetOnNotFoundOr404.class)
+   Set<LoadBalancerRule> listLoadBalancerRules(ListLoadBalancerRulesOptions... options);
+
+   /**
+    * get a specific LoadBalancerRule by id
+    * 
+    * @param id
+    *           LoadBalancerRule to get
+    * @return LoadBalancerRule or null if not found
+    */
+   @Named("listLoadBalancerRules")
+   @GET
+   @QueryParams(keys = { "command", "listAll" }, values = { "listLoadBalancerRules", "true" })
+   @SelectJson("loadbalancerrule")
+   @OnlyElement
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Fallback(NullOnNotFoundOr404.class)
+   LoadBalancerRule getLoadBalancerRule(@QueryParam("id") String id);
+
+   /**
+    * Creates a load balancer rule.
+    * 
+    * @param publicIPId
+    *           the public port from where the network traffic will be load
+    *           balanced from
+    * @param algorithm
+    *           load balancer algorithm (source, roundrobin, leastconn)
+    * @param name
+    *           name of the load balancer rule
+    * @param privatePort
+    *           the private port of the private ip address/virtual machine where
+    *           the network traffic will be load balanced to
+    * @param publicPort
+    *           public ip address id from where the network traffic will be load
+    *           balanced from
+    * @param options optional call arguments
+    * @return newly created rule
+    */
+   @Named("createLoadBalancerRule")
+   @GET
+   @QueryParams(keys = "command", values = "createLoadBalancerRule")
+   @SelectJson("jobid")
+   @Consumes(MediaType.APPLICATION_JSON)
+   String createLoadBalancerRuleForPublicIP(@QueryParam("publicipid") String publicIPId,
+         @QueryParam("algorithm") Algorithm algorithm, @QueryParam("name") String name,
+         @QueryParam("privateport") int privatePort, @QueryParam("publicport") int publicPort,
+         CreateLoadBalancerRuleOptions... options);
+
+   /**
+    * Update a load balancer rule.
+    *
+    * @param id
+    *       rule id
+    * @param options
+    *       optional arguments
+    * @return updated rule
+    */
+   @Named("updateLoadBalancerRule")
+   @GET
+   @QueryParams(keys = "command", values ="updateLoadBalancerRule")
+   @SelectJson("loadbalancerrule")
+   @OnlyElement
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Fallback(NullOnNotFoundOr404.class)
+   LoadBalancerRule updateLoadBalancerRule(@QueryParam("id") String id, UpdateLoadBalancerRuleOptions... options);
+
+   /**
+    * 
+    * deletes a loadbalancer rule
+    * 
+    * @param id
+    *           id of the rule to delete
+    * @return async job id of the job completing or null, if the load balancer
+    *         rule was not found.
+    */
+   @Named("deleteLoadBalancerRule")
+   @GET
+   @QueryParams(keys = "command", values = "deleteLoadBalancerRule")
+   @SelectJson("jobid")
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Fallback(NullOnNotFoundOr404.class)
+   String deleteLoadBalancerRule(@QueryParam("id") String id);
+
+   /**
+    * Assigns virtual machine or a list of virtual machines to a load balancer
+    * rule.
+    * 
+    * @param id
+    *           the ID of the load balancer rule
+    * @param virtualMachineIds
+    *           the list of IDs of the virtual machine that are being assigned
+    *           to the load balancer rule
+    * @return job id related to the operation
+    */
+   @Named("assignToLoadBalancerRule")
+   @GET
+   @QueryParams(keys = "command", values = "assignToLoadBalancerRule")
+   @Fallback(NullOnNotFoundOr404.class)
+   @SelectJson("jobid")
+   @Consumes(MediaType.APPLICATION_JSON)
+   String assignVirtualMachinesToLoadBalancerRule(@QueryParam("id") String id,
+         @QueryParam("virtualmachineids") @ParamParser(JoinOnComma.class) Iterable<String> virtualMachineIds);
+
+   /**
+    * Assigns virtual machine or a list of virtual machines to a load balancer
+    * rule.
+    * 
+    * @param id
+    *           the ID of the load balancer rule
+    * @param virtualMachineIds
+    *           the list of IDs of the virtual machine that are being assigned
+    *           to the load balancer rule
+    * @return job id related to the operation
+    */
+   @Named("assignToLoadBalancerRule")
+   @GET
+   @QueryParams(keys = "command", values = "assignToLoadBalancerRule")
+   @Fallback(NullOnNotFoundOr404.class)
+   @SelectJson("jobid")
+   @Consumes(MediaType.APPLICATION_JSON)
+   String assignVirtualMachinesToLoadBalancerRule(@QueryParam("id") String id,
+         @QueryParam("virtualmachineids") @ParamParser(JoinOnComma.class) String... virtualMachineIds);
+
+   /**
+    * Removes a virtual machine or a list of virtual machines from a load
+    * balancer rule.
+    * 
+    * @param id
+    *           the ID of the load balancer rule
+    * @param virtualMachineIds
+    *           the list of IDs of the virtual machine that are being removed
+    *           from the load balancer rule
+    * @return job id related to the operation
+    */
+   @Named("removeFromLoadBalancerRule")
+   @GET
+   @QueryParams(keys = "command", values = "removeFromLoadBalancerRule")
+   @Fallback(NullOnNotFoundOr404.class)
+   @SelectJson("jobid")
+   @Consumes(MediaType.APPLICATION_JSON)
+   String removeVirtualMachinesFromLoadBalancerRule(@QueryParam("id") String id,
+         @QueryParam("virtualmachineids") @ParamParser(JoinOnComma.class) Iterable<String> virtualMachineIds);
+
+   /**
+    * Removes a virtual machine or a list of virtual machines from a load
+    * balancer rule.
+    * 
+    * @param id
+    *           the ID of the load balancer rule
+    * @param virtualMachineIds
+    *           the list of IDs of the virtual machine that are being removed
+    *           from the load balancer rule
+    * @return job id related to the operation
+    */
+   @Named("removeFromLoadBalancerRule")
+   @GET
+   @QueryParams(keys = "command", values = "removeFromLoadBalancerRule")
+   @Fallback(NullOnNotFoundOr404.class)
+   @SelectJson("jobid")
+   @Consumes(MediaType.APPLICATION_JSON)
+   String removeVirtualMachinesFromLoadBalancerRule(@QueryParam("id") String id,
+         @QueryParam("virtualmachineids") @ParamParser(JoinOnComma.class) String... virtualMachineIds);
+
+   /**
+    * List all virtual machine instances that are assigned to a load balancer
+    * rule.
+    * 
+    * @param id
+    *           id of the rule
+    * @return VirtualMachines matching query, or empty set, if no
+    *         VirtualMachines are assigned
+    */
+   @Named("listLoadBalancerRuleInstances")
+   @GET
+   @QueryParams(keys = { "command", "listAll" }, values = { "listLoadBalancerRuleInstances", "true" })
+   @SelectJson("loadbalancerruleinstance")
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Fallback(EmptySetOnNotFoundOr404.class)
+   Set<VirtualMachine> listVirtualMachinesAssignedToLoadBalancerRule(@QueryParam("id") String id);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LoadBalancerAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LoadBalancerAsyncClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LoadBalancerAsyncClient.java
deleted file mode 100644
index 34de82a..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LoadBalancerAsyncClient.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudstack.features;
-
-import java.util.Set;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks.EmptySetOnNotFoundOr404;
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.cloudstack.domain.LoadBalancerRule;
-import org.jclouds.cloudstack.domain.LoadBalancerRule.Algorithm;
-import org.jclouds.cloudstack.domain.VirtualMachine;
-import org.jclouds.cloudstack.filters.AuthenticationFilter;
-import org.jclouds.cloudstack.options.CreateLoadBalancerRuleOptions;
-import org.jclouds.cloudstack.options.ListLoadBalancerRulesOptions;
-import org.jclouds.cloudstack.options.UpdateLoadBalancerRuleOptions;
-import org.jclouds.functions.JoinOnComma;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.OnlyElement;
-import org.jclouds.rest.annotations.ParamParser;
-import org.jclouds.rest.annotations.QueryParams;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.SelectJson;
-
-import com.google.common.util.concurrent.ListenableFuture;
-
-/**
- * Provides asynchronous access to cloudstack via their REST API.
- * <p/>
- * 
- * @see LoadBalancerClient
- * @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html" />
- * @author Adrian Cole
- */
-@RequestFilters(AuthenticationFilter.class)
-@QueryParams(keys = "response", values = "json")
-public interface LoadBalancerAsyncClient {
-
-   /**
-    * @see LoadBalancerClient#listLoadBalancerRules
-    */
-   @Named("listLoadBalancerRules")
-   @GET
-   @QueryParams(keys = { "command", "listAll" }, values = { "listLoadBalancerRules", "true" })
-   @SelectJson("loadbalancerrule")
-   @Consumes(MediaType.APPLICATION_JSON)
-   @Fallback(EmptySetOnNotFoundOr404.class)
-   ListenableFuture<Set<LoadBalancerRule>> listLoadBalancerRules(ListLoadBalancerRulesOptions... options);
-
-   /**
-    * @see LoadBalancerClient#getLoadBalancerRule
-    */
-   @Named("listLoadBalancerRules")
-   @GET
-   @QueryParams(keys = { "command", "listAll" }, values = { "listLoadBalancerRules", "true" })
-   @SelectJson("loadbalancerrule")
-   @OnlyElement
-   @Consumes(MediaType.APPLICATION_JSON)
-   @Fallback(NullOnNotFoundOr404.class)
-   ListenableFuture<LoadBalancerRule> getLoadBalancerRule(@QueryParam("id") String id);
-
-   /**
-    * @see LoadBalancerClient#createLoadBalancerRuleForPublicIP
-    */
-   @Named("createLoadBalancerRule")
-   @GET
-   @QueryParams(keys = "command", values = "createLoadBalancerRule")
-   @SelectJson("jobid")
-   @Consumes(MediaType.APPLICATION_JSON)
-   ListenableFuture<String> createLoadBalancerRuleForPublicIP(@QueryParam("publicipid") String publicIPId,
-         @QueryParam("algorithm") Algorithm algorithm, @QueryParam("name") String name,
-         @QueryParam("privateport") int privatePort, @QueryParam("publicport") int publicPort,
-         CreateLoadBalancerRuleOptions... options);
-
-   /**
-    * @see LoadBalancerClient#updateLoadBalancerRule
-    */
-   @Named("updateLoadBalancerRule")
-   @GET
-   @QueryParams(keys = "command", values ="updateLoadBalancerRule")
-   @SelectJson("loadbalancerrule")
-   @OnlyElement
-   @Consumes(MediaType.APPLICATION_JSON)
-   @Fallback(NullOnNotFoundOr404.class)
-   ListenableFuture<LoadBalancerRule> updateLoadBalancerRule(@QueryParam("id") String id, UpdateLoadBalancerRuleOptions... options);
-
-   /**
-    * @see LoadBalancerClient#deleteLoadBalancerRule
-    */
-   @Named("deleteLoadBalancerRule")
-   @GET
-   @QueryParams(keys = "command", values = "deleteLoadBalancerRule")
-   @SelectJson("jobid")
-   @Consumes(MediaType.APPLICATION_JSON)
-   @Fallback(NullOnNotFoundOr404.class)
-   ListenableFuture<String> deleteLoadBalancerRule(@QueryParam("id") String id);
-
-   /**
-    * @see LoadBalancerClient#assignVirtualMachinesToLoadBalancerRule(String,Iterable)
-    */
-   @Named("assignToLoadBalancerRule")
-   @GET
-   @QueryParams(keys = "command", values = "assignToLoadBalancerRule")
-   @Fallback(NullOnNotFoundOr404.class)
-   @SelectJson("jobid")
-   @Consumes(MediaType.APPLICATION_JSON)
-   ListenableFuture<String> assignVirtualMachinesToLoadBalancerRule(@QueryParam("id") String id,
-         @QueryParam("virtualmachineids") @ParamParser(JoinOnComma.class) Iterable<String> virtualMachineIds);
-
-   /**
-    * @see LoadBalancerClient#assignVirtualMachinesToLoadBalancerRule(String,String[])
-    */
-   @Named("assignToLoadBalancerRule")
-   @GET
-   @QueryParams(keys = "command", values = "assignToLoadBalancerRule")
-   @Fallback(NullOnNotFoundOr404.class)
-   @SelectJson("jobid")
-   @Consumes(MediaType.APPLICATION_JSON)
-   ListenableFuture<String> assignVirtualMachinesToLoadBalancerRule(@QueryParam("id") String id,
-         @QueryParam("virtualmachineids") @ParamParser(JoinOnComma.class) String... virtualMachineIds);
-
-   /**
-    * @see LoadBalancerClient#removeVirtualMachinesFromLoadBalancerRule(String,Iterable)
-    */
-   @Named("removeFromLoadBalancerRule")
-   @GET
-   @QueryParams(keys = "command", values = "removeFromLoadBalancerRule")
-   @Fallback(NullOnNotFoundOr404.class)
-   @SelectJson("jobid")
-   @Consumes(MediaType.APPLICATION_JSON)
-   ListenableFuture<String> removeVirtualMachinesFromLoadBalancerRule(@QueryParam("id") String id,
-         @QueryParam("virtualmachineids") @ParamParser(JoinOnComma.class) Iterable<String> virtualMachineIds);
-
-   /**
-    * @see LoadBalancerClient#removeVirtualMachinesFromLoadBalancerRule(String,String[])
-    */
-   @Named("removeFromLoadBalancerRule")
-   @GET
-   @QueryParams(keys = "command", values = "removeFromLoadBalancerRule")
-   @Fallback(NullOnNotFoundOr404.class)
-   @SelectJson("jobid")
-   @Consumes(MediaType.APPLICATION_JSON)
-   ListenableFuture<String> removeVirtualMachinesFromLoadBalancerRule(@QueryParam("id") String id,
-         @QueryParam("virtualmachineids") @ParamParser(JoinOnComma.class) String... virtualMachineIds);
-
-   /**
-    * @see LoadBalancerClient#listVirtualMachinesAssignedToLoadBalancerRule
-    */
-   @Named("listLoadBalancerRuleInstances")
-   @GET
-   @QueryParams(keys = { "command", "listAll" }, values = { "listLoadBalancerRuleInstances", "true" })
-   @SelectJson("loadbalancerruleinstance")
-   @Consumes(MediaType.APPLICATION_JSON)
-   @Fallback(EmptySetOnNotFoundOr404.class)
-   ListenableFuture<Set<VirtualMachine>> listVirtualMachinesAssignedToLoadBalancerRule(@QueryParam("id") String id);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LoadBalancerClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LoadBalancerClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LoadBalancerClient.java
deleted file mode 100644
index 0552c99..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LoadBalancerClient.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudstack.features;
-
-import java.util.Set;
-import org.jclouds.cloudstack.domain.LoadBalancerRule;
-import org.jclouds.cloudstack.domain.VirtualMachine;
-import org.jclouds.cloudstack.domain.LoadBalancerRule.Algorithm;
-import org.jclouds.cloudstack.options.CreateLoadBalancerRuleOptions;
-import org.jclouds.cloudstack.options.ListLoadBalancerRulesOptions;
-import org.jclouds.cloudstack.options.UpdateLoadBalancerRuleOptions;
-
-/**
- * Provides synchronous access to CloudStack LoadBalancer features.
- * <p/>
- * 
- * @see LoadBalancerAsyncClient
- * @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html" />
- * @author Adrian Cole
- */
-public interface LoadBalancerClient {
-   /**
-    * List the load balancer rules
-    * 
-    * @param options
-    *           if present, how to constrain the list.
-    * @return load balancer rules matching query, or empty set, if no load
-    *         balancer rules are found
-    */
-   Set<LoadBalancerRule> listLoadBalancerRules(ListLoadBalancerRulesOptions... options);
-
-   /**
-    * get a specific LoadBalancerRule by id
-    * 
-    * @param id
-    *           LoadBalancerRule to get
-    * @return LoadBalancerRule or null if not found
-    */
-   LoadBalancerRule getLoadBalancerRule(String id);
-
-   /**
-    * Creates a load balancer rule.
-    * 
-    * @param publicIPId
-    *           the public port from where the network traffic will be load
-    *           balanced from
-    * @param algorithm
-    *           load balancer algorithm (source, roundrobin, leastconn)
-    * @param name
-    *           name of the load balancer rule
-    * @param privatePort
-    *           the private port of the private ip address/virtual machine where
-    *           the network traffic will be load balanced to
-    * @param publicPort
-    *           public ip address id from where the network traffic will be load
-    *           balanced from
-    * @param options optional call arguments
-    * @return newly created rule
-    */
-   String createLoadBalancerRuleForPublicIP(String publicIPId, Algorithm algorithm, String name,
-         int privatePort, int publicPort, CreateLoadBalancerRuleOptions... options);
-
-   /**
-    * Update a load balancer rule.
-    *
-    * @param id
-    *       rule id
-    * @param options
-    *       optional arguments
-    * @return updated rule
-    */
-   LoadBalancerRule updateLoadBalancerRule(String id, UpdateLoadBalancerRuleOptions... options);
-
-   /**
-    * 
-    * deletes a loadbalancer rule
-    * 
-    * @param id
-    *           id of the rule to delete
-    * @return async job id of the job completing or null, if the load balancer
-    *         rule was not found.
-    */
-   String deleteLoadBalancerRule(String id);
-
-   /**
-    * List all virtual machine instances that are assigned to a load balancer
-    * rule.
-    * 
-    * @param id
-    *           id of the rule
-    * @return VirtualMachines matching query, or empty set, if no
-    *         VirtualMachines are assigned
-    */
-   Set<VirtualMachine> listVirtualMachinesAssignedToLoadBalancerRule(String id);
-
-   /**
-    * Assigns virtual machine or a list of virtual machines to a load balancer
-    * rule.
-    * 
-    * @param id
-    *           the ID of the load balancer rule
-    * @param virtualMachineIds
-    *           the list of IDs of the virtual machine that are being assigned
-    *           to the load balancer rule
-    * @return job id related to the operation
-    */
-   String assignVirtualMachinesToLoadBalancerRule(String id, Iterable<String> virtualMachineIds);
-
-   /**
-    * Assigns virtual machine or a list of virtual machines to a load balancer
-    * rule.
-    * 
-    * @param id
-    *           the ID of the load balancer rule
-    * @param virtualMachineIds
-    *           the list of IDs of the virtual machine that are being assigned
-    *           to the load balancer rule
-    * @return job id related to the operation
-    */
-   String assignVirtualMachinesToLoadBalancerRule(String id, String... virtualMachineIds);
-
-   /**
-    * Removes a virtual machine or a list of virtual machines from a load
-    * balancer rule.
-    * 
-    * @param id
-    *           the ID of the load balancer rule
-    * @param virtualMachineIds
-    *           the list of IDs of the virtual machine that are being removed
-    *           from the load balancer rule
-    * @return job id related to the operation
-    */
-   String removeVirtualMachinesFromLoadBalancerRule(String id, Iterable<String> virtualMachineIds);
-
-   /**
-    * Removes a virtual machine or a list of virtual machines from a load
-    * balancer rule.
-    * 
-    * @param id
-    *           the ID of the load balancer rule
-    * @param virtualMachineIds
-    *           the list of IDs of the virtual machine that are being removed
-    *           from the load balancer rule
-    * @return job id related to the operation
-    */
-   String removeVirtualMachinesFromLoadBalancerRule(String id, String... virtualMachineIds);
-}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NATApi.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NATApi.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NATApi.java
new file mode 100644
index 0000000..688c2fb
--- /dev/null
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NATApi.java
@@ -0,0 +1,170 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.cloudstack.features;
+
+import java.util.Set;
+
+import javax.inject.Named;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+
+import org.jclouds.Fallbacks.EmptySetOnNotFoundOr404;
+import org.jclouds.Fallbacks.NullOnNotFoundOr404;
+import org.jclouds.cloudstack.domain.AsyncCreateResponse;
+import org.jclouds.cloudstack.domain.IPForwardingRule;
+import org.jclouds.cloudstack.filters.AuthenticationFilter;
+import org.jclouds.cloudstack.options.CreateIPForwardingRuleOptions;
+import org.jclouds.cloudstack.options.ListIPForwardingRulesOptions;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.OnlyElement;
+import org.jclouds.rest.annotations.QueryParams;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.SelectJson;
+import org.jclouds.rest.annotations.Unwrap;
+
+/**
+ * Provides synchronous access to cloudstack via their REST API.
+ * <p/>
+ * 
+ * @see <a
+ *      href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html"
+ *      />
+ * @author Adrian Cole
+ */
+@RequestFilters(AuthenticationFilter.class)
+@QueryParams(keys = "response", values = "json")
+public interface NATApi {
+
+   /**
+    * List the ip forwarding rules
+    * 
+    * @param options
+    *           if present, how to constrain the list.
+    * @return IPForwardingRules matching query, or empty set, if no
+    *         IPForwardingRules are found
+    */
+   @Named("listIpForwardingRules")
+   @GET
+   @QueryParams(keys = { "command", "listAll" }, values = { "listIpForwardingRules", "true" })
+   @SelectJson("ipforwardingrule")
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Fallback(EmptySetOnNotFoundOr404.class)
+   Set<IPForwardingRule> listIPForwardingRules(ListIPForwardingRulesOptions... options);
+
+   /**
+    * get a specific IPForwardingRule by id
+    * 
+    * @param id
+    *           IPForwardingRule to get
+    * @return IPForwardingRule or null if not found
+    */
+   @Named("listIpForwardingRules")
+   @GET
+   @QueryParams(keys = { "command", "listAll" }, values = { "listIpForwardingRules", "true" })
+   @SelectJson("ipforwardingrule")
+   @OnlyElement
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Fallback(NullOnNotFoundOr404.class)
+   IPForwardingRule getIPForwardingRule(@QueryParam("id") String id);
+
+   /**
+    * get a set of IPForwardingRules by ipaddress id
+    * 
+    * @param id
+    *           IPAddress of rule to get
+    * @return IPForwardingRule matching query or empty if not found
+    */
+   @Named("listIpForwardingRules")
+   @GET
+   @QueryParams(keys = { "command", "listAll" }, values = { "listIpForwardingRules", "true" })
+   @SelectJson("ipforwardingrule")
+   @Consumes(MediaType.APPLICATION_JSON)
+   Set<IPForwardingRule> getIPForwardingRulesForIPAddress(@QueryParam("ipaddressid") String id);
+
+   /**
+    * get a set of IPForwardingRules by virtual machine id
+    * 
+    * @param id
+    *           virtual machine of rule to get
+    * @return IPForwardingRule matching query or empty set if not found
+    */
+   @Named("listIpForwardingRules")
+   @GET
+   @QueryParams(keys = { "command", "listAll" }, values = { "listIpForwardingRules", "true" })
+   @SelectJson("ipforwardingrule")
+   @Consumes(MediaType.APPLICATION_JSON)
+   Set<IPForwardingRule> getIPForwardingRulesForVirtualMachine(@QueryParam("virtualmachineid") String id);
+
+   /**
+    * Creates an ip forwarding rule
+    * 
+    * @param IPAddressId
+    *           the public IP address id of the forwarding rule, already
+    *           associated via associateIp
+    * @param protocol
+    *           the protocol for the rule. Valid values are TCP or UDP.
+    * @param startPort
+    *           the start port for the rule
+    * @return response used to track creation
+    */
+   @Named("createIpForwardingRule")
+   @GET
+   @QueryParams(keys = "command", values = "createIpForwardingRule")
+   @Unwrap
+   @Consumes(MediaType.APPLICATION_JSON)
+   AsyncCreateResponse createIPForwardingRule(@QueryParam("ipaddressid") String IPAddressId,
+         @QueryParam("protocol") String protocol, @QueryParam("startport") int startPort,
+         CreateIPForwardingRuleOptions... options);
+
+   @Named("enableStaticNat")
+   @GET
+   @QueryParams(keys = "command", values = "enableStaticNat")
+   @Consumes(MediaType.APPLICATION_JSON)
+   void enableStaticNATForVirtualMachine(
+         @QueryParam("virtualmachineid") String virtualMachineId, @QueryParam("ipaddressid") String IPAddressId);
+
+   /**
+    * Deletes an ip forwarding rule
+    * 
+    * @param id
+    *           the id of the forwarding rule
+    */
+   @Named("deleteIpForwardingRule")
+   @GET
+   @QueryParams(keys = "command", values = "deleteIpForwardingRule")
+   @SelectJson("jobid")
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Fallback(NullOnNotFoundOr404.class)
+   String deleteIPForwardingRule(@QueryParam("id") String id);
+
+   /**
+    * Disables static rule for given ip address
+    * 
+    * @param IPAddressId
+    *           the public IP address id for which static nat feature is being
+    *           disabled
+    */
+   @Named("disableStaticNat")
+   @GET
+   @QueryParams(keys = "command", values = "disableStaticNat")
+   @SelectJson("jobid")
+   @Consumes(MediaType.APPLICATION_JSON)
+   String disableStaticNATOnPublicIP(@QueryParam("ipaddressid") String IPAddressId);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NATAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NATAsyncClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NATAsyncClient.java
deleted file mode 100644
index ed7ff5f..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NATAsyncClient.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudstack.features;
-
-import java.util.Set;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks.EmptySetOnNotFoundOr404;
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.cloudstack.domain.AsyncCreateResponse;
-import org.jclouds.cloudstack.domain.IPForwardingRule;
-import org.jclouds.cloudstack.filters.AuthenticationFilter;
-import org.jclouds.cloudstack.options.CreateIPForwardingRuleOptions;
-import org.jclouds.cloudstack.options.ListIPForwardingRulesOptions;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.OnlyElement;
-import org.jclouds.rest.annotations.QueryParams;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.annotations.Unwrap;
-
-import com.google.common.util.concurrent.ListenableFuture;
-
-/**
- * Provides asynchronous access to cloudstack via their REST API.
- * <p/>
- * 
- * @see NATClient
- * @see <a
- *      href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html"
- *      />
- * @author Adrian Cole
- */
-@RequestFilters(AuthenticationFilter.class)
-@QueryParams(keys = "response", values = "json")
-public interface NATAsyncClient {
-
-   /**
-    * @see NATClient#listIPForwardingRules
-    */
-   @Named("listIpForwardingRules")
-   @GET
-   @QueryParams(keys = { "command", "listAll" }, values = { "listIpForwardingRules", "true" })
-   @SelectJson("ipforwardingrule")
-   @Consumes(MediaType.APPLICATION_JSON)
-   @Fallback(EmptySetOnNotFoundOr404.class)
-   ListenableFuture<Set<IPForwardingRule>> listIPForwardingRules(ListIPForwardingRulesOptions... options);
-
-   /**
-    * @see NATClient#getIPForwardingRule
-    */
-   @Named("listIpForwardingRules")
-   @GET
-   @QueryParams(keys = { "command", "listAll" }, values = { "listIpForwardingRules", "true" })
-   @SelectJson("ipforwardingrule")
-   @OnlyElement
-   @Consumes(MediaType.APPLICATION_JSON)
-   @Fallback(NullOnNotFoundOr404.class)
-   ListenableFuture<IPForwardingRule> getIPForwardingRule(@QueryParam("id") String id);
-
-   /**
-    * @see NATClient#getIPForwardingRulesForIPAddress
-    */
-   @Named("listIpForwardingRules")
-   @GET
-   @QueryParams(keys = { "command", "listAll" }, values = { "listIpForwardingRules", "true" })
-   @SelectJson("ipforwardingrule")
-   @Consumes(MediaType.APPLICATION_JSON)
-   ListenableFuture<Set<IPForwardingRule>> getIPForwardingRulesForIPAddress(@QueryParam("ipaddressid") String id);
-
-   /**
-    * @see NATClient#getIPForwardingRulesForVirtualMachine
-    */
-   @Named("listIpForwardingRules")
-   @GET
-   @QueryParams(keys = { "command", "listAll" }, values = { "listIpForwardingRules", "true" })
-   @SelectJson("ipforwardingrule")
-   @Consumes(MediaType.APPLICATION_JSON)
-   ListenableFuture<Set<IPForwardingRule>> getIPForwardingRulesForVirtualMachine(@QueryParam("virtualmachineid") String id);
-
-   /**
-    * @see NATClient#createIPForwardingRule
-    */
-   @Named("createIpForwardingRule")
-   @GET
-   @QueryParams(keys = "command", values = "createIpForwardingRule")
-   @Unwrap
-   @Consumes(MediaType.APPLICATION_JSON)
-   ListenableFuture<AsyncCreateResponse> createIPForwardingRule(@QueryParam("ipaddressid") String IPAddressId,
-         @QueryParam("protocol") String protocol, @QueryParam("startport") int startPort,
-         CreateIPForwardingRuleOptions... options);
-
-   /**
-    * @see NATClient#enableStaticNATForVirtualMachine
-    */
-   @Named("enableStaticNat")
-   @GET
-   @QueryParams(keys = "command", values = "enableStaticNat")
-   @Consumes(MediaType.APPLICATION_JSON)
-   ListenableFuture<Void> enableStaticNATForVirtualMachine(
-         @QueryParam("virtualmachineid") String virtualMachineId, @QueryParam("ipaddressid") String IPAddressId);
-
-   /**
-    * @see NATClient#deleteIPForwardingRule
-    */
-   @Named("deleteIpForwardingRule")
-   @GET
-   @QueryParams(keys = "command", values = "deleteIpForwardingRule")
-   @SelectJson("jobid")
-   @Consumes(MediaType.APPLICATION_JSON)
-   @Fallback(NullOnNotFoundOr404.class)
-   ListenableFuture<String> deleteIPForwardingRule(@QueryParam("id") String id);
-
-   /**
-    * @see NATClient#disableStaticNATOnPublicIP
-    */
-   @Named("disableStaticNat")
-   @GET
-   @QueryParams(keys = "command", values = "disableStaticNat")
-   @SelectJson("jobid")
-   @Consumes(MediaType.APPLICATION_JSON)
-   ListenableFuture<String> disableStaticNATOnPublicIP(@QueryParam("ipaddressid") String IPAddressId);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NATClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NATClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NATClient.java
deleted file mode 100644
index ec6a7a2..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NATClient.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudstack.features;
-
-import java.util.Set;
-import org.jclouds.cloudstack.domain.AsyncCreateResponse;
-import org.jclouds.cloudstack.domain.IPForwardingRule;
-import org.jclouds.cloudstack.options.CreateIPForwardingRuleOptions;
-import org.jclouds.cloudstack.options.ListIPForwardingRulesOptions;
-
-/**
- * Provides synchronous access to CloudStack IPForwardingRule features.
- * <p/>
- * 
- * @see NATAsyncClient
- * @see <a
- *      href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html"
- *      />
- * @author Adrian Cole
- */
-public interface NATClient {
-   /**
-    * List the ip forwarding rules
-    * 
-    * @param options
-    *           if present, how to constrain the list.
-    * @return IPForwardingRules matching query, or empty set, if no
-    *         IPForwardingRules are found
-    */
-   Set<IPForwardingRule> listIPForwardingRules(ListIPForwardingRulesOptions... options);
-
-   /**
-    * get a specific IPForwardingRule by id
-    * 
-    * @param id
-    *           IPForwardingRule to get
-    * @return IPForwardingRule or null if not found
-    */
-   IPForwardingRule getIPForwardingRule(String id);
-
-   /**
-    * get a set of IPForwardingRules by ipaddress id
-    * 
-    * @param id
-    *           IPAddress of rule to get
-    * @return IPForwardingRule matching query or empty if not found
-    */
-   Set<IPForwardingRule> getIPForwardingRulesForIPAddress(String id);
-
-   /**
-    * get a set of IPForwardingRules by virtual machine id
-    * 
-    * @param id
-    *           virtual machine of rule to get
-    * @return IPForwardingRule matching query or empty set if not found
-    */
-   Set<IPForwardingRule> getIPForwardingRulesForVirtualMachine(String id);
-
-   /**
-    * Creates an ip forwarding rule
-    * 
-    * @param IPAddressId
-    *           the public IP address id of the forwarding rule, already
-    *           associated via associateIp
-    * @param protocol
-    *           the protocol for the rule. Valid values are TCP or UDP.
-    * @param startPort
-    *           the start port for the rule
-    * @return response used to track creation
-    */
-   AsyncCreateResponse createIPForwardingRule(String IPAddressId, String protocol, int startPort,
-         CreateIPForwardingRuleOptions... options);
-
-   /**
-    * Deletes an ip forwarding rule
-    * 
-    * @param id
-    *           the id of the forwarding rule
-    */
-   String deleteIPForwardingRule(String id);
-
-   void enableStaticNATForVirtualMachine(String virtualMachineId, String IPAddressId);
-
-   /**
-    * Disables static rule for given ip address
-    * 
-    * @param IPAddressId
-    *           the public IP address id for which static nat feature is being
-    *           disabled
-    */
-   String disableStaticNATOnPublicIP(String IPAddressId);
-}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkApi.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkApi.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkApi.java
new file mode 100644
index 0000000..db7418f
--- /dev/null
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkApi.java
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.cloudstack.features;
+
+import java.util.Set;
+
+import javax.inject.Named;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+
+import org.jclouds.Fallbacks.EmptySetOnNotFoundOr404;
+import org.jclouds.Fallbacks.NullOnNotFoundOr404;
+import org.jclouds.cloudstack.domain.Network;
+import org.jclouds.cloudstack.filters.AuthenticationFilter;
+import org.jclouds.cloudstack.options.CreateNetworkOptions;
+import org.jclouds.cloudstack.options.ListNetworksOptions;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.OnlyElement;
+import org.jclouds.rest.annotations.QueryParams;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.SelectJson;
+
+/**
+ * Provides synchronous access to cloudstack via their REST API.
+ * <p/>
+ * 
+ * @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html" />
+ * @author Adrian Cole
+ */
+@RequestFilters(AuthenticationFilter.class)
+@QueryParams(keys = "response", values = "json")
+public interface NetworkApi {
+
+   /**
+    * Lists networks
+    * 
+    * @param options
+    *           if present, how to constrain the list.
+    * @return networks matching query, or empty set, if no networks are found
+    */
+   @Named("listNetworks")
+   @GET
+   @QueryParams(keys = { "command", "listAll" }, values = { "listNetworks", "true" })
+   @SelectJson("network")
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Fallback(EmptySetOnNotFoundOr404.class)
+   Set<Network> listNetworks(ListNetworksOptions... options);
+
+   /**
+    * get a specific network by id
+    * 
+    * @param id
+    *           network to get
+    * @return network or null if not found
+    */
+   @Named("listNetworks")
+   @GET
+   @QueryParams(keys = { "command", "listAll" }, values = { "listNetworks", "true" })
+   @SelectJson("network")
+   @OnlyElement
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Fallback(NullOnNotFoundOr404.class)
+   Network getNetwork(@QueryParam("id") String id);
+
+   /**
+    * Creates a network
+    * 
+    * @param zoneId
+    *           the Zone ID for the Vlan ip range
+    * @param networkOfferingId
+    *           the network offering id
+    * @param name
+    *           the name of the network
+    * @param displayText
+    *           the display text of the network
+    * @param options
+    *           optional parameters
+    * @return newly created network
+    */
+   @Named("createNetwork")
+   @GET
+   @QueryParams(keys = "command", values = "createNetwork")
+   @SelectJson("network")
+   @Consumes(MediaType.APPLICATION_JSON)
+   Network createNetworkInZone(@QueryParam("zoneid") String zoneId,
+         @QueryParam("networkofferingid") String networkOfferingId, @QueryParam("name") String name,
+         @QueryParam("displaytext") String displayText, CreateNetworkOptions... options);
+
+   /**
+    * Deletes a network
+    * 
+    * @param id
+    *           the ID of the network
+    * @return job id related to destroying the network, or null if resource was
+    *         not found
+    */
+   @Named("deleteNetwork")
+   @GET
+   @QueryParams(keys = "command", values = "deleteNetwork")
+   @SelectJson("jobid")
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Fallback(NullOnNotFoundOr404.class)
+   String deleteNetwork(@QueryParam("id") String id);
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkAsyncClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkAsyncClient.java
deleted file mode 100644
index 8d40de8..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkAsyncClient.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudstack.features;
-
-import java.util.Set;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks.EmptySetOnNotFoundOr404;
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.cloudstack.domain.Network;
-import org.jclouds.cloudstack.filters.AuthenticationFilter;
-import org.jclouds.cloudstack.options.CreateNetworkOptions;
-import org.jclouds.cloudstack.options.ListNetworksOptions;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.OnlyElement;
-import org.jclouds.rest.annotations.QueryParams;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.SelectJson;
-
-import com.google.common.util.concurrent.ListenableFuture;
-
-/**
- * Provides asynchronous access to cloudstack via their REST API.
- * <p/>
- * 
- * @see NetworkClient
- * @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html" />
- * @author Adrian Cole
- */
-@RequestFilters(AuthenticationFilter.class)
-@QueryParams(keys = "response", values = "json")
-public interface NetworkAsyncClient {
-
-   /**
-    * @see NetworkClient#listNetworks
-    */
-   @Named("listNetworks")
-   @GET
-   @QueryParams(keys = { "command", "listAll" }, values = { "listNetworks", "true" })
-   @SelectJson("network")
-   @Consumes(MediaType.APPLICATION_JSON)
-   @Fallback(EmptySetOnNotFoundOr404.class)
-   ListenableFuture<Set<Network>> listNetworks(ListNetworksOptions... options);
-
-   /**
-    * @see NetworkClient#getNetwork
-    */
-   @Named("listNetworks")
-   @GET
-   @QueryParams(keys = { "command", "listAll" }, values = { "listNetworks", "true" })
-   @SelectJson("network")
-   @OnlyElement
-   @Consumes(MediaType.APPLICATION_JSON)
-   @Fallback(NullOnNotFoundOr404.class)
-   ListenableFuture<Network> getNetwork(@QueryParam("id") String id);
-
-   /**
-    * @see NetworkClient#createNetworkInZone
-    */
-   @Named("createNetwork")
-   @GET
-   @QueryParams(keys = "command", values = "createNetwork")
-   @SelectJson("network")
-   @Consumes(MediaType.APPLICATION_JSON)
-   ListenableFuture<Network> createNetworkInZone(@QueryParam("zoneid") String zoneId,
-         @QueryParam("networkofferingid") String networkOfferingId, @QueryParam("name") String name,
-         @QueryParam("displaytext") String displayText, CreateNetworkOptions... options);
-
-   /**
-    * @see NetworkClient#deleteNetwork
-    */
-   @Named("deleteNetwork")
-   @GET
-   @QueryParams(keys = "command", values = "deleteNetwork")
-   @SelectJson("jobid")
-   @Consumes(MediaType.APPLICATION_JSON)
-   @Fallback(NullOnNotFoundOr404.class)
-   ListenableFuture<String> deleteNetwork(@QueryParam("id") String id);
-}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkClient.java
deleted file mode 100644
index 821a64a..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkClient.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudstack.features;
-
-import java.util.Set;
-import org.jclouds.cloudstack.domain.Network;
-import org.jclouds.cloudstack.options.CreateNetworkOptions;
-import org.jclouds.cloudstack.options.ListNetworksOptions;
-
-/**
- * Provides synchronous access to CloudStack network features.
- * <p/>
- * 
- * @see NetworkAsyncClient
- * @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html" />
- * @author Adrian Cole
- */
-public interface NetworkClient {
-   /**
-    * Lists networks
-    * 
-    * @param options
-    *           if present, how to constrain the list.
-    * @return networks matching query, or empty set, if no networks are found
-    */
-   Set<Network> listNetworks(ListNetworksOptions... options);
-
-   /**
-    * get a specific network by id
-    * 
-    * @param id
-    *           network to get
-    * @return network or null if not found
-    */
-   Network getNetwork(String id);
-
-   /**
-    * Creates a network
-    * 
-    * @param zoneId
-    *           the Zone ID for the Vlan ip range
-    * @param networkOfferingId
-    *           the network offering id
-    * @param name
-    *           the name of the network
-    * @param displayText
-    *           the display text of the network
-    * @param options
-    *           optional parameters
-    * @return newly created network
-    */
-   Network createNetworkInZone(String zoneId, String networkOfferingId, String name, String displayText,
-         CreateNetworkOptions... options);
-
-   /**
-    * Deletes a network
-    * 
-    * @param id
-    *           the ID of the network
-    * @return job id related to destroying the network, or null if resource was
-    *         not found
-    */
-   String deleteNetwork(String id);
-}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingApi.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingApi.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingApi.java
new file mode 100644
index 0000000..e625a1e
--- /dev/null
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingApi.java
@@ -0,0 +1,149 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.cloudstack.features;
+
+import java.util.Set;
+
+import javax.inject.Named;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+
+import org.jclouds.Fallbacks.EmptySetOnNotFoundOr404;
+import org.jclouds.Fallbacks.NullOnNotFoundOr404;
+import org.jclouds.cloudstack.domain.DiskOffering;
+import org.jclouds.cloudstack.domain.NetworkOffering;
+import org.jclouds.cloudstack.domain.ServiceOffering;
+import org.jclouds.cloudstack.filters.AuthenticationFilter;
+import org.jclouds.cloudstack.options.ListDiskOfferingsOptions;
+import org.jclouds.cloudstack.options.ListNetworkOfferingsOptions;
+import org.jclouds.cloudstack.options.ListServiceOfferingsOptions;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.OnlyElement;
+import org.jclouds.rest.annotations.QueryParams;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.SelectJson;
+
+/**
+ * Provides synchronous access to cloudstack via their REST API.
+ * <p/>
+ * 
+ * @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html" />
+ * @author Adrian Cole
+ */
+@RequestFilters(AuthenticationFilter.class)
+@QueryParams(keys = "response", values = "json")
+public interface OfferingApi {
+
+   /**
+    * Lists service offerings
+    * 
+    * @param options
+    *           if present, how to constrain the list.
+    * @return service offerings matching query, or empty set, if no service
+    *         offerings are found
+    */
+   @Named("listServiceOfferings")
+   @GET
+   @QueryParams(keys = { "command", "listAll" }, values = { "listServiceOfferings", "true" })
+   @SelectJson("serviceoffering")
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Fallback(EmptySetOnNotFoundOr404.class)
+   Set<ServiceOffering> listServiceOfferings(ListServiceOfferingsOptions... options);
+
+   /**
+    * get a specific service offering by id
+    * 
+    * @param id
+    *           offering to get
+    * @return service offering or null if not found
+    */
+   @Named("listServiceOfferings")
+   @GET
+   @QueryParams(keys = { "command", "listAll" }, values = { "listServiceOfferings", "true" })
+   @SelectJson("serviceoffering")
+   @OnlyElement
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Fallback(NullOnNotFoundOr404.class)
+   ServiceOffering getServiceOffering(@QueryParam("id") String id);
+
+   /**
+    * Lists disk offerings
+    * 
+    * @param options
+    *           if present, how to constrain the list.
+    * @return disk offerings matching query, or empty set, if no disk offerings
+    *         are found
+    */
+   @Named("listDiskOfferings")
+   @GET
+   @QueryParams(keys = { "command", "listAll" }, values = { "listDiskOfferings", "true" })
+   @SelectJson("diskoffering")
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Fallback(EmptySetOnNotFoundOr404.class)
+   Set<DiskOffering> listDiskOfferings(ListDiskOfferingsOptions... options);
+
+   /**
+    * get a specific disk offering by id
+    * 
+    * @param id
+    *           offering to get
+    * @return disk offering or null if not found
+    */
+   @Named("listDiskOfferings")
+   @GET
+   @QueryParams(keys = { "command", "listAll" }, values = { "listDiskOfferings", "true" })
+   @SelectJson("diskoffering")
+   @OnlyElement
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Fallback(NullOnNotFoundOr404.class)
+   DiskOffering getDiskOffering(@QueryParam("id") String id);
+
+   /**
+    * Lists service offerings
+    * 
+    * @param options
+    *           if present, how to constrain the list.
+    * @return service offerings matching query, or empty set, if no service
+    *         offerings are found
+    */
+   @Named("listNetworkOfferings")
+   @GET
+   @QueryParams(keys = { "command", "listAll" }, values = { "listNetworkOfferings", "true" })
+   @SelectJson("networkoffering")
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Fallback(EmptySetOnNotFoundOr404.class)
+   Set<NetworkOffering> listNetworkOfferings(ListNetworkOfferingsOptions... options);
+
+   /**
+    * get a specific service offering by id
+    * 
+    * @param id
+    *           offering to get
+    * @return service offering or null if not found
+    */
+   @Named("listNetworkOfferings")
+   @GET
+   @QueryParams(keys = { "command", "listAll" }, values = { "listNetworkOfferings", "true" })
+   @SelectJson("networkoffering")
+   @OnlyElement
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Fallback(NullOnNotFoundOr404.class)
+   NetworkOffering getNetworkOffering(@QueryParam("id") String id);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingAsyncClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingAsyncClient.java
deleted file mode 100644
index 8c4b4f0..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingAsyncClient.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudstack.features;
-
-import java.util.Set;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks.EmptySetOnNotFoundOr404;
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.cloudstack.domain.DiskOffering;
-import org.jclouds.cloudstack.domain.NetworkOffering;
-import org.jclouds.cloudstack.domain.ServiceOffering;
-import org.jclouds.cloudstack.filters.AuthenticationFilter;
-import org.jclouds.cloudstack.options.ListDiskOfferingsOptions;
-import org.jclouds.cloudstack.options.ListNetworkOfferingsOptions;
-import org.jclouds.cloudstack.options.ListServiceOfferingsOptions;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.OnlyElement;
-import org.jclouds.rest.annotations.QueryParams;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.SelectJson;
-
-import com.google.common.util.concurrent.ListenableFuture;
-
-/**
- * Provides asynchronous access to cloudstack via their REST API.
- * <p/>
- * 
- * @see OfferingClient
- * @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html" />
- * @author Adrian Cole
- */
-@RequestFilters(AuthenticationFilter.class)
-@QueryParams(keys = "response", values = "json")
-public interface OfferingAsyncClient {
-
-   /**
-    * @see OfferingClient#listServiceOfferings
-    */
-   @Named("listServiceOfferings")
-   @GET
-   @QueryParams(keys = { "command", "listAll" }, values = { "listServiceOfferings", "true" })
-   @SelectJson("serviceoffering")
-   @Consumes(MediaType.APPLICATION_JSON)
-   @Fallback(EmptySetOnNotFoundOr404.class)
-   ListenableFuture<Set<ServiceOffering>> listServiceOfferings(ListServiceOfferingsOptions... options);
-
-   /**
-    * @see OfferingClient#getServiceOffering
-    */
-   @Named("listServiceOfferings")
-   @GET
-   @QueryParams(keys = { "command", "listAll" }, values = { "listServiceOfferings", "true" })
-   @SelectJson("serviceoffering")
-   @OnlyElement
-   @Consumes(MediaType.APPLICATION_JSON)
-   @Fallback(NullOnNotFoundOr404.class)
-   ListenableFuture<ServiceOffering> getServiceOffering(@QueryParam("id") String id);
-
-   /**
-    * @see OfferingClient#listDiskOfferings
-    */
-   @Named("listDiskOfferings")
-   @GET
-   @QueryParams(keys = { "command", "listAll" }, values = { "listDiskOfferings", "true" })
-   @SelectJson("diskoffering")
-   @Consumes(MediaType.APPLICATION_JSON)
-   @Fallback(EmptySetOnNotFoundOr404.class)
-   ListenableFuture<Set<DiskOffering>> listDiskOfferings(ListDiskOfferingsOptions... options);
-
-   /**
-    * @see OfferingClient#getDiskOffering
-    */
-   @Named("listDiskOfferings")
-   @GET
-   @QueryParams(keys = { "command", "listAll" }, values = { "listDiskOfferings", "true" })
-   @SelectJson("diskoffering")
-   @OnlyElement
-   @Consumes(MediaType.APPLICATION_JSON)
-   @Fallback(NullOnNotFoundOr404.class)
-   ListenableFuture<DiskOffering> getDiskOffering(@QueryParam("id") String id);
-
-   /**
-    * @see NetworkOfferingClient#listNetworkOfferings
-    */
-   @Named("listNetworkOfferings")
-   @GET
-   @QueryParams(keys = { "command", "listAll" }, values = { "listNetworkOfferings", "true" })
-   @SelectJson("networkoffering")
-   @Consumes(MediaType.APPLICATION_JSON)
-   @Fallback(EmptySetOnNotFoundOr404.class)
-   ListenableFuture<Set<NetworkOffering>> listNetworkOfferings(ListNetworkOfferingsOptions... options);
-
-   /**
-    * @see NetworkOfferingClient#getNetworkOffering
-    */
-   @Named("listNetworkOfferings")
-   @GET
-   @QueryParams(keys = { "command", "listAll" }, values = { "listNetworkOfferings", "true" })
-   @SelectJson("networkoffering")
-   @OnlyElement
-   @Consumes(MediaType.APPLICATION_JSON)
-   @Fallback(NullOnNotFoundOr404.class)
-   ListenableFuture<NetworkOffering> getNetworkOffering(@QueryParam("id") String id);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingClient.java
deleted file mode 100644
index 72ea088..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingClient.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudstack.features;
-
-import java.util.Set;
-import org.jclouds.cloudstack.domain.DiskOffering;
-import org.jclouds.cloudstack.domain.NetworkOffering;
-import org.jclouds.cloudstack.domain.ServiceOffering;
-import org.jclouds.cloudstack.options.ListDiskOfferingsOptions;
-import org.jclouds.cloudstack.options.ListNetworkOfferingsOptions;
-import org.jclouds.cloudstack.options.ListServiceOfferingsOptions;
-
-/**
- * Provides synchronous access to CloudStack zone features.
- * <p/>
- * 
- * @see OfferingAsyncClient
- * @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html" />
- * @author Adrian Cole
- */
-public interface OfferingClient {
-   /**
-    * Lists service offerings
-    * 
-    * @param options
-    *           if present, how to constrain the list.
-    * @return service offerings matching query, or empty set, if no service
-    *         offerings are found
-    */
-   Set<ServiceOffering> listServiceOfferings(ListServiceOfferingsOptions... options);
-
-   /**
-    * get a specific service offering by id
-    * 
-    * @param id
-    *           offering to get
-    * @return service offering or null if not found
-    */
-   ServiceOffering getServiceOffering(String id);
-
-   /**
-    * Lists disk offerings
-    * 
-    * @param options
-    *           if present, how to constrain the list.
-    * @return disk offerings matching query, or empty set, if no disk offerings
-    *         are found
-    */
-   Set<DiskOffering> listDiskOfferings(ListDiskOfferingsOptions... options);
-
-   /**
-    * get a specific disk offering by id
-    * 
-    * @param id
-    *           offering to get
-    * @return disk offering or null if not found
-    */
-   DiskOffering getDiskOffering(String id);
-
-   /**
-    * Lists service offerings
-    * 
-    * @param options
-    *           if present, how to constrain the list.
-    * @return service offerings matching query, or empty set, if no service
-    *         offerings are found
-    */
-   Set<NetworkOffering> listNetworkOfferings(ListNetworkOfferingsOptions... options);
-
-   /**
-    * get a specific service offering by id
-    * 
-    * @param id
-    *           offering to get
-    * @return service offering or null if not found
-    */
-   NetworkOffering getNetworkOffering(String id);
-}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SSHKeyPairApi.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SSHKeyPairApi.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SSHKeyPairApi.java
new file mode 100644
index 0000000..0eab036
--- /dev/null
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SSHKeyPairApi.java
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.cloudstack.features;
+
+import java.util.Set;
+
+import javax.inject.Named;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+
+import org.jclouds.Fallbacks.EmptySetOnNotFoundOr404;
+import org.jclouds.Fallbacks.NullOnNotFoundOr404;
+import org.jclouds.Fallbacks.VoidOnNotFoundOr404;
+import org.jclouds.cloudstack.domain.SshKeyPair;
+import org.jclouds.cloudstack.filters.AuthenticationFilter;
+import org.jclouds.cloudstack.options.ListSSHKeyPairsOptions;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.OnlyElement;
+import org.jclouds.rest.annotations.QueryParams;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.SelectJson;
+
+/**
+ * Provides synchronous access to CloudStack SSHKeyPair features.
+ *
+ * @author Vijay Kiran
+ * @see <a
+ *      href="http://download.cloud.com/releases/2.2.0/api_2.2.8/TOC_User.html"
+ *      />
+ */
+@RequestFilters(AuthenticationFilter.class)
+@QueryParams(keys = "response", values = "json")
+public interface SSHKeyPairApi {
+   /**
+    * Returns a list of {@link SshKeyPair}s registered by current user.
+    *
+    * @param options if present, how to constrain the list
+    * @return Set of {@link SshKeyPair}s matching the current constrains or
+    *         empty set if no SshKeyPairs found.
+    */
+   @Named("listSSHKeyPairs")
+   @GET
+   @QueryParams(keys = { "command", "listAll" }, values = { "listSSHKeyPairs", "true" })
+   @SelectJson("sshkeypair")
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Fallback(EmptySetOnNotFoundOr404.class)
+   Set<SshKeyPair> listSSHKeyPairs(ListSSHKeyPairsOptions... options);
+
+   /**
+    * Registers a {@link SshKeyPair} with the given name and  public kay material.
+    *
+    * @param name      of the keypair
+    * @param publicKey Public key material of the keypair
+    * @return Created SshKeyPair.
+    */
+   @Named("registerSSHKeyPair")
+   @GET
+   @QueryParams(keys = "command", values = "registerSSHKeyPair")
+   @SelectJson("keypair")
+   @Consumes(MediaType.APPLICATION_JSON)
+   SshKeyPair registerSSHKeyPair(@QueryParam("name") String name, @QueryParam("publickey") String publicKey);
+
+   /**
+    * Creates a {@link SshKeyPair} with specified name.
+    *
+    * @param name of the SshKeyPair.
+    * @return Created SshKeyPair.
+    */
+   @Named("createSSHKeyPair")
+   @GET
+   @QueryParams(keys = "command", values = "createSSHKeyPair")
+   @SelectJson("keypair")
+   @Consumes(MediaType.APPLICATION_JSON)
+   SshKeyPair createSSHKeyPair(@QueryParam("name") String name);
+
+   /**
+    * Retrieves the {@link SSHKeyPairApi} with given name.
+    *
+    * @param name name of the key pair
+    * @return SSH Key pair or null if not found.
+    */
+   @Named("listSSHKeyPairs")
+   @GET
+   @QueryParams(keys = { "command", "listAll" }, values = { "listSSHKeyPairs", "true" })
+   @SelectJson("sshkeypair")
+   @OnlyElement()
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Fallback(NullOnNotFoundOr404.class)
+   SshKeyPair getSSHKeyPair(@QueryParam("name") String name);
+
+   /**
+    * Deletes the {@link SSHKeyPairApi} with given name.
+    *
+    * @param name name of the key pair
+    * @return
+    */
+   @Named("deleteSSHKeyPair")
+   @GET
+   @QueryParams(keys = "command", values = "deleteSSHKeyPair")
+   @Fallback(VoidOnNotFoundOr404.class)
+   void deleteSSHKeyPair(@QueryParam("name") String name);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SSHKeyPairAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SSHKeyPairAsyncClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SSHKeyPairAsyncClient.java
deleted file mode 100644
index 92cfcbc..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SSHKeyPairAsyncClient.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudstack.features;
-
-import java.util.Set;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks.EmptySetOnNotFoundOr404;
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.Fallbacks.VoidOnNotFoundOr404;
-import org.jclouds.cloudstack.domain.SshKeyPair;
-import org.jclouds.cloudstack.filters.AuthenticationFilter;
-import org.jclouds.cloudstack.options.ListSSHKeyPairsOptions;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.OnlyElement;
-import org.jclouds.rest.annotations.QueryParams;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.SelectJson;
-
-import com.google.common.util.concurrent.ListenableFuture;
-
-/**
- * Provides asynchronous access to CloudStack SSHKeyPair features.
- *
- * @author Vijay Kiran
- * @see <a
- *      href="http://download.cloud.com/releases/2.2.0/api_2.2.8/TOC_User.html"
- *      />
- */
-@RequestFilters(AuthenticationFilter.class)
-@QueryParams(keys = "response", values = "json")
-public interface SSHKeyPairAsyncClient {
-   /**
-    * @see SSHKeyPairClient#listSSHKeyPairs
-    */
-   @Named("listSSHKeyPairs")
-   @GET
-   @QueryParams(keys = { "command", "listAll" }, values = { "listSSHKeyPairs", "true" })
-   @SelectJson("sshkeypair")
-   @Consumes(MediaType.APPLICATION_JSON)
-   @Fallback(EmptySetOnNotFoundOr404.class)
-   ListenableFuture<Set<SshKeyPair>> listSSHKeyPairs(ListSSHKeyPairsOptions... options);
-
-  /**
-    * @see SSHKeyPairClient#registerSSHKeyPair
-    */
-   @Named("registerSSHKeyPair")
-   @GET
-   @QueryParams(keys = "command", values = "registerSSHKeyPair")
-   @SelectJson("keypair")
-   @Consumes(MediaType.APPLICATION_JSON)
-   ListenableFuture<SshKeyPair> registerSSHKeyPair(@QueryParam("name") String name, @QueryParam("publickey") String publicKey);
-
-   /**
-    * @see SSHKeyPairClient#createSSHKeyPair
-    */
-   @Named("createSSHKeyPair")
-   @GET
-   @QueryParams(keys = "command", values = "createSSHKeyPair")
-   @SelectJson("keypair")
-   @Consumes(MediaType.APPLICATION_JSON)
-   ListenableFuture<SshKeyPair> createSSHKeyPair(@QueryParam("name") String name);
-
-   /**
-    * @see SSHKeyPairClient#getSSHKeyPair
-    */
-   @Named("listSSHKeyPairs")
-   @GET
-   @QueryParams(keys = { "command", "listAll" }, values = { "listSSHKeyPairs", "true" })
-   @SelectJson("sshkeypair")
-   @OnlyElement()
-   @Consumes(MediaType.APPLICATION_JSON)
-   @Fallback(NullOnNotFoundOr404.class)
-   ListenableFuture<SshKeyPair> getSSHKeyPair(@QueryParam("name") String name);
-
-   /**
-    * @see SSHKeyPairClient#deleteSSHKeyPair
-    */
-   @Named("deleteSSHKeyPair")
-   @GET
-   @QueryParams(keys = "command", values = "deleteSSHKeyPair")
-   @Fallback(VoidOnNotFoundOr404.class)
-   ListenableFuture<Void> deleteSSHKeyPair(@QueryParam("name") String name);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SSHKeyPairClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SSHKeyPairClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SSHKeyPairClient.java
deleted file mode 100644
index 2a3871a..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/SSHKeyPairClient.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.cloudstack.features;
-
-import java.util.Set;
-import org.jclouds.cloudstack.domain.SshKeyPair;
-import org.jclouds.cloudstack.options.ListSSHKeyPairsOptions;
-
-/**
- * Provides synchronous access to CloudStack SSHKeyPair features.
- *
- * @author Vijay Kiran
- * @see <a
- *      href="http://download.cloud.com/releases/2.2.0/api_2.2.8/TOC_User.html"
- *      />
- */
-public interface SSHKeyPairClient {
-   /**
-    * Returns a list of {@link SshKeyPair}s registered by current user.
-    *
-    * @param options if present, how to constrain the list
-    * @return Set of {@link SshKeyPair}s matching the current constrains or
-    *         empty set if no SshKeyPairs found.
-    */
-   Set<SshKeyPair> listSSHKeyPairs(ListSSHKeyPairsOptions... options);
-
-
-   /**
-    * Registers a {@link SshKeyPair} with the given name and  public kay material.
-    *
-    * @param name      of the keypair
-    * @param publicKey Public key material of the keypair
-    * @return Created SshKeyPair.
-    */
-   SshKeyPair registerSSHKeyPair(String name, String publicKey);
-
-   /**
-    * Creates a {@link SshKeyPair} with specified name.
-    *
-    * @param name of the SshKeyPair.
-    * @return Created SshKeyPair.
-    */
-   SshKeyPair createSSHKeyPair(String name);
-
-   /**
-    * Retrieves the {@link SSHKeyPairClient} with given name.
-    *
-    * @param name name of the key pair
-    * @return SSH Key pair or null if not found.
-    */
-   SshKeyPair getSSHKeyPair(String name);
-
-   /**
-    * Deletes the {@link SSHKeyPairClient} with given name.
-    *
-    * @param name name of the key pair
-    * @return
-    */
-   void deleteSSHKeyPair(String name);
-
-}