@Named annotations in all async api methods for OpenStack.

This commit is contained in:
Everett Toews 2013-01-19 18:16:14 -06:00
parent 5e241d96bd
commit d54e8dcecb
29 changed files with 207 additions and 0 deletions

View File

@ -18,6 +18,7 @@
*/ */
package org.jclouds.openstack.cinder.v1.features; package org.jclouds.openstack.cinder.v1.features;
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;
@ -56,6 +57,7 @@ public interface SnapshotAsyncApi {
/** /**
* @see SnapshotApi#list() * @see SnapshotApi#list()
*/ */
@Named("snapshot:list")
@GET @GET
@Path("/snapshots") @Path("/snapshots")
@SelectJson("snapshots") @SelectJson("snapshots")
@ -66,6 +68,7 @@ public interface SnapshotAsyncApi {
/** /**
* @see SnapshotApi#listInDetail() * @see SnapshotApi#listInDetail()
*/ */
@Named("snapshot:list")
@GET @GET
@Path("/snapshots/detail") @Path("/snapshots/detail")
@SelectJson("snapshots") @SelectJson("snapshots")
@ -76,6 +79,7 @@ public interface SnapshotAsyncApi {
/** /**
* @see SnapshotApi#get(String) * @see SnapshotApi#get(String)
*/ */
@Named("snapshot:get")
@GET @GET
@Path("/snapshots/{id}") @Path("/snapshots/{id}")
@SelectJson("snapshot") @SelectJson("snapshot")
@ -86,6 +90,7 @@ public interface SnapshotAsyncApi {
/** /**
* @see SnapshotApi#create(String, CreateSnapshotOptions...) * @see SnapshotApi#create(String, CreateSnapshotOptions...)
*/ */
@Named("snapshot:create")
@POST @POST
@Path("/snapshots") @Path("/snapshots")
@SelectJson("snapshot") @SelectJson("snapshot")
@ -97,6 +102,7 @@ public interface SnapshotAsyncApi {
/** /**
* @see SnapshotApi#delete(String) * @see SnapshotApi#delete(String)
*/ */
@Named("snapshot:delete")
@DELETE @DELETE
@Path("/snapshots/{id}") @Path("/snapshots/{id}")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)

View File

@ -18,6 +18,7 @@
*/ */
package org.jclouds.openstack.cinder.v1.features; package org.jclouds.openstack.cinder.v1.features;
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;
@ -56,6 +57,7 @@ public interface VolumeAsyncApi {
/** /**
* @see VolumeApi#list() * @see VolumeApi#list()
*/ */
@Named("volume:list")
@GET @GET
@Path("/volumes") @Path("/volumes")
@SelectJson("volumes") @SelectJson("volumes")
@ -66,6 +68,7 @@ public interface VolumeAsyncApi {
/** /**
* @see VolumeApi#listInDetail() * @see VolumeApi#listInDetail()
*/ */
@Named("volume:list")
@GET @GET
@Path("/volumes/detail") @Path("/volumes/detail")
@SelectJson("volumes") @SelectJson("volumes")
@ -76,6 +79,7 @@ public interface VolumeAsyncApi {
/** /**
* @see VolumeApi#get(String) * @see VolumeApi#get(String)
*/ */
@Named("volume:get")
@GET @GET
@Path("/volumes/{id}") @Path("/volumes/{id}")
@SelectJson("volume") @SelectJson("volume")
@ -86,6 +90,7 @@ public interface VolumeAsyncApi {
/** /**
* @see VolumeApi#create(int, CreateVolumeOptions...) * @see VolumeApi#create(int, CreateVolumeOptions...)
*/ */
@Named("volume:create")
@POST @POST
@Path("/volumes") @Path("/volumes")
@SelectJson("volume") @SelectJson("volume")
@ -97,6 +102,7 @@ public interface VolumeAsyncApi {
/** /**
* @see VolumeApi#delete(String) * @see VolumeApi#delete(String)
*/ */
@Named("volume:delete")
@DELETE @DELETE
@Path("/volumes/{id}") @Path("/volumes/{id}")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)

View File

@ -18,6 +18,7 @@
*/ */
package org.jclouds.openstack.cinder.v1.features; package org.jclouds.openstack.cinder.v1.features;
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;
@ -49,6 +50,7 @@ public interface VolumeTypeAsyncApi {
/** /**
* @see VolumeTypeApi#list() * @see VolumeTypeApi#list()
*/ */
@Named("volumetype:list")
@GET @GET
@Path("/types") @Path("/types")
@SelectJson("volume_types") @SelectJson("volume_types")
@ -59,6 +61,7 @@ public interface VolumeTypeAsyncApi {
/** /**
* @see VolumeTypeApi#get(String) * @see VolumeTypeApi#get(String)
*/ */
@Named("volumetype:get")
@GET @GET
@Path("/types/{id}") @Path("/types/{id}")
@SelectJson("volume_type") @SelectJson("volume_type")

View File

@ -20,6 +20,7 @@ package org.jclouds.openstack.keystone.v2_0.features;
import java.util.Set; import java.util.Set;
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;
@ -49,6 +50,7 @@ public interface ServiceAsyncApi {
/** /**
* @see ServiceApi#listTenants() * @see ServiceApi#listTenants()
*/ */
@Named("service:listtenants")
@GET @GET
@SelectJson("tenants") @SelectJson("tenants")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)

View File

@ -18,6 +18,7 @@
*/ */
package org.jclouds.openstack.keystone.v2_0.features; package org.jclouds.openstack.keystone.v2_0.features;
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 TenantAsyncApi {
/** /**
* @see TenantApi#list() * @see TenantApi#list()
*/ */
@Named("tenant:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/tenants") @Path("/tenants")
@ -70,6 +72,7 @@ public interface TenantAsyncApi {
ListenableFuture<? extends PagedIterable<? extends Tenant>> list(); ListenableFuture<? extends PagedIterable<? extends Tenant>> list();
/** @see TenantApi#list(PaginationOptions) */ /** @see TenantApi#list(PaginationOptions) */
@Named("tenant:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/tenants") @Path("/tenants")
@ -79,6 +82,7 @@ public interface TenantAsyncApi {
ListenableFuture<? extends PaginatedCollection<? extends Tenant>> list(PaginationOptions options); ListenableFuture<? extends PaginatedCollection<? extends Tenant>> list(PaginationOptions options);
/** @see TenantApi#get(String) */ /** @see TenantApi#get(String) */
@Named("tenant:get")
@GET @GET
@SelectJson("tenant") @SelectJson("tenant")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -88,6 +92,7 @@ public interface TenantAsyncApi {
ListenableFuture<? extends Tenant> get(@PathParam("tenantId") String tenantId); ListenableFuture<? extends Tenant> get(@PathParam("tenantId") String tenantId);
/** @see TenantApi#getByName(String) */ /** @see TenantApi#getByName(String) */
@Named("tenant:get")
@GET @GET
@SelectJson("tenant") @SelectJson("tenant")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)

View File

@ -20,6 +20,7 @@ package org.jclouds.openstack.keystone.v2_0.features;
import java.util.Set; import java.util.Set;
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.HEAD; import javax.ws.rs.HEAD;
@ -56,6 +57,7 @@ public interface TokenAsyncApi {
/** @see TokenApi#get(String) */ /** @see TokenApi#get(String) */
@Named("token:get")
@GET @GET
@SelectJson("token") @SelectJson("token")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -65,6 +67,7 @@ public interface TokenAsyncApi {
ListenableFuture<? extends Token> get(@PathParam("token") String token); ListenableFuture<? extends Token> get(@PathParam("token") String token);
/** @see TokenApi#getUserOfToken(String) */ /** @see TokenApi#getUserOfToken(String) */
@Named("token:getuser")
@GET @GET
@SelectJson("user") @SelectJson("user")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -74,6 +77,7 @@ public interface TokenAsyncApi {
ListenableFuture<? extends User> getUserOfToken(@PathParam("token") String token); ListenableFuture<? extends User> getUserOfToken(@PathParam("token") String token);
/** @see TokenApi#isValid(String) */ /** @see TokenApi#isValid(String) */
@Named("token:valid")
@HEAD @HEAD
@Path("/tokens/{token}") @Path("/tokens/{token}")
@RequestFilters(AuthenticateRequest.class) @RequestFilters(AuthenticateRequest.class)
@ -81,6 +85,7 @@ public interface TokenAsyncApi {
ListenableFuture<Boolean> isValid(@PathParam("token") String token); ListenableFuture<Boolean> isValid(@PathParam("token") String token);
/** @see TokenApi#listEndpointsForToken(String) */ /** @see TokenApi#listEndpointsForToken(String) */
@Named("token:listendpoints")
@GET @GET
@SelectJson("endpoints") @SelectJson("endpoints")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)

View File

@ -20,6 +20,7 @@ package org.jclouds.openstack.keystone.v2_0.features;
import java.util.Set; import java.util.Set;
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;
@ -64,6 +65,7 @@ public interface UserAsyncApi {
/** /**
* @see UserApi#list() * @see UserApi#list()
*/ */
@Named("user:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/users") @Path("/users")
@ -74,6 +76,7 @@ public interface UserAsyncApi {
ListenableFuture<? extends PagedIterable<? extends User>> list(); ListenableFuture<? extends PagedIterable<? extends User>> list();
/** @see UserApi#list(PaginationOptions) */ /** @see UserApi#list(PaginationOptions) */
@Named("user:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/users") @Path("/users")
@ -83,6 +86,7 @@ public interface UserAsyncApi {
ListenableFuture<? extends PaginatedCollection<? extends User>> list(PaginationOptions options); ListenableFuture<? extends PaginatedCollection<? extends User>> list(PaginationOptions options);
/** @see UserApi#get(String) */ /** @see UserApi#get(String) */
@Named("user:get")
@GET @GET
@SelectJson("user") @SelectJson("user")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -92,6 +96,7 @@ public interface UserAsyncApi {
ListenableFuture<? extends User> get(@PathParam("userId") String userId); ListenableFuture<? extends User> get(@PathParam("userId") String userId);
/** @see UserApi#getByName(String) */ /** @see UserApi#getByName(String) */
@Named("user:get")
@GET @GET
@SelectJson("user") @SelectJson("user")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -101,6 +106,7 @@ public interface UserAsyncApi {
ListenableFuture<? extends User> getByName(@QueryParam("name") String userName); ListenableFuture<? extends User> getByName(@QueryParam("name") String userName);
/** @see UserApi#listRolesOfUser(String) */ /** @see UserApi#listRolesOfUser(String) */
@Named("user:listroles")
@GET @GET
@SelectJson("roles") @SelectJson("roles")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -110,6 +116,7 @@ public interface UserAsyncApi {
ListenableFuture<? extends Set<? extends Role>> listRolesOfUser(@PathParam("userId") String userId); ListenableFuture<? extends Set<? extends Role>> listRolesOfUser(@PathParam("userId") String userId);
/** @see UserApi#listRolesOfUserOnTenant(String, String) */ /** @see UserApi#listRolesOfUserOnTenant(String, String) */
@Named("user:listroles")
@GET @GET
@SelectJson("roles") @SelectJson("roles")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)

View File

@ -20,6 +20,7 @@ package org.jclouds.openstack.v2_0.features;
import java.util.Set; import java.util.Set;
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;
@ -52,6 +53,7 @@ public interface ExtensionAsyncApi {
/** /**
* @see ExtensionApi#list * @see ExtensionApi#list
*/ */
@Named("extension:list")
@GET @GET
@SelectJson("extensions") @SelectJson("extensions")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -62,6 +64,7 @@ public interface ExtensionAsyncApi {
/** /**
* @see ExtensionApi#get * @see ExtensionApi#get
*/ */
@Named("extension:get")
@GET @GET
@SelectJson("extension") @SelectJson("extension")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)

View File

@ -20,6 +20,7 @@ package org.jclouds.openstack.nova.ec2.services;
import static org.jclouds.aws.reference.FormParameters.ACTION; import static org.jclouds.aws.reference.FormParameters.ACTION;
import javax.inject.Named;
import javax.ws.rs.FormParam; import javax.ws.rs.FormParam;
import javax.ws.rs.POST; import javax.ws.rs.POST;
import javax.ws.rs.Path; import javax.ws.rs.Path;
@ -50,6 +51,7 @@ public interface NovaEC2KeyPairAsyncClient extends KeyPairAsyncClient {
/** /**
* @see NovaEC2KeyPairClient#importKeyPairInRegion(String, String, String) * @see NovaEC2KeyPairClient#importKeyPairInRegion(String, String, String)
*/ */
@Named("keypair:import")
@POST @POST
@Path("/") @Path("/")
@FormParams(keys = ACTION, values = "ImportKeyPair") @FormParams(keys = ACTION, values = "ImportKeyPair")

View File

@ -20,6 +20,7 @@ package org.jclouds.openstack.nova.v2_0.extensions;
import java.util.Map; import java.util.Map;
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;
@ -65,6 +66,7 @@ public interface FlavorExtraSpecsAsyncApi {
/** /**
* @see FlavorExtraSpecsApi#getMetadata(String) * @see FlavorExtraSpecsApi#getMetadata(String)
*/ */
@Named("flavor:getmetadata")
@GET @GET
@SelectJson("extra_specs") @SelectJson("extra_specs")
@Path("/flavors/{flavor_id}/os-extra_specs") @Path("/flavors/{flavor_id}/os-extra_specs")
@ -74,6 +76,7 @@ public interface FlavorExtraSpecsAsyncApi {
/** /**
* @see FlavorExtraSpecsApi#updateMetadataEntry(String, String, String) * @see FlavorExtraSpecsApi#updateMetadataEntry(String, String, String)
*/ */
@Named("flavor:updatemetadata")
@POST @POST
@Path("/flavors/{flavor_id}/os-extra_specs") @Path("/flavors/{flavor_id}/os-extra_specs")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ -84,6 +87,7 @@ public interface FlavorExtraSpecsAsyncApi {
/** /**
* @see FlavorExtraSpecsApi#getMetadataKey(String, String) * @see FlavorExtraSpecsApi#getMetadataKey(String, String)
*/ */
@Named("flavor:getmetadata")
@GET @GET
@Path("/flavors/{flavor_id}/os-extra_specs/{key}") @Path("/flavors/{flavor_id}/os-extra_specs/{key}")
@Unwrap @Unwrap
@ -93,6 +97,7 @@ public interface FlavorExtraSpecsAsyncApi {
/** /**
* @see FlavorExtraSpecsApi#updateMetadataEntry(String, String, String) * @see FlavorExtraSpecsApi#updateMetadataEntry(String, String, String)
*/ */
@Named("flavor:updatemetadata")
@PUT @PUT
@Path("/flavors/{flavor_id}/os-extra_specs/{key}") @Path("/flavors/{flavor_id}/os-extra_specs/{key}")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ -105,6 +110,7 @@ public interface FlavorExtraSpecsAsyncApi {
/** /**
* @see FlavorExtraSpecsApi#deleteMetadataKey(String, String) * @see FlavorExtraSpecsApi#deleteMetadataKey(String, String)
*/ */
@Named("flavor:deletemetadata")
@DELETE @DELETE
@Path("/flavors/{flavor_id}/os-extra_specs/{key}") @Path("/flavors/{flavor_id}/os-extra_specs/{key}")
@Fallback(FalseOnNotFoundOr404.class) @Fallback(FalseOnNotFoundOr404.class)

View File

@ -18,6 +18,7 @@
*/ */
package org.jclouds.openstack.nova.v2_0.extensions; package org.jclouds.openstack.nova.v2_0.extensions;
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;
@ -64,6 +65,7 @@ public interface FloatingIPAsyncApi {
/** /**
* @see FloatingIPApi#list * @see FloatingIPApi#list
*/ */
@Named("floatingip:list")
@GET @GET
@Path("/os-floating-ips") @Path("/os-floating-ips")
@SelectJson("floating_ips") @SelectJson("floating_ips")
@ -74,6 +76,7 @@ public interface FloatingIPAsyncApi {
/** /**
* @see FloatingIPApi#get * @see FloatingIPApi#get
*/ */
@Named("floatingip:get")
@GET @GET
@Path("/os-floating-ips/{id}") @Path("/os-floating-ips/{id}")
@SelectJson("floating_ip") @SelectJson("floating_ip")
@ -84,6 +87,7 @@ public interface FloatingIPAsyncApi {
/** /**
* @see FloatingIPApi#create * @see FloatingIPApi#create
*/ */
@Named("floatingip:create")
@POST @POST
@Path("/os-floating-ips") @Path("/os-floating-ips")
@SelectJson("floating_ip") @SelectJson("floating_ip")
@ -96,6 +100,7 @@ public interface FloatingIPAsyncApi {
/** /**
* @see FloatingIPApi#delete * @see FloatingIPApi#delete
*/ */
@Named("floatingip:delete")
@DELETE @DELETE
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Fallback(NullOnNotFoundOr404.class) @Fallback(NullOnNotFoundOr404.class)
@ -105,6 +110,7 @@ public interface FloatingIPAsyncApi {
/** /**
* @see FloatingIPApi#addToServer * @see FloatingIPApi#addToServer
*/ */
@Named("floatingip:add")
@POST @POST
@Path("/servers/{server}/action") @Path("/servers/{server}/action")
@Consumes @Consumes
@ -116,6 +122,7 @@ public interface FloatingIPAsyncApi {
/** /**
* @see FloatingIPApi#removeFromServer * @see FloatingIPApi#removeFromServer
*/ */
@Named("floatingip:remove")
@POST @POST
@Path("/servers/{server}/action") @Path("/servers/{server}/action")
@Consumes @Consumes

View File

@ -18,6 +18,7 @@
*/ */
package org.jclouds.openstack.nova.v2_0.extensions; package org.jclouds.openstack.nova.v2_0.extensions;
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.PUT; import javax.ws.rs.PUT;
@ -69,6 +70,7 @@ public interface HostAdministrationAsyncApi {
/** /**
* @see HostAdministrationApi#list() * @see HostAdministrationApi#list()
*/ */
@Named("hostadmin:list")
@GET @GET
@SelectJson("hosts") @SelectJson("hosts")
@Fallback(EmptyFluentIterableOnNotFoundOr404.class) @Fallback(EmptyFluentIterableOnNotFoundOr404.class)
@ -77,6 +79,7 @@ public interface HostAdministrationAsyncApi {
/** /**
* @see HostAdministrationApi#listResourceUsage(String) * @see HostAdministrationApi#listResourceUsage(String)
*/ */
@Named("hostadmin:listresource")
@GET @GET
@Path("/{id}") @Path("/{id}")
@SelectJson("host") @SelectJson("host")
@ -86,6 +89,7 @@ public interface HostAdministrationAsyncApi {
/** /**
* @see HostAdministrationApi#enable(String) * @see HostAdministrationApi#enable(String)
*/ */
@Named("hostadmin:enable")
@PUT @PUT
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Path("/{id}") @Path("/{id}")
@ -96,6 +100,7 @@ public interface HostAdministrationAsyncApi {
/** /**
* @see HostAdministrationApi#disable(String) * @see HostAdministrationApi#disable(String)
*/ */
@Named("hostadmin:disable")
@PUT @PUT
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Path("/{id}") @Path("/{id}")
@ -106,6 +111,7 @@ public interface HostAdministrationAsyncApi {
/** /**
* @see HostAdministrationApi#startMaintenance(String) * @see HostAdministrationApi#startMaintenance(String)
*/ */
@Named("hostadmin:startmaintenance")
@PUT @PUT
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Path("/{id}") @Path("/{id}")
@ -116,6 +122,7 @@ public interface HostAdministrationAsyncApi {
/** /**
* @see HostAdministrationApi#stopMaintenance(String) * @see HostAdministrationApi#stopMaintenance(String)
*/ */
@Named("hostadmin:stopmaintenance")
@PUT @PUT
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Path("/{id}") @Path("/{id}")
@ -126,6 +133,7 @@ public interface HostAdministrationAsyncApi {
/** /**
* @see HostAdministrationApi#startup(String) * @see HostAdministrationApi#startup(String)
*/ */
@Named("hostadmin:startup")
@GET @GET
@Path("/{id}/startup") @Path("/{id}/startup")
@ResponseParser(PowerIsStartupResponseParser.class) @ResponseParser(PowerIsStartupResponseParser.class)
@ -134,6 +142,7 @@ public interface HostAdministrationAsyncApi {
/** /**
* @see HostAdministrationApi#shutdown(String) * @see HostAdministrationApi#shutdown(String)
*/ */
@Named("hostadmin:shutdown")
@GET @GET
@Path("/{id}/shutdown") @Path("/{id}/shutdown")
@ResponseParser(PowerIsShutdownResponseParser.class) @ResponseParser(PowerIsShutdownResponseParser.class)
@ -142,6 +151,7 @@ public interface HostAdministrationAsyncApi {
/** /**
* @see HostAdministrationApi#reboot(String) * @see HostAdministrationApi#reboot(String)
*/ */
@Named("hostadmin:reboot")
@GET @GET
@Path("/{id}/reboot") @Path("/{id}/reboot")
@ResponseParser(PowerIsRebootResponseParser.class) @ResponseParser(PowerIsRebootResponseParser.class)

View File

@ -20,6 +20,7 @@ package org.jclouds.openstack.nova.v2_0.extensions;
import java.util.Map; import java.util.Map;
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 HostAggregateAsyncApi {
/** /**
* @see HostAggregateApi#list() * @see HostAggregateApi#list()
*/ */
@Named("hostaggregate:list")
@GET @GET
@SelectJson("aggregates") @SelectJson("aggregates")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -70,6 +72,7 @@ public interface HostAggregateAsyncApi {
/** /**
* @see HostAggregateApi#get(String) * @see HostAggregateApi#get(String)
*/ */
@Named("hostaggregate:get")
@GET @GET
@Path("/{id}") @Path("/{id}")
@SelectJson("aggregate") @SelectJson("aggregate")
@ -80,6 +83,7 @@ public interface HostAggregateAsyncApi {
/** /**
* @see HostAggregateApi#createInAvailabilityZone(String, String) * @see HostAggregateApi#createInAvailabilityZone(String, String)
*/ */
@Named("hostaggregate:create")
@POST @POST
@SelectJson("aggregate") @SelectJson("aggregate")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -91,6 +95,7 @@ public interface HostAggregateAsyncApi {
/** /**
* @see HostAggregateApi#updateName * @see HostAggregateApi#updateName
*/ */
@Named("hostaggregate:update")
@POST @POST
@Path("/{id}") @Path("/{id}")
@SelectJson("aggregate") @SelectJson("aggregate")
@ -101,6 +106,7 @@ public interface HostAggregateAsyncApi {
/** /**
* @see HostAggregateApi#updateAvailabilityZone * @see HostAggregateApi#updateAvailabilityZone
*/ */
@Named("hostaggregate:update")
@POST @POST
@Path("/{id}") @Path("/{id}")
@SelectJson("aggregate") @SelectJson("aggregate")
@ -111,6 +117,7 @@ public interface HostAggregateAsyncApi {
/** /**
* @see HostAggregateApi#delete(String) * @see HostAggregateApi#delete(String)
*/ */
@Named("hostaggregate:delete")
@DELETE @DELETE
@Path("/{id}") @Path("/{id}")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -120,6 +127,7 @@ public interface HostAggregateAsyncApi {
/** /**
* @see HostAggregateApi#addHost(String,String) * @see HostAggregateApi#addHost(String,String)
*/ */
@Named("hostaggregate:addhost")
@POST @POST
@Path("/{id}/action") @Path("/{id}/action")
@SelectJson("aggregate") @SelectJson("aggregate")
@ -132,6 +140,7 @@ public interface HostAggregateAsyncApi {
/** /**
* @see HostAggregateApi#removeHost(String,String) * @see HostAggregateApi#removeHost(String,String)
*/ */
@Named("hostaggregate:removehost")
@POST @POST
@Path("/{id}/action") @Path("/{id}/action")
@SelectJson("aggregate") @SelectJson("aggregate")
@ -143,6 +152,7 @@ public interface HostAggregateAsyncApi {
/** /**
* @see HostAggregateApi#setMetadata * @see HostAggregateApi#setMetadata
*/ */
@Named("hostaggregate:setmetadata")
@POST @POST
@Path("/{id}/action") @Path("/{id}/action")
@SelectJson("aggregate") @SelectJson("aggregate")

View File

@ -18,6 +18,7 @@
*/ */
package org.jclouds.openstack.nova.v2_0.extensions; package org.jclouds.openstack.nova.v2_0.extensions;
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;
@ -66,6 +67,7 @@ import com.google.common.util.concurrent.ListenableFuture;
@RequestFilters(AuthenticateRequest.class) @RequestFilters(AuthenticateRequest.class)
public interface KeyPairAsyncApi { public interface KeyPairAsyncApi {
@Named("keypair:list")
@GET @GET
@Path("/os-keypairs") @Path("/os-keypairs")
@ResponseParser(ParseKeyPairs.class) @ResponseParser(ParseKeyPairs.class)
@ -73,6 +75,7 @@ public interface KeyPairAsyncApi {
@Fallback(EmptyFluentIterableOnNotFoundOr404.class) @Fallback(EmptyFluentIterableOnNotFoundOr404.class)
ListenableFuture<? extends FluentIterable<? extends KeyPair>> list(); ListenableFuture<? extends FluentIterable<? extends KeyPair>> list();
@Named("keypair:create")
@POST @POST
@Path("/os-keypairs") @Path("/os-keypairs")
@SelectJson("keypair") @SelectJson("keypair")
@ -81,6 +84,7 @@ public interface KeyPairAsyncApi {
@Payload("%7B\"keypair\":%7B\"name\":\"{name}\"%7D%7D") @Payload("%7B\"keypair\":%7B\"name\":\"{name}\"%7D%7D")
ListenableFuture<? extends KeyPair> create(@PayloadParam("name") String name); ListenableFuture<? extends KeyPair> create(@PayloadParam("name") String name);
@Named("keypair:create")
@POST @POST
@Path("/os-keypairs") @Path("/os-keypairs")
@SelectJson("keypair") @SelectJson("keypair")
@ -90,6 +94,7 @@ public interface KeyPairAsyncApi {
ListenableFuture<? extends KeyPair> createWithPublicKey(@PayloadParam("name") String name, ListenableFuture<? extends KeyPair> createWithPublicKey(@PayloadParam("name") String name,
@PayloadParam("public_key") String publicKey); @PayloadParam("public_key") String publicKey);
@Named("keypair:delete")
@DELETE @DELETE
@Path("/os-keypairs/{name}") @Path("/os-keypairs/{name}")
@Fallback(FalseOnNotFoundOr404.class) @Fallback(FalseOnNotFoundOr404.class)

View File

@ -18,6 +18,7 @@
*/ */
package org.jclouds.openstack.nova.v2_0.extensions; package org.jclouds.openstack.nova.v2_0.extensions;
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.PUT; import javax.ws.rs.PUT;
@ -57,6 +58,7 @@ public interface QuotaAsyncApi {
/** /**
* @see QuotaApi#getDefaultsForTenant(String) * @see QuotaApi#getDefaultsForTenant(String)
*/ */
@Named("quota:get")
@GET @GET
@SelectJson("quota_set") @SelectJson("quota_set")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -67,6 +69,7 @@ public interface QuotaAsyncApi {
/** /**
* @see QuotaApi#updateQuotaOfTenant * @see QuotaApi#updateQuotaOfTenant
*/ */
@Named("quota:update")
@PUT @PUT
@Path("/{tenant_id}") @Path("/{tenant_id}")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ -77,6 +80,7 @@ public interface QuotaAsyncApi {
/** /**
* @see QuotaApi#getDefaultsForTenant(String) * @see QuotaApi#getDefaultsForTenant(String)
*/ */
@Named("quota:get")
@GET @GET
@SelectJson("quota_set") @SelectJson("quota_set")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)

View File

@ -18,6 +18,7 @@
*/ */
package org.jclouds.openstack.nova.v2_0.extensions; package org.jclouds.openstack.nova.v2_0.extensions;
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.PUT; import javax.ws.rs.PUT;
@ -58,6 +59,7 @@ public interface QuotaClassAsyncApi {
/** /**
* @see QuotaClassApi#get * @see QuotaClassApi#get
*/ */
@Named("quotaclass:get")
@GET @GET
@SelectJson("quota_class_set") @SelectJson("quota_class_set")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -68,6 +70,7 @@ public interface QuotaClassAsyncApi {
/** /**
* @see QuotaClassApi#update * @see QuotaClassApi#update
*/ */
@Named("quotaclass:update")
@PUT @PUT
@Path("/{id}") @Path("/{id}")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)

View File

@ -18,6 +18,7 @@
*/ */
package org.jclouds.openstack.nova.v2_0.extensions; package org.jclouds.openstack.nova.v2_0.extensions;
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 SecurityGroupAsyncApi {
/** /**
* @see SecurityGroupApi#list * @see SecurityGroupApi#list
*/ */
@Named("securitygroup:list")
@GET @GET
@SelectJson("security_groups") @SelectJson("security_groups")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -77,6 +79,7 @@ public interface SecurityGroupAsyncApi {
/** /**
* @see SecurityGroupApi#get * @see SecurityGroupApi#get
*/ */
@Named("securitygroup:get")
@GET @GET
@Path("/os-security-groups/{id}") @Path("/os-security-groups/{id}")
@SelectJson("security_group") @SelectJson("security_group")
@ -87,6 +90,7 @@ public interface SecurityGroupAsyncApi {
/** /**
* @see SecurityGroupApi#createWithDescription * @see SecurityGroupApi#createWithDescription
*/ */
@Named("securitygroup:create")
@POST @POST
@Path("/os-security-groups") @Path("/os-security-groups")
@SelectJson("security_group") @SelectJson("security_group")
@ -100,6 +104,7 @@ public interface SecurityGroupAsyncApi {
/** /**
* @see SecurityGroupApi#delete * @see SecurityGroupApi#delete
*/ */
@Named("securitygroup:delete")
@DELETE @DELETE
@Path("/os-security-groups/{id}") @Path("/os-security-groups/{id}")
@Fallback(FalseOnNotFoundOr404.class) @Fallback(FalseOnNotFoundOr404.class)
@ -109,6 +114,7 @@ public interface SecurityGroupAsyncApi {
/** /**
* @see SecurityGroupApi#createRuleAllowingCidrBlock * @see SecurityGroupApi#createRuleAllowingCidrBlock
*/ */
@Named("securitygroup:create")
@POST @POST
@Path("/os-security-group-rules") @Path("/os-security-group-rules")
@SelectJson("security_group_rule") @SelectJson("security_group_rule")
@ -123,6 +129,7 @@ public interface SecurityGroupAsyncApi {
/** /**
* @see SecurityGroupApi#createRuleOnSecurityGroupToCidrBlock * @see SecurityGroupApi#createRuleOnSecurityGroupToCidrBlock
*/ */
@Named("securitygroup:create")
@POST @POST
@Path("/os-security-group-rules") @Path("/os-security-group-rules")
@SelectJson("security_group_rule") @SelectJson("security_group_rule")
@ -137,6 +144,7 @@ public interface SecurityGroupAsyncApi {
/** /**
* @see SecurityGroupApi#deleteRule * @see SecurityGroupApi#deleteRule
*/ */
@Named("securitygroup:delete")
@DELETE @DELETE
@Path("/os-security-group-rules/{security_group_rule_ID}") @Path("/os-security-group-rules/{security_group_rule_ID}")
@Fallback(FalseOnNotFoundOr404.class) @Fallback(FalseOnNotFoundOr404.class)

View File

@ -18,6 +18,7 @@
*/ */
package org.jclouds.openstack.nova.v2_0.extensions; package org.jclouds.openstack.nova.v2_0.extensions;
import javax.inject.Named;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.POST; import javax.ws.rs.POST;
import javax.ws.rs.Path; import javax.ws.rs.Path;
@ -58,6 +59,7 @@ public interface ServerAdminAsyncApi {
/** /**
* @see ServerAdminApi#suspend(String) * @see ServerAdminApi#suspend(String)
*/ */
@Named("serveradmin:suspend")
@POST @POST
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Payload("{\"suspend\":null}") @Payload("{\"suspend\":null}")
@ -67,6 +69,7 @@ public interface ServerAdminAsyncApi {
/** /**
* @see ServerAdminApi#resume(String) * @see ServerAdminApi#resume(String)
*/ */
@Named("serveradmin:resume")
@POST @POST
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Payload("{\"resume\":null}") @Payload("{\"resume\":null}")
@ -76,6 +79,7 @@ public interface ServerAdminAsyncApi {
/** /**
* @see ServerAdminApi#migrate(String) * @see ServerAdminApi#migrate(String)
*/ */
@Named("serveradmin:migrate")
@POST @POST
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Payload("{\"migrate\":null}") @Payload("{\"migrate\":null}")
@ -85,6 +89,7 @@ public interface ServerAdminAsyncApi {
/** /**
* @see ServerAdminApi#lock(String) * @see ServerAdminApi#lock(String)
*/ */
@Named("serveradmin:lock")
@POST @POST
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Payload("{\"lock\":null}") @Payload("{\"lock\":null}")
@ -94,6 +99,7 @@ public interface ServerAdminAsyncApi {
/** /**
* @see ServerAdminApi#unlock(String) * @see ServerAdminApi#unlock(String)
*/ */
@Named("serveradmin:unlock")
@POST @POST
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Payload("{\"unlock\":null}") @Payload("{\"unlock\":null}")
@ -103,6 +109,7 @@ public interface ServerAdminAsyncApi {
/** /**
* @see ServerAdminApi#resetNetwork(String) * @see ServerAdminApi#resetNetwork(String)
*/ */
@Named("serveradmin:resetnetwork")
@POST @POST
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Payload("{\"resetNetwork\":null}") @Payload("{\"resetNetwork\":null}")
@ -112,6 +119,7 @@ public interface ServerAdminAsyncApi {
/** /**
* @see ServerAdminApi#createBackup * @see ServerAdminApi#createBackup
*/ */
@Named("serveradmin:createbackup")
@POST @POST
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ -127,6 +135,7 @@ public interface ServerAdminAsyncApi {
/** /**
* @see ServerAdminApi#pause(String) * @see ServerAdminApi#pause(String)
*/ */
@Named("serveradmin:pause")
@POST @POST
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Payload("{\"pause\":null}") @Payload("{\"pause\":null}")
@ -136,6 +145,7 @@ public interface ServerAdminAsyncApi {
/** /**
* @see ServerAdminApi#unpause(String) * @see ServerAdminApi#unpause(String)
*/ */
@Named("serveradmin:unpause")
@POST @POST
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Payload("{\"unpause\":null}") @Payload("{\"unpause\":null}")
@ -145,6 +155,7 @@ public interface ServerAdminAsyncApi {
/** /**
* @see ServerAdminApi#injectNetworkInfo(String) * @see ServerAdminApi#injectNetworkInfo(String)
*/ */
@Named("serveradmin:injectnetwork")
@POST @POST
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Payload("{\"injectNetworkInfo\":null}") @Payload("{\"injectNetworkInfo\":null}")
@ -154,6 +165,7 @@ public interface ServerAdminAsyncApi {
/** /**
* @see ServerAdminApi#liveMigrate(String) * @see ServerAdminApi#liveMigrate(String)
*/ */
@Named("serveradmin:livemigrate")
@POST @POST
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Fallback(FalseOnNotFoundOr404.class) @Fallback(FalseOnNotFoundOr404.class)

View File

@ -18,6 +18,7 @@
*/ */
package org.jclouds.openstack.nova.v2_0.extensions; package org.jclouds.openstack.nova.v2_0.extensions;
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;
@ -52,6 +53,7 @@ public interface ServerWithSecurityGroupsAsyncApi {
/** /**
* @see ServerWithSecurityGroupsApi#get(String) * @see ServerWithSecurityGroupsApi#get(String)
*/ */
@Named("server:get")
@GET @GET
@SelectJson("server") @SelectJson("server")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)

View File

@ -18,6 +18,7 @@
*/ */
package org.jclouds.openstack.nova.v2_0.extensions; package org.jclouds.openstack.nova.v2_0.extensions;
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;
@ -56,6 +57,7 @@ public interface SimpleTenantUsageAsyncApi {
/** /**
* @see SimpleTenantUsageApi#list() * @see SimpleTenantUsageApi#list()
*/ */
@Named("tenantusage:list")
@GET @GET
@Path("/os-simple-tenant-usage") @Path("/os-simple-tenant-usage")
@SelectJson("tenant_usages") @SelectJson("tenant_usages")
@ -66,6 +68,7 @@ public interface SimpleTenantUsageAsyncApi {
/** /**
* @see SimpleTenantUsageApi#get(String) * @see SimpleTenantUsageApi#get(String)
*/ */
@Named("tenantusage:get")
@GET @GET
@Path("/os-simple-tenant-usage/{id}") @Path("/os-simple-tenant-usage/{id}")
@SelectJson("tenant_usage") @SelectJson("tenant_usage")

View File

@ -18,6 +18,7 @@
*/ */
package org.jclouds.openstack.nova.v2_0.extensions; package org.jclouds.openstack.nova.v2_0.extensions;
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;
@ -50,6 +51,7 @@ public interface VirtualInterfaceAsyncApi {
/** /**
* @see VirtualInterfaceApi#listOnServer(String) * @see VirtualInterfaceApi#listOnServer(String)
*/ */
@Named("virtualinterface:list")
@GET @GET
@SelectJson("virtual_interfaces") @SelectJson("virtual_interfaces")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)

View File

@ -18,6 +18,7 @@
*/ */
package org.jclouds.openstack.nova.v2_0.extensions; package org.jclouds.openstack.nova.v2_0.extensions;
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;
@ -65,6 +66,7 @@ public interface VolumeAsyncApi {
* *
* @return the list of volumes * @return the list of volumes
*/ */
@Named("volume:list")
@GET @GET
@Path("/os-volumes") @Path("/os-volumes")
@SelectJson("volumes") @SelectJson("volumes")
@ -77,6 +79,7 @@ public interface VolumeAsyncApi {
* *
* @return the list of volumes. * @return the list of volumes.
*/ */
@Named("volume:list")
@GET @GET
@Path("/os-volumes/detail") @Path("/os-volumes/detail")
@SelectJson("volumes") @SelectJson("volumes")
@ -89,6 +92,7 @@ public interface VolumeAsyncApi {
* *
* @return details of a specific volume. * @return details of a specific volume.
*/ */
@Named("volume:get")
@GET @GET
@Path("/os-volumes/{id}") @Path("/os-volumes/{id}")
@SelectJson("volume") @SelectJson("volume")
@ -101,6 +105,7 @@ public interface VolumeAsyncApi {
* *
* @return the new Snapshot * @return the new Snapshot
*/ */
@Named("volume:create")
@POST @POST
@Path("/os-volumes") @Path("/os-volumes")
@SelectJson("volume") @SelectJson("volume")
@ -114,6 +119,7 @@ public interface VolumeAsyncApi {
* *
* @return true if successful * @return true if successful
*/ */
@Named("volume:delete")
@DELETE @DELETE
@Path("/os-volumes/{id}") @Path("/os-volumes/{id}")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -127,6 +133,7 @@ public interface VolumeAsyncApi {
* @deprecated To be removed in jclouds 1.7 * @deprecated To be removed in jclouds 1.7
* @see VolumeAttachmentApi#listAttachmentsOnServer(String) * @see VolumeAttachmentApi#listAttachmentsOnServer(String)
*/ */
@Named("volume:listattachments")
@GET @GET
@Path("/servers/{server_id}/os-volume_attachments") @Path("/servers/{server_id}/os-volume_attachments")
@SelectJson("volumeAttachments") @SelectJson("volumeAttachments")
@ -141,6 +148,7 @@ public interface VolumeAsyncApi {
* @deprecated To be removed in jclouds 1.7 * @deprecated To be removed in jclouds 1.7
* @see VolumeAttachmentApi#getAttachmentForVolumeOnServer(String, String) * @see VolumeAttachmentApi#getAttachmentForVolumeOnServer(String, String)
*/ */
@Named("volume:getattachments")
@GET @GET
@Path("/servers/{server_id}/os-volume_attachments/{id}") @Path("/servers/{server_id}/os-volume_attachments/{id}")
@SelectJson("volumeAttachment") @SelectJson("volumeAttachment")
@ -156,6 +164,7 @@ public interface VolumeAsyncApi {
* @deprecated To be removed in jclouds 1.7 * @deprecated To be removed in jclouds 1.7
* @see VolumeAttachmentApi#attachVolumeToServerAsDevice(String, String, String) * @see VolumeAttachmentApi#attachVolumeToServerAsDevice(String, String, String)
*/ */
@Named("volume:attach")
@POST @POST
@Path("/servers/{server_id}/os-volume_attachments") @Path("/servers/{server_id}/os-volume_attachments")
@SelectJson("volumeAttachment") @SelectJson("volumeAttachment")
@ -172,6 +181,7 @@ public interface VolumeAsyncApi {
* @deprecated To be removed in jclouds 1.7 * @deprecated To be removed in jclouds 1.7
* @see VolumeAttachmentApi#detachVolumeFromServer(String, String) * @see VolumeAttachmentApi#detachVolumeFromServer(String, String)
*/ */
@Named("volume:detach")
@DELETE @DELETE
@Path("/servers/{server_id}/os-volume_attachments/{id}") @Path("/servers/{server_id}/os-volume_attachments/{id}")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -183,6 +193,7 @@ public interface VolumeAsyncApi {
* *
* @return the list of snapshots * @return the list of snapshots
*/ */
@Named("volume:listsnapshots")
@GET @GET
@Path("/os-snapshots") @Path("/os-snapshots")
@SelectJson("snapshots") @SelectJson("snapshots")
@ -195,6 +206,7 @@ public interface VolumeAsyncApi {
* *
* @return the list of snapshots * @return the list of snapshots
*/ */
@Named("volume:listsnapshot")
@GET @GET
@Path("/os-snapshots/detail") @Path("/os-snapshots/detail")
@SelectJson("snapshots") @SelectJson("snapshots")
@ -207,6 +219,7 @@ public interface VolumeAsyncApi {
* *
* @return details of a specific snapshot. * @return details of a specific snapshot.
*/ */
@Named("volume:getsnapshot")
@GET @GET
@Path("/os-snapshots/{id}") @Path("/os-snapshots/{id}")
@SelectJson("snapshot") @SelectJson("snapshot")
@ -219,6 +232,7 @@ public interface VolumeAsyncApi {
* *
* @return the new Snapshot * @return the new Snapshot
*/ */
@Named("volume:createsnapshot")
@POST @POST
@Path("/os-snapshots") @Path("/os-snapshots")
@SelectJson("snapshot") @SelectJson("snapshot")
@ -232,6 +246,7 @@ public interface VolumeAsyncApi {
* *
* @return true if successful * @return true if successful
*/ */
@Named("volume:deletesnapshot")
@DELETE @DELETE
@Path("/os-snapshots/{id}") @Path("/os-snapshots/{id}")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)

View File

@ -18,6 +18,7 @@
*/ */
package org.jclouds.openstack.nova.v2_0.extensions; package org.jclouds.openstack.nova.v2_0.extensions;
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;
@ -57,6 +58,7 @@ public interface VolumeAttachmentAsyncApi {
/** /**
* @see VolumeAttachmentApi#listAttachmentsOnServer(String) * @see VolumeAttachmentApi#listAttachmentsOnServer(String)
*/ */
@Named("volumeattachment:list")
@GET @GET
@Path("/servers/{server_id}/os-volume_attachments") @Path("/servers/{server_id}/os-volume_attachments")
@SelectJson("volumeAttachments") @SelectJson("volumeAttachments")
@ -68,6 +70,7 @@ public interface VolumeAttachmentAsyncApi {
/** /**
* @see VolumeAttachmentApi#getAttachmentForVolumeOnServer(String, String) * @see VolumeAttachmentApi#getAttachmentForVolumeOnServer(String, String)
*/ */
@Named("volumeattachment:get")
@GET @GET
@Path("/servers/{server_id}/os-volume_attachments/{id}") @Path("/servers/{server_id}/os-volume_attachments/{id}")
@SelectJson("volumeAttachment") @SelectJson("volumeAttachment")
@ -80,6 +83,7 @@ public interface VolumeAttachmentAsyncApi {
/** /**
* @see VolumeAttachmentApi#attachVolumeToServerAsDevice(String, String, String) * @see VolumeAttachmentApi#attachVolumeToServerAsDevice(String, String, String)
*/ */
@Named("volumeattachment:attach")
@POST @POST
@Path("/servers/{server_id}/os-volume_attachments") @Path("/servers/{server_id}/os-volume_attachments")
@SelectJson("volumeAttachment") @SelectJson("volumeAttachment")
@ -94,6 +98,7 @@ public interface VolumeAttachmentAsyncApi {
/** /**
* @see VolumeAttachmentApi#detachVolumeFromServer(String, String) * @see VolumeAttachmentApi#detachVolumeFromServer(String, String)
*/ */
@Named("volumeattachment:detach")
@DELETE @DELETE
@Path("/servers/{server_id}/os-volume_attachments/{id}") @Path("/servers/{server_id}/os-volume_attachments/{id}")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)

View File

@ -20,6 +20,7 @@ package org.jclouds.openstack.nova.v2_0.extensions;
import java.util.Map; import java.util.Map;
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;
@ -69,6 +70,7 @@ public interface VolumeTypeAsyncApi {
/** /**
* @see VolumeTypeApi#list * @see VolumeTypeApi#list
*/ */
@Named("volumetype:list")
@GET @GET
@SelectJson("volume_types") @SelectJson("volume_types")
@Fallback(EmptyFluentIterableOnNotFoundOr404.class) @Fallback(EmptyFluentIterableOnNotFoundOr404.class)
@ -78,6 +80,7 @@ public interface VolumeTypeAsyncApi {
/** /**
* @see VolumeTypeApi#get * @see VolumeTypeApi#get
*/ */
@Named("volumetype:get")
@GET @GET
@Path("/{id}") @Path("/{id}")
@SelectJson("volume_type") @SelectJson("volume_type")
@ -87,6 +90,7 @@ public interface VolumeTypeAsyncApi {
/** /**
* @see VolumeTypeApi#create * @see VolumeTypeApi#create
*/ */
@Named("volumetype:create")
@POST @POST
@SelectJson("volume_type") @SelectJson("volume_type")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ -96,6 +100,7 @@ public interface VolumeTypeAsyncApi {
/** /**
* @see VolumeTypeApi#delete * @see VolumeTypeApi#delete
*/ */
@Named("volumetype:delete")
@DELETE @DELETE
@Path("/{id}") @Path("/{id}")
@Fallback(FalseOnNotFoundOr404.class) @Fallback(FalseOnNotFoundOr404.class)
@ -104,6 +109,7 @@ public interface VolumeTypeAsyncApi {
/** /**
* @see VolumeTypeApi#getExtraSpecs(String) * @see VolumeTypeApi#getExtraSpecs(String)
*/ */
@Named("volumetype:getextraspecs")
@GET @GET
@SelectJson("extra_specs") @SelectJson("extra_specs")
@Path("/{id}/extra_specs") @Path("/{id}/extra_specs")
@ -113,6 +119,7 @@ public interface VolumeTypeAsyncApi {
/** /**
* @see VolumeTypeApi#updateExtraSpecs(String, java.util.Map) * @see VolumeTypeApi#updateExtraSpecs(String, java.util.Map)
*/ */
@Named("volumetype:udpateextraspecs")
@POST @POST
@Path("/{id}/extra_specs") @Path("/{id}/extra_specs")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ -123,6 +130,7 @@ public interface VolumeTypeAsyncApi {
/** /**
* @see VolumeTypeApi#getExtraSpec(String, String) * @see VolumeTypeApi#getExtraSpec(String, String)
*/ */
@Named("volumetype:getextraspec")
@GET @GET
@Path("/{id}/extra_specs/{key}") @Path("/{id}/extra_specs/{key}")
@Unwrap @Unwrap
@ -132,6 +140,7 @@ public interface VolumeTypeAsyncApi {
/** /**
* @see VolumeTypeApi#updateExtraSpec(String, String, String) * @see VolumeTypeApi#updateExtraSpec(String, String, String)
*/ */
@Named("volumetype:updateextraspec")
@PUT @PUT
@Path("/{id}/extra_specs/{key}") @Path("/{id}/extra_specs/{key}")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ -144,6 +153,7 @@ public interface VolumeTypeAsyncApi {
/** /**
* @see VolumeTypeApi#deleteExtraSpec(String, String) * @see VolumeTypeApi#deleteExtraSpec(String, String)
*/ */
@Named("volumetype:deleteextraspec")
@DELETE @DELETE
@Path("/{id}/extra_specs/{key}") @Path("/{id}/extra_specs/{key}")
@Fallback(FalseOnNotFoundOr404.class) @Fallback(FalseOnNotFoundOr404.class)

View File

@ -18,6 +18,7 @@
*/ */
package org.jclouds.openstack.nova.v2_0.features; package org.jclouds.openstack.nova.v2_0.features;
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 FlavorAsyncApi {
/** /**
* @see FlavorApi#list() * @see FlavorApi#list()
*/ */
@Named("flavor:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/flavors") @Path("/flavors")
@ -70,6 +72,7 @@ public interface FlavorAsyncApi {
ListenableFuture<? extends PagedIterable<? extends Resource>> list(); ListenableFuture<? extends PagedIterable<? extends Resource>> list();
/** @see FlavorApi#list(PaginationOptions) */ /** @see FlavorApi#list(PaginationOptions) */
@Named("flavor:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/flavors") @Path("/flavors")
@ -81,6 +84,7 @@ public interface FlavorAsyncApi {
/** /**
* @see FlavorApi#listInDetail() * @see FlavorApi#listInDetail()
*/ */
@Named("flavor:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/flavors/detail") @Path("/flavors/detail")
@ -91,6 +95,7 @@ public interface FlavorAsyncApi {
ListenableFuture<? extends PagedIterable<? extends Flavor>> listInDetail(); ListenableFuture<? extends PagedIterable<? extends Flavor>> listInDetail();
/** @see FlavorApi#listInDetail(PaginationOptions) */ /** @see FlavorApi#listInDetail(PaginationOptions) */
@Named("flavor:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/flavors/detail") @Path("/flavors/detail")
@ -102,6 +107,7 @@ public interface FlavorAsyncApi {
/** /**
* @see FlavorApi#get * @see FlavorApi#get
*/ */
@Named("flavor:get")
@GET @GET
@SelectJson("flavor") @SelectJson("flavor")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)

View File

@ -20,6 +20,7 @@ package org.jclouds.openstack.nova.v2_0.features;
import java.util.Map; import java.util.Map;
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;
@ -69,6 +70,7 @@ public interface ImageAsyncApi {
/** /**
* @see ImageApi#list() * @see ImageApi#list()
*/ */
@Named("image:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/images") @Path("/images")
@ -79,6 +81,7 @@ public interface ImageAsyncApi {
ListenableFuture<? extends PagedIterable<? extends Resource>> list(); ListenableFuture<? extends PagedIterable<? extends Resource>> list();
/** @see ImageApi#list(PaginationOptions) */ /** @see ImageApi#list(PaginationOptions) */
@Named("image:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/images") @Path("/images")
@ -90,6 +93,7 @@ public interface ImageAsyncApi {
/** /**
* @see ImageApi#listInDetail() * @see ImageApi#listInDetail()
*/ */
@Named("image:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/images/detail") @Path("/images/detail")
@ -100,6 +104,7 @@ public interface ImageAsyncApi {
ListenableFuture<? extends PagedIterable<? extends Image>> listInDetail(); ListenableFuture<? extends PagedIterable<? extends Image>> listInDetail();
/** @see ImageApi#listInDetail(PaginationOptions) */ /** @see ImageApi#listInDetail(PaginationOptions) */
@Named("image:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/images/detail") @Path("/images/detail")
@ -111,6 +116,7 @@ public interface ImageAsyncApi {
/** /**
* @see ImageApi#get * @see ImageApi#get
*/ */
@Named("image:get")
@GET @GET
@SelectJson("image") @SelectJson("image")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -121,6 +127,7 @@ public interface ImageAsyncApi {
/** /**
* @see ImageApi#delete * @see ImageApi#delete
*/ */
@Named("image:delete")
@DELETE @DELETE
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/images/{id}") @Path("/images/{id}")
@ -130,6 +137,7 @@ public interface ImageAsyncApi {
/** /**
* @see ImageApi#getMetadata * @see ImageApi#getMetadata
*/ */
@Named("image:getmetadata")
@GET @GET
@SelectJson("metadata") @SelectJson("metadata")
@Path("/images/{id}/metadata") @Path("/images/{id}/metadata")
@ -140,6 +148,7 @@ public interface ImageAsyncApi {
/** /**
* @see ImageApi#setMetadata * @see ImageApi#setMetadata
*/ */
@Named("image:setmetadata")
@PUT @PUT
@SelectJson("metadata") @SelectJson("metadata")
@Path("/images/{id}/metadata") @Path("/images/{id}/metadata")
@ -152,6 +161,7 @@ public interface ImageAsyncApi {
/** /**
* @see ImageApi#updateMetadata * @see ImageApi#updateMetadata
*/ */
@Named("image:updatemetadata")
@POST @POST
@SelectJson("metadata") @SelectJson("metadata")
@Path("/images/{id}/metadata") @Path("/images/{id}/metadata")
@ -164,6 +174,7 @@ public interface ImageAsyncApi {
/** /**
* @see ImageApi#getMetadata * @see ImageApi#getMetadata
*/ */
@Named("image:getmetadata")
@GET @GET
@Path("/images/{id}/metadata/{key}") @Path("/images/{id}/metadata/{key}")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -174,6 +185,7 @@ public interface ImageAsyncApi {
/** /**
* @see ImageApi#updateMetadata * @see ImageApi#updateMetadata
*/ */
@Named("image:updatemetadata")
@PUT @PUT
@Path("/images/{id}/metadata/{key}") @Path("/images/{id}/metadata/{key}")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -187,6 +199,7 @@ public interface ImageAsyncApi {
/** /**
* @see ImageApi#deleteMetadata * @see ImageApi#deleteMetadata
*/ */
@Named("image:deletemetadata")
@DELETE @DELETE
@Consumes @Consumes
@Path("/images/{id}/metadata/{key}") @Path("/images/{id}/metadata/{key}")

View File

@ -20,6 +20,7 @@ package org.jclouds.openstack.nova.v2_0.features;
import java.util.Map; import java.util.Map;
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;
@ -83,6 +84,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#list() * @see ServerApi#list()
*/ */
@Named("server:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/servers") @Path("/servers")
@ -93,6 +95,7 @@ public interface ServerAsyncApi {
ListenableFuture<? extends PagedIterable<? extends Resource>> list(); ListenableFuture<? extends PagedIterable<? extends Resource>> list();
/** @see ServerApi#list(PaginationOptions) */ /** @see ServerApi#list(PaginationOptions) */
@Named("server:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/servers") @Path("/servers")
@ -104,6 +107,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#listInDetail() * @see ServerApi#listInDetail()
*/ */
@Named("server:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/servers/detail") @Path("/servers/detail")
@ -114,6 +118,7 @@ public interface ServerAsyncApi {
ListenableFuture<? extends PagedIterable<? extends Server>> listInDetail(); ListenableFuture<? extends PagedIterable<? extends Server>> listInDetail();
/** @see ServerApi#listInDetail(PaginationOptions) */ /** @see ServerApi#listInDetail(PaginationOptions) */
@Named("server:list")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Path("/servers/detail") @Path("/servers/detail")
@ -125,6 +130,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#get * @see ServerApi#get
*/ */
@Named("server:get")
@GET @GET
@SelectJson("server") @SelectJson("server")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -135,6 +141,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#delete * @see ServerApi#delete
*/ */
@Named("server:delete")
@DELETE @DELETE
@Consumes @Consumes
@Fallback(FalseOnNotFoundOr404.class) @Fallback(FalseOnNotFoundOr404.class)
@ -144,6 +151,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#start * @see ServerApi#start
*/ */
@Named("server:start")
@POST @POST
@Path("/servers/{id}/action") @Path("/servers/{id}/action")
@Consumes @Consumes
@ -154,6 +162,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#stop * @see ServerApi#stop
*/ */
@Named("server:stop")
@POST @POST
@Path("/servers/{id}/action") @Path("/servers/{id}/action")
@Consumes @Consumes
@ -164,6 +173,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#reboot * @see ServerApi#reboot
*/ */
@Named("server:reboot")
@POST @POST
@Path("/servers/{id}/action") @Path("/servers/{id}/action")
@Consumes @Consumes
@ -174,6 +184,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#resize * @see ServerApi#resize
*/ */
@Named("server:resize")
@POST @POST
@Path("/servers/{id}/action") @Path("/servers/{id}/action")
@Consumes @Consumes
@ -184,6 +195,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#confirmResize * @see ServerApi#confirmResize
*/ */
@Named("server:resize")
@POST @POST
@Path("/servers/{id}/action") @Path("/servers/{id}/action")
@Consumes @Consumes
@ -194,6 +206,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#revertResize * @see ServerApi#revertResize
*/ */
@Named("server:resize")
@POST @POST
@Path("/servers/{id}/action") @Path("/servers/{id}/action")
@Consumes @Consumes
@ -204,6 +217,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#create * @see ServerApi#create
*/ */
@Named("server:create")
@POST @POST
@Unwrap @Unwrap
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -215,6 +229,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#rebuild * @see ServerApi#rebuild
*/ */
@Named("server:rebuild")
@POST @POST
@Path("/servers/{id}/action") @Path("/servers/{id}/action")
@Consumes @Consumes
@ -224,6 +239,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#changeAdminPass * @see ServerApi#changeAdminPass
*/ */
@Named("server:changeadminpass")
@POST @POST
@Path("/servers/{id}/action") @Path("/servers/{id}/action")
@Consumes @Consumes
@ -234,6 +250,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#rename * @see ServerApi#rename
*/ */
@Named("server:rename")
@PUT @PUT
@Path("/servers/{id}") @Path("/servers/{id}")
@Consumes @Consumes
@ -244,6 +261,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#createImageFromServer * @see ServerApi#createImageFromServer
*/ */
@Named("server:create")
@POST @POST
@Path("/servers/{id}/action") @Path("/servers/{id}/action")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -256,6 +274,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#getMetadata * @see ServerApi#getMetadata
*/ */
@Named("server:getmetadata")
@GET @GET
@SelectJson("metadata") @SelectJson("metadata")
@Path("/servers/{id}/metadata") @Path("/servers/{id}/metadata")
@ -266,6 +285,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#setMetadata * @see ServerApi#setMetadata
*/ */
@Named("server:setmetadata")
@PUT @PUT
@SelectJson("metadata") @SelectJson("metadata")
@Path("/servers/{id}/metadata") @Path("/servers/{id}/metadata")
@ -279,6 +299,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#updateMetadata * @see ServerApi#updateMetadata
*/ */
@Named("server:updatemetadata")
@POST @POST
@SelectJson("metadata") @SelectJson("metadata")
@Path("/servers/{id}/metadata") @Path("/servers/{id}/metadata")
@ -292,6 +313,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#getMetadata * @see ServerApi#getMetadata
*/ */
@Named("server:getmetadata")
@GET @GET
@Path("/servers/{id}/metadata/{key}") @Path("/servers/{id}/metadata/{key}")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -302,6 +324,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#updateMetadata * @see ServerApi#updateMetadata
*/ */
@Named("server:updatemetadata")
@PUT @PUT
@Path("/servers/{id}/metadata/{key}") @Path("/servers/{id}/metadata/{key}")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@ -314,6 +337,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#deleteMetadata * @see ServerApi#deleteMetadata
*/ */
@Named("server:deletemetadata")
@DELETE @DELETE
@Consumes @Consumes
@Path("/servers/{id}/metadata/{key}") @Path("/servers/{id}/metadata/{key}")
@ -324,6 +348,7 @@ public interface ServerAsyncApi {
/** /**
* @see ServerApi#getDiagnostics * @see ServerApi#getDiagnostics
*/ */
@Named("server:getdiagnostics")
@GET @GET
@Path("/servers/{id}/diagnostics") @Path("/servers/{id}/diagnostics")
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)

View File

@ -21,6 +21,7 @@ package org.jclouds.openstack.swift;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
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;
@ -83,6 +84,7 @@ public interface CommonSwiftAsyncClient {
/** /**
* @see CommonSwiftClient#getAccountStatistics * @see CommonSwiftClient#getAccountStatistics
*/ */
@Named("swift:getaccountstats")
@HEAD @HEAD
@Path("/") @Path("/")
@Consumes(MediaType.WILDCARD) @Consumes(MediaType.WILDCARD)
@ -92,6 +94,7 @@ public interface CommonSwiftAsyncClient {
/** /**
* @see CommonSwiftClient#listContainers * @see CommonSwiftClient#listContainers
*/ */
@Named("swift:listcontainers")
@GET @GET
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@ -101,6 +104,7 @@ public interface CommonSwiftAsyncClient {
/** /**
* @see CommonSwiftClient#getContainerMetadata * @see CommonSwiftClient#getContainerMetadata
*/ */
@Named("swift:getcontainermetadata")
@Beta @Beta
@HEAD @HEAD
@Path("/{container}") @Path("/{container}")
@ -112,6 +116,7 @@ public interface CommonSwiftAsyncClient {
/** /**
* @see CommonSwiftClient#setContainerMetadata * @see CommonSwiftClient#setContainerMetadata
*/ */
@Named("swift:setcontainermetadata")
@POST @POST
@Path("/{container}") @Path("/{container}")
@Fallback(FalseOnContainerNotFound.class) @Fallback(FalseOnContainerNotFound.class)
@ -121,6 +126,7 @@ public interface CommonSwiftAsyncClient {
/** /**
* @see CommonSwiftClient#deleteContainerMetadata * @see CommonSwiftClient#deleteContainerMetadata
*/ */
@Named("swift:deletecontainermetadata")
@POST @POST
@Path("/{container}") @Path("/{container}")
@Fallback(FalseOnContainerNotFound.class) @Fallback(FalseOnContainerNotFound.class)
@ -130,6 +136,7 @@ public interface CommonSwiftAsyncClient {
/** /**
* @see CommonSwiftClient#createContainer * @see CommonSwiftClient#createContainer
*/ */
@Named("swift:createcontainer")
@PUT @PUT
@Path("/{container}") @Path("/{container}")
ListenableFuture<Boolean> createContainer(@PathParam("container") String container, ListenableFuture<Boolean> createContainer(@PathParam("container") String container,
@ -138,6 +145,7 @@ public interface CommonSwiftAsyncClient {
/** /**
* @see CommonSwiftClient#setObjectInfo * @see CommonSwiftClient#setObjectInfo
*/ */
@Named("swift:setobjectinfo")
@POST @POST
@Path("/{container}/{name}") @Path("/{container}/{name}")
ListenableFuture<Boolean> setObjectInfo(@PathParam("container") String container, ListenableFuture<Boolean> setObjectInfo(@PathParam("container") String container,
@ -147,6 +155,7 @@ public interface CommonSwiftAsyncClient {
/** /**
* @see CommonSwiftClient#createContainer * @see CommonSwiftClient#createContainer
*/ */
@Named("swift:createcontainer")
@PUT @PUT
@Path("/{container}") @Path("/{container}")
ListenableFuture<Boolean> createContainer(@PathParam("container") String container); ListenableFuture<Boolean> createContainer(@PathParam("container") String container);
@ -154,6 +163,7 @@ public interface CommonSwiftAsyncClient {
/** /**
* @see CommonSwiftClient#deleteContainerIfEmpty * @see CommonSwiftClient#deleteContainerIfEmpty
*/ */
@Named("swift:deletecontainerifempty")
@DELETE @DELETE
@Fallback(TrueOn404FalseOn409.class) @Fallback(TrueOn404FalseOn409.class)
@Path("/{container}") @Path("/{container}")
@ -162,6 +172,7 @@ public interface CommonSwiftAsyncClient {
/** /**
* @see CommonSwiftClient#listObjects * @see CommonSwiftClient#listObjects
*/ */
@Named("swift:listobjects")
@GET @GET
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@ResponseParser(ParseObjectInfoListFromJsonResponse.class) @ResponseParser(ParseObjectInfoListFromJsonResponse.class)
@ -172,6 +183,7 @@ public interface CommonSwiftAsyncClient {
/** /**
* @see CommonSwiftClient#containerExists * @see CommonSwiftClient#containerExists
*/ */
@Named("swift:containerexists")
@HEAD @HEAD
@Path("/{container}") @Path("/{container}")
@Consumes(MediaType.WILDCARD) @Consumes(MediaType.WILDCARD)
@ -181,6 +193,7 @@ public interface CommonSwiftAsyncClient {
/** /**
* @see CommonSwiftClient#putObject * @see CommonSwiftClient#putObject
*/ */
@Named("swift:putobject")
@PUT @PUT
@Path("/{container}/{name}") @Path("/{container}/{name}")
@ResponseParser(ParseETagHeader.class) @ResponseParser(ParseETagHeader.class)
@ -190,6 +203,7 @@ public interface CommonSwiftAsyncClient {
/** /**
* @see CommonSwiftClient#copyObject * @see CommonSwiftClient#copyObject
*/ */
@Named("swift:copyobject")
@PUT @PUT
@Path("/{destinationContainer}/{destinationObject}") @Path("/{destinationContainer}/{destinationObject}")
@Headers(keys = SwiftHeaders.OBJECT_COPY_FROM, values = "/{sourceContainer}/{sourceObject}") @Headers(keys = SwiftHeaders.OBJECT_COPY_FROM, values = "/{sourceContainer}/{sourceObject}")
@ -202,6 +216,7 @@ public interface CommonSwiftAsyncClient {
/** /**
* @see CommonSwiftClient#getObject * @see CommonSwiftClient#getObject
*/ */
@Named("swift:getobject")
@GET @GET
@ResponseParser(ParseObjectFromHeadersAndHttpContent.class) @ResponseParser(ParseObjectFromHeadersAndHttpContent.class)
@Fallback(NullOnKeyNotFound.class) @Fallback(NullOnKeyNotFound.class)
@ -213,6 +228,7 @@ public interface CommonSwiftAsyncClient {
/** /**
* @see CommonSwiftClient#getObjectInfo * @see CommonSwiftClient#getObjectInfo
*/ */
@Named("swift:getobjectinfo")
@HEAD @HEAD
@ResponseParser(ParseObjectInfoFromHeaders.class) @ResponseParser(ParseObjectInfoFromHeaders.class)
@Fallback(NullOnKeyNotFound.class) @Fallback(NullOnKeyNotFound.class)
@ -224,6 +240,7 @@ public interface CommonSwiftAsyncClient {
/** /**
* @see CommonSwiftClient#objectExists * @see CommonSwiftClient#objectExists
*/ */
@Named("swift:objectexists")
@HEAD @HEAD
@Fallback(FalseOnKeyNotFound.class) @Fallback(FalseOnKeyNotFound.class)
@Path("/{container}/{name}") @Path("/{container}/{name}")
@ -234,12 +251,14 @@ public interface CommonSwiftAsyncClient {
/** /**
* @see CommonSwiftClient#removeObject * @see CommonSwiftClient#removeObject
*/ */
@Named("swift:removeobject")
@DELETE @DELETE
@Fallback(VoidOnNotFoundOr404.class) @Fallback(VoidOnNotFoundOr404.class)
@Path("/{container}/{name}") @Path("/{container}/{name}")
ListenableFuture<Void> removeObject(@PathParam("container") String container, ListenableFuture<Void> removeObject(@PathParam("container") String container,
@PathParam("name") String name); @PathParam("name") String name);
@Named("swift:putobjectmanifest")
@PUT @PUT
@Path("/{container}/{name}") @Path("/{container}/{name}")
@ResponseParser(ParseETagHeader.class) @ResponseParser(ParseETagHeader.class)

View File

@ -27,6 +27,7 @@ import org.jclouds.rest.annotations.Endpoint;
import org.jclouds.rest.annotations.RequestFilters; import org.jclouds.rest.annotations.RequestFilters;
import org.jclouds.rest.annotations.ResponseParser; import org.jclouds.rest.annotations.ResponseParser;
import javax.inject.Named;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.HEAD; import javax.ws.rs.HEAD;
import javax.ws.rs.HeaderParam; import javax.ws.rs.HeaderParam;
@ -45,6 +46,7 @@ public interface TemporaryUrlKeyAsyncApi {
/** /**
* @see TemporaryUrlKeyApi#getTemporaryUrlKey * @see TemporaryUrlKeyApi#getTemporaryUrlKey
*/ */
@Named("tempurlkey:get")
@HEAD @HEAD
@Path("/") @Path("/")
@Consumes(MediaType.WILDCARD) @Consumes(MediaType.WILDCARD)
@ -54,6 +56,7 @@ public interface TemporaryUrlKeyAsyncApi {
/** /**
* @see TemporaryUrlKeyApi#setTemporaryUrlKey * @see TemporaryUrlKeyApi#setTemporaryUrlKey
*/ */
@Named("tempurlkey:set")
@POST @POST
@Path("/") @Path("/")
ListenableFuture<Void> setTemporaryUrlKey(@HeaderParam(SwiftHeaders.ACCOUNT_TEMPORARY_URL_KEY) String key); ListenableFuture<Void> setTemporaryUrlKey(@HeaderParam(SwiftHeaders.ACCOUNT_TEMPORARY_URL_KEY) String key);