http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalAccountApi.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalAccountApi.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalAccountApi.java deleted file mode 100644 index 7612b73..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalAccountApi.java +++ /dev/null @@ -1,103 +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.Account; -import org.jclouds.cloudstack.filters.AuthenticationFilter; -import org.jclouds.cloudstack.options.CreateAccountOptions; -import org.jclouds.cloudstack.options.UpdateAccountOptions; -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. - * - * @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 GlobalAccountApi extends DomainAccountApi { - - /** - * Create a new Cloudstack account - * - * @param userName unique username. - * @param accountType type of account - * @param email - * @param firstName - * @param lastName - * @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 options - * optional parameters - * @return - */ - @Named("createAccount") - @GET - @QueryParams(keys = "command", values = "createAccount") - @SelectJson("account") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(NullOnNotFoundOr404.class) - Account createAccount(@QueryParam("username") String userName, - @QueryParam("accounttype") Account.Type accountType, @QueryParam("email") String email, - @QueryParam("firstname") String firstName, @QueryParam("lastname") String lastName, - @QueryParam("password") String hashedPassword, CreateAccountOptions... options); - - /** - * Update an existing account - * - * @param accountName the current account name - * @param domainId the ID of the domain were the account exists - * @param newName new name for the account - * @param options optional arguments - * @return - */ - @Named("updateAccount") - @GET - @QueryParams(keys = "command", values = "updateAccount") - @SelectJson("account") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(NullOnNotFoundOr404.class) - Account updateAccount(@QueryParam("account") String accountName, - @QueryParam("domainid") String domainId, @QueryParam("newname") String newName, UpdateAccountOptions... options); - - /** - * Delete an account with the specified ID - * - * @param accountId - * @return - */ - @Named("deleteAccount") - @GET - @QueryParams(keys = "command", values = "deleteAccount") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(NullOnNotFoundOr404.class) - void deleteAccount(@QueryParam("id") String id); -}
http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalAlertApi.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalAlertApi.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalAlertApi.java deleted file mode 100644 index c71ef17..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalAlertApi.java +++ /dev/null @@ -1,60 +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.Alert; -import org.jclouds.cloudstack.filters.AuthenticationFilter; -import org.jclouds.cloudstack.options.ListAlertsOptions; -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. - * - * @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 GlobalAlertApi { - - /** - * List Alerts - * - * @return alert list or null if not found - */ - @Named("listAlerts") - @GET - @QueryParams(keys = { "command", "listAll" }, values = { "listAlerts", "true" }) - @SelectJson("alert") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(EmptySetOnNotFoundOr404.class) - Set<Alert> listAlerts(ListAlertsOptions...options); - -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalCapacityApi.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalCapacityApi.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalCapacityApi.java deleted file mode 100644 index eb0d0fa..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalCapacityApi.java +++ /dev/null @@ -1,60 +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.Capacity; -import org.jclouds.cloudstack.filters.AuthenticationFilter; -import org.jclouds.cloudstack.options.ListCapacityOptions; -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. - * - * @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 GlobalCapacityApi { - - /** - * List Capacities - * - * @return alert list or null if not found - */ - @Named("listCapacity") - @GET - @QueryParams(keys = { "command", "listAll" }, values = { "listCapacity", "true" }) - @SelectJson("capacity") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(EmptySetOnNotFoundOr404.class) - Set<Capacity> listCapacity(ListCapacityOptions...options); - -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalConfigurationApi.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalConfigurationApi.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalConfigurationApi.java deleted file mode 100644 index 1d9b5b8..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalConfigurationApi.java +++ /dev/null @@ -1,83 +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.ConfigurationEntry; -import org.jclouds.cloudstack.filters.AuthenticationFilter; -import org.jclouds.cloudstack.options.ListConfigurationEntriesOptions; -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 Configuration features available to Global - * Admin users. - * - * @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 GlobalConfigurationApi extends ConfigurationApi { - - /** - * List all configuration entries - * - * @param options - * result set filtering options - * @return - * a set of entries or empty - */ - @Named("listConfigurations") - @GET - @QueryParams(keys = { "command", "listAll" }, values = { "listConfigurations", "true" }) - @SelectJson("configuration") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(EmptySetOnNotFoundOr404.class) - Set<ConfigurationEntry> listConfigurationEntries(ListConfigurationEntriesOptions... options); - - /** - * Update a configuration entry - * - * @param name - * the name of the configuration - * @param value - * the value of the configuration - * @return - * the updated configuration value - */ - @Named("updateConfiguration") - @GET - @QueryParams(keys = "command", values = "updateConfiguration") - @SelectJson("configuration") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(NullOnNotFoundOr404.class) - ConfigurationEntry updateConfigurationEntry( - @QueryParam("name") String name, @QueryParam("value") String value); -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalDomainApi.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalDomainApi.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalDomainApi.java deleted file mode 100644 index fabfc41..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalDomainApi.java +++ /dev/null @@ -1,108 +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.Domain; -import org.jclouds.cloudstack.filters.AuthenticationFilter; -import org.jclouds.cloudstack.options.CreateDomainOptions; -import org.jclouds.cloudstack.options.UpdateDomainOptions; -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 Domain features available to Global - * Admin users. - * - * @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 GlobalDomainApi extends DomainDomainApi { - - /** - * Create new Domain - * - * @param name - * domain name - * @param options - * optional arguments - * @return - * domain instance - */ - @Named("createDomain") - @GET - @QueryParams(keys = "command", values = "createDomain") - @SelectJson("domain") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(NullOnNotFoundOr404.class) - Domain createDomain(@QueryParam("name") String name, CreateDomainOptions... options); - - /** - * Update a domain - * - * @param domainId - * the ID of the domain - * @param options - * optional arguments - * @return - * domain instance - */ - @Named("updateDomain") - @GET - @QueryParams(keys = "command", values = "updateDomain") - @SelectJson("domain") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(NullOnNotFoundOr404.class) - Domain updateDomain(@QueryParam("id") String domainId, UpdateDomainOptions... options); - - /** - * Delete domain (without deleting attached resources) - * - * @param id - * the domain ID - */ - @Named("deleteDomain") - @GET - @QueryParams(keys = {"command", "cleanup"}, values = {"deleteDomain", "false"}) - @Fallback(VoidOnNotFoundOr404.class) - void deleteOnlyDomain(@QueryParam("id") String id); - - /** - * Delete domain and cleanup all attached resources - * - * @param id - * the domain ID - */ - @Named("deleteDomain") - @GET - @QueryParams(keys = {"command", "cleanup"}, values = {"deleteDomain", "true"}) - @Fallback(VoidOnNotFoundOr404.class) - void deleteDomainAndAttachedResources(@QueryParam("id") String id); -} - http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalHostApi.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalHostApi.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalHostApi.java deleted file mode 100644 index 2255d71..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalHostApi.java +++ /dev/null @@ -1,247 +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.cloudstack.domain.Cluster; -import org.jclouds.cloudstack.domain.Host; -import org.jclouds.cloudstack.filters.AuthenticationFilter; -import org.jclouds.cloudstack.options.AddClusterOptions; -import org.jclouds.cloudstack.options.AddHostOptions; -import org.jclouds.cloudstack.options.AddSecondaryStorageOptions; -import org.jclouds.cloudstack.options.DeleteHostOptions; -import org.jclouds.cloudstack.options.ListClustersOptions; -import org.jclouds.cloudstack.options.ListHostsOptions; -import org.jclouds.cloudstack.options.UpdateClusterOptions; -import org.jclouds.cloudstack.options.UpdateHostOptions; -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 via their REST API. - * <p/> - * - * @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 GlobalHostApi { - - /** - * Lists hosts - * - * @param options - * if present, how to constrain the list. - * @return hosts matching query, or empty set, if no service - * offerings are found - */ - @Named("listHosts") - @GET - @QueryParams(keys = { "command", "listAll" }, values = { "listHosts", "true" }) - @SelectJson("host") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(EmptySetOnNotFoundOr404.class) - Set<Host> listHosts(ListHostsOptions... options); - - /** - * Adds a new host. - * - * @param zoneId the Zone ID for the host - * @param url the host URL - * @param hypervisor hypervisor type of the host - * @param username the username for the host - * @param password the password for the host - * @param options optional arguments - * @return the new host. - */ - @Named("addHost") - @GET - @QueryParams(keys = "command", values = "addHost") - @SelectJson("host") - @Consumes(MediaType.APPLICATION_JSON) - Host addHost(@QueryParam("zoneid") String zoneId, @QueryParam("url") String url, @QueryParam("hypervisor") String hypervisor, @QueryParam("username") String username, @QueryParam("password") String password, AddHostOptions... options); - - /** - * Updates a host. - * - * @param hostId the ID of the host to update - * @param options optional arguments - * @return the modified host. - */ - @Named("updateHost") - @GET - @QueryParams(keys = "command", values = "updateHost") - @SelectJson("host") - @Consumes(MediaType.APPLICATION_JSON) - Host updateHost(@QueryParam("id") String hostId, UpdateHostOptions... options); - - /** - * Update password of a host on management server. - * - * @param hostId the host ID - * @param username the username for the host - * @param password the password for the host - */ - @Named("updateHostPassword") - @GET - @QueryParams(keys = "command", values = "updateHostPassword") - @Consumes(MediaType.APPLICATION_JSON) - void updateHostPassword(@QueryParam("hostid") String hostId, @QueryParam("username") String username, @QueryParam("password") String password); - - /** - * Deletes a host. - * - * @param hostId the host ID - * @param options optional arguments - */ - @Named("deleteHost") - @GET - @QueryParams(keys = "command", values = "deleteHost") - @Consumes(MediaType.APPLICATION_JSON) - void deleteHost(@QueryParam("id") String hostId, DeleteHostOptions... options); - - /** - * Prepares a host for maintenance. - * - * @param hostId the host ID - * @return a job reference number for tracking this asynchronous job. - */ - @Named("prepareHostForMaintenance") - @GET - @QueryParams(keys = "command", values = "prepareHostForMaintenance") - @SelectJson("jobid") - @Consumes(MediaType.APPLICATION_JSON) - String prepareHostForMaintenance(@QueryParam("id") String hostId); - - /** - * Cancels host maintenance. - * - * @param hostId the host ID - * @return a job reference number for tracking this asynchronous job. - */ - @Named("cancelHostMaintenance") - @GET - @QueryParams(keys = "command", values = "cancelHostMaintenance") - @SelectJson("jobid") - @Consumes(MediaType.APPLICATION_JSON) - String cancelHostMaintenance(@QueryParam("id") String hostId); - - /** - * Reconnects a host. - * - * @param hostId - * @return a job reference number for tracking this asynchronous job. - */ - @Named("reconnectHost") - @GET - @QueryParams(keys = "command", values = "reconnectHost") - @SelectJson("jobid") - @Consumes(MediaType.APPLICATION_JSON) - String reconnectHost(@QueryParam("id") String hostId); - - /** - * Adds secondary storage. - * - * @param url the URL for the secondary storage - * @param options optional arguments - * @return the host of the storage. - */ - @Named("addSecondaryStorage") - @GET - @QueryParams(keys = "command", values = "addSecondaryStorage") - @SelectJson("host") - @Consumes(MediaType.APPLICATION_JSON) - Host addSecondaryStorage(@QueryParam("url") String url, AddSecondaryStorageOptions... options); - - /** - * @see GlobalHostApi#listClusters - */ - @Named("listClusters") - @GET - @QueryParams(keys = { "command", "listAll" }, values = { "listClusters", "true" }) - @SelectJson("cluster") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(EmptySetOnNotFoundOr404.class) - Set<Cluster> listClusters(ListClustersOptions... options); - - /** - * Adds a new cluster. - * - * @param zoneId the Zone ID for the cluster - * @param clusterName the cluster name - * @param clusterType type of the cluster - * @param hypervisor hypervisor type of the cluster - * @param options optional arguments - * @return the new cluster. - */ - @Named("addCluster") - @GET - @QueryParams(keys = "command", values = "addCluster") - @SelectJson("cluster") - @Consumes(MediaType.APPLICATION_JSON) - Cluster addCluster(@QueryParam("zoneid") String zoneId, @QueryParam("clustername") String clusterName, @QueryParam("clustertype") Host.ClusterType clusterType, @QueryParam("hypervisor") String hypervisor, AddClusterOptions... options); - - /** - * Updates an existing cluster. - * - * @param clusterId the ID of the cluster - * @param options optional arguments - * @return the modified cluster - */ - @Named("updateCluster") - @GET - @QueryParams(keys = "command", values = "updateCluster") - @SelectJson("cluster") - @Consumes(MediaType.APPLICATION_JSON) - Cluster updateCluster(@QueryParam("id") String clusterId, UpdateClusterOptions... options); - - /** - * Update password of a cluster on management server. - * - * @param clusterId the cluster ID - * @param username the username for the cluster - * @param password the password for the cluster - */ - @Named("updateHostPassword") - @GET - @QueryParams(keys = "command", values = "updateHostPassword") - @SelectJson("cluster") - @Consumes(MediaType.APPLICATION_JSON) - void updateClusterPassword(@QueryParam("clusterid") String clusterId, @QueryParam("username") String username, @QueryParam("password") String password); - - /** - * Deletes a cluster. - * - * @param clusterId the cluster ID - */ - @Named("deleteCluster") - @GET - @QueryParams(keys = "command", values = "deleteCluster") - @Consumes(MediaType.APPLICATION_JSON) - void deleteCluster(@QueryParam("id") String clusterId); - -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalOfferingApi.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalOfferingApi.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalOfferingApi.java deleted file mode 100644 index 793f277..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalOfferingApi.java +++ /dev/null @@ -1,178 +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.DiskOffering; -import org.jclouds.cloudstack.domain.NetworkOffering; -import org.jclouds.cloudstack.domain.ServiceOffering; -import org.jclouds.cloudstack.filters.AuthenticationFilter; -import org.jclouds.cloudstack.options.CreateDiskOfferingOptions; -import org.jclouds.cloudstack.options.CreateServiceOfferingOptions; -import org.jclouds.cloudstack.options.UpdateDiskOfferingOptions; -import org.jclouds.cloudstack.options.UpdateNetworkOfferingOptions; -import org.jclouds.cloudstack.options.UpdateServiceOfferingOptions; -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 via their REST API. - * <p/> - * - * @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 GlobalOfferingApi extends OfferingApi { - - /** - * Create a new service offering - * - * @param name - * name of the service offering - * @param displayText - * display name - * @param cpuNumber - * number of CPUs - * @param cpuSpeedInMHz - * CPU speed in MHz - * @param memoryInMB - * the total memory of the service offering in MB - * @param options - * optional arguments - * @return - * service offering instance - */ - @Named("createServiceOffering") - @GET - @QueryParams(keys = "command", values = "createServiceOffering") - @SelectJson("serviceoffering") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(NullOnNotFoundOr404.class) - ServiceOffering createServiceOffering(@QueryParam("name") String name, @QueryParam("displaytext") String displayText, - @QueryParam("cpunumber") int cpuNumber, @QueryParam("cpuspeed") int cpuSpeedInMHz, @QueryParam("memory") int memoryInMB, CreateServiceOfferingOptions... options); - - - /** - * Update an existing service offering - * - * @param id - * service offering ID - * @param options - * optional arguments - * @return - * service offering instance - */ - @Named("updateServiceOffering") - @GET - @QueryParams(keys = "command", values = "updateServiceOffering") - @SelectJson("serviceoffering") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(NullOnNotFoundOr404.class) - ServiceOffering updateServiceOffering(@QueryParam("id") String id, UpdateServiceOfferingOptions... options); - - /** - * Delete service offering - * - * @param id - * the ID of the service offering - */ - @Named("deleteServiceOffering") - @GET - @QueryParams(keys = "command", values = "deleteServiceOffering") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(NullOnNotFoundOr404.class) - void deleteServiceOffering(@QueryParam("id") String id); - - /** - * Create a new disk offering - * - * @param name - * name of the disk offering - * @param displayText - * display text for disk offering - * @param options - * optional arguments - * @return - * disk offering instance - */ - @Named("createDiskOffering") - @GET - @QueryParams(keys = "command", values = "createDiskOffering") - @SelectJson("diskoffering") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(NullOnNotFoundOr404.class) - DiskOffering createDiskOffering(@QueryParam("name") String name, - @QueryParam("displaytext") String displayText, CreateDiskOfferingOptions... options); - - /** - * Update a disk offering - * - * @param id - * disk offering ID - * @param options - * optional arguments - * @return - * disk offering instance - */ - @Named("updateDiskOffering") - @GET - @QueryParams(keys = "command", values = "updateDiskOffering") - @SelectJson("diskoffering") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(NullOnNotFoundOr404.class) - DiskOffering updateDiskOffering(@QueryParam("id") String id, UpdateDiskOfferingOptions... options); - - /** - * Delete disk offering - * - * @param id - * the ID of the disk offering - */ - @Named("deleteDiskOffering") - @GET - @QueryParams(keys = "command", values = "deleteDiskOffering") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(NullOnNotFoundOr404.class) - void deleteDiskOffering(@QueryParam("id") String id); - - /** - * Update network offering - * - * @param id - * the id of the network offering - * @param options - * optional arguments - * @return - * network offering instance - */ - @Named("updateNetworkOffering") - @GET - @QueryParams(keys = "command", values = "updateNetworkOffering") - @SelectJson("networkoffering") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(NullOnNotFoundOr404.class) - NetworkOffering updateNetworkOffering(@QueryParam("id") String id, UpdateNetworkOfferingOptions... options); -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalPodApi.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalPodApi.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalPodApi.java deleted file mode 100644 index d76abaa..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalPodApi.java +++ /dev/null @@ -1,148 +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.Pod; -import org.jclouds.cloudstack.filters.AuthenticationFilter; -import org.jclouds.cloudstack.options.CreatePodOptions; -import org.jclouds.cloudstack.options.ListPodsOptions; -import org.jclouds.cloudstack.options.UpdatePodOptions; -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 Pod features available to Global - * Admin users. - * - * @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 GlobalPodApi { - - /** - * Lists pods - * - * @param options - * if present, how to constrain the list. - * @return pods matching query, or empty set, if no pods are found - */ - @Named("listPods") - @GET - @QueryParams(keys = { "command", "listAll" }, values = { "listPods", "true" }) - @SelectJson("pod") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(EmptySetOnNotFoundOr404.class) - Set<Pod> listPods(ListPodsOptions... options); - - /** - * get a specific pod by id - * - * @param id - * pod to get - * @return pod or null if not found - */ - @Named("listPods") - @GET - @QueryParams(keys = { "command", "listAll" }, values = { "listPods", "true" }) - @SelectJson("pod") - @OnlyElement - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(NullOnNotFoundOr404.class) - Pod getPod(@QueryParam("id") String id); - - /** - * Creates a new Pod. - * - * @param name the name of the Pod - * @param zoneId the Zone ID in which the Pod will be created - * @param startIp the starting IP address for the Pod - * @param endIp the ending IP address for the Pod - * @param gateway the gateway for the Pod - * @param netmask the netmask for the Pod - * @param createPodOptions optional arguments - * @return the new Pod - */ - @Named("createPod") - @GET - @QueryParams(keys = "command", values = "createPod") - @SelectJson("pod") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(NullOnNotFoundOr404.class) - Pod createPod(@QueryParam("name") String name, @QueryParam("zoneid") String zoneId, @QueryParam("startip") String startIp, @QueryParam("endip") String endIp, @QueryParam("gateway") String gateway, @QueryParam("netmask") String netmask, CreatePodOptions... createPodOptions); - - /** - * Creates a new Pod. - * - * @param name the name of the Pod - * @param zoneId the Zone ID in which the Pod will be created - * @param startIp the starting IP address for the Pod - * @param gateway the gateway for the Pod - * @param netmask the netmask for the Pod - * @param createPodOptions optional arguments - * @return the new Pod - */ - @Named("createPod") - @GET - @QueryParams(keys = "command", values = "createPod") - @SelectJson("pod") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(NullOnNotFoundOr404.class) - Pod createPod(@QueryParam("name") String name, @QueryParam("zoneid") String zoneId, @QueryParam("startip") String startIp, @QueryParam("gateway") String gateway, @QueryParam("netmask") String netmask, CreatePodOptions... createPodOptions); - - /** - * Deletes a Pod. - * @param id the ID of the Pod - */ - @Named("deletePod") - @GET - @QueryParams(keys = "command", values = "deletePod") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(VoidOnNotFoundOr404.class) - void deletePod(@QueryParam("id") String id); - - /** - * Updates a Pod. - * @param id the ID of the Pod - * @param updatePodOptions optional arguments - * @return the updated pod - */ - @Named("updatePod") - @GET - @QueryParams(keys = "command", values = "updatePod") - @SelectJson("pod") - @Consumes(MediaType.APPLICATION_JSON) - @Fallback(NullOnNotFoundOr404.class) - Pod updatePod(@QueryParam("id") String id, UpdatePodOptions... updatePodOptions); - -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalStoragePoolApi.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalStoragePoolApi.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalStoragePoolApi.java deleted file mode 100644 index 6fa00ea..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalStoragePoolApi.java +++ /dev/null @@ -1,50 +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.cloudstack.domain.StoragePool; -import org.jclouds.cloudstack.filters.AuthenticationFilter; -import org.jclouds.cloudstack.options.ListStoragePoolsOptions; -import org.jclouds.rest.annotations.QueryParams; -import org.jclouds.rest.annotations.RequestFilters; -import org.jclouds.rest.annotations.SelectJson; - -/** - * Provides synchronous access to CloudStack storage pool features. - * <p/> - * - * @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 GlobalStoragePoolApi { - - @Named("listStoragePools") - @GET - @QueryParams(keys = { "command", "listAll" }, values = { "listStoragePools", "true" }) - @SelectJson("storagepool") - @Consumes(MediaType.APPLICATION_JSON) - Set<StoragePool> listStoragePools(ListStoragePoolsOptions... options); - -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalUsageApi.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalUsageApi.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalUsageApi.java deleted file mode 100644 index acc8d91..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalUsageApi.java +++ /dev/null @@ -1,63 +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 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.cloudstack.domain.JobResult; -import org.jclouds.cloudstack.domain.UsageRecord; -import org.jclouds.cloudstack.filters.AuthenticationFilter; -import org.jclouds.cloudstack.functions.DateToYyyyMmDd; -import org.jclouds.cloudstack.options.GenerateUsageRecordsOptions; -import org.jclouds.cloudstack.options.ListUsageRecordsOptions; -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 usage features. - * <p/> - * - * @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 GlobalUsageApi { - - @Named("generateUsageRecords") - @GET - @QueryParams(keys = "command", values = "generateUsageRecords") - @SelectJson("generateusagerecordsresponse") - @Consumes(MediaType.APPLICATION_JSON) - JobResult generateUsageRecords(@QueryParam("startdate") @ParamParser(DateToYyyyMmDd.class) Date start, @QueryParam("enddate") @ParamParser(DateToYyyyMmDd.class) Date end, GenerateUsageRecordsOptions... options); - - @Named("listUsageRecords") - @GET - @QueryParams(keys = { "command", "listAll" }, values = { "listUsageRecords", "true" }) - @SelectJson("usagerecord") - @Consumes(MediaType.APPLICATION_JSON) - Set<UsageRecord> listUsageRecords(@QueryParam("startdate") @ParamParser(DateToYyyyMmDd.class) Date start, @QueryParam("enddate") @ParamParser(DateToYyyyMmDd.class) Date end, ListUsageRecordsOptions... options); - -} http://git-wip-us.apache.org/repos/asf/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalUserApi.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalUserApi.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalUserApi.java deleted file mode 100644 index 430b292..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalUserApi.java +++ /dev/null @@ -1,114 +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; - -/** - * Provides synchronous access to CloudStack User features available to Global - * Admin users. - * - * @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/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalVlanApi.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalVlanApi.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalVlanApi.java deleted file mode 100644 index f5b0b87..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalVlanApi.java +++ /dev/null @@ -1,105 +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; - -/** - * 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" /> - */ -@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/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalZoneApi.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalZoneApi.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalZoneApi.java deleted file mode 100644 index 37f1805..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GlobalZoneApi.java +++ /dev/null @@ -1,103 +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; - -/** - * Provides synchronous access to CloudStack Account features available to Global - * Admin users. - * - * @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/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GuestOSApi.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GuestOSApi.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GuestOSApi.java deleted file mode 100644 index 9d43b01..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/GuestOSApi.java +++ /dev/null @@ -1,110 +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; - -/** - * 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" /> - */ -@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/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/HypervisorApi.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/HypervisorApi.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/HypervisorApi.java deleted file mode 100644 index 1b132fe..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/HypervisorApi.java +++ /dev/null @@ -1,62 +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; - -/** - * 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" /> - */ -@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/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/ISOApi.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/ISOApi.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/ISOApi.java deleted file mode 100644 index 241e286..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/ISOApi.java +++ /dev/null @@ -1,219 +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; - -/** - * - * <p/> - * - * @see http://download.cloud.com/releases/2.2.12/api/TOC_User.html - */ -@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/stratos/blob/1d88fdf4/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/LimitApi.java ---------------------------------------------------------------------- diff --git a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/LimitApi.java b/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/LimitApi.java deleted file mode 100644 index c07ccb2..0000000 --- a/dependencies/jclouds/apis/cloudstack/1.8.0-stratos/src/main/java/org/jclouds/cloudstack/features/LimitApi.java +++ /dev/null @@ -1,58 +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; - -/** - * Provides synchronous access to CloudStack SSHKeyPair features. - * - * @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); - -}
