issue #1184 command names for cloudstack

This commit is contained in:
adriancole 2013-02-03 13:03:46 -08:00
parent 82c9d709b6
commit 1bcf73197d
39 changed files with 215 additions and 0 deletions

View File

@ -20,6 +20,7 @@ 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;
@ -52,6 +53,7 @@ public interface AccountAsyncClient {
/**
* @see AccountClient#listAccounts
*/
@Named("listAccounts")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listAccounts", "true" })
@SelectJson("account")
@ -62,6 +64,7 @@ public interface AccountAsyncClient {
/**
* @see AccountClient#getAccount
*/
@Named("listAccounts")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listAccounts", "true" })
@SelectJson("account")

View File

@ -20,6 +20,7 @@ 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;
@ -57,6 +58,7 @@ public interface AddressAsyncClient {
/**
* @see AddressClient#listPublicIPAddresses
*/
@Named("listPublicIpAddresses")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listPublicIpAddresses", "true" })
@SelectJson("publicipaddress")
@ -67,6 +69,7 @@ public interface AddressAsyncClient {
/**
* @see AddressClient#getPublicIPAddress
*/
@Named("listPublicIpAddresses")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listPublicIpAddresses", "true" })
@SelectJson("publicipaddress")
@ -78,6 +81,7 @@ public interface AddressAsyncClient {
/**
* @see AddressClient#associateIPAddressInZone
*/
@Named("associateIpAddress")
@GET
@QueryParams(keys = "command", values = "associateIpAddress")
@Unwrap
@ -88,6 +92,7 @@ public interface AddressAsyncClient {
/**
* @see AddressClient#disassociateIPAddress
*/
@Named("disassociateIpAddress")
@GET
@QueryParams(keys = "command", values = "disassociateIpAddress")
@Fallback(VoidOnNotFoundOr404OrUnableToFindAccountOwner.class)

View File

@ -20,6 +20,7 @@ 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;
@ -54,6 +55,7 @@ public interface AsyncJobAsyncClient {
/**
* @see AsyncJobClient#listAsyncJobs
*/
@Named("listAsyncJobs")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listAsyncJobs", "true" })
@ResponseParser(ParseAsyncJobsFromHttpResponse.class)
@ -63,6 +65,7 @@ public interface AsyncJobAsyncClient {
/**
* @see AsyncJobClient#getAsyncJob
*/
@Named("queryAsyncJobResult")
@GET
@QueryParams(keys = "command", values = "queryAsyncJobResult")
@Consumes(MediaType.APPLICATION_JSON)

View File

@ -18,6 +18,7 @@
*/
package org.jclouds.cloudstack.features;
import javax.inject.Named;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.core.MediaType;
@ -45,6 +46,7 @@ public interface ConfigurationAsyncClient {
/**
* @see ConfigurationClient#listCapabilities
*/
@Named("listCapabilities")
@GET
@QueryParams(keys = "command", values = "listCapabilities")
@SelectJson("capability")

View File

@ -18,6 +18,7 @@
*/
package org.jclouds.cloudstack.features;
import javax.inject.Named;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.QueryParam;
@ -51,6 +52,7 @@ public interface DomainAccountAsyncClient extends AccountAsyncClient {
/**
* @see DomainAccountClient#enableAccount
*/
@Named("enableAccount")
@GET
@QueryParams(keys = "command", values = "enableAccount")
@SelectJson("account")
@ -62,6 +64,7 @@ public interface DomainAccountAsyncClient extends AccountAsyncClient {
/**
* @see DomainAccountAsyncClient#disableAccount
*/
@Named("disableAccount")
@GET
@QueryParams(keys = "command", values = "disableAccount")
@Unwrap

View File

@ -20,6 +20,7 @@ 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;
@ -55,6 +56,7 @@ public interface DomainDomainAsyncClient {
/**
* @see DomainDomainClient#listDomains
*/
@Named("listDomains")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listDomains", "true" })
@SelectJson("domain")
@ -65,6 +67,7 @@ public interface DomainDomainAsyncClient {
/**
* @see DomainDomainClient#getDomainById
*/
@Named("listDomains")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listDomains", "true" })
@SelectJson("domain")
@ -76,6 +79,7 @@ public interface DomainDomainAsyncClient {
/**
* @see DomainDomainClient#listDomainChildren
*/
@Named("listDomainChildren")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listDomainChildren", "true" })
@SelectJson("domain")

View File

@ -18,6 +18,7 @@
*/
package org.jclouds.cloudstack.features;
import javax.inject.Named;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.core.MediaType;
@ -47,6 +48,7 @@ public interface DomainLimitAsyncClient extends LimitAsyncClient {
/**
* @see DomainLimitClient#updateResourceLimit
*/
@Named("updateResourceLimit")
@GET
@QueryParams(keys = "command", values = "updateResourceLimit")
@SelectJson("resourcelimit")

View File

@ -20,6 +20,7 @@ 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;
@ -55,6 +56,7 @@ public interface DomainUserAsyncClient {
/**
* @see DomainUserClient#listUsers
*/
@Named("listUsers")
@GET
@QueryParams(keys = "command", values = "listUsers")
@SelectJson("user")
@ -65,6 +67,7 @@ public interface DomainUserAsyncClient {
/**
* @see DomainUserClient#enableUser
*/
@Named("enableUser")
@GET
@QueryParams(keys = "command", values = "enableUser")
@SelectJson("user")
@ -75,6 +78,7 @@ public interface DomainUserAsyncClient {
/**
* @see DomainUserClient#disableUser
*/
@Named("disableUser")
@GET
@QueryParams(keys = "command", values = "disableUser")
@Unwrap

View File

@ -20,6 +20,7 @@ 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;
@ -51,6 +52,7 @@ public interface EventAsyncClient {
/**
* @see EventClient#listEventTypes()
*/
@Named("listEventTypes")
@GET
@QueryParams(keys = "command", values = "listEventTypes")
@Consumes(MediaType.APPLICATION_JSON)
@ -61,6 +63,7 @@ public interface EventAsyncClient {
/**
* @see EventClient#listEventTypes()
*/
@Named("listEventTypes")
@GET
@QueryParams(keys = "command", values = "listEvents")
@SelectJson("event")

View File

@ -20,6 +20,7 @@ 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;
@ -59,6 +60,7 @@ public interface FirewallAsyncClient {
/**
* @see FirewallClient#listFirewallRules
*/
@Named("listFirewallRules")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listFirewallRules", "true" })
@SelectJson("firewallrule")
@ -69,6 +71,7 @@ public interface FirewallAsyncClient {
/**
* @see FirewallClient#getFirewallRule
*/
@Named("listFirewallRules")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listFirewallRules", "true" })
@SelectJson("firewallrule")
@ -80,6 +83,7 @@ public interface FirewallAsyncClient {
/**
* @see FirewallClient#createFirewallRuleForIpAndProtocol
*/
@Named("createFirewallRule")
@GET
@QueryParams(keys = "command", values = "createFirewallRule")
@Unwrap
@ -90,6 +94,7 @@ public interface FirewallAsyncClient {
/**
* @see FirewallClient#createFirewallRuleForIpProtocolAndPort
*/
@Named("createFirewallRule")
@GET
@QueryParams(keys = "command", values = "createFirewallRule")
@Unwrap
@ -103,6 +108,7 @@ public interface FirewallAsyncClient {
/**
* @see FirewallClient#deleteFirewallRule
*/
@Named("deleteFirewallRule")
@GET
@QueryParams(keys = "command", values = "deleteFirewallRule")
@Fallback(VoidOnNotFoundOr404.class)
@ -111,6 +117,7 @@ public interface FirewallAsyncClient {
/**
* @see FirewallClient#listPortForwardingRules
*/
@Named("listPortForwardingRules")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listPortForwardingRules", "true" })
@SelectJson("portforwardingrule")
@ -121,6 +128,7 @@ public interface FirewallAsyncClient {
/**
* @see FirewallClient#getPortForwardingRule
*/
@Named("listPortForwardingRules")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listPortForwardingRules", "true" })
@SelectJson("portforwardingrule")
@ -132,6 +140,7 @@ public interface FirewallAsyncClient {
/**
* @see FirewallClient#createPortForwardingRuleForVirtualMachine
*/
@Named("createPortForwardingRule")
@GET
@QueryParams(keys = "command", values = "createPortForwardingRule")
@Unwrap
@ -144,6 +153,7 @@ public interface FirewallAsyncClient {
/**
* @see FirewallClient#deletePortForwardingRule
*/
@Named("deletePortForwardingRule")
@GET
@QueryParams(keys = "command", values = "deletePortForwardingRule")
@Fallback(VoidOnNotFoundOr404.class)

View File

@ -18,6 +18,7 @@
*/
package org.jclouds.cloudstack.features;
import javax.inject.Named;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.QueryParam;
@ -51,6 +52,7 @@ public interface GlobalAccountAsyncClient extends DomainAccountAsyncClient {
/**
* @see GlobalAccountClient#createAccount
*/
@Named("createAccount")
@GET
@QueryParams(keys = "command", values = "createAccount")
@SelectJson("account")
@ -64,6 +66,7 @@ public interface GlobalAccountAsyncClient extends DomainAccountAsyncClient {
/**
* @see GlobalAccountClient#updateAccount
*/
@Named("updateAccount")
@GET
@QueryParams(keys = "command", values = "updateAccount")
@SelectJson("account")
@ -75,6 +78,7 @@ public interface GlobalAccountAsyncClient extends DomainAccountAsyncClient {
/**
* @see GlobalAccountClient#deleteAccount
*/
@Named("deleteAccount")
@GET
@QueryParams(keys = "command", values = "deleteAccount")
@Consumes(MediaType.APPLICATION_JSON)

View File

@ -20,6 +20,7 @@ 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;
@ -51,6 +52,7 @@ public interface GlobalAlertAsyncClient {
/**
* @see GlobalAlertClient#listAlerts(org.jclouds.cloudstack.options.ListAlertsOptions...)
*/
@Named("listAlerts")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listAlerts", "true" })
@SelectJson("alert")

View File

@ -20,6 +20,7 @@ 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;
@ -51,6 +52,7 @@ public interface GlobalCapacityAsyncClient {
/**
* @see GlobalCapacityClient#listCapacity(org.jclouds.cloudstack.options.ListCapacityOptions...)
*/
@Named("listCapacity")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listCapacity", "true" })
@SelectJson("capacity")

View File

@ -20,6 +20,7 @@ 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;
@ -53,6 +54,7 @@ public interface GlobalConfigurationAsyncClient extends ConfigurationAsyncClient
/**
* @see GlobalConfigurationClient#listConfigurationEntries
*/
@Named("listConfigurations")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listConfigurations", "true" })
@SelectJson("configuration")
@ -63,6 +65,7 @@ public interface GlobalConfigurationAsyncClient extends ConfigurationAsyncClient
/**
* @see GlobalConfigurationClient#updateConfigurationEntry
*/
@Named("updateConfiguration")
@GET
@QueryParams(keys = "command", values = "updateConfiguration")
@SelectJson("configuration")

View File

@ -18,6 +18,7 @@
*/
package org.jclouds.cloudstack.features;
import javax.inject.Named;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.QueryParam;
@ -52,6 +53,7 @@ public interface GlobalDomainAsyncClient extends DomainDomainAsyncClient {
/**
* @see GlobalDomainClient#createDomain
*/
@Named("createDomain")
@GET
@QueryParams(keys = "command", values = "createDomain")
@SelectJson("domain")
@ -62,6 +64,7 @@ public interface GlobalDomainAsyncClient extends DomainDomainAsyncClient {
/**
* @see GlobalDomainClient#updateDomain
*/
@Named("updateDomain")
@GET
@QueryParams(keys = "command", values = "updateDomain")
@SelectJson("domain")
@ -72,6 +75,7 @@ public interface GlobalDomainAsyncClient extends DomainDomainAsyncClient {
/**
* @see GlobalDomainClient#deleteOnlyDomain
*/
@Named("deleteDomain")
@GET
@QueryParams(keys = {"command", "cleanup"}, values = {"deleteDomain", "false"})
@Fallback(VoidOnNotFoundOr404.class)
@ -80,6 +84,7 @@ public interface GlobalDomainAsyncClient extends DomainDomainAsyncClient {
/**
* @see GlobalDomainClient#deleteDomainAndAttachedResources
*/
@Named("deleteDomain")
@GET
@QueryParams(keys = {"command", "cleanup"}, values = {"deleteDomain", "true"})
@Fallback(VoidOnNotFoundOr404.class)

View File

@ -20,6 +20,7 @@ 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;
@ -59,6 +60,7 @@ public interface GlobalHostAsyncClient {
/**
* @see GlobalHostClient#listHosts
*/
@Named("listHosts")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listHosts", "true" })
@SelectJson("host")
@ -77,6 +79,7 @@ public interface GlobalHostAsyncClient {
* @param options optional arguments
* @return the new host.
*/
@Named("addHost")
@GET
@QueryParams(keys = "command", values = "addHost")
@SelectJson("host")
@ -90,6 +93,7 @@ public interface GlobalHostAsyncClient {
* @param options optional arguments
* @return the modified host.
*/
@Named("updateHost")
@GET
@QueryParams(keys = "command", values = "updateHost")
@SelectJson("host")
@ -103,6 +107,7 @@ public interface GlobalHostAsyncClient {
* @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)
@ -114,6 +119,7 @@ public interface GlobalHostAsyncClient {
* @param hostId the host ID
* @param options optional arguments
*/
@Named("deleteHost")
@GET
@QueryParams(keys = "command", values = "deleteHost")
@Consumes(MediaType.APPLICATION_JSON)
@ -125,6 +131,7 @@ public interface GlobalHostAsyncClient {
* @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")
@ -137,6 +144,7 @@ public interface GlobalHostAsyncClient {
* @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")
@ -149,6 +157,7 @@ public interface GlobalHostAsyncClient {
* @param hostId
* @return a job reference number for tracking this asynchronous job.
*/
@Named("reconnectHost")
@GET
@QueryParams(keys = "command", values = "reconnectHost")
@SelectJson("jobid")
@ -162,6 +171,7 @@ public interface GlobalHostAsyncClient {
* @param options optional arguments
* @return the host of the storage.
*/
@Named("addSecondaryStorage")
@GET
@QueryParams(keys = "command", values = "addSecondaryStorage")
@SelectJson("host")
@ -171,6 +181,7 @@ public interface GlobalHostAsyncClient {
/**
* @see GlobalHostClient#listClusters
*/
@Named("listClusters")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listClusters", "true" })
@SelectJson("cluster")
@ -188,6 +199,7 @@ public interface GlobalHostAsyncClient {
* @param options optional arguments
* @return the new cluster.
*/
@Named("addCluster")
@GET
@QueryParams(keys = "command", values = "addCluster")
@SelectJson("cluster")
@ -201,6 +213,7 @@ public interface GlobalHostAsyncClient {
* @param options optional arguments
* @return the modified cluster
*/
@Named("updateCluster")
@GET
@QueryParams(keys = "command", values = "updateCluster")
@SelectJson("cluster")
@ -214,6 +227,7 @@ public interface GlobalHostAsyncClient {
* @param username the username for the cluster
* @param password the password for the cluster
*/
@Named("updateHostPassword")
@GET
@QueryParams(keys = "command", values = "updateHostPassword")
@SelectJson("cluster")
@ -225,6 +239,7 @@ public interface GlobalHostAsyncClient {
*
* @param clusterId the cluster ID
*/
@Named("deleteCluster")
@GET
@QueryParams(keys = "command", values = "deleteCluster")
@Consumes(MediaType.APPLICATION_JSON)

View File

@ -18,6 +18,7 @@
*/
package org.jclouds.cloudstack.features;
import javax.inject.Named;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.QueryParam;
@ -55,6 +56,7 @@ public interface GlobalOfferingAsyncClient extends OfferingAsyncClient {
/**
* @see GlobalOfferingClient#createServiceOffering
*/
@Named("createServiceOffering")
@GET
@QueryParams(keys = "command", values = "createServiceOffering")
@SelectJson("serviceoffering")
@ -67,6 +69,7 @@ public interface GlobalOfferingAsyncClient extends OfferingAsyncClient {
/**
* @see GlobalOfferingClient#updateServiceOffering
*/
@Named("updateServiceOffering")
@GET
@QueryParams(keys = "command", values = "updateServiceOffering")
@SelectJson("serviceoffering")
@ -77,6 +80,7 @@ public interface GlobalOfferingAsyncClient extends OfferingAsyncClient {
/**
* @see GlobalOfferingClient#deleteServiceOffering
*/
@Named("deleteServiceOffering")
@GET
@QueryParams(keys = "command", values = "deleteServiceOffering")
@Consumes(MediaType.APPLICATION_JSON)
@ -86,6 +90,7 @@ public interface GlobalOfferingAsyncClient extends OfferingAsyncClient {
/**
* @see GlobalOfferingClient#createDiskOffering
*/
@Named("createDiskOffering")
@GET
@QueryParams(keys = "command", values = "createDiskOffering")
@SelectJson("diskoffering")
@ -97,6 +102,7 @@ public interface GlobalOfferingAsyncClient extends OfferingAsyncClient {
/**
* @see GlobalOfferingClient#updateDiskOffering
*/
@Named("updateDiskOffering")
@GET
@QueryParams(keys = "command", values = "updateDiskOffering")
@SelectJson("diskoffering")
@ -107,6 +113,7 @@ public interface GlobalOfferingAsyncClient extends OfferingAsyncClient {
/**
* @see GlobalOfferingClient#deleteDiskOffering
*/
@Named("deleteDiskOffering")
@GET
@QueryParams(keys = "command", values = "deleteDiskOffering")
@Consumes(MediaType.APPLICATION_JSON)
@ -116,6 +123,7 @@ public interface GlobalOfferingAsyncClient extends OfferingAsyncClient {
/**
* @see GlobalOfferingClient#updateNetworkOffering
*/
@Named("updateNetworkOffering")
@GET
@QueryParams(keys = "command", values ="updateNetworkOffering")
@SelectJson("networkoffering")

View File

@ -20,6 +20,7 @@ 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;
@ -57,6 +58,7 @@ public interface GlobalPodAsyncClient {
/**
* @see PodClient#listPods
*/
@Named("listPods")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listPods", "true" })
@SelectJson("pod")
@ -67,6 +69,7 @@ public interface GlobalPodAsyncClient {
/**
* @see PodClient#getPod
*/
@Named("listPods")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listPods", "true" })
@SelectJson("pod")
@ -87,6 +90,7 @@ public interface GlobalPodAsyncClient {
* @param createPodOptions optional arguments
* @return the new Pod
*/
@Named("createPod")
@GET
@QueryParams(keys = "command", values = "createPod")
@SelectJson("pod")
@ -105,6 +109,7 @@ public interface GlobalPodAsyncClient {
* @param createPodOptions optional arguments
* @return the new Pod
*/
@Named("createPod")
@GET
@QueryParams(keys = "command", values = "createPod")
@SelectJson("pod")
@ -116,6 +121,7 @@ public interface GlobalPodAsyncClient {
* Deletes a Pod.
* @param id the ID of the Pod
*/
@Named("deletePod")
@GET
@QueryParams(keys = "command", values = "deletePod")
@Consumes(MediaType.APPLICATION_JSON)
@ -128,6 +134,7 @@ public interface GlobalPodAsyncClient {
* @param updatePodOptions optional arguments
* @return the updated pod
*/
@Named("updatePod")
@GET
@QueryParams(keys = "command", values = "updatePod")
@SelectJson("pod")

View File

@ -20,6 +20,7 @@ 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;
@ -45,6 +46,7 @@ import com.google.common.util.concurrent.ListenableFuture;
@QueryParams(keys = "response", values = "json")
public interface GlobalStoragePoolAsyncClient {
@Named("listStoragePools")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listStoragePools", "true" })
@SelectJson("storagepool")

View File

@ -21,6 +21,7 @@ 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;
@ -51,12 +52,14 @@ import com.google.common.util.concurrent.ListenableFuture;
@QueryParams(keys = "response", values = "json")
public interface GlobalUsageAsyncClient {
@Named("generateUsageRecords")
@GET
@QueryParams(keys = "command", values = "generateUsageRecords")
@SelectJson("generateusagerecordsresponse")
@Consumes(MediaType.APPLICATION_JSON)
ListenableFuture<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")

View File

@ -18,6 +18,7 @@
*/
package org.jclouds.cloudstack.features;
import javax.inject.Named;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.QueryParam;
@ -52,6 +53,7 @@ public interface GlobalUserAsyncClient extends DomainUserAsyncClient {
/**
* @see GlobalUserClient#createUser
*/
@Named("createUser")
@GET
@QueryParams(keys = "command", values = "createUser")
@SelectJson("user")
@ -64,6 +66,7 @@ public interface GlobalUserAsyncClient extends DomainUserAsyncClient {
/**
* @see GlobalUserClient#registerUserKeys
*/
@Named("registerUserKeys")
@GET
@QueryParams(keys = "command", values = "registerUserKeys")
@SelectJson("userkeys")
@ -74,6 +77,7 @@ public interface GlobalUserAsyncClient extends DomainUserAsyncClient {
/**
* @see GlobalUserClient#updateUser
*/
@Named("updateUser")
@GET
@QueryParams(keys = "command", values = "updateUser")
@SelectJson("user")
@ -84,6 +88,7 @@ public interface GlobalUserAsyncClient extends DomainUserAsyncClient {
/**
* @see GlobalUserClient#deleteUser
*/
@Named("deleteUser")
@GET
@QueryParams(keys = "command", values = "deleteUser")
@Consumes(MediaType.APPLICATION_JSON)

View File

@ -20,6 +20,7 @@ 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;
@ -57,6 +58,7 @@ public interface GlobalVlanAsyncClient {
* @param id the required IP range.
* @return the requested IP range.
*/
@Named("listVlanIpRanges")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listVlanIpRanges", "true" })
@SelectJson("vlaniprange")
@ -71,6 +73,7 @@ public interface GlobalVlanAsyncClient {
* @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")
@ -86,6 +89,7 @@ public interface GlobalVlanAsyncClient {
* @param options optional arguments
* @return the newly-create IP range.
*/
@Named("createVlanIpRange")
@GET
@QueryParams(keys = "command", values = "createVlanIpRange")
@SelectJson("vlaniprange")
@ -98,6 +102,7 @@ public interface GlobalVlanAsyncClient {
* @param rangeId the id of the VLAN IP range
* @return void
*/
@Named("deleteVlanIpRange")
@GET
@QueryParams(keys = "command", values = "deleteVlanIpRange")
@Consumes(MediaType.APPLICATION_JSON)

View File

@ -18,6 +18,7 @@
*/
package org.jclouds.cloudstack.features;
import javax.inject.Named;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.QueryParam;
@ -53,6 +54,7 @@ public interface GlobalZoneAsyncClient extends ZoneAsyncClient {
/**
* @see GlobalZoneClient#createZone
*/
@Named("createZone")
@GET
@QueryParams(keys = "command", values = "createZone")
@SelectJson("zone")
@ -64,6 +66,7 @@ public interface GlobalZoneAsyncClient extends ZoneAsyncClient {
/**
* @see GlobalZoneClient#updateZone
*/
@Named("updateZone")
@GET
@QueryParams(keys = "command", values = "updateZone")
@SelectJson("zone")
@ -74,6 +77,7 @@ public interface GlobalZoneAsyncClient extends ZoneAsyncClient {
/**
* @see GlobalZoneClient#deleteZone
*/
@Named("deleteZone")
@GET
@QueryParams(keys = "command", values = "deleteZone")
@Consumes(MediaType.APPLICATION_JSON)

View File

@ -21,6 +21,7 @@ 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;
@ -57,6 +58,7 @@ public interface GuestOSAsyncClient {
/**
* @see GuestOSClient#listOSTypes
*/
@Named("listOsTypes")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listOsTypes", "true" })
@SelectJson("ostype")
@ -67,6 +69,7 @@ public interface GuestOSAsyncClient {
/**
* @see OSTypeClient#getOSType
*/
@Named("listOsTypes")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listOsTypes", "true" })
@SelectJson("ostype")
@ -78,6 +81,7 @@ public interface GuestOSAsyncClient {
/**
* @see GuestOSClient#listOSCategories
*/
@Named("listOsCategories")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listOsCategories", "true" })
@ResponseParser(ParseIdToNameFromHttpResponse.class)
@ -87,6 +91,7 @@ public interface GuestOSAsyncClient {
/**
* @see GuestOSClient#getOSCategory
*/
@Named("listOsCategories")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listOsCategories", "true" })
@ResponseParser(ParseIdToNameEntryFromHttpResponse.class)

View File

@ -20,6 +20,7 @@ package org.jclouds.cloudstack.features;
import java.util.Set;
import javax.inject.Named;
import javax.ws.rs.GET;
import javax.ws.rs.QueryParam;
@ -48,6 +49,7 @@ public interface HypervisorAsyncClient {
/**
* @see HypervisorClient#listHypervisors
*/
@Named("listHypervisors")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listHypervisors", "true" })
@ResponseParser(ParseNamesFromHttpResponse.class)
@ -57,6 +59,7 @@ public interface HypervisorAsyncClient {
/**
* @see HypervisorClient#listHypervisorsInZone
*/
@Named("listHypervisors")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listHypervisors", "true" })
@ResponseParser(ParseNamesFromHttpResponse.class)

View File

@ -20,6 +20,7 @@ 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;
@ -67,6 +68,7 @@ public interface ISOAsyncClient {
* @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")
@ -79,6 +81,7 @@ public interface ISOAsyncClient {
* @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")
@ -91,6 +94,7 @@ public interface ISOAsyncClient {
* @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" })
@ -105,6 +109,7 @@ public interface ISOAsyncClient {
* @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" })
@ -122,6 +127,7 @@ public interface ISOAsyncClient {
* @param options optional arguments
* @return the newly-added ISO
*/
@Named("registerIso")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = "command", values = "registerIso")
@ -136,6 +142,7 @@ public interface ISOAsyncClient {
* @param options optional arguments
* @return the ISO object matching the ID
*/
@Named("updateIso")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = "command", values = "updateIso")
@ -149,6 +156,7 @@ public interface ISOAsyncClient {
* @param options optional arguments
* @return an asynchronous job response.
*/
@Named("deleteIso")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = "command", values = "deleteIso")
@ -163,6 +171,7 @@ public interface ISOAsyncClient {
* @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")
@ -176,6 +185,7 @@ public interface ISOAsyncClient {
* @param options optional arguments
* @return
*/
@Named("updateIsoPermissions")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = "command", values = "updateIsoPermissions")
@ -189,6 +199,7 @@ public interface ISOAsyncClient {
* @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" })
@ -204,6 +215,7 @@ public interface ISOAsyncClient {
* @param options optional arguments
* @return an asynchronous job response.
*/
@Named("extractIso")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = "command", values = "extractIso")

View File

@ -20,6 +20,7 @@ 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;
@ -49,6 +50,7 @@ public interface LimitAsyncClient {
/**
* @see org.jclouds.cloudstack.features.LimitClient#listResourceLimits
*/
@Named("listResourceLimits")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listResourceLimits", "true" })
@SelectJson("resourcelimit")

View File

@ -20,6 +20,7 @@ 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;
@ -59,6 +60,7 @@ public interface LoadBalancerAsyncClient {
/**
* @see LoadBalancerClient#listLoadBalancerRules
*/
@Named("listLoadBalancerRules")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listLoadBalancerRules", "true" })
@SelectJson("loadbalancerrule")
@ -69,6 +71,7 @@ public interface LoadBalancerAsyncClient {
/**
* @see LoadBalancerClient#getLoadBalancerRule
*/
@Named("listLoadBalancerRules")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listLoadBalancerRules", "true" })
@SelectJson("loadbalancerrule")
@ -80,6 +83,7 @@ public interface LoadBalancerAsyncClient {
/**
* @see LoadBalancerClient#createLoadBalancerRuleForPublicIP
*/
@Named("createLoadBalancerRule")
@GET
@QueryParams(keys = "command", values = "createLoadBalancerRule")
@SelectJson("jobid")
@ -92,6 +96,7 @@ public interface LoadBalancerAsyncClient {
/**
* @see LoadBalancerClient#updateLoadBalancerRule
*/
@Named("updateLoadBalancerRule")
@GET
@QueryParams(keys = "command", values ="updateLoadBalancerRule")
@SelectJson("loadbalancerrule")
@ -103,6 +108,7 @@ public interface LoadBalancerAsyncClient {
/**
* @see LoadBalancerClient#deleteLoadBalancerRule
*/
@Named("deleteLoadBalancerRule")
@GET
@QueryParams(keys = "command", values = "deleteLoadBalancerRule")
@SelectJson("jobid")
@ -113,6 +119,7 @@ public interface LoadBalancerAsyncClient {
/**
* @see LoadBalancerClient#assignVirtualMachinesToLoadBalancerRule(String,Iterable)
*/
@Named("assignToLoadBalancerRule")
@GET
@QueryParams(keys = "command", values = "assignToLoadBalancerRule")
@Fallback(NullOnNotFoundOr404.class)
@ -124,6 +131,7 @@ public interface LoadBalancerAsyncClient {
/**
* @see LoadBalancerClient#assignVirtualMachinesToLoadBalancerRule(String,String[])
*/
@Named("assignToLoadBalancerRule")
@GET
@QueryParams(keys = "command", values = "assignToLoadBalancerRule")
@Fallback(NullOnNotFoundOr404.class)
@ -135,6 +143,7 @@ public interface LoadBalancerAsyncClient {
/**
* @see LoadBalancerClient#removeVirtualMachinesFromLoadBalancerRule(String,Iterable)
*/
@Named("removeFromLoadBalancerRule")
@GET
@QueryParams(keys = "command", values = "removeFromLoadBalancerRule")
@Fallback(NullOnNotFoundOr404.class)
@ -146,6 +155,7 @@ public interface LoadBalancerAsyncClient {
/**
* @see LoadBalancerClient#removeVirtualMachinesFromLoadBalancerRule(String,String[])
*/
@Named("removeFromLoadBalancerRule")
@GET
@QueryParams(keys = "command", values = "removeFromLoadBalancerRule")
@Fallback(NullOnNotFoundOr404.class)
@ -157,6 +167,7 @@ public interface LoadBalancerAsyncClient {
/**
* @see LoadBalancerClient#listVirtualMachinesAssignedToLoadBalancerRule
*/
@Named("listLoadBalancerRuleInstances")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listLoadBalancerRuleInstances", "true" })
@SelectJson("loadbalancerruleinstance")

View File

@ -20,6 +20,7 @@ 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;
@ -58,6 +59,7 @@ public interface NATAsyncClient {
/**
* @see NATClient#listIPForwardingRules
*/
@Named("listIpForwardingRules")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listIpForwardingRules", "true" })
@SelectJson("ipforwardingrule")
@ -68,6 +70,7 @@ public interface NATAsyncClient {
/**
* @see NATClient#getIPForwardingRule
*/
@Named("listIpForwardingRules")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listIpForwardingRules", "true" })
@SelectJson("ipforwardingrule")
@ -79,6 +82,7 @@ public interface NATAsyncClient {
/**
* @see NATClient#getIPForwardingRulesForIPAddress
*/
@Named("listIpForwardingRules")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listIpForwardingRules", "true" })
@SelectJson("ipforwardingrule")
@ -88,6 +92,7 @@ public interface NATAsyncClient {
/**
* @see NATClient#getIPForwardingRulesForVirtualMachine
*/
@Named("listIpForwardingRules")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listIpForwardingRules", "true" })
@SelectJson("ipforwardingrule")
@ -97,6 +102,7 @@ public interface NATAsyncClient {
/**
* @see NATClient#createIPForwardingRule
*/
@Named("createIpForwardingRule")
@GET
@QueryParams(keys = "command", values = "createIpForwardingRule")
@Unwrap
@ -108,6 +114,7 @@ public interface NATAsyncClient {
/**
* @see NATClient#enableStaticNATForVirtualMachine
*/
@Named("enableStaticNat")
@GET
@QueryParams(keys = "command", values = "enableStaticNat")
@Consumes(MediaType.APPLICATION_JSON)
@ -117,6 +124,7 @@ public interface NATAsyncClient {
/**
* @see NATClient#deleteIPForwardingRule
*/
@Named("deleteIpForwardingRule")
@GET
@QueryParams(keys = "command", values = "deleteIpForwardingRule")
@SelectJson("jobid")
@ -127,6 +135,7 @@ public interface NATAsyncClient {
/**
* @see NATClient#disableStaticNATOnPublicIP
*/
@Named("disableStaticNat")
@GET
@QueryParams(keys = "command", values = "disableStaticNat")
@SelectJson("jobid")

View File

@ -20,6 +20,7 @@ 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;
@ -54,6 +55,7 @@ public interface NetworkAsyncClient {
/**
* @see NetworkClient#listNetworks
*/
@Named("listNetworks")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listNetworks", "true" })
@SelectJson("network")
@ -64,6 +66,7 @@ public interface NetworkAsyncClient {
/**
* @see NetworkClient#getNetwork
*/
@Named("listNetworks")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listNetworks", "true" })
@SelectJson("network")
@ -75,6 +78,7 @@ public interface NetworkAsyncClient {
/**
* @see NetworkClient#createNetworkInZone
*/
@Named("createNetwork")
@GET
@QueryParams(keys = "command", values = "createNetwork")
@SelectJson("network")
@ -86,6 +90,7 @@ public interface NetworkAsyncClient {
/**
* @see NetworkClient#deleteNetwork
*/
@Named("deleteNetwork")
@GET
@QueryParams(keys = "command", values = "deleteNetwork")
@SelectJson("jobid")

View File

@ -20,6 +20,7 @@ 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;
@ -57,6 +58,7 @@ public interface OfferingAsyncClient {
/**
* @see OfferingClient#listServiceOfferings
*/
@Named("listServiceOfferings")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listServiceOfferings", "true" })
@SelectJson("serviceoffering")
@ -67,6 +69,7 @@ public interface OfferingAsyncClient {
/**
* @see OfferingClient#getServiceOffering
*/
@Named("listServiceOfferings")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listServiceOfferings", "true" })
@SelectJson("serviceoffering")
@ -78,6 +81,7 @@ public interface OfferingAsyncClient {
/**
* @see OfferingClient#listDiskOfferings
*/
@Named("listDiskOfferings")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listDiskOfferings", "true" })
@SelectJson("diskoffering")
@ -88,6 +92,7 @@ public interface OfferingAsyncClient {
/**
* @see OfferingClient#getDiskOffering
*/
@Named("listDiskOfferings")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listDiskOfferings", "true" })
@SelectJson("diskoffering")
@ -99,6 +104,7 @@ public interface OfferingAsyncClient {
/**
* @see NetworkOfferingClient#listNetworkOfferings
*/
@Named("listNetworkOfferings")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listNetworkOfferings", "true" })
@SelectJson("networkoffering")
@ -109,6 +115,7 @@ public interface OfferingAsyncClient {
/**
* @see NetworkOfferingClient#getNetworkOffering
*/
@Named("listNetworkOfferings")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listNetworkOfferings", "true" })
@SelectJson("networkoffering")

View File

@ -20,6 +20,7 @@ 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;
@ -53,6 +54,7 @@ public interface SSHKeyPairAsyncClient {
/**
* @see SSHKeyPairClient#listSSHKeyPairs
*/
@Named("listSSHKeyPairs")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listSSHKeyPairs", "true" })
@SelectJson("sshkeypair")
@ -63,6 +65,7 @@ public interface SSHKeyPairAsyncClient {
/**
* @see SSHKeyPairClient#registerSSHKeyPair
*/
@Named("registerSSHKeyPair")
@GET
@QueryParams(keys = "command", values = "registerSSHKeyPair")
@SelectJson("keypair")
@ -72,6 +75,7 @@ public interface SSHKeyPairAsyncClient {
/**
* @see SSHKeyPairClient#createSSHKeyPair
*/
@Named("createSSHKeyPair")
@GET
@QueryParams(keys = "command", values = "createSSHKeyPair")
@SelectJson("keypair")
@ -81,6 +85,7 @@ public interface SSHKeyPairAsyncClient {
/**
* @see SSHKeyPairClient#getSSHKeyPair
*/
@Named("listSSHKeyPairs")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listSSHKeyPairs", "true" })
@SelectJson("sshkeypair")
@ -92,6 +97,7 @@ public interface SSHKeyPairAsyncClient {
/**
* @see SSHKeyPairClient#deleteSSHKeyPair
*/
@Named("deleteSSHKeyPair")
@GET
@QueryParams(keys = "command", values = "deleteSSHKeyPair")
@Fallback(VoidOnNotFoundOr404.class)

View File

@ -20,6 +20,7 @@ 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;
@ -59,6 +60,7 @@ public interface SecurityGroupAsyncClient {
/**
* @see SecurityGroupClient#listSecurityGroups
*/
@Named("listSecurityGroups")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listSecurityGroups", "true" })
@SelectJson("securitygroup")
@ -69,6 +71,7 @@ public interface SecurityGroupAsyncClient {
/**
* @see SecurityGroupClient#getSecurityGroup
*/
@Named("listSecurityGroups")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listSecurityGroups", "true" })
@SelectJson("securitygroup")
@ -80,6 +83,7 @@ public interface SecurityGroupAsyncClient {
/**
* @see SecurityGroupClient#createSecurityGroup
*/
@Named("createSecurityGroup")
@GET
@QueryParams(keys = "command", values = "createSecurityGroup")
@SelectJson("securitygroup")
@ -89,6 +93,7 @@ public interface SecurityGroupAsyncClient {
/**
* @see SecurityGroupClient#authorizeIngressPortsToCIDRs
*/
@Named("authorizeSecurityGroupIngress")
@GET
@QueryParams(keys = "command", values = "authorizeSecurityGroupIngress")
@SelectJson("jobid")
@ -102,6 +107,7 @@ public interface SecurityGroupAsyncClient {
/**
* @see SecurityGroupClient#authorizeIngressPortsToSecurityGroups
*/
@Named("authorizeSecurityGroupIngress")
@GET
@QueryParams(keys = "command", values = "authorizeSecurityGroupIngress")
@SelectJson("jobid")
@ -115,6 +121,7 @@ public interface SecurityGroupAsyncClient {
/**
* @see SecurityGroupClient#authorizeIngressICMPToCIDRs
*/
@Named("authorizeSecurityGroupIngress")
@GET
@QueryParams(keys = { "command", "protocol" }, values = { "authorizeSecurityGroupIngress", "ICMP" })
@SelectJson("jobid")
@ -127,6 +134,7 @@ public interface SecurityGroupAsyncClient {
/**
* @see SecurityGroupClient#authorizeIngressICMPToSecurityGroups
*/
@Named("authorizeSecurityGroupIngress")
@GET
@QueryParams(keys = { "command", "protocol" }, values = { "authorizeSecurityGroupIngress", "ICMP" })
@SelectJson("jobid")
@ -139,6 +147,7 @@ public interface SecurityGroupAsyncClient {
/**
* @see SecurityGroupClient#revokeIngressRule
*/
@Named("revokeSecurityGroupIngress")
@GET
@QueryParams(keys = "command", values = "revokeSecurityGroupIngress")
@Fallback(VoidOnNotFoundOr404.class)
@ -149,6 +158,7 @@ public interface SecurityGroupAsyncClient {
/**
* @see SecurityGroupClient#deleteSecurityGroup
*/
@Named("deleteSecurityGroup")
@GET
@QueryParams(keys = "command", values = "deleteSecurityGroup")
@Fallback(VoidOnNotFoundOr404.class)

View File

@ -18,6 +18,7 @@
*/
package org.jclouds.cloudstack.features;
import javax.inject.Named;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.QueryParam;
@ -47,6 +48,7 @@ public interface SessionAsyncClient {
/**
* @see SessionClient#loginUserInDomainWithHashOfPassword
*/
@Named("login")
@GET
@QueryParams(keys = "command", values = "login")
@ResponseParser(ParseLoginResponseFromHttpResponse.class)
@ -58,6 +60,7 @@ public interface SessionAsyncClient {
/**
* @see SessionClient#logoutUser
*/
@Named("logout")
@GET
@QueryParams(keys = "command", values = "logout")
@Fallback(VoidOnNotFoundOr404.class)

View File

@ -20,6 +20,7 @@ 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;
@ -67,6 +68,7 @@ public interface SnapshotAsyncClient {
* @param options optional arguments
* @return an asynchronous job structure
*/
@Named("createSnapshot")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = "command", values = "createSnapshot")
@ -79,6 +81,7 @@ public interface SnapshotAsyncClient {
* @param options optional arguments
* @return the snapshots matching the query
*/
@Named("listSnapshots")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = { "command", "listAll" }, values = { "listSnapshots", "true" })
@ -93,6 +96,7 @@ public interface SnapshotAsyncClient {
* @param id the snapshot ID
* @return the snapshot with the requested ID
*/
@Named("listSnapshots")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = { "command", "listAll" }, values = { "listSnapshots", "true" })
@ -107,6 +111,7 @@ public interface SnapshotAsyncClient {
* @param id The ID of the snapshot
* @return an asynchronous job structure
*/
@Named("deleteSnapshot")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = "command", values = "deleteSnapshot")
@ -122,6 +127,7 @@ public interface SnapshotAsyncClient {
* @param volumeId the ID of the disk volume
* @return the newly-created snapshot policy
*/
@Named("createSnapshotPolicy")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@Unwrap
@ -134,6 +140,7 @@ public interface SnapshotAsyncClient {
* @param id The ID of the snapshot policy
* @return
*/
@Named("deleteSnapshotPolicies")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = "command", values = "deleteSnapshotPolicies")
@ -146,6 +153,7 @@ public interface SnapshotAsyncClient {
* @param id IDs of snapshot policies
* @return
*/
@Named("deleteSnapshotPolicies")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = "command", values = "deleteSnapshotPolicies")
@ -159,6 +167,7 @@ public interface SnapshotAsyncClient {
* @param options optional arguments
* @return the snapshot policies matching the query
*/
@Named("listSnapshotPolicies")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = { "command", "listAll" }, values = { "listSnapshotPolicies", "true" })

View File

@ -20,6 +20,7 @@ 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;
@ -69,6 +70,7 @@ public interface TemplateAsyncClient {
/**
* @see TemplateClient#createTemplate
*/
@Named("createTemplate")
@GET
@QueryParams(keys = "command", values = "createTemplate")
@Unwrap
@ -80,6 +82,7 @@ public interface TemplateAsyncClient {
/**
* @see TemplateClient#registerTemplate
*/
@Named("registerTemplate")
@GET
@QueryParams(keys = "command", values = "registerTemplate")
@SelectJson("template")
@ -92,6 +95,7 @@ public interface TemplateAsyncClient {
/**
* @see TemplateClient#updateTemplate
*/
@Named("updateTemplate")
@GET
@QueryParams(keys = "command", values = "updateTemplate")
@SelectJson("template")
@ -101,6 +105,7 @@ public interface TemplateAsyncClient {
/**
* @see TemplateClient#copyTemplate
*/
@Named("copyTemplate")
@GET
@QueryParams(keys = "command", values = "copyTemplate")
@Unwrap
@ -111,6 +116,7 @@ public interface TemplateAsyncClient {
/**
* @see TemplateClient#deleteTemplate
*/
@Named("deleteTemplate")
@GET
@QueryParams(keys = "command", values = "deleteTemplate")
@Unwrap
@ -120,6 +126,7 @@ public interface TemplateAsyncClient {
/**
* @see TemplateClient#listTemplates
*/
@Named("listTemplates")
@GET
@QueryParams(keys = { "command", "listAll", "templatefilter" }, values = { "listTemplates", "true", "executable" })
@SelectJson("template")
@ -130,6 +137,7 @@ public interface TemplateAsyncClient {
/**
* @see TemplateClient#listTemplates(ListTemplatesOptions)
*/
@Named("listTemplates")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listTemplates", "true" })
@SelectJson("template")
@ -140,6 +148,7 @@ public interface TemplateAsyncClient {
/**
* @see TemplateClient#getTemplate
*/
@Named("listTemplates")
@GET
// templatefilter required in at least 2.2.8 version
@QueryParams(keys = { "command", "listAll", "templatefilter" }, values = { "listTemplates", "true", "executable" })
@ -152,6 +161,7 @@ public interface TemplateAsyncClient {
/**
* @see TemplateClient#updateTemplatePermissions
*/
@Named("updateTemplatePermissions")
@GET
@QueryParams(keys = "command", values = "updateTemplatePermissions")
ListenableFuture<Void> updateTemplatePermissions(@QueryParam("id") String id,
@ -160,6 +170,7 @@ public interface TemplateAsyncClient {
/**
* @see TemplateClient#listTemplatePermissions
*/
@Named("listTemplatePermissions")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listTemplatePermissions", "true" })
@Unwrap
@ -170,6 +181,7 @@ public interface TemplateAsyncClient {
/**
* @see TemplateClient#extractTemplate
*/
@Named("extractTemplate")
@GET
@QueryParams(keys = "command", values = "extractTemplate")
@Unwrap

View File

@ -20,6 +20,7 @@ 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;
@ -58,6 +59,7 @@ public interface VMGroupAsyncClient {
* @param options if present, how to constrain the list.
* @return VM groups matching query, or empty set, if no zones are found
*/
@Named("listInstanceGroups")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listInstanceGroups", "true" })
@SelectJson("instancegroup")
@ -68,6 +70,7 @@ public interface VMGroupAsyncClient {
/**
* @see VMGroupClient#getInstanceGroup
*/
@Named("listInstanceGroups")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listInstanceGroups", "true" })
@SelectJson("instancegroup")
@ -83,6 +86,7 @@ public interface VMGroupAsyncClient {
* @param options optional parameters
* @return the new VMGroup
*/
@Named("createInstanceGroup")
@GET
@QueryParams(keys = "command", values = "createInstanceGroup")
@SelectJson("instancegroup")
@ -95,6 +99,7 @@ public interface VMGroupAsyncClient {
* @param name the new name of the group
* @return the modified VMGroup
*/
@Named("updateInstanceGroup")
@GET
@QueryParams(keys = "command", values = "updateInstanceGroup")
@SelectJson("instancegroup")
@ -107,6 +112,7 @@ public interface VMGroupAsyncClient {
* @param id the ID of the VM group
* @return a future with a void data type
*/
@Named("deleteInstanceGroup")
@GET
@QueryParams(keys = "command", values = "deleteInstanceGroup")
@Fallback(VoidOnNotFoundOr404.class)

View File

@ -20,6 +20,7 @@ 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;
@ -55,6 +56,7 @@ public interface VolumeAsyncClient {
/**
* @see VolumeClient#listVolumes(org.jclouds.cloudstack.options.ListVolumesOptions...)
*/
@Named("listVolumes")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listVolumes", "true" })
@SelectJson("volume")
@ -65,6 +67,7 @@ public interface VolumeAsyncClient {
/**
* @see VolumeClient#getVolume(String)
*/
@Named("listVolumes")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = { "command", "listAll" }, values = { "listVolumes", "true" })
@ -77,6 +80,7 @@ public interface VolumeAsyncClient {
/**
* @see VolumeClient#createVolumeFromDiskOfferingInZone(String, String, String)
*/
@Named("createVolume")
@GET
@QueryParams(keys = "command", values = "createVolume")
@Unwrap
@ -88,6 +92,7 @@ public interface VolumeAsyncClient {
/**
* @see VolumeClient#createVolumeFromSnapshotInZone(String, String, String)
*/
@Named("createVolume")
@GET
@QueryParams(keys = "command", values = "createVolume")
@Unwrap
@ -99,6 +104,7 @@ public interface VolumeAsyncClient {
/**
* @see VolumeClient#attachVolume(String, String)
*/
@Named("attachVolume")
@GET
@QueryParams(keys = "command", values = "attachVolume")
@Unwrap
@ -109,6 +115,7 @@ public interface VolumeAsyncClient {
/**
* @see VolumeClient#detachVolume(String)
*/
@Named("detachVolume")
@GET
@QueryParams(keys = "command", values = "detachVolume")
@Unwrap
@ -118,6 +125,7 @@ public interface VolumeAsyncClient {
/**
* @see VolumeClient#deleteVolume(String)
*/
@Named("deleteVolume")
@GET
@QueryParams(keys = "command", values = "deleteVolume")
@Fallback(VoidOnNotFoundOr404.class)

View File

@ -20,6 +20,7 @@ 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;
@ -53,6 +54,7 @@ public interface ZoneAsyncClient {
/**
* @see ZoneClient#listZones
*/
@Named("listZones")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listZones", "true" })
@SelectJson("zone")
@ -63,6 +65,7 @@ public interface ZoneAsyncClient {
/**
* @see ZoneClient#getZone
*/
@Named("listZones")
@GET
@QueryParams(keys = { "command", "listAll" }, values = { "listZones", "true" })
@SelectJson("zone")