Merge pull request #1224 from dralves/gce-named-annotations

Added @Named annotations to gce
This commit is contained in:
Adrian Cole 2013-01-22 16:40:49 -08:00
commit 0a31ef2c96
10 changed files with 82 additions and 0 deletions

View File

@ -38,6 +38,7 @@ import org.jclouds.rest.annotations.SkipEncoding;
import org.jclouds.rest.annotations.Transform; import org.jclouds.rest.annotations.Transform;
import org.jclouds.rest.binders.BindToJsonPayload; import org.jclouds.rest.binders.BindToJsonPayload;
import javax.inject.Named;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE; import javax.ws.rs.DELETE;
import javax.ws.rs.GET; import javax.ws.rs.GET;
@ -68,6 +69,7 @@ public interface DiskAsyncApi {
/** /**
* @see DiskApi#get(String) * @see DiskApi#get(String)
*/ */
@Named("Disks:get")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/disks/{disk}") @Path("/disks/{disk}")
@ -78,6 +80,7 @@ public interface DiskAsyncApi {
/** /**
* @see DiskApi#createInZone(String, int, java.net.URI) * @see DiskApi#createInZone(String, int, java.net.URI)
*/ */
@Named("Disks:insert")
@POST @POST
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ -91,6 +94,7 @@ public interface DiskAsyncApi {
/** /**
* @see DiskApi#delete(String) * @see DiskApi#delete(String)
*/ */
@Named("Disks:delete")
@DELETE @DELETE
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/disks/{disk}") @Path("/disks/{disk}")
@ -101,6 +105,7 @@ public interface DiskAsyncApi {
/** /**
* @see org.jclouds.googlecompute.features.DiskApi#listFirstPage() * @see org.jclouds.googlecompute.features.DiskApi#listFirstPage()
*/ */
@Named("Disks:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/disks") @Path("/disks")
@ -112,6 +117,7 @@ public interface DiskAsyncApi {
/** /**
* @see DiskApi#listAtMarker(String) * @see DiskApi#listAtMarker(String)
*/ */
@Named("Disks:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/disks") @Path("/disks")
@ -123,6 +129,7 @@ public interface DiskAsyncApi {
/** /**
* @see DiskApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions) * @see DiskApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions)
*/ */
@Named("Disks:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/disks") @Path("/disks")
@ -134,6 +141,7 @@ public interface DiskAsyncApi {
/** /**
* @see DiskApi#list(org.jclouds.googlecompute.options.ListOptions) * @see DiskApi#list(org.jclouds.googlecompute.options.ListOptions)
*/ */
@Named("Disks:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/disks") @Path("/disks")
@ -146,6 +154,7 @@ public interface DiskAsyncApi {
/** /**
* @see DiskApi#list(org.jclouds.googlecompute.options.ListOptions) * @see DiskApi#list(org.jclouds.googlecompute.options.ListOptions)
*/ */
@Named("Disks:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/disks") @Path("/disks")

View File

@ -38,6 +38,7 @@ import org.jclouds.rest.annotations.SkipEncoding;
import org.jclouds.rest.annotations.Transform; import org.jclouds.rest.annotations.Transform;
import org.jclouds.rest.binders.BindToJsonPayload; import org.jclouds.rest.binders.BindToJsonPayload;
import javax.inject.Named;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE; import javax.ws.rs.DELETE;
import javax.ws.rs.GET; import javax.ws.rs.GET;
@ -70,6 +71,7 @@ public interface FirewallAsyncApi {
/** /**
* @see FirewallApi#get(String) * @see FirewallApi#get(String)
*/ */
@Named("Firewalls:get")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/firewalls/{firewall}") @Path("/firewalls/{firewall}")
@ -80,6 +82,7 @@ public interface FirewallAsyncApi {
/** /**
* @see FirewallApi#create(org.jclouds.googlecompute.domain.Firewall) * @see FirewallApi#create(org.jclouds.googlecompute.domain.Firewall)
*/ */
@Named("Firewalls:insert")
@POST @POST
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ -90,6 +93,7 @@ public interface FirewallAsyncApi {
/** /**
* @see FirewallApi#update(String, org.jclouds.googlecompute.domain.Firewall) * @see FirewallApi#update(String, org.jclouds.googlecompute.domain.Firewall)
*/ */
@Named("Firewalls:update")
@PUT @PUT
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ -101,6 +105,7 @@ public interface FirewallAsyncApi {
/** /**
* @see FirewallApi#patch(String, org.jclouds.googlecompute.domain.Firewall) * @see FirewallApi#patch(String, org.jclouds.googlecompute.domain.Firewall)
*/ */
@Named("Firewalls:patch")
@PATCH @PATCH
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ -112,6 +117,7 @@ public interface FirewallAsyncApi {
/** /**
* @see FirewallApi#delete(String) * @see FirewallApi#delete(String)
*/ */
@Named("Firewalls:delete")
@DELETE @DELETE
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/firewalls/{firewall}") @Path("/firewalls/{firewall}")
@ -122,6 +128,7 @@ public interface FirewallAsyncApi {
/** /**
* @see FirewallApi#listFirstPage() * @see FirewallApi#listFirstPage()
*/ */
@Named("Firewalls:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/firewalls") @Path("/firewalls")
@ -133,6 +140,7 @@ public interface FirewallAsyncApi {
/** /**
* @see FirewallApi#listAtMarker(String) * @see FirewallApi#listAtMarker(String)
*/ */
@Named("Firewalls:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/firewalls") @Path("/firewalls")
@ -144,6 +152,7 @@ public interface FirewallAsyncApi {
/** /**
* @see FirewallApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions) * @see FirewallApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions)
*/ */
@Named("Firewalls:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/firewalls") @Path("/firewalls")
@ -156,6 +165,7 @@ public interface FirewallAsyncApi {
/** /**
* @see FirewallApi#list() * @see FirewallApi#list()
*/ */
@Named("Firewalls:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/firewalls") @Path("/firewalls")
@ -169,6 +179,7 @@ public interface FirewallAsyncApi {
/** /**
* @see FirewallApi#list(org.jclouds.googlecompute.options.ListOptions) * @see FirewallApi#list(org.jclouds.googlecompute.options.ListOptions)
*/ */
@Named("Firewalls:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/firewalls") @Path("/firewalls")

View File

@ -35,6 +35,7 @@ import org.jclouds.rest.annotations.ResponseParser;
import org.jclouds.rest.annotations.SkipEncoding; import org.jclouds.rest.annotations.SkipEncoding;
import org.jclouds.rest.annotations.Transform; import org.jclouds.rest.annotations.Transform;
import javax.inject.Named;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE; import javax.ws.rs.DELETE;
import javax.ws.rs.GET; import javax.ws.rs.GET;
@ -62,6 +63,7 @@ public interface ImageAsyncApi {
/** /**
* @see ImageApi#get(String) * @see ImageApi#get(String)
*/ */
@Named("Images:get")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/images/{image}") @Path("/images/{image}")
@ -72,6 +74,7 @@ public interface ImageAsyncApi {
/** /**
* @see ImageApi#delete(String) * @see ImageApi#delete(String)
*/ */
@Named("Images:delete")
@DELETE @DELETE
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/images/{image}") @Path("/images/{image}")
@ -82,6 +85,7 @@ public interface ImageAsyncApi {
/** /**
* @see ImageApi#listFirstPage() * @see ImageApi#listFirstPage()
*/ */
@Named("Images:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/images") @Path("/images")
@ -93,6 +97,7 @@ public interface ImageAsyncApi {
/** /**
* @see ImageApi#listAtMarker(String) * @see ImageApi#listAtMarker(String)
*/ */
@Named("Images:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/images") @Path("/images")
@ -104,6 +109,7 @@ public interface ImageAsyncApi {
/** /**
* @see ImageApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions) * @see ImageApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions)
*/ */
@Named("Images:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/images") @Path("/images")
@ -116,6 +122,7 @@ public interface ImageAsyncApi {
/** /**
* @see ImageApi#listAtMarker(String) * @see ImageApi#listAtMarker(String)
*/ */
@Named("Images:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/images") @Path("/images")
@ -128,6 +135,7 @@ public interface ImageAsyncApi {
/** /**
* @see ImageApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions) * @see ImageApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions)
*/ */
@Named("Images:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/images") @Path("/images")

View File

@ -41,6 +41,7 @@ import org.jclouds.rest.annotations.SkipEncoding;
import org.jclouds.rest.annotations.Transform; import org.jclouds.rest.annotations.Transform;
import org.jclouds.rest.binders.BindToJsonPayload; import org.jclouds.rest.binders.BindToJsonPayload;
import javax.inject.Named;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE; import javax.ws.rs.DELETE;
import javax.ws.rs.GET; import javax.ws.rs.GET;
@ -70,6 +71,7 @@ public interface InstanceAsyncApi {
/** /**
* @see InstanceApi#get(String) * @see InstanceApi#get(String)
*/ */
@Named("Instances:get")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/instances/{instance}") @Path("/instances/{instance}")
@ -80,6 +82,7 @@ public interface InstanceAsyncApi {
/** /**
* @see InstanceApi#createInZone(String, org.jclouds.googlecompute.domain.InstanceTemplate, String) * @see InstanceApi#createInZone(String, org.jclouds.googlecompute.domain.InstanceTemplate, String)
*/ */
@Named("Instances:insert")
@POST @POST
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ -93,6 +96,7 @@ public interface InstanceAsyncApi {
/** /**
* @see InstanceApi#delete(String) * @see InstanceApi#delete(String)
*/ */
@Named("Instances:delete")
@DELETE @DELETE
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/instances/{instance}") @Path("/instances/{instance}")
@ -103,6 +107,7 @@ public interface InstanceAsyncApi {
/** /**
* @see InstanceApi#listFirstPage() * @see InstanceApi#listFirstPage()
*/ */
@Named("Instances:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/instances") @Path("/instances")
@ -114,6 +119,7 @@ public interface InstanceAsyncApi {
/** /**
* @see InstanceApi#listAtMarker(String) * @see InstanceApi#listAtMarker(String)
*/ */
@Named("Instances:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/instances") @Path("/instances")
@ -125,6 +131,7 @@ public interface InstanceAsyncApi {
/** /**
* @see InstanceApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions) * @see InstanceApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions)
*/ */
@Named("Instances:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/instances") @Path("/instances")
@ -136,6 +143,7 @@ public interface InstanceAsyncApi {
/** /**
* @see InstanceApi#list() * @see InstanceApi#list()
*/ */
@Named("Instances:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/instances") @Path("/instances")
@ -148,6 +156,7 @@ public interface InstanceAsyncApi {
/** /**
* @see InstanceApi#list(org.jclouds.googlecompute.options.ListOptions) * @see InstanceApi#list(org.jclouds.googlecompute.options.ListOptions)
*/ */
@Named("Instances:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/instances") @Path("/instances")
@ -160,6 +169,7 @@ public interface InstanceAsyncApi {
/** /**
* @see InstanceApi#addAccessConfigToNic(String, Instance.NetworkInterface.AccessConfig, String) * @see InstanceApi#addAccessConfigToNic(String, Instance.NetworkInterface.AccessConfig, String)
*/ */
@Named("Instances:addAccessConfig")
@POST @POST
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ -173,6 +183,7 @@ public interface InstanceAsyncApi {
/** /**
* @see InstanceApi#deleteAccessConfigFromNic(String, String, String) * @see InstanceApi#deleteAccessConfigFromNic(String, String, String)
*/ */
@Named("Instances:deleteAccessConfig")
@DELETE @DELETE
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/instances/{instance}/deleteAccessConfig") @Path("/instances/{instance}/deleteAccessConfig")
@ -185,6 +196,7 @@ public interface InstanceAsyncApi {
/** /**
* @see InstanceApi#getSerialPortOutput(String) * @see InstanceApi#getSerialPortOutput(String)
*/ */
@Named("Instances:serialPort")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/instances/{instance}/serialPort") @Path("/instances/{instance}/serialPort")

View File

@ -34,6 +34,7 @@ import org.jclouds.rest.annotations.ResponseParser;
import org.jclouds.rest.annotations.SkipEncoding; import org.jclouds.rest.annotations.SkipEncoding;
import org.jclouds.rest.annotations.Transform; import org.jclouds.rest.annotations.Transform;
import javax.inject.Named;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.GET; import javax.ws.rs.GET;
import javax.ws.rs.Path; import javax.ws.rs.Path;
@ -59,6 +60,7 @@ public interface KernelAsyncApi {
/** /**
* @see KernelApi#get(String) * @see KernelApi#get(String)
*/ */
@Named("Kernels:get")
@GET @GET
@Path("/kernels/{kernel}") @Path("/kernels/{kernel}")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -68,6 +70,7 @@ public interface KernelAsyncApi {
/** /**
* @see KernelApi#listFirstPage() * @see KernelApi#listFirstPage()
*/ */
@Named("Kernels:list")
@GET @GET
@Path("/kernels") @Path("/kernels")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -78,6 +81,7 @@ public interface KernelAsyncApi {
/** /**
* @see KernelApi#listAtMarker(String) * @see KernelApi#listAtMarker(String)
*/ */
@Named("Kernels:list")
@GET @GET
@Path("/kernels") @Path("/kernels")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -88,6 +92,7 @@ public interface KernelAsyncApi {
/** /**
* @see KernelApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions) * @see KernelApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions)
*/ */
@Named("Kernels:list")
@GET @GET
@Path("/kernels") @Path("/kernels")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -99,6 +104,7 @@ public interface KernelAsyncApi {
/** /**
* @see org.jclouds.googlecompute.features.KernelApi#list() * @see org.jclouds.googlecompute.features.KernelApi#list()
*/ */
@Named("Kernels:list")
@GET @GET
@Path("/kernels") @Path("/kernels")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -110,6 +116,7 @@ public interface KernelAsyncApi {
/** /**
* @see KernelApi#list(org.jclouds.googlecompute.options.ListOptions) * @see KernelApi#list(org.jclouds.googlecompute.options.ListOptions)
*/ */
@Named("Kernels:list")
@GET @GET
@Path("/kernels") @Path("/kernels")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)

View File

@ -34,6 +34,7 @@ import org.jclouds.rest.annotations.ResponseParser;
import org.jclouds.rest.annotations.SkipEncoding; import org.jclouds.rest.annotations.SkipEncoding;
import org.jclouds.rest.annotations.Transform; import org.jclouds.rest.annotations.Transform;
import javax.inject.Named;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.GET; import javax.ws.rs.GET;
import javax.ws.rs.Path; import javax.ws.rs.Path;
@ -60,6 +61,7 @@ public interface MachineTypeAsyncApi {
/** /**
* @see MachineTypeApi#get(String) * @see MachineTypeApi#get(String)
*/ */
@Named("MachineTypes:get")
@GET @GET
@Path("/machineTypes/{machineType}") @Path("/machineTypes/{machineType}")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -69,6 +71,7 @@ public interface MachineTypeAsyncApi {
/** /**
* @see MachineTypeApi#listFirstPage() * @see MachineTypeApi#listFirstPage()
*/ */
@Named("MachineTypes:list")
@GET @GET
@Path("/machineTypes") @Path("/machineTypes")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -79,6 +82,7 @@ public interface MachineTypeAsyncApi {
/** /**
* @see MachineTypeApi#listAtMarker(String) * @see MachineTypeApi#listAtMarker(String)
*/ */
@Named("MachineTypes:list")
@GET @GET
@Path("/machineTypes") @Path("/machineTypes")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -89,6 +93,7 @@ public interface MachineTypeAsyncApi {
/** /**
* @see MachineTypeApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions) * @see MachineTypeApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions)
*/ */
@Named("MachineTypes:list")
@GET @GET
@Path("/machineTypes") @Path("/machineTypes")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -100,6 +105,7 @@ public interface MachineTypeAsyncApi {
/** /**
* @see org.jclouds.googlecompute.features.MachineTypeApi#list() * @see org.jclouds.googlecompute.features.MachineTypeApi#list()
*/ */
@Named("MachineTypes:list")
@GET @GET
@Path("/machineTypes") @Path("/machineTypes")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -111,6 +117,7 @@ public interface MachineTypeAsyncApi {
/** /**
* @see MachineTypeApi#list(org.jclouds.googlecompute.options.ListOptions) * @see MachineTypeApi#list(org.jclouds.googlecompute.options.ListOptions)
*/ */
@Named("MachineTypes:list")
@GET @GET
@Path("/machineTypes") @Path("/machineTypes")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)

View File

@ -38,6 +38,7 @@ import org.jclouds.rest.annotations.SkipEncoding;
import org.jclouds.rest.annotations.Transform; import org.jclouds.rest.annotations.Transform;
import org.jclouds.rest.binders.BindToJsonPayload; import org.jclouds.rest.binders.BindToJsonPayload;
import javax.inject.Named;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE; import javax.ws.rs.DELETE;
import javax.ws.rs.GET; import javax.ws.rs.GET;
@ -67,6 +68,7 @@ public interface NetworkAsyncApi {
/** /**
* @see NetworkApi#get(String) * @see NetworkApi#get(String)
*/ */
@Named("Networks:get")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/networks/{network}") @Path("/networks/{network}")
@ -77,6 +79,7 @@ public interface NetworkAsyncApi {
/** /**
* @see NetworkApi#createInIPv4Range(String, String) * @see NetworkApi#createInIPv4Range(String, String)
*/ */
@Named("Networks:insert")
@POST @POST
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ -89,6 +92,7 @@ public interface NetworkAsyncApi {
/** /**
* @see NetworkApi#createInIPv4RangeWithGateway(String, String, String) * @see NetworkApi#createInIPv4RangeWithGateway(String, String, String)
*/ */
@Named("Networks:insert")
@POST @POST
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ -102,6 +106,7 @@ public interface NetworkAsyncApi {
/** /**
* @see NetworkApi#delete(String) * @see NetworkApi#delete(String)
*/ */
@Named("Networks:delete")
@DELETE @DELETE
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/networks/{network}") @Path("/networks/{network}")
@ -112,6 +117,7 @@ public interface NetworkAsyncApi {
/** /**
* @see NetworkApi#listFirstPage() * @see NetworkApi#listFirstPage()
*/ */
@Named("Networks:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/networks") @Path("/networks")
@ -123,6 +129,7 @@ public interface NetworkAsyncApi {
/** /**
* @see NetworkApi#listAtMarker(String) * @see NetworkApi#listAtMarker(String)
*/ */
@Named("Networks:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/networks") @Path("/networks")
@ -134,6 +141,7 @@ public interface NetworkAsyncApi {
/** /**
* @see NetworkApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions) * @see NetworkApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions)
*/ */
@Named("Networks:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/networks") @Path("/networks")
@ -146,6 +154,7 @@ public interface NetworkAsyncApi {
/** /**
* @see NetworkApi#list() * @see NetworkApi#list()
*/ */
@Named("Networks:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/networks") @Path("/networks")
@ -158,6 +167,7 @@ public interface NetworkAsyncApi {
/** /**
* @see NetworkApi#list(org.jclouds.googlecompute.options.ListOptions) * @see NetworkApi#list(org.jclouds.googlecompute.options.ListOptions)
*/ */
@Named("Networks:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/networks") @Path("/networks")

View File

@ -34,6 +34,7 @@ import org.jclouds.rest.annotations.ResponseParser;
import org.jclouds.rest.annotations.SkipEncoding; import org.jclouds.rest.annotations.SkipEncoding;
import org.jclouds.rest.annotations.Transform; import org.jclouds.rest.annotations.Transform;
import javax.inject.Named;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE; import javax.ws.rs.DELETE;
import javax.ws.rs.GET; import javax.ws.rs.GET;
@ -61,6 +62,7 @@ public interface OperationAsyncApi {
/** /**
* @see OperationApi#get(String) * @see OperationApi#get(String)
*/ */
@Named("Operations:get")
@GET @GET
@Path("/operations/{operation}") @Path("/operations/{operation}")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -71,6 +73,7 @@ public interface OperationAsyncApi {
/** /**
* @see OperationApi#delete(String) * @see OperationApi#delete(String)
*/ */
@Named("Operations:delete")
@DELETE @DELETE
@Path("/operations/{operation}") @Path("/operations/{operation}")
@OAuthScopes(COMPUTE_SCOPE) @OAuthScopes(COMPUTE_SCOPE)
@ -80,6 +83,7 @@ public interface OperationAsyncApi {
/** /**
* @see OperationApi#listFirstPage() * @see OperationApi#listFirstPage()
*/ */
@Named("Operations:list")
@GET @GET
@Path("/operations") @Path("/operations")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -91,6 +95,7 @@ public interface OperationAsyncApi {
/** /**
* @see OperationApi#listAtMarker(String) * @see OperationApi#listAtMarker(String)
*/ */
@Named("Operations:list")
@GET @GET
@Path("/operations") @Path("/operations")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -102,6 +107,7 @@ public interface OperationAsyncApi {
/** /**
* @see OperationApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions) * @see OperationApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions)
*/ */
@Named("Operations:list")
@GET @GET
@Path("/operations") @Path("/operations")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -114,6 +120,7 @@ public interface OperationAsyncApi {
/** /**
* @see OperationApi#list() * @see OperationApi#list()
*/ */
@Named("Operations:list")
@GET @GET
@Path("/operations") @Path("/operations")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -126,6 +133,7 @@ public interface OperationAsyncApi {
/** /**
* @see OperationApi#list(org.jclouds.googlecompute.options.ListOptions) * @see OperationApi#list(org.jclouds.googlecompute.options.ListOptions)
*/ */
@Named("Operations:list")
@GET @GET
@Path("/operations") @Path("/operations")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)

View File

@ -30,6 +30,7 @@ import org.jclouds.rest.annotations.Fallback;
import org.jclouds.rest.annotations.RequestFilters; import org.jclouds.rest.annotations.RequestFilters;
import org.jclouds.rest.annotations.SkipEncoding; import org.jclouds.rest.annotations.SkipEncoding;
import javax.inject.Named;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.GET; import javax.ws.rs.GET;
import javax.ws.rs.POST; import javax.ws.rs.POST;
@ -57,6 +58,7 @@ public interface ProjectAsyncApi {
/** /**
* @see ProjectApi#get(String) * @see ProjectApi#get(String)
*/ */
@Named("Projects:get")
@GET @GET
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -67,6 +69,7 @@ public interface ProjectAsyncApi {
/** /**
* @see ProjectApi#setCommonInstanceMetadata(String, java.util.Map) * @see ProjectApi#setCommonInstanceMetadata(String, java.util.Map)
*/ */
@Named("Projects:setCommonInstanceMetadata")
@POST @POST
@Path("/projects/{project}/setCommonInstanceMetadata") @Path("/projects/{project}/setCommonInstanceMetadata")
@OAuthScopes(COMPUTE_SCOPE) @OAuthScopes(COMPUTE_SCOPE)

View File

@ -33,6 +33,7 @@ import org.jclouds.rest.annotations.ResponseParser;
import org.jclouds.rest.annotations.SkipEncoding; import org.jclouds.rest.annotations.SkipEncoding;
import org.jclouds.rest.annotations.Transform; import org.jclouds.rest.annotations.Transform;
import javax.inject.Named;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.GET; import javax.ws.rs.GET;
import javax.ws.rs.Path; import javax.ws.rs.Path;
@ -58,6 +59,7 @@ public interface ZoneAsyncApi {
/** /**
* @see ZoneApi#get(String) * @see ZoneApi#get(String)
*/ */
@Named("Zones:get")
@GET @GET
@Path("/zones/{zone}") @Path("/zones/{zone}")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -67,6 +69,7 @@ public interface ZoneAsyncApi {
/** /**
* @see ZoneApi#listFirstPage() * @see ZoneApi#listFirstPage()
*/ */
@Named("Zones:list")
@GET @GET
@Path("/zones") @Path("/zones")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -77,6 +80,7 @@ public interface ZoneAsyncApi {
/** /**
* @see ZoneApi#listAtMarker(String) * @see ZoneApi#listAtMarker(String)
*/ */
@Named("Zones:list")
@GET @GET
@Path("/zones") @Path("/zones")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -87,6 +91,7 @@ public interface ZoneAsyncApi {
/** /**
* @see ZoneApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions) * @see ZoneApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions)
*/ */
@Named("Zones:list")
@GET @GET
@Path("/zones") @Path("/zones")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -97,6 +102,7 @@ public interface ZoneAsyncApi {
/** /**
* @see ZoneApi#list() * @see ZoneApi#list()
*/ */
@Named("Zones:list")
@GET @GET
@Path("/zones") @Path("/zones")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -108,6 +114,7 @@ public interface ZoneAsyncApi {
/** /**
* @see ZoneApi#list(org.jclouds.googlecompute.options.ListOptions) * @see ZoneApi#list(org.jclouds.googlecompute.options.ListOptions)
*/ */
@Named("Zones:list")
@GET @GET
@Path("/zones") @Path("/zones")
@OAuthScopes(COMPUTE_READONLY_SCOPE) @OAuthScopes(COMPUTE_READONLY_SCOPE)