added @Named annotations to gce

This commit is contained in:
David Ribeiro Alves 2013-01-22 15:26:50 -06:00
parent 7711ca0d60
commit bb08acda44
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.binders.BindToJsonPayload;
import javax.inject.Named;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
@ -68,6 +69,7 @@ public interface DiskAsyncApi {
/**
* @see DiskApi#get(String)
*/
@Named("Disks:get")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@Path("/disks/{disk}")
@ -78,6 +80,7 @@ public interface DiskAsyncApi {
/**
* @see DiskApi#createInZone(String, int, java.net.URI)
*/
@Named("Disks:insert")
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@ -91,6 +94,7 @@ public interface DiskAsyncApi {
/**
* @see DiskApi#delete(String)
*/
@Named("Disks:delete")
@DELETE
@Consumes(MediaType.APPLICATION_JSON)
@Path("/disks/{disk}")
@ -101,6 +105,7 @@ public interface DiskAsyncApi {
/**
* @see org.jclouds.googlecompute.features.DiskApi#listFirstPage()
*/
@Named("Disks:list")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@Path("/disks")
@ -112,6 +117,7 @@ public interface DiskAsyncApi {
/**
* @see DiskApi#listAtMarker(String)
*/
@Named("Disks:list")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@Path("/disks")
@ -123,6 +129,7 @@ public interface DiskAsyncApi {
/**
* @see DiskApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions)
*/
@Named("Disks:list")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@Path("/disks")
@ -134,6 +141,7 @@ public interface DiskAsyncApi {
/**
* @see DiskApi#list(org.jclouds.googlecompute.options.ListOptions)
*/
@Named("Disks:list")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@Path("/disks")
@ -146,6 +154,7 @@ public interface DiskAsyncApi {
/**
* @see DiskApi#list(org.jclouds.googlecompute.options.ListOptions)
*/
@Named("Disks:list")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@Path("/disks")

View File

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

View File

@ -41,6 +41,7 @@ import org.jclouds.rest.annotations.SkipEncoding;
import org.jclouds.rest.annotations.Transform;
import org.jclouds.rest.binders.BindToJsonPayload;
import javax.inject.Named;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
@ -70,6 +71,7 @@ public interface InstanceAsyncApi {
/**
* @see InstanceApi#get(String)
*/
@Named("Instances:get")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@Path("/instances/{instance}")
@ -80,6 +82,7 @@ public interface InstanceAsyncApi {
/**
* @see InstanceApi#createInZone(String, org.jclouds.googlecompute.domain.InstanceTemplate, String)
*/
@Named("Instances:insert")
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@ -93,6 +96,7 @@ public interface InstanceAsyncApi {
/**
* @see InstanceApi#delete(String)
*/
@Named("Instances:delete")
@DELETE
@Consumes(MediaType.APPLICATION_JSON)
@Path("/instances/{instance}")
@ -103,6 +107,7 @@ public interface InstanceAsyncApi {
/**
* @see InstanceApi#listFirstPage()
*/
@Named("Instances:list")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@Path("/instances")
@ -114,6 +119,7 @@ public interface InstanceAsyncApi {
/**
* @see InstanceApi#listAtMarker(String)
*/
@Named("Instances:list")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@Path("/instances")
@ -125,6 +131,7 @@ public interface InstanceAsyncApi {
/**
* @see InstanceApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions)
*/
@Named("Instances:list")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@Path("/instances")
@ -136,6 +143,7 @@ public interface InstanceAsyncApi {
/**
* @see InstanceApi#list()
*/
@Named("Instances:list")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@Path("/instances")
@ -148,6 +156,7 @@ public interface InstanceAsyncApi {
/**
* @see InstanceApi#list(org.jclouds.googlecompute.options.ListOptions)
*/
@Named("Instances:list")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@Path("/instances")
@ -160,6 +169,7 @@ public interface InstanceAsyncApi {
/**
* @see InstanceApi#addAccessConfigToNic(String, Instance.NetworkInterface.AccessConfig, String)
*/
@Named("Instances:addAccessConfig")
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@ -173,6 +183,7 @@ public interface InstanceAsyncApi {
/**
* @see InstanceApi#deleteAccessConfigFromNic(String, String, String)
*/
@Named("Instances:deleteAccessConfig")
@DELETE
@Consumes(MediaType.APPLICATION_JSON)
@Path("/instances/{instance}/deleteAccessConfig")
@ -185,6 +196,7 @@ public interface InstanceAsyncApi {
/**
* @see InstanceApi#getSerialPortOutput(String)
*/
@Named("Instances:serialPort")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@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.Transform;
import javax.inject.Named;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
@ -59,6 +60,7 @@ public interface KernelAsyncApi {
/**
* @see KernelApi#get(String)
*/
@Named("Kernels:get")
@GET
@Path("/kernels/{kernel}")
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -68,6 +70,7 @@ public interface KernelAsyncApi {
/**
* @see KernelApi#listFirstPage()
*/
@Named("Kernels:list")
@GET
@Path("/kernels")
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -78,6 +81,7 @@ public interface KernelAsyncApi {
/**
* @see KernelApi#listAtMarker(String)
*/
@Named("Kernels:list")
@GET
@Path("/kernels")
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -88,6 +92,7 @@ public interface KernelAsyncApi {
/**
* @see KernelApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions)
*/
@Named("Kernels:list")
@GET
@Path("/kernels")
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -99,6 +104,7 @@ public interface KernelAsyncApi {
/**
* @see org.jclouds.googlecompute.features.KernelApi#list()
*/
@Named("Kernels:list")
@GET
@Path("/kernels")
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -110,6 +116,7 @@ public interface KernelAsyncApi {
/**
* @see KernelApi#list(org.jclouds.googlecompute.options.ListOptions)
*/
@Named("Kernels:list")
@GET
@Path("/kernels")
@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.Transform;
import javax.inject.Named;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
@ -60,6 +61,7 @@ public interface MachineTypeAsyncApi {
/**
* @see MachineTypeApi#get(String)
*/
@Named("MachineTypes:get")
@GET
@Path("/machineTypes/{machineType}")
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -69,6 +71,7 @@ public interface MachineTypeAsyncApi {
/**
* @see MachineTypeApi#listFirstPage()
*/
@Named("MachineTypes:list")
@GET
@Path("/machineTypes")
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -79,6 +82,7 @@ public interface MachineTypeAsyncApi {
/**
* @see MachineTypeApi#listAtMarker(String)
*/
@Named("MachineTypes:list")
@GET
@Path("/machineTypes")
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -89,6 +93,7 @@ public interface MachineTypeAsyncApi {
/**
* @see MachineTypeApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions)
*/
@Named("MachineTypes:list")
@GET
@Path("/machineTypes")
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -100,6 +105,7 @@ public interface MachineTypeAsyncApi {
/**
* @see org.jclouds.googlecompute.features.MachineTypeApi#list()
*/
@Named("MachineTypes:list")
@GET
@Path("/machineTypes")
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -111,6 +117,7 @@ public interface MachineTypeAsyncApi {
/**
* @see MachineTypeApi#list(org.jclouds.googlecompute.options.ListOptions)
*/
@Named("MachineTypes:list")
@GET
@Path("/machineTypes")
@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.binders.BindToJsonPayload;
import javax.inject.Named;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
@ -67,6 +68,7 @@ public interface NetworkAsyncApi {
/**
* @see NetworkApi#get(String)
*/
@Named("Networks:get")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@Path("/networks/{network}")
@ -77,6 +79,7 @@ public interface NetworkAsyncApi {
/**
* @see NetworkApi#createInIPv4Range(String, String)
*/
@Named("Networks:insert")
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@ -89,6 +92,7 @@ public interface NetworkAsyncApi {
/**
* @see NetworkApi#createInIPv4RangeWithGateway(String, String, String)
*/
@Named("Networks:insert")
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@ -102,6 +106,7 @@ public interface NetworkAsyncApi {
/**
* @see NetworkApi#delete(String)
*/
@Named("Networks:delete")
@DELETE
@Consumes(MediaType.APPLICATION_JSON)
@Path("/networks/{network}")
@ -112,6 +117,7 @@ public interface NetworkAsyncApi {
/**
* @see NetworkApi#listFirstPage()
*/
@Named("Networks:list")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@Path("/networks")
@ -123,6 +129,7 @@ public interface NetworkAsyncApi {
/**
* @see NetworkApi#listAtMarker(String)
*/
@Named("Networks:list")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@Path("/networks")
@ -134,6 +141,7 @@ public interface NetworkAsyncApi {
/**
* @see NetworkApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions)
*/
@Named("Networks:list")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@Path("/networks")
@ -146,6 +154,7 @@ public interface NetworkAsyncApi {
/**
* @see NetworkApi#list()
*/
@Named("Networks:list")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@Path("/networks")
@ -158,6 +167,7 @@ public interface NetworkAsyncApi {
/**
* @see NetworkApi#list(org.jclouds.googlecompute.options.ListOptions)
*/
@Named("Networks:list")
@GET
@Consumes(MediaType.APPLICATION_JSON)
@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.Transform;
import javax.inject.Named;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
@ -61,6 +62,7 @@ public interface OperationAsyncApi {
/**
* @see OperationApi#get(String)
*/
@Named("Operations:get")
@GET
@Path("/operations/{operation}")
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -71,6 +73,7 @@ public interface OperationAsyncApi {
/**
* @see OperationApi#delete(String)
*/
@Named("Operations:delete")
@DELETE
@Path("/operations/{operation}")
@OAuthScopes(COMPUTE_SCOPE)
@ -80,6 +83,7 @@ public interface OperationAsyncApi {
/**
* @see OperationApi#listFirstPage()
*/
@Named("Operations:list")
@GET
@Path("/operations")
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -91,6 +95,7 @@ public interface OperationAsyncApi {
/**
* @see OperationApi#listAtMarker(String)
*/
@Named("Operations:list")
@GET
@Path("/operations")
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -102,6 +107,7 @@ public interface OperationAsyncApi {
/**
* @see OperationApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions)
*/
@Named("Operations:list")
@GET
@Path("/operations")
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -114,6 +120,7 @@ public interface OperationAsyncApi {
/**
* @see OperationApi#list()
*/
@Named("Operations:list")
@GET
@Path("/operations")
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -126,6 +133,7 @@ public interface OperationAsyncApi {
/**
* @see OperationApi#list(org.jclouds.googlecompute.options.ListOptions)
*/
@Named("Operations:list")
@GET
@Path("/operations")
@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.SkipEncoding;
import javax.inject.Named;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
@ -57,6 +58,7 @@ public interface ProjectAsyncApi {
/**
* @see ProjectApi#get(String)
*/
@Named("Projects:get")
@GET
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@Consumes(MediaType.APPLICATION_JSON)
@ -67,6 +69,7 @@ public interface ProjectAsyncApi {
/**
* @see ProjectApi#setCommonInstanceMetadata(String, java.util.Map)
*/
@Named("Projects:setCommonInstanceMetadata")
@POST
@Path("/projects/{project}/setCommonInstanceMetadata")
@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.Transform;
import javax.inject.Named;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
@ -58,6 +59,7 @@ public interface ZoneAsyncApi {
/**
* @see ZoneApi#get(String)
*/
@Named("Zones:get")
@GET
@Path("/zones/{zone}")
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -67,6 +69,7 @@ public interface ZoneAsyncApi {
/**
* @see ZoneApi#listFirstPage()
*/
@Named("Zones:list")
@GET
@Path("/zones")
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -77,6 +80,7 @@ public interface ZoneAsyncApi {
/**
* @see ZoneApi#listAtMarker(String)
*/
@Named("Zones:list")
@GET
@Path("/zones")
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -87,6 +91,7 @@ public interface ZoneAsyncApi {
/**
* @see ZoneApi#listAtMarker(String, org.jclouds.googlecompute.options.ListOptions)
*/
@Named("Zones:list")
@GET
@Path("/zones")
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -97,6 +102,7 @@ public interface ZoneAsyncApi {
/**
* @see ZoneApi#list()
*/
@Named("Zones:list")
@GET
@Path("/zones")
@OAuthScopes(COMPUTE_READONLY_SCOPE)
@ -108,6 +114,7 @@ public interface ZoneAsyncApi {
/**
* @see ZoneApi#list(org.jclouds.googlecompute.options.ListOptions)
*/
@Named("Zones:list")
@GET
@Path("/zones")
@OAuthScopes(COMPUTE_READONLY_SCOPE)