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:07 UTC
[20/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/GlobalUsageClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUsageClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUsageClient.java
deleted file mode 100644
index 4b0af3a..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUsageClient.java
+++ /dev/null
@@ -1,40 +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.Date;
-import java.util.Set;
-import org.jclouds.cloudstack.domain.JobResult;
-import org.jclouds.cloudstack.domain.UsageRecord;
-import org.jclouds.cloudstack.options.GenerateUsageRecordsOptions;
-import org.jclouds.cloudstack.options.ListUsageRecordsOptions;
-
-/**
- * Provides synchronous access to CloudStack usage features.
- * <p/>
- *
- * @see org.jclouds.cloudstack.features.GlobalOfferingAsyncClient
- * @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html" />
- * @author Richard Downer
- */
-public interface GlobalUsageClient {
-
- JobResult generateUsageRecords(Date start, Date end, GenerateUsageRecordsOptions... options);
-
- Set<UsageRecord> listUsageRecords(Date start, Date end, ListUsageRecordsOptions... options);
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUserApi.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUserApi.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUserApi.java
new file mode 100644
index 0000000..4633a80
--- /dev/null
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUserApi.java
@@ -0,0 +1,115 @@
+/*
+ * 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 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.NullOnNotFoundOr404;
+import org.jclouds.cloudstack.domain.ApiKeyPair;
+import org.jclouds.cloudstack.domain.User;
+import org.jclouds.cloudstack.filters.AuthenticationFilter;
+import org.jclouds.cloudstack.options.CreateUserOptions;
+import org.jclouds.cloudstack.options.UpdateUserOptions;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.QueryParams;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.SelectJson;
+
+/**
+ * Provides synchronous access to CloudStack User features available to Global
+ * Admin users.
+ *
+ * @author Andrei Savu
+ * @see <a href=
+ * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html"
+ * />
+ */
+@RequestFilters(AuthenticationFilter.class)
+@QueryParams(keys = "response", values = "json")
+public interface GlobalUserApi extends DomainUserApi {
+
+ /**
+ * Create an user for an account that already exists
+ *
+ * @param userName unique user name
+ * @param accountName Creates the user under the specified account. If no
+ * account is specified, the username will be used as the account name.
+ * @param email
+ * @param hashedPassword Hashed password (Default is MD5). If you wish to use
+ * any other hashing algorithm, you would need to write a custom authentication
+ * adapter See Docs section.
+ * @param firstName
+ * @param lastName
+ * @param options optional arguments
+ * @return
+ */
+ @Named("createUser")
+ @GET
+ @QueryParams(keys = "command", values = "createUser")
+ @SelectJson("user")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(NullOnNotFoundOr404.class)
+ User createUser(@QueryParam("username") String userName, @QueryParam("account") String accountName,
+ @QueryParam("email") String email, @QueryParam("password") String hashedPassword,
+ @QueryParam("firstname") String firstName, @QueryParam("lastname") String lastName, CreateUserOptions... options);
+
+ /**
+ * This command allows a user to register for the developer API, returning a
+ * secret key and an API key
+ *
+ * @param userId the ID of the user
+ * @return
+ */
+ @Named("registerUserKeys")
+ @GET
+ @QueryParams(keys = "command", values = "registerUserKeys")
+ @SelectJson("userkeys")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(NullOnNotFoundOr404.class)
+ ApiKeyPair registerUserKeys(@QueryParam("id") String userId);
+
+ /**
+ * Update an user
+ *
+ * @param id the user ID
+ * @param options optional arguments
+ * @return
+ */
+ @Named("updateUser")
+ @GET
+ @QueryParams(keys = "command", values = "updateUser")
+ @SelectJson("user")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(NullOnNotFoundOr404.class)
+ User updateUser(@QueryParam("id") String id, UpdateUserOptions... options);
+
+ /**
+ * Delete an user with the specified ID
+ *
+ * @param id user ID
+ */
+ @Named("deleteUser")
+ @GET
+ @QueryParams(keys = "command", values = "deleteUser")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(NullOnNotFoundOr404.class)
+ void deleteUser(@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/GlobalUserAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUserAsyncClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUserAsyncClient.java
deleted file mode 100644
index eedb5f0..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUserAsyncClient.java
+++ /dev/null
@@ -1,95 +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 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.NullOnNotFoundOr404;
-import org.jclouds.cloudstack.domain.ApiKeyPair;
-import org.jclouds.cloudstack.domain.User;
-import org.jclouds.cloudstack.filters.AuthenticationFilter;
-import org.jclouds.cloudstack.options.CreateUserOptions;
-import org.jclouds.cloudstack.options.UpdateUserOptions;
-import org.jclouds.rest.annotations.Fallback;
-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 User features available to Global
- * Admin users.
- *
- * @author Andrei Savu
- * @see <a href=
- * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html"
- * />
- */
-@RequestFilters(AuthenticationFilter.class)
-@QueryParams(keys = "response", values = "json")
-public interface GlobalUserAsyncClient extends DomainUserAsyncClient {
-
- /**
- * @see GlobalUserClient#createUser
- */
- @Named("createUser")
- @GET
- @QueryParams(keys = "command", values = "createUser")
- @SelectJson("user")
- @Consumes(MediaType.APPLICATION_JSON)
- @Fallback(NullOnNotFoundOr404.class)
- ListenableFuture<User>createUser(@QueryParam("username") String userName, @QueryParam("account") String accountName,
- @QueryParam("email") String email, @QueryParam("password") String hashedPassword,
- @QueryParam("firstname") String firstName, @QueryParam("lastname") String lastName, CreateUserOptions... options);
-
- /**
- * @see GlobalUserClient#registerUserKeys
- */
- @Named("registerUserKeys")
- @GET
- @QueryParams(keys = "command", values = "registerUserKeys")
- @SelectJson("userkeys")
- @Consumes(MediaType.APPLICATION_JSON)
- @Fallback(NullOnNotFoundOr404.class)
- ListenableFuture<ApiKeyPair> registerUserKeys(@QueryParam("id") String userId);
-
- /**
- * @see GlobalUserClient#updateUser
- */
- @Named("updateUser")
- @GET
- @QueryParams(keys = "command", values = "updateUser")
- @SelectJson("user")
- @Consumes(MediaType.APPLICATION_JSON)
- @Fallback(NullOnNotFoundOr404.class)
- ListenableFuture<User> updateUser(@QueryParam("id") String id, UpdateUserOptions... options);
-
- /**
- * @see GlobalUserClient#deleteUser
- */
- @Named("deleteUser")
- @GET
- @QueryParams(keys = "command", values = "deleteUser")
- @Consumes(MediaType.APPLICATION_JSON)
- @Fallback(NullOnNotFoundOr404.class)
- ListenableFuture<Void> deleteUser(@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/GlobalUserClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUserClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUserClient.java
deleted file mode 100644
index 76df179..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUserClient.java
+++ /dev/null
@@ -1,79 +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 org.jclouds.cloudstack.domain.ApiKeyPair;
-import org.jclouds.cloudstack.domain.User;
-import org.jclouds.cloudstack.options.CreateUserOptions;
-import org.jclouds.cloudstack.options.UpdateUserOptions;
-
-/**
- * Provides synchronous access to CloudStack User features available to Global
- * Admin users.
- *
- * @author Andrei savu
- * @see <a href=
- * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html"
- * />
- */
-public interface GlobalUserClient extends DomainUserClient {
-
-
- /**
- * Create an user for an account that already exists
- *
- * @param userName unique user name
- * @param accountName Creates the user under the specified account. If no
- * account is specified, the username will be used as the account name.
- * @param email
- * @param hashedPassword Hashed password (Default is MD5). If you wish to use
- * any other hashing algorithm, you would need to write a custom authentication
- * adapter See Docs section.
- * @param firstName
- * @param lastName
- * @param options optional arguments
- * @return
- */
- User createUser(String userName, String accountName, String email, String hashedPassword,
- String firstName, String lastName, CreateUserOptions... options);
-
-
- /**
- * This command allows a user to register for the developer API, returning a
- * secret key and an API key
- *
- * @param userId the ID of the user
- * @return
- */
- ApiKeyPair registerUserKeys(String userId);
-
- /**
- * Update an user
- *
- * @param id the user ID
- * @param options optional arguments
- * @return
- */
- User updateUser(String id, UpdateUserOptions... options);
-
- /**
- * Delete an user with the specified ID
- *
- * @param id user ID
- */
- Void deleteUser(String id);
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalVlanApi.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalVlanApi.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalVlanApi.java
new file mode 100644
index 0000000..b9efe8a
--- /dev/null
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalVlanApi.java
@@ -0,0 +1,106 @@
+/*
+ * 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.VlanIPRange;
+import org.jclouds.cloudstack.filters.AuthenticationFilter;
+import org.jclouds.cloudstack.options.CreateVlanIPRangeOptions;
+import org.jclouds.cloudstack.options.ListVlanIPRangesOptions;
+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_Global_Admin.html" />
+ * @author Richard Downer
+ */
+@RequestFilters(AuthenticationFilter.class)
+@QueryParams(keys = "response", values = "json")
+public interface GlobalVlanApi {
+
+ /**
+ * Get the details of an IP range by its id.
+ * @param id the required IP range.
+ * @return the requested IP range.
+ */
+ @Named("listVlanIpRanges")
+ @GET
+ @QueryParams(keys = { "command", "listAll" }, values = { "listVlanIpRanges", "true" })
+ @SelectJson("vlaniprange")
+ @OnlyElement
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(NullOnNotFoundOr404.class)
+ VlanIPRange getVlanIPRange(@QueryParam("id") String id);
+
+ /**
+ * Lists all VLAN IP ranges.
+ *
+ * @param options optional arguments.
+ * @return the list of IP ranges that match the criteria.
+ */
+ @Named("listVlanIpRanges")
+ @GET
+ @QueryParams(keys = { "command", "listAll" }, values = { "listVlanIpRanges", "true" })
+ @SelectJson("vlaniprange")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(EmptySetOnNotFoundOr404.class)
+ Set<VlanIPRange> listVlanIPRanges(ListVlanIPRangesOptions... options);
+
+ /**
+ * Creates a VLAN IP range.
+ *
+ * @param startIP the beginning IP address in the VLAN IP range
+ * @param endIP the ending IP address in the VLAN IP range
+ * @param options optional arguments
+ * @return the newly-create IP range.
+ */
+ @Named("createVlanIpRange")
+ @GET
+ @QueryParams(keys = "command", values = "createVlanIpRange")
+ @SelectJson("vlaniprange")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(NullOnNotFoundOr404.class)
+ VlanIPRange createVlanIPRange(@QueryParam("startip") String startIP, @QueryParam("endip") String endIP, CreateVlanIPRangeOptions... options);
+
+ /**
+ * Deletes a VLAN IP range.
+ * @param rangeId the id of the VLAN IP range
+ * @return void
+ */
+ @Named("deleteVlanIpRange")
+ @GET
+ @QueryParams(keys = "command", values = "deleteVlanIpRange")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(VoidOnNotFoundOr404.class)
+ void deleteVlanIPRange(@QueryParam("id") String rangeId);
+}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalVlanAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalVlanAsyncClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalVlanAsyncClient.java
deleted file mode 100644
index cc95a31..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalVlanAsyncClient.java
+++ /dev/null
@@ -1,109 +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.VlanIPRange;
-import org.jclouds.cloudstack.filters.AuthenticationFilter;
-import org.jclouds.cloudstack.options.CreateVlanIPRangeOptions;
-import org.jclouds.cloudstack.options.ListVlanIPRangesOptions;
-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 org.jclouds.cloudstack.features.GlobalVlanClient
- * @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html" />
- * @author Richard Downer
- */
-@RequestFilters(AuthenticationFilter.class)
-@QueryParams(keys = "response", values = "json")
-public interface GlobalVlanAsyncClient {
-
- /**
- * Get the details of an IP range by its id.
- * @param id the required IP range.
- * @return the requested IP range.
- */
- @Named("listVlanIpRanges")
- @GET
- @QueryParams(keys = { "command", "listAll" }, values = { "listVlanIpRanges", "true" })
- @SelectJson("vlaniprange")
- @OnlyElement
- @Consumes(MediaType.APPLICATION_JSON)
- @Fallback(NullOnNotFoundOr404.class)
- ListenableFuture<VlanIPRange> getVlanIPRange(@QueryParam("id") String id);
-
- /**
- * Lists all VLAN IP ranges.
- *
- * @param options optional arguments.
- * @return the list of IP ranges that match the criteria.
- */
- @Named("listVlanIpRanges")
- @GET
- @QueryParams(keys = { "command", "listAll" }, values = { "listVlanIpRanges", "true" })
- @SelectJson("vlaniprange")
- @Consumes(MediaType.APPLICATION_JSON)
- @Fallback(EmptySetOnNotFoundOr404.class)
- ListenableFuture<Set<VlanIPRange>> listVlanIPRanges(ListVlanIPRangesOptions... options);
-
- /**
- * Creates a VLAN IP range.
- *
- * @param startIP the beginning IP address in the VLAN IP range
- * @param endIP the ending IP address in the VLAN IP range
- * @param options optional arguments
- * @return the newly-create IP range.
- */
- @Named("createVlanIpRange")
- @GET
- @QueryParams(keys = "command", values = "createVlanIpRange")
- @SelectJson("vlaniprange")
- @Consumes(MediaType.APPLICATION_JSON)
- @Fallback(NullOnNotFoundOr404.class)
- ListenableFuture<VlanIPRange> createVlanIPRange(@QueryParam("startip") String startIP, @QueryParam("endip") String endIP, CreateVlanIPRangeOptions... options);
-
- /**
- * Deletes a VLAN IP range.
- * @param rangeId the id of the VLAN IP range
- * @return void
- */
- @Named("deleteVlanIpRange")
- @GET
- @QueryParams(keys = "command", values = "deleteVlanIpRange")
- @Consumes(MediaType.APPLICATION_JSON)
- @Fallback(VoidOnNotFoundOr404.class)
- ListenableFuture<Void> deleteVlanIPRange(@QueryParam("id") String rangeId);
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalVlanClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalVlanClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalVlanClient.java
deleted file mode 100644
index c52bf8e..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalVlanClient.java
+++ /dev/null
@@ -1,64 +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.VlanIPRange;
-import org.jclouds.cloudstack.options.CreateVlanIPRangeOptions;
-import org.jclouds.cloudstack.options.ListVlanIPRangesOptions;
-
-/**
- * Provides synchronous access to CloudStack VLAN features.
- * <p/>
- *
- * @see GlobalOfferingAsyncClient
- * @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html" />
- * @author Richard Downer
- */
-public interface GlobalVlanClient {
-
- /**
- * Get the details of an IP range by its id.
- * @param id the required IP range.
- * @return the requested IP range.
- */
- VlanIPRange getVlanIPRange(String id);
-
- /**
- * Lists all VLAN IP ranges.
- *
- * @param options optional arguments.
- * @return the list of IP ranges that match the criteria.
- */
- Set<VlanIPRange> listVlanIPRanges(ListVlanIPRangesOptions... options);
-
- /**
- * Creates a VLAN IP range.
- *
- * @param startIP the beginning IP address in the VLAN IP range
- * @param endIP the ending IP address in the VLAN IP range
- * @param options optional arguments
- * @return the newly-create IP range.
- */
- VlanIPRange createVlanIPRange(String startIP, String endIP, CreateVlanIPRangeOptions... options);
-
- /**
- * Deletes a VLAN IP range.
- * @param rangeId the id of the VLAN IP range
- */
- void deleteVlanIPRange(String rangeId);
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalZoneApi.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalZoneApi.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalZoneApi.java
new file mode 100644
index 0000000..bc58858
--- /dev/null
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalZoneApi.java
@@ -0,0 +1,104 @@
+/*
+ * 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 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.NullOnNotFoundOr404;
+import org.jclouds.Fallbacks.VoidOnNotFoundOr404;
+import org.jclouds.cloudstack.domain.NetworkType;
+import org.jclouds.cloudstack.domain.Zone;
+import org.jclouds.cloudstack.filters.AuthenticationFilter;
+import org.jclouds.cloudstack.options.CreateZoneOptions;
+import org.jclouds.cloudstack.options.UpdateZoneOptions;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.QueryParams;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.SelectJson;
+
+/**
+ * Provides synchronous access to CloudStack Account features available to Global
+ * Admin users.
+ *
+ * @author Adrian Cole, Andrei Savu
+ * @see <a href=
+ * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html"
+ * />
+ */
+@RequestFilters(AuthenticationFilter.class)
+@QueryParams(keys = "response", values = "json")
+public interface GlobalZoneApi extends ZoneApi {
+
+ /**
+ * Create a new Zone
+ *
+ * @param name
+ * the name of the Zone
+ * @param networkType
+ * network type of the zone, can be Basic or Advanced
+ * @param dns1
+ * the first DNS for the Zone
+ * @param internalDns1
+ * the first internal DNS for the Zone
+ * @param options
+ * optional arguments
+ * @return
+ * zone instance or null
+ */
+ @Named("createZone")
+ @GET
+ @QueryParams(keys = "command", values = "createZone")
+ @SelectJson("zone")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(NullOnNotFoundOr404.class)
+ Zone createZone(@QueryParam("name") String name, @QueryParam("networktype") NetworkType networkType,
+ @QueryParam("dns1") String externalDns1, @QueryParam("internaldns1") String internalDns1, CreateZoneOptions... options);
+
+ /**
+ * Update a zone
+ *
+ * @param id
+ * the ID of the Zone
+ * @param options
+ * optional arguments
+ * @return
+ */
+ @Named("updateZone")
+ @GET
+ @QueryParams(keys = "command", values = "updateZone")
+ @SelectJson("zone")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(NullOnNotFoundOr404.class)
+ Zone updateZone(@QueryParam("id") String id, UpdateZoneOptions... options);
+
+ /**
+ * Delete a zone with a specific ID
+ *
+ * @param zoneId
+ * the ID of the Zone
+ */
+ @Named("deleteZone")
+ @GET
+ @QueryParams(keys = "command", values = "deleteZone")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(VoidOnNotFoundOr404.class)
+ void deleteZone(@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/GlobalZoneAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalZoneAsyncClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalZoneAsyncClient.java
deleted file mode 100644
index 0462473..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalZoneAsyncClient.java
+++ /dev/null
@@ -1,84 +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 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.NullOnNotFoundOr404;
-import org.jclouds.Fallbacks.VoidOnNotFoundOr404;
-import org.jclouds.cloudstack.domain.NetworkType;
-import org.jclouds.cloudstack.domain.Zone;
-import org.jclouds.cloudstack.filters.AuthenticationFilter;
-import org.jclouds.cloudstack.options.CreateZoneOptions;
-import org.jclouds.cloudstack.options.UpdateZoneOptions;
-import org.jclouds.rest.annotations.Fallback;
-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 Account features available to Global
- * Admin users.
- *
- * @author Adrian Cole, Andrei Savu
- * @see <a href=
- * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html"
- * />
- */
-@RequestFilters(AuthenticationFilter.class)
-@QueryParams(keys = "response", values = "json")
-public interface GlobalZoneAsyncClient extends ZoneAsyncClient {
-
- /**
- * @see GlobalZoneClient#createZone
- */
- @Named("createZone")
- @GET
- @QueryParams(keys = "command", values = "createZone")
- @SelectJson("zone")
- @Consumes(MediaType.APPLICATION_JSON)
- @Fallback(NullOnNotFoundOr404.class)
- ListenableFuture<Zone> createZone(@QueryParam("name") String name, @QueryParam("networktype") NetworkType networkType,
- @QueryParam("dns1") String externalDns1, @QueryParam("internaldns1") String internalDns1, CreateZoneOptions... options);
-
- /**
- * @see GlobalZoneClient#updateZone
- */
- @Named("updateZone")
- @GET
- @QueryParams(keys = "command", values = "updateZone")
- @SelectJson("zone")
- @Consumes(MediaType.APPLICATION_JSON)
- @Fallback(NullOnNotFoundOr404.class)
- ListenableFuture<Zone> updateZone(@QueryParam("id") String id, UpdateZoneOptions... options);
-
- /**
- * @see GlobalZoneClient#deleteZone
- */
- @Named("deleteZone")
- @GET
- @QueryParams(keys = "command", values = "deleteZone")
- @Consumes(MediaType.APPLICATION_JSON)
- @Fallback(VoidOnNotFoundOr404.class)
- ListenableFuture<Void> deleteZone(@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/GlobalZoneClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalZoneClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalZoneClient.java
deleted file mode 100644
index 2de68a5..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalZoneClient.java
+++ /dev/null
@@ -1,73 +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 org.jclouds.cloudstack.domain.NetworkType;
-import org.jclouds.cloudstack.domain.Zone;
-import org.jclouds.cloudstack.options.CreateZoneOptions;
-import org.jclouds.cloudstack.options.UpdateZoneOptions;
-
-/**
- * Provides synchronous access to CloudStack Zone features available to Global
- * Admin users.
- *
- * @author Andrei Savu
- * @see <a href=
- * "http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_Global_Admin.html"
- * />
- */
-public interface GlobalZoneClient extends ZoneClient {
-
- /**
- * Create a new Zone
- *
- * @param name
- * the name of the Zone
- * @param networkType
- * network type of the zone, can be Basic or Advanced
- * @param dns1
- * the first DNS for the Zone
- * @param internalDns1
- * the first internal DNS for the Zone
- * @param options
- * optional arguments
- * @return
- * zone instance or null
- */
- Zone createZone(String name, NetworkType networkType, String dns1,
- String internalDns1, CreateZoneOptions... options);
-
- /**
- * Update a zone
- *
- * @param id
- * the ID of the Zone
- * @param options
- * optional arguments
- * @return
- */
- Zone updateZone(String id, UpdateZoneOptions... options);
-
- /**
- * Delete a zone with a specific ID
- *
- * @param zoneId
- * the ID of the Zone
- */
- Void deleteZone(String zoneId);
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GuestOSApi.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GuestOSApi.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GuestOSApi.java
new file mode 100644
index 0000000..b22e090
--- /dev/null
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GuestOSApi.java
@@ -0,0 +1,111 @@
+/*
+ * 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.Map;
+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.OSType;
+import org.jclouds.cloudstack.filters.AuthenticationFilter;
+import org.jclouds.cloudstack.functions.ParseIdToNameEntryFromHttpResponse;
+import org.jclouds.cloudstack.functions.ParseIdToNameFromHttpResponse;
+import org.jclouds.cloudstack.options.ListOSTypesOptions;
+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.ResponseParser;
+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 GuestOSApi {
+
+ /**
+ * Lists all supported OS types for this cloud.
+ *
+ * @param options
+ * if present, how to constrain the list
+ * @return os types matching query, or empty set, if no types are found
+ */
+ @Named("listOsTypes")
+ @GET
+ @QueryParams(keys = { "command", "listAll" }, values = { "listOsTypes", "true" })
+ @SelectJson("ostype")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(EmptySetOnNotFoundOr404.class)
+ Set<OSType> listOSTypes(ListOSTypesOptions... options);
+
+ /**
+ * get a specific os type by id
+ *
+ * @param id
+ * os type to get
+ * @return os type or null if not found
+ */
+ @Named("listOsTypes")
+ @GET
+ @QueryParams(keys = { "command", "listAll" }, values = { "listOsTypes", "true" })
+ @SelectJson("ostype")
+ @OnlyElement
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(NullOnNotFoundOr404.class)
+ OSType getOSType(@QueryParam("id") String id);
+
+ /**
+ * Lists all supported OS categories for this cloud.
+ *
+ * @return os categories matching query, or empty set, if no categories are
+ * found
+ */
+ @Named("listOsCategories")
+ @GET
+ @QueryParams(keys = { "command", "listAll" }, values = { "listOsCategories", "true" })
+ @ResponseParser(ParseIdToNameFromHttpResponse.class)
+ @Fallback(EmptySetOnNotFoundOr404.class)
+ Map<String, String> listOSCategories();
+
+ /**
+ * get a specific os category by id
+ *
+ * @param id
+ * os category to get
+ * @return os category or null if not found
+ */
+ @Named("listOsCategories")
+ @GET
+ @QueryParams(keys = { "command", "listAll" }, values = { "listOsCategories", "true" })
+ @ResponseParser(ParseIdToNameEntryFromHttpResponse.class)
+ @Fallback(NullOnNotFoundOr404.class)
+ Map.Entry<String, String> getOSCategory(@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/GuestOSAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GuestOSAsyncClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GuestOSAsyncClient.java
deleted file mode 100644
index 4e3d9c7..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GuestOSAsyncClient.java
+++ /dev/null
@@ -1,99 +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.Map;
-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.OSType;
-import org.jclouds.cloudstack.filters.AuthenticationFilter;
-import org.jclouds.cloudstack.functions.ParseIdToNameEntryFromHttpResponse;
-import org.jclouds.cloudstack.functions.ParseIdToNameFromHttpResponse;
-import org.jclouds.cloudstack.options.ListOSTypesOptions;
-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.ResponseParser;
-import org.jclouds.rest.annotations.SelectJson;
-
-import com.google.common.util.concurrent.ListenableFuture;
-
-/**
- * Provides asynchronous access to cloudstack via their REST API.
- * <p/>
- *
- * @see AsyncJobClient
- * @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 GuestOSAsyncClient {
-
- /**
- * @see GuestOSClient#listOSTypes
- */
- @Named("listOsTypes")
- @GET
- @QueryParams(keys = { "command", "listAll" }, values = { "listOsTypes", "true" })
- @SelectJson("ostype")
- @Consumes(MediaType.APPLICATION_JSON)
- @Fallback(EmptySetOnNotFoundOr404.class)
- ListenableFuture<Set<OSType>> listOSTypes(ListOSTypesOptions... options);
-
- /**
- * @see OSTypeClient#getOSType
- */
- @Named("listOsTypes")
- @GET
- @QueryParams(keys = { "command", "listAll" }, values = { "listOsTypes", "true" })
- @SelectJson("ostype")
- @OnlyElement
- @Consumes(MediaType.APPLICATION_JSON)
- @Fallback(NullOnNotFoundOr404.class)
- ListenableFuture<OSType> getOSType(@QueryParam("id") String id);
-
- /**
- * @see GuestOSClient#listOSCategories
- */
- @Named("listOsCategories")
- @GET
- @QueryParams(keys = { "command", "listAll" }, values = { "listOsCategories", "true" })
- @ResponseParser(ParseIdToNameFromHttpResponse.class)
- @Fallback(EmptySetOnNotFoundOr404.class)
- ListenableFuture<Map<String, String>> listOSCategories();
-
- /**
- * @see GuestOSClient#getOSCategory
- */
- @Named("listOsCategories")
- @GET
- @QueryParams(keys = { "command", "listAll" }, values = { "listOsCategories", "true" })
- @ResponseParser(ParseIdToNameEntryFromHttpResponse.class)
- @Fallback(NullOnNotFoundOr404.class)
- ListenableFuture<Map.Entry<String, String>> getOSCategory(@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/GuestOSClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GuestOSClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GuestOSClient.java
deleted file mode 100644
index 8baab8a..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GuestOSClient.java
+++ /dev/null
@@ -1,67 +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.Map;
-import java.util.Set;
-import org.jclouds.cloudstack.domain.OSType;
-import org.jclouds.cloudstack.options.ListOSTypesOptions;
-
-/**
- * Provides synchronous access to CloudStack Operating System features.
- * <p/>
- *
- * @see GuestOSAsyncClient
- * @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html" />
- * @author Adrian Cole
- */
-public interface GuestOSClient {
- /**
- * Lists all supported OS types for this cloud.
- *
- * @param options
- * if present, how to constrain the list
- * @return os types matching query, or empty set, if no types are found
- */
- Set<OSType> listOSTypes(ListOSTypesOptions... options);
-
- /**
- * get a specific os type by id
- *
- * @param id
- * os type to get
- * @return os type or null if not found
- */
- OSType getOSType(String id);
-
- /**
- * Lists all supported OS categories for this cloud.
- *
- * @return os categories matching query, or empty set, if no categories are
- * found
- */
- Map<String, String> listOSCategories();
-
- /**
- * get a specific os category by id
- *
- * @param id
- * os category to get
- * @return os category or null if not found
- */
- Map.Entry<String, String> getOSCategory(String id);
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/HypervisorApi.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/HypervisorApi.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/HypervisorApi.java
new file mode 100644
index 0000000..d1fbd18
--- /dev/null
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/HypervisorApi.java
@@ -0,0 +1,63 @@
+/*
+ * 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.GET;
+import javax.ws.rs.QueryParam;
+
+import org.jclouds.Fallbacks.EmptySetOnNotFoundOr404;
+import org.jclouds.cloudstack.filters.AuthenticationFilter;
+import org.jclouds.cloudstack.functions.ParseNamesFromHttpResponse;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.QueryParams;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.ResponseParser;
+
+/**
+ * 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 HypervisorApi {
+
+ /**
+ * @see HypervisorApi#listHypervisors
+ */
+ @Named("listHypervisors")
+ @GET
+ @QueryParams(keys = { "command", "listAll" }, values = { "listHypervisors", "true" })
+ @ResponseParser(ParseNamesFromHttpResponse.class)
+ @Fallback(EmptySetOnNotFoundOr404.class)
+ Set<String> listHypervisors();
+
+ /**
+ * @see HypervisorApi#listHypervisorsInZone
+ */
+ @Named("listHypervisors")
+ @GET
+ @QueryParams(keys = { "command", "listAll" }, values = { "listHypervisors", "true" })
+ @ResponseParser(ParseNamesFromHttpResponse.class)
+ @Fallback(EmptySetOnNotFoundOr404.class)
+ Set<String> listHypervisorsInZone(@QueryParam("zoneid") String zoneId);
+}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/HypervisorAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/HypervisorAsyncClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/HypervisorAsyncClient.java
deleted file mode 100644
index 71a2f7f..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/HypervisorAsyncClient.java
+++ /dev/null
@@ -1,66 +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.GET;
-import javax.ws.rs.QueryParam;
-
-import org.jclouds.Fallbacks.EmptySetOnNotFoundOr404;
-import org.jclouds.cloudstack.filters.AuthenticationFilter;
-import org.jclouds.cloudstack.functions.ParseNamesFromHttpResponse;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.QueryParams;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-
-import com.google.common.util.concurrent.ListenableFuture;
-
-/**
- * Provides asynchronous access to cloudstack via their REST API.
- * <p/>
- *
- * @see AsyncJobClient
- * @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 HypervisorAsyncClient {
-
- /**
- * @see HypervisorClient#listHypervisors
- */
- @Named("listHypervisors")
- @GET
- @QueryParams(keys = { "command", "listAll" }, values = { "listHypervisors", "true" })
- @ResponseParser(ParseNamesFromHttpResponse.class)
- @Fallback(EmptySetOnNotFoundOr404.class)
- ListenableFuture<Set<String>> listHypervisors();
-
- /**
- * @see HypervisorClient#listHypervisorsInZone
- */
- @Named("listHypervisors")
- @GET
- @QueryParams(keys = { "command", "listAll" }, values = { "listHypervisors", "true" })
- @ResponseParser(ParseNamesFromHttpResponse.class)
- @Fallback(EmptySetOnNotFoundOr404.class)
- ListenableFuture<Set<String>> listHypervisorsInZone(@QueryParam("zoneid") String zoneId);
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/HypervisorClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/HypervisorClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/HypervisorClient.java
deleted file mode 100644
index 3fa89d8..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/HypervisorClient.java
+++ /dev/null
@@ -1,45 +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;
-/**
- * Provides synchronous access to CloudStack Operating System features.
- * <p/>
- *
- * @see GuestOSAsyncClient
- * @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html" />
- * @author Adrian Cole
- */
-public interface HypervisorClient {
- /**
- * Lists all supported hypervisors for this cloud.
- *
- * @return hypervisors, or empty set, if no hypervisors are found
- */
- Set<String> listHypervisors();
-
- /**
- * Lists all supported hypervisors for this zone.
- *
- * @param zoneId
- * the zone id for listing hypervisors.
- * @return hypervisors in the zone, or empty set, if no hypervisors are found
- */
- Set<String> listHypervisorsInZone(String zoneId);
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ISOApi.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ISOApi.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ISOApi.java
new file mode 100644
index 0000000..4102f69
--- /dev/null
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ISOApi.java
@@ -0,0 +1,220 @@
+/*
+ * 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.ExtractMode;
+import org.jclouds.cloudstack.domain.ISO;
+import org.jclouds.cloudstack.domain.ISOPermissions;
+import org.jclouds.cloudstack.filters.AuthenticationFilter;
+import org.jclouds.cloudstack.options.AccountInDomainOptions;
+import org.jclouds.cloudstack.options.DeleteISOOptions;
+import org.jclouds.cloudstack.options.ExtractISOOptions;
+import org.jclouds.cloudstack.options.ListISOsOptions;
+import org.jclouds.cloudstack.options.RegisterISOOptions;
+import org.jclouds.cloudstack.options.UpdateISOOptions;
+import org.jclouds.cloudstack.options.UpdateISOPermissionsOptions;
+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;
+
+/**
+ *
+ * <p/>
+ *
+ * @see http://download.cloud.com/releases/2.2.12/api/TOC_User.html
+ * @author Richard Downer
+ */
+@RequestFilters(AuthenticationFilter.class)
+@QueryParams(keys = "response", values = "json")
+public interface ISOApi {
+
+ /**
+ * Attaches an ISO to a virtual machine.
+ *
+ * @param isoId the ID of the ISO file
+ * @param vmId the ID of the virtual machine
+ * @return an asynchronous job response.
+ */
+ @Named("attachIso")
+ @GET
+ @Consumes(MediaType.APPLICATION_JSON)
+ @QueryParams(keys = "command", values = "attachIso")
+ @Unwrap
+ AsyncCreateResponse attachISO(@QueryParam("id") String isoId, @QueryParam("virtualmachineid") String vmId);
+
+ /**
+ * Detaches any ISO file (if any) currently attached to a virtual machine.
+ *
+ * @param vmId The ID of the virtual machine
+ * @return an asynchronous job response.
+ */
+ @Named("detachIso")
+ @GET
+ @Consumes(MediaType.APPLICATION_JSON)
+ @QueryParams(keys = "command", values = "detachIso")
+ @Unwrap
+ AsyncCreateResponse detachISO(@QueryParam("virtualmachineid") String vmId);
+
+ /**
+ * Gets information about an ISO by its ID.
+ *
+ * @param id the ID of the ISO file
+ * @return the ISO object matching the ID
+ */
+ @Named("listIsos")
+ @GET
+ @Consumes(MediaType.APPLICATION_JSON)
+ @QueryParams(keys = { "command", "listAll" }, values = { "listIsos", "true" })
+ @SelectJson("iso")
+ @OnlyElement
+ @Fallback(NullOnNotFoundOr404.class)
+ ISO getISO(@QueryParam("id") String id);
+
+ /**
+ * Lists all available ISO files.
+ *
+ * @param options optional arguments
+ * @return a set of ISO objects the match the filter
+ */
+ @Named("listIsos")
+ @GET
+ @Consumes(MediaType.APPLICATION_JSON)
+ @QueryParams(keys = { "command", "listAll" }, values = { "listIsos", "true" })
+ @SelectJson("iso")
+ @Fallback(EmptySetOnNotFoundOr404.class)
+ Set<ISO> listISOs(ListISOsOptions... options);
+
+ /**
+ * Registers an existing ISO into the Cloud.com Cloud.
+ *
+ * @param name the name of the ISO
+ * @param displayText the display text of the ISO. This is usually used for display purposes.
+ * @param url the URL to where the ISO is currently being hosted
+ * @param zoneId the ID of the zone you wish to register the ISO to.
+ * @param options optional arguments
+ * @return the newly-added ISO
+ */
+ @Named("registerIso")
+ @GET
+ @Consumes(MediaType.APPLICATION_JSON)
+ @QueryParams(keys = "command", values = "registerIso")
+ @SelectJson("iso")
+ @OnlyElement
+ ISO registerISO(@QueryParam("name") String name, @QueryParam("displaytext") String displayText, @QueryParam("url") String url, @QueryParam("zoneid") String zoneId, RegisterISOOptions... options);
+
+ /**
+ *
+ *
+ * @param id the ID of the ISO file
+ * @param options optional arguments
+ * @return the ISO object matching the ID
+ */
+ @Named("updateIso")
+ @GET
+ @Consumes(MediaType.APPLICATION_JSON)
+ @QueryParams(keys = "command", values = "updateIso")
+ @Unwrap
+ ISO updateISO(@QueryParam("id") String id, UpdateISOOptions... options);
+
+ /**
+ * Deletes an ISO file.
+ *
+ * @param id the ID of the ISO file
+ * @param options optional arguments
+ * @return an asynchronous job response.
+ */
+ @Named("deleteIso")
+ @GET
+ @Consumes(MediaType.APPLICATION_JSON)
+ @QueryParams(keys = "command", values = "deleteIso")
+ @Unwrap
+ AsyncCreateResponse deleteISO(@QueryParam("id") String id, DeleteISOOptions... options);
+
+ /**
+ * Copies a template from one zone to another.
+ *
+ * @param isoId Template ID.
+ * @param sourceZoneId ID of the zone the template is currently hosted on.
+ * @param destZoneId ID of the zone the template is being copied to.
+ * @return an asynchronous job response.
+ */
+ @Named("copyIso")
+ @GET
+ @Consumes(MediaType.APPLICATION_JSON)
+ @QueryParams(keys = "command", values = "copyIso")
+ @Unwrap
+ AsyncCreateResponse copyISO(@QueryParam("id") String isoId, @QueryParam("sourcezoneid") String sourceZoneId, @QueryParam("destzoneid") String destZoneId);
+
+ /**
+ * Updates iso permissions
+ *
+ * @param id the template ID
+ * @param options optional arguments
+ * @return
+ */
+ @Named("updateIsoPermissions")
+ @GET
+ @Consumes(MediaType.APPLICATION_JSON)
+ @QueryParams(keys = "command", values = "updateIsoPermissions")
+ @Unwrap
+ void updateISOPermissions(@QueryParam("id") String id, UpdateISOPermissionsOptions... options);
+
+ /**
+ * List template visibility and all accounts that have permissions to view this template.
+ *
+ * @param id the template ID
+ * @param options optional arguments
+ * @return A set of the permissions on this ISO
+ */
+ @Named("listIsoPermissions")
+ @GET
+ @Consumes(MediaType.APPLICATION_JSON)
+ @QueryParams(keys = { "command", "listAll" }, values = { "listIsoPermissions", "true" })
+ @SelectJson("templatepermission")
+ ISOPermissions listISOPermissions(@QueryParam("id") String id, AccountInDomainOptions... options);
+
+ /**
+ * Extracts an ISO
+ *
+ * @param id the ID of the ISO file
+ * @param mode the mode of extraction - HTTP_DOWNLOAD or FTP_UPLOAD
+ * @param zoneId the ID of the zone where the ISO is originally located
+ * @param options optional arguments
+ * @return an asynchronous job response.
+ */
+ @Named("extractIso")
+ @GET
+ @Consumes(MediaType.APPLICATION_JSON)
+ @QueryParams(keys = "command", values = "extractIso")
+ @Unwrap
+ AsyncCreateResponse extractISO(@QueryParam("id") String id, @QueryParam("mode") ExtractMode mode, @QueryParam("zoneid") String zoneId, ExtractISOOptions... options);
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ISOAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ISOAsyncClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ISOAsyncClient.java
deleted file mode 100644
index 03bd58b..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ISOAsyncClient.java
+++ /dev/null
@@ -1,223 +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.ExtractMode;
-import org.jclouds.cloudstack.domain.ISO;
-import org.jclouds.cloudstack.domain.ISOPermissions;
-import org.jclouds.cloudstack.filters.AuthenticationFilter;
-import org.jclouds.cloudstack.options.AccountInDomainOptions;
-import org.jclouds.cloudstack.options.DeleteISOOptions;
-import org.jclouds.cloudstack.options.ExtractISOOptions;
-import org.jclouds.cloudstack.options.ListISOsOptions;
-import org.jclouds.cloudstack.options.RegisterISOOptions;
-import org.jclouds.cloudstack.options.UpdateISOOptions;
-import org.jclouds.cloudstack.options.UpdateISOPermissionsOptions;
-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;
-
-/**
- *
- * <p/>
- *
- * @see ISOClient
- * @see http://download.cloud.com/releases/2.2.12/api/TOC_User.html
- * @author Richard Downer
- */
-@RequestFilters(AuthenticationFilter.class)
-@QueryParams(keys = "response", values = "json")
-public interface ISOAsyncClient {
-
- /**
- * Attaches an ISO to a virtual machine.
- *
- * @param isoId the ID of the ISO file
- * @param vmId the ID of the virtual machine
- * @return an asynchronous job response.
- */
- @Named("attachIso")
- @GET
- @Consumes(MediaType.APPLICATION_JSON)
- @QueryParams(keys = "command", values = "attachIso")
- @Unwrap
- ListenableFuture<AsyncCreateResponse> attachISO(@QueryParam("id") String isoId, @QueryParam("virtualmachineid") String vmId);
-
- /**
- * Detaches any ISO file (if any) currently attached to a virtual machine.
- *
- * @param vmId The ID of the virtual machine
- * @return an asynchronous job response.
- */
- @Named("detachIso")
- @GET
- @Consumes(MediaType.APPLICATION_JSON)
- @QueryParams(keys = "command", values = "detachIso")
- @Unwrap
- ListenableFuture<AsyncCreateResponse> detachISO(@QueryParam("virtualmachineid") String vmId);
-
- /**
- * Gets information about an ISO by its ID.
- *
- * @param id the ID of the ISO file
- * @return the ISO object matching the ID
- */
- @Named("listIsos")
- @GET
- @Consumes(MediaType.APPLICATION_JSON)
- @QueryParams(keys = { "command", "listAll" }, values = { "listIsos", "true" })
- @SelectJson("iso")
- @OnlyElement
- @Fallback(NullOnNotFoundOr404.class)
- ListenableFuture<ISO> getISO(@QueryParam("id") String id);
-
- /**
- * Lists all available ISO files.
- *
- * @param options optional arguments
- * @return a set of ISO objects the match the filter
- */
- @Named("listIsos")
- @GET
- @Consumes(MediaType.APPLICATION_JSON)
- @QueryParams(keys = { "command", "listAll" }, values = { "listIsos", "true" })
- @SelectJson("iso")
- @Fallback(EmptySetOnNotFoundOr404.class)
- ListenableFuture<Set<ISO>> listISOs(ListISOsOptions... options);
-
- /**
- * Registers an existing ISO into the Cloud.com Cloud.
- *
- * @param name the name of the ISO
- * @param displayText the display text of the ISO. This is usually used for display purposes.
- * @param url the URL to where the ISO is currently being hosted
- * @param zoneId the ID of the zone you wish to register the ISO to.
- * @param options optional arguments
- * @return the newly-added ISO
- */
- @Named("registerIso")
- @GET
- @Consumes(MediaType.APPLICATION_JSON)
- @QueryParams(keys = "command", values = "registerIso")
- @SelectJson("iso")
- @OnlyElement
- ListenableFuture<ISO> registerISO(@QueryParam("name") String name, @QueryParam("displaytext") String displayText, @QueryParam("url") String url, @QueryParam("zoneid") String zoneId, RegisterISOOptions... options);
-
- /**
- *
- *
- * @param id the ID of the ISO file
- * @param options optional arguments
- * @return the ISO object matching the ID
- */
- @Named("updateIso")
- @GET
- @Consumes(MediaType.APPLICATION_JSON)
- @QueryParams(keys = "command", values = "updateIso")
- @Unwrap
- ListenableFuture<ISO> updateISO(@QueryParam("id") String id, UpdateISOOptions... options);
-
- /**
- * Deletes an ISO file.
- *
- * @param id the ID of the ISO file
- * @param options optional arguments
- * @return an asynchronous job response.
- */
- @Named("deleteIso")
- @GET
- @Consumes(MediaType.APPLICATION_JSON)
- @QueryParams(keys = "command", values = "deleteIso")
- @Unwrap
- ListenableFuture<AsyncCreateResponse> deleteISO(@QueryParam("id") String id, DeleteISOOptions... options);
-
- /**
- * Copies a template from one zone to another.
- *
- * @param isoId Template ID.
- * @param sourceZoneId ID of the zone the template is currently hosted on.
- * @param destZoneId ID of the zone the template is being copied to.
- * @return an asynchronous job response.
- */
- @Named("copyIso")
- @GET
- @Consumes(MediaType.APPLICATION_JSON)
- @QueryParams(keys = "command", values = "copyIso")
- @Unwrap
- ListenableFuture<AsyncCreateResponse> copyISO(@QueryParam("id") String isoId, @QueryParam("sourcezoneid") String sourceZoneId, @QueryParam("destzoneid") String destZoneId);
-
- /**
- * Updates iso permissions
- *
- * @param id the template ID
- * @param options optional arguments
- * @return
- */
- @Named("updateIsoPermissions")
- @GET
- @Consumes(MediaType.APPLICATION_JSON)
- @QueryParams(keys = "command", values = "updateIsoPermissions")
- @Unwrap
- ListenableFuture<Void> updateISOPermissions(@QueryParam("id") String id, UpdateISOPermissionsOptions... options);
-
- /**
- * List template visibility and all accounts that have permissions to view this template.
- *
- * @param id the template ID
- * @param options optional arguments
- * @return A set of the permissions on this ISO
- */
- @Named("listIsoPermissions")
- @GET
- @Consumes(MediaType.APPLICATION_JSON)
- @QueryParams(keys = { "command", "listAll" }, values = { "listIsoPermissions", "true" })
- @SelectJson("templatepermission")
- ListenableFuture<ISOPermissions> listISOPermissions(@QueryParam("id") String id, AccountInDomainOptions... options);
-
- /**
- * Extracts an ISO
- *
- * @param id the ID of the ISO file
- * @param mode the mode of extraction - HTTP_DOWNLOAD or FTP_UPLOAD
- * @param zoneId the ID of the zone where the ISO is originally located
- * @param options optional arguments
- * @return an asynchronous job response.
- */
- @Named("extractIso")
- @GET
- @Consumes(MediaType.APPLICATION_JSON)
- @QueryParams(keys = "command", values = "extractIso")
- @Unwrap
- ListenableFuture<AsyncCreateResponse> extractISO(@QueryParam("id") String id, @QueryParam("mode") ExtractMode mode, @QueryParam("zoneid") String zoneId, ExtractISOOptions... options);
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ISOClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ISOClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ISOClient.java
deleted file mode 100644
index 660a190..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/ISOClient.java
+++ /dev/null
@@ -1,144 +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.ExtractMode;
-import org.jclouds.cloudstack.domain.ISO;
-import org.jclouds.cloudstack.domain.ISOPermissions;
-import org.jclouds.cloudstack.options.AccountInDomainOptions;
-import org.jclouds.cloudstack.options.DeleteISOOptions;
-import org.jclouds.cloudstack.options.ExtractISOOptions;
-import org.jclouds.cloudstack.options.ListISOsOptions;
-import org.jclouds.cloudstack.options.RegisterISOOptions;
-import org.jclouds.cloudstack.options.UpdateISOOptions;
-import org.jclouds.cloudstack.options.UpdateISOPermissionsOptions;
-
-/**
- *
- * <p/>
- *
- * @see ISOAsyncClient
- * @see http://download.cloud.com/releases/2.2.12/api/TOC_User.html
- * @author Richard Downer
- */
-public interface ISOClient {
-
- /**
- * Attaches an ISO to a virtual machine.
- *
- * @param isoId the ID of the ISO file
- * @param vmId the ID of the virtual machine
- * @return an asynchronous job response.
- */
- AsyncCreateResponse attachISO(String isoId, String vmId);
-
- /**
- * Detaches any ISO file (if any) currently attached to a virtual machine.
- *
- * @param vmId The ID of the virtual machine
- * @return an asynchronous job response.
- */
- AsyncCreateResponse detachISO(String vmId);
-
- /**
- * Gets information about an ISO by its ID.
- *
- * @param id the ID of the ISO file
- * @return the ISO object matching the ID
- */
- ISO getISO(String id);
-
- /**
- * Lists all available ISO files.
- *
- * @param options optional arguments
- * @return a set of ISO objects the match the filter
- */
- Set<ISO> listISOs(ListISOsOptions... options);
-
- /**
- * Registers an existing ISO into the Cloud.com Cloud.
- *
- * @param name the name of the ISO
- * @param displayText the display text of the ISO. This is usually used for display purposes.
- * @param url the URL to where the ISO is currently being hosted
- * @param zoneId the ID of the zone you wish to register the ISO to.
- * @param options optional arguments
- * @return the newly-added ISO
- */
- ISO registerISO(String name, String displayText, String url, String zoneId, RegisterISOOptions... options);
-
- /**
- *
- *
- * @param id the ID of the ISO file
- * @param options optional arguments
- * @return the ISO object matching the ID
- */
- ISO updateISO(String id, UpdateISOOptions... options);
-
- /**
- * Deletes an ISO file.
- *
- * @param id the ID of the ISO file
- * @param options optional arguments
- * @return an asynchronous job response.
- */
- AsyncCreateResponse deleteISO(String id, DeleteISOOptions... options);
-
- /**
- * Copies a template from one zone to another.
- *
- * @param isoId Template ID.
- * @param sourceZoneId ID of the zone the template is currently hosted on.
- * @param destZoneId ID of the zone the template is being copied to.
- * @return an asynchronous job response.
- */
- AsyncCreateResponse copyISO(String isoId, String sourceZoneId, String destZoneId);
-
- /**
- * Updates iso permissions
- *
- * @param id the template ID
- * @param options optional arguments
- * @return
- */
- void updateISOPermissions(String id, UpdateISOPermissionsOptions... options);
-
- /**
- * List template visibility and all accounts that have permissions to view this template.
- *
- * @param id the template ID
- * @param options optional arguments
- * @return A set of the permissions on this ISO
- */
- ISOPermissions listISOPermissions(String id, AccountInDomainOptions... options);
-
- /**
- * Extracts an ISO
- *
- * @param id the ID of the ISO file
- * @param mode the mode of extraction - HTTP_DOWNLOAD or FTP_UPLOAD
- * @param zoneId the ID of the zone where the ISO is originally located
- * @param options optional arguments
- * @return an asynchronous job response.
- */
- AsyncCreateResponse extractISO(String id, ExtractMode mode, String zoneId, ExtractISOOptions... options);
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LimitApi.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LimitApi.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LimitApi.java
new file mode 100644
index 0000000..d420b90
--- /dev/null
+++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LimitApi.java
@@ -0,0 +1,59 @@
+/*
+ * 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.core.MediaType;
+
+import org.jclouds.Fallbacks.EmptySetOnNotFoundOr404;
+import org.jclouds.cloudstack.domain.ResourceLimit;
+import org.jclouds.cloudstack.filters.AuthenticationFilter;
+import org.jclouds.cloudstack.options.ListResourceLimitsOptions;
+import org.jclouds.rest.annotations.Fallback;
+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.12/TOC_User.html"
+ * />
+ */
+@RequestFilters(AuthenticationFilter.class)
+@QueryParams(keys = "response", values = "json")
+public interface LimitApi {
+ /**
+ * List the resource limits.
+ *
+ * @param options if present, how to constrain the list
+ */
+ @Named("listResourceLimits")
+ @GET
+ @QueryParams(keys = { "command", "listAll" }, values = { "listResourceLimits", "true" })
+ @SelectJson("resourcelimit")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Fallback(EmptySetOnNotFoundOr404.class)
+ Set<ResourceLimit> listResourceLimits(ListResourceLimitsOptions... options);
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LimitAsyncClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LimitAsyncClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LimitAsyncClient.java
deleted file mode 100644
index becd520..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LimitAsyncClient.java
+++ /dev/null
@@ -1,59 +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.core.MediaType;
-
-import org.jclouds.Fallbacks.EmptySetOnNotFoundOr404;
-import org.jclouds.cloudstack.domain.ResourceLimit;
-import org.jclouds.cloudstack.filters.AuthenticationFilter;
-import org.jclouds.cloudstack.options.ListResourceLimitsOptions;
-import org.jclouds.rest.annotations.Fallback;
-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.12/TOC_User.html"
- * />
- */
-@RequestFilters(AuthenticationFilter.class)
-@QueryParams(keys = "response", values = "json")
-public interface LimitAsyncClient {
- /**
- * @see org.jclouds.cloudstack.features.LimitClient#listResourceLimits
- */
- @Named("listResourceLimits")
- @GET
- @QueryParams(keys = { "command", "listAll" }, values = { "listResourceLimits", "true" })
- @SelectJson("resourcelimit")
- @Consumes(MediaType.APPLICATION_JSON)
- @Fallback(EmptySetOnNotFoundOr404.class)
- ListenableFuture<Set<ResourceLimit>> listResourceLimits(ListResourceLimitsOptions... options);
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/c6986efd/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LimitClient.java
----------------------------------------------------------------------
diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LimitClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LimitClient.java
deleted file mode 100644
index c6b8d90..0000000
--- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LimitClient.java
+++ /dev/null
@@ -1,39 +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.ResourceLimit;
-import org.jclouds.cloudstack.options.ListResourceLimitsOptions;
-
-/**
- * Provides synchronous access to CloudStack resource limit API.
- *
- * @author Vijay Kiran
- * @see <a
- * href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html"
- * />
- */
-public interface LimitClient {
- /**
- * List the resource limits.
- *
- * @param options if present, how to constrain the list
- */
- Set<ResourceLimit> listResourceLimits(ListResourceLimitsOptions... options);
-
-}