From d54e8dcecbe8ca6ed225b0f8940dd120a867def3 Mon Sep 17 00:00:00 2001 From: Everett Toews Date: Sat, 19 Jan 2013 18:16:14 -0600 Subject: [PATCH] @Named annotations in all async api methods for OpenStack. --- .../cinder/v1/features/SnapshotAsyncApi.java | 6 +++++ .../cinder/v1/features/VolumeAsyncApi.java | 6 +++++ .../v1/features/VolumeTypeAsyncApi.java | 3 +++ .../v2_0/features/ServiceAsyncApi.java | 2 ++ .../v2_0/features/TenantAsyncApi.java | 5 ++++ .../keystone/v2_0/features/TokenAsyncApi.java | 5 ++++ .../keystone/v2_0/features/UserAsyncApi.java | 7 ++++++ .../v2_0/features/ExtensionAsyncApi.java | 3 +++ .../services/NovaEC2KeyPairAsyncClient.java | 2 ++ .../extensions/FlavorExtraSpecsAsyncApi.java | 6 +++++ .../v2_0/extensions/FloatingIPAsyncApi.java | 7 ++++++ .../HostAdministrationAsyncApi.java | 10 ++++++++ .../extensions/HostAggregateAsyncApi.java | 10 ++++++++ .../nova/v2_0/extensions/KeyPairAsyncApi.java | 5 ++++ .../nova/v2_0/extensions/QuotaAsyncApi.java | 4 +++ .../v2_0/extensions/QuotaClassAsyncApi.java | 3 +++ .../extensions/SecurityGroupAsyncApi.java | 8 ++++++ .../v2_0/extensions/ServerAdminAsyncApi.java | 12 +++++++++ .../ServerWithSecurityGroupsAsyncApi.java | 2 ++ .../extensions/SimpleTenantUsageAsyncApi.java | 3 +++ .../extensions/VirtualInterfaceAsyncApi.java | 2 ++ .../nova/v2_0/extensions/VolumeAsyncApi.java | 15 +++++++++++ .../extensions/VolumeAttachmentAsyncApi.java | 5 ++++ .../v2_0/extensions/VolumeTypeAsyncApi.java | 10 ++++++++ .../nova/v2_0/features/FlavorAsyncApi.java | 6 +++++ .../nova/v2_0/features/ImageAsyncApi.java | 13 ++++++++++ .../nova/v2_0/features/ServerAsyncApi.java | 25 +++++++++++++++++++ .../swift/CommonSwiftAsyncClient.java | 19 ++++++++++++++ .../extensions/TemporaryUrlKeyAsyncApi.java | 3 +++ 29 files changed, 207 insertions(+) diff --git a/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/SnapshotAsyncApi.java b/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/SnapshotAsyncApi.java index 25c05a5eb1..30cb358aab 100644 --- a/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/SnapshotAsyncApi.java +++ b/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/SnapshotAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.openstack.cinder.v1.features; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; @@ -56,6 +57,7 @@ public interface SnapshotAsyncApi { /** * @see SnapshotApi#list() */ + @Named("snapshot:list") @GET @Path("/snapshots") @SelectJson("snapshots") @@ -66,6 +68,7 @@ public interface SnapshotAsyncApi { /** * @see SnapshotApi#listInDetail() */ + @Named("snapshot:list") @GET @Path("/snapshots/detail") @SelectJson("snapshots") @@ -76,6 +79,7 @@ public interface SnapshotAsyncApi { /** * @see SnapshotApi#get(String) */ + @Named("snapshot:get") @GET @Path("/snapshots/{id}") @SelectJson("snapshot") @@ -86,6 +90,7 @@ public interface SnapshotAsyncApi { /** * @see SnapshotApi#create(String, CreateSnapshotOptions...) */ + @Named("snapshot:create") @POST @Path("/snapshots") @SelectJson("snapshot") @@ -97,6 +102,7 @@ public interface SnapshotAsyncApi { /** * @see SnapshotApi#delete(String) */ + @Named("snapshot:delete") @DELETE @Path("/snapshots/{id}") @Consumes(MediaType.APPLICATION_JSON) diff --git a/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/VolumeAsyncApi.java b/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/VolumeAsyncApi.java index 5d6678bbed..0379a33669 100644 --- a/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/VolumeAsyncApi.java +++ b/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/VolumeAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.openstack.cinder.v1.features; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; @@ -56,6 +57,7 @@ public interface VolumeAsyncApi { /** * @see VolumeApi#list() */ + @Named("volume:list") @GET @Path("/volumes") @SelectJson("volumes") @@ -66,6 +68,7 @@ public interface VolumeAsyncApi { /** * @see VolumeApi#listInDetail() */ + @Named("volume:list") @GET @Path("/volumes/detail") @SelectJson("volumes") @@ -76,6 +79,7 @@ public interface VolumeAsyncApi { /** * @see VolumeApi#get(String) */ + @Named("volume:get") @GET @Path("/volumes/{id}") @SelectJson("volume") @@ -86,6 +90,7 @@ public interface VolumeAsyncApi { /** * @see VolumeApi#create(int, CreateVolumeOptions...) */ + @Named("volume:create") @POST @Path("/volumes") @SelectJson("volume") @@ -97,6 +102,7 @@ public interface VolumeAsyncApi { /** * @see VolumeApi#delete(String) */ + @Named("volume:delete") @DELETE @Path("/volumes/{id}") @Consumes(MediaType.APPLICATION_JSON) diff --git a/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/VolumeTypeAsyncApi.java b/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/VolumeTypeAsyncApi.java index e60ffc185b..d47abb4c07 100644 --- a/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/VolumeTypeAsyncApi.java +++ b/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/features/VolumeTypeAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.openstack.cinder.v1.features; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; @@ -49,6 +50,7 @@ public interface VolumeTypeAsyncApi { /** * @see VolumeTypeApi#list() */ + @Named("volumetype:list") @GET @Path("/types") @SelectJson("volume_types") @@ -59,6 +61,7 @@ public interface VolumeTypeAsyncApi { /** * @see VolumeTypeApi#get(String) */ + @Named("volumetype:get") @GET @Path("/types/{id}") @SelectJson("volume_type") diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/ServiceAsyncApi.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/ServiceAsyncApi.java index a80cdfc2e2..9d381b65f7 100644 --- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/ServiceAsyncApi.java +++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/ServiceAsyncApi.java @@ -20,6 +20,7 @@ package org.jclouds.openstack.keystone.v2_0.features; import java.util.Set; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; @@ -49,6 +50,7 @@ public interface ServiceAsyncApi { /** * @see ServiceApi#listTenants() */ + @Named("service:listtenants") @GET @SelectJson("tenants") @Consumes(MediaType.APPLICATION_JSON) diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/TenantAsyncApi.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/TenantAsyncApi.java index 82dc90e2c5..c653c17ec5 100644 --- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/TenantAsyncApi.java +++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/TenantAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.openstack.keystone.v2_0.features; +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 TenantAsyncApi { /** * @see TenantApi#list() */ + @Named("tenant:list") @GET @Consumes(MediaType.APPLICATION_JSON) @Path("/tenants") @@ -70,6 +72,7 @@ public interface TenantAsyncApi { ListenableFuture> list(); /** @see TenantApi#list(PaginationOptions) */ + @Named("tenant:list") @GET @Consumes(MediaType.APPLICATION_JSON) @Path("/tenants") @@ -79,6 +82,7 @@ public interface TenantAsyncApi { ListenableFuture> list(PaginationOptions options); /** @see TenantApi#get(String) */ + @Named("tenant:get") @GET @SelectJson("tenant") @Consumes(MediaType.APPLICATION_JSON) @@ -88,6 +92,7 @@ public interface TenantAsyncApi { ListenableFuture get(@PathParam("tenantId") String tenantId); /** @see TenantApi#getByName(String) */ + @Named("tenant:get") @GET @SelectJson("tenant") @Consumes(MediaType.APPLICATION_JSON) diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/TokenAsyncApi.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/TokenAsyncApi.java index b1a272747d..8958293a94 100644 --- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/TokenAsyncApi.java +++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/TokenAsyncApi.java @@ -20,6 +20,7 @@ package org.jclouds.openstack.keystone.v2_0.features; import java.util.Set; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.HEAD; @@ -56,6 +57,7 @@ public interface TokenAsyncApi { /** @see TokenApi#get(String) */ + @Named("token:get") @GET @SelectJson("token") @Consumes(MediaType.APPLICATION_JSON) @@ -65,6 +67,7 @@ public interface TokenAsyncApi { ListenableFuture get(@PathParam("token") String token); /** @see TokenApi#getUserOfToken(String) */ + @Named("token:getuser") @GET @SelectJson("user") @Consumes(MediaType.APPLICATION_JSON) @@ -74,6 +77,7 @@ public interface TokenAsyncApi { ListenableFuture getUserOfToken(@PathParam("token") String token); /** @see TokenApi#isValid(String) */ + @Named("token:valid") @HEAD @Path("/tokens/{token}") @RequestFilters(AuthenticateRequest.class) @@ -81,6 +85,7 @@ public interface TokenAsyncApi { ListenableFuture isValid(@PathParam("token") String token); /** @see TokenApi#listEndpointsForToken(String) */ + @Named("token:listendpoints") @GET @SelectJson("endpoints") @Consumes(MediaType.APPLICATION_JSON) diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/UserAsyncApi.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/UserAsyncApi.java index 80990be092..2ea74e65cf 100644 --- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/UserAsyncApi.java +++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/features/UserAsyncApi.java @@ -20,6 +20,7 @@ package org.jclouds.openstack.keystone.v2_0.features; import java.util.Set; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; @@ -64,6 +65,7 @@ public interface UserAsyncApi { /** * @see UserApi#list() */ + @Named("user:list") @GET @Consumes(MediaType.APPLICATION_JSON) @Path("/users") @@ -74,6 +76,7 @@ public interface UserAsyncApi { ListenableFuture> list(); /** @see UserApi#list(PaginationOptions) */ + @Named("user:list") @GET @Consumes(MediaType.APPLICATION_JSON) @Path("/users") @@ -83,6 +86,7 @@ public interface UserAsyncApi { ListenableFuture> list(PaginationOptions options); /** @see UserApi#get(String) */ + @Named("user:get") @GET @SelectJson("user") @Consumes(MediaType.APPLICATION_JSON) @@ -92,6 +96,7 @@ public interface UserAsyncApi { ListenableFuture get(@PathParam("userId") String userId); /** @see UserApi#getByName(String) */ + @Named("user:get") @GET @SelectJson("user") @Consumes(MediaType.APPLICATION_JSON) @@ -101,6 +106,7 @@ public interface UserAsyncApi { ListenableFuture getByName(@QueryParam("name") String userName); /** @see UserApi#listRolesOfUser(String) */ + @Named("user:listroles") @GET @SelectJson("roles") @Consumes(MediaType.APPLICATION_JSON) @@ -110,6 +116,7 @@ public interface UserAsyncApi { ListenableFuture> listRolesOfUser(@PathParam("userId") String userId); /** @see UserApi#listRolesOfUserOnTenant(String, String) */ + @Named("user:listroles") @GET @SelectJson("roles") @Consumes(MediaType.APPLICATION_JSON) diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/v2_0/features/ExtensionAsyncApi.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/v2_0/features/ExtensionAsyncApi.java index 786c22fe6f..0bbbc12392 100644 --- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/v2_0/features/ExtensionAsyncApi.java +++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/v2_0/features/ExtensionAsyncApi.java @@ -20,6 +20,7 @@ package org.jclouds.openstack.v2_0.features; import java.util.Set; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; @@ -52,6 +53,7 @@ public interface ExtensionAsyncApi { /** * @see ExtensionApi#list */ + @Named("extension:list") @GET @SelectJson("extensions") @Consumes(MediaType.APPLICATION_JSON) @@ -62,6 +64,7 @@ public interface ExtensionAsyncApi { /** * @see ExtensionApi#get */ + @Named("extension:get") @GET @SelectJson("extension") @Consumes(MediaType.APPLICATION_JSON) diff --git a/apis/openstack-nova-ec2/src/main/java/org/jclouds/openstack/nova/ec2/services/NovaEC2KeyPairAsyncClient.java b/apis/openstack-nova-ec2/src/main/java/org/jclouds/openstack/nova/ec2/services/NovaEC2KeyPairAsyncClient.java index 001f3d00c4..4658e014e3 100644 --- a/apis/openstack-nova-ec2/src/main/java/org/jclouds/openstack/nova/ec2/services/NovaEC2KeyPairAsyncClient.java +++ b/apis/openstack-nova-ec2/src/main/java/org/jclouds/openstack/nova/ec2/services/NovaEC2KeyPairAsyncClient.java @@ -20,6 +20,7 @@ package org.jclouds.openstack.nova.ec2.services; import static org.jclouds.aws.reference.FormParameters.ACTION; +import javax.inject.Named; import javax.ws.rs.FormParam; import javax.ws.rs.POST; import javax.ws.rs.Path; @@ -50,6 +51,7 @@ public interface NovaEC2KeyPairAsyncClient extends KeyPairAsyncClient { /** * @see NovaEC2KeyPairClient#importKeyPairInRegion(String, String, String) */ + @Named("keypair:import") @POST @Path("/") @FormParams(keys = ACTION, values = "ImportKeyPair") diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/FlavorExtraSpecsAsyncApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/FlavorExtraSpecsAsyncApi.java index 55c37ff22c..521c505b4e 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/FlavorExtraSpecsAsyncApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/FlavorExtraSpecsAsyncApi.java @@ -20,6 +20,7 @@ package org.jclouds.openstack.nova.v2_0.extensions; import java.util.Map; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; @@ -65,6 +66,7 @@ public interface FlavorExtraSpecsAsyncApi { /** * @see FlavorExtraSpecsApi#getMetadata(String) */ + @Named("flavor:getmetadata") @GET @SelectJson("extra_specs") @Path("/flavors/{flavor_id}/os-extra_specs") @@ -74,6 +76,7 @@ public interface FlavorExtraSpecsAsyncApi { /** * @see FlavorExtraSpecsApi#updateMetadataEntry(String, String, String) */ + @Named("flavor:updatemetadata") @POST @Path("/flavors/{flavor_id}/os-extra_specs") @Produces(MediaType.APPLICATION_JSON) @@ -84,6 +87,7 @@ public interface FlavorExtraSpecsAsyncApi { /** * @see FlavorExtraSpecsApi#getMetadataKey(String, String) */ + @Named("flavor:getmetadata") @GET @Path("/flavors/{flavor_id}/os-extra_specs/{key}") @Unwrap @@ -93,6 +97,7 @@ public interface FlavorExtraSpecsAsyncApi { /** * @see FlavorExtraSpecsApi#updateMetadataEntry(String, String, String) */ + @Named("flavor:updatemetadata") @PUT @Path("/flavors/{flavor_id}/os-extra_specs/{key}") @Produces(MediaType.APPLICATION_JSON) @@ -105,6 +110,7 @@ public interface FlavorExtraSpecsAsyncApi { /** * @see FlavorExtraSpecsApi#deleteMetadataKey(String, String) */ + @Named("flavor:deletemetadata") @DELETE @Path("/flavors/{flavor_id}/os-extra_specs/{key}") @Fallback(FalseOnNotFoundOr404.class) diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/FloatingIPAsyncApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/FloatingIPAsyncApi.java index 72777188f2..3ef2ff39a3 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/FloatingIPAsyncApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/FloatingIPAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; @@ -64,6 +65,7 @@ public interface FloatingIPAsyncApi { /** * @see FloatingIPApi#list */ + @Named("floatingip:list") @GET @Path("/os-floating-ips") @SelectJson("floating_ips") @@ -74,6 +76,7 @@ public interface FloatingIPAsyncApi { /** * @see FloatingIPApi#get */ + @Named("floatingip:get") @GET @Path("/os-floating-ips/{id}") @SelectJson("floating_ip") @@ -84,6 +87,7 @@ public interface FloatingIPAsyncApi { /** * @see FloatingIPApi#create */ + @Named("floatingip:create") @POST @Path("/os-floating-ips") @SelectJson("floating_ip") @@ -96,6 +100,7 @@ public interface FloatingIPAsyncApi { /** * @see FloatingIPApi#delete */ + @Named("floatingip:delete") @DELETE @Consumes(MediaType.APPLICATION_JSON) @Fallback(NullOnNotFoundOr404.class) @@ -105,6 +110,7 @@ public interface FloatingIPAsyncApi { /** * @see FloatingIPApi#addToServer */ + @Named("floatingip:add") @POST @Path("/servers/{server}/action") @Consumes @@ -116,6 +122,7 @@ public interface FloatingIPAsyncApi { /** * @see FloatingIPApi#removeFromServer */ + @Named("floatingip:remove") @POST @Path("/servers/{server}/action") @Consumes diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/HostAdministrationAsyncApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/HostAdministrationAsyncApi.java index 6812c1c32c..56fe5d0163 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/HostAdministrationAsyncApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/HostAdministrationAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.PUT; @@ -69,6 +70,7 @@ public interface HostAdministrationAsyncApi { /** * @see HostAdministrationApi#list() */ + @Named("hostadmin:list") @GET @SelectJson("hosts") @Fallback(EmptyFluentIterableOnNotFoundOr404.class) @@ -77,6 +79,7 @@ public interface HostAdministrationAsyncApi { /** * @see HostAdministrationApi#listResourceUsage(String) */ + @Named("hostadmin:listresource") @GET @Path("/{id}") @SelectJson("host") @@ -86,6 +89,7 @@ public interface HostAdministrationAsyncApi { /** * @see HostAdministrationApi#enable(String) */ + @Named("hostadmin:enable") @PUT @Produces(MediaType.APPLICATION_JSON) @Path("/{id}") @@ -96,6 +100,7 @@ public interface HostAdministrationAsyncApi { /** * @see HostAdministrationApi#disable(String) */ + @Named("hostadmin:disable") @PUT @Produces(MediaType.APPLICATION_JSON) @Path("/{id}") @@ -106,6 +111,7 @@ public interface HostAdministrationAsyncApi { /** * @see HostAdministrationApi#startMaintenance(String) */ + @Named("hostadmin:startmaintenance") @PUT @Produces(MediaType.APPLICATION_JSON) @Path("/{id}") @@ -116,6 +122,7 @@ public interface HostAdministrationAsyncApi { /** * @see HostAdministrationApi#stopMaintenance(String) */ + @Named("hostadmin:stopmaintenance") @PUT @Produces(MediaType.APPLICATION_JSON) @Path("/{id}") @@ -126,6 +133,7 @@ public interface HostAdministrationAsyncApi { /** * @see HostAdministrationApi#startup(String) */ + @Named("hostadmin:startup") @GET @Path("/{id}/startup") @ResponseParser(PowerIsStartupResponseParser.class) @@ -134,6 +142,7 @@ public interface HostAdministrationAsyncApi { /** * @see HostAdministrationApi#shutdown(String) */ + @Named("hostadmin:shutdown") @GET @Path("/{id}/shutdown") @ResponseParser(PowerIsShutdownResponseParser.class) @@ -142,6 +151,7 @@ public interface HostAdministrationAsyncApi { /** * @see HostAdministrationApi#reboot(String) */ + @Named("hostadmin:reboot") @GET @Path("/{id}/reboot") @ResponseParser(PowerIsRebootResponseParser.class) diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/HostAggregateAsyncApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/HostAggregateAsyncApi.java index 8d366809f9..ba96371138 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/HostAggregateAsyncApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/HostAggregateAsyncApi.java @@ -20,6 +20,7 @@ package org.jclouds.openstack.nova.v2_0.extensions; import java.util.Map; +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 HostAggregateAsyncApi { /** * @see HostAggregateApi#list() */ + @Named("hostaggregate:list") @GET @SelectJson("aggregates") @Consumes(MediaType.APPLICATION_JSON) @@ -70,6 +72,7 @@ public interface HostAggregateAsyncApi { /** * @see HostAggregateApi#get(String) */ + @Named("hostaggregate:get") @GET @Path("/{id}") @SelectJson("aggregate") @@ -80,6 +83,7 @@ public interface HostAggregateAsyncApi { /** * @see HostAggregateApi#createInAvailabilityZone(String, String) */ + @Named("hostaggregate:create") @POST @SelectJson("aggregate") @Consumes(MediaType.APPLICATION_JSON) @@ -91,6 +95,7 @@ public interface HostAggregateAsyncApi { /** * @see HostAggregateApi#updateName */ + @Named("hostaggregate:update") @POST @Path("/{id}") @SelectJson("aggregate") @@ -101,6 +106,7 @@ public interface HostAggregateAsyncApi { /** * @see HostAggregateApi#updateAvailabilityZone */ + @Named("hostaggregate:update") @POST @Path("/{id}") @SelectJson("aggregate") @@ -111,6 +117,7 @@ public interface HostAggregateAsyncApi { /** * @see HostAggregateApi#delete(String) */ + @Named("hostaggregate:delete") @DELETE @Path("/{id}") @Consumes(MediaType.APPLICATION_JSON) @@ -120,6 +127,7 @@ public interface HostAggregateAsyncApi { /** * @see HostAggregateApi#addHost(String,String) */ + @Named("hostaggregate:addhost") @POST @Path("/{id}/action") @SelectJson("aggregate") @@ -132,6 +140,7 @@ public interface HostAggregateAsyncApi { /** * @see HostAggregateApi#removeHost(String,String) */ + @Named("hostaggregate:removehost") @POST @Path("/{id}/action") @SelectJson("aggregate") @@ -143,6 +152,7 @@ public interface HostAggregateAsyncApi { /** * @see HostAggregateApi#setMetadata */ + @Named("hostaggregate:setmetadata") @POST @Path("/{id}/action") @SelectJson("aggregate") diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/KeyPairAsyncApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/KeyPairAsyncApi.java index 55a9c5f91e..9f56c9e6ad 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/KeyPairAsyncApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/KeyPairAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; @@ -66,6 +67,7 @@ import com.google.common.util.concurrent.ListenableFuture; @RequestFilters(AuthenticateRequest.class) public interface KeyPairAsyncApi { + @Named("keypair:list") @GET @Path("/os-keypairs") @ResponseParser(ParseKeyPairs.class) @@ -73,6 +75,7 @@ public interface KeyPairAsyncApi { @Fallback(EmptyFluentIterableOnNotFoundOr404.class) ListenableFuture> list(); + @Named("keypair:create") @POST @Path("/os-keypairs") @SelectJson("keypair") @@ -81,6 +84,7 @@ public interface KeyPairAsyncApi { @Payload("%7B\"keypair\":%7B\"name\":\"{name}\"%7D%7D") ListenableFuture create(@PayloadParam("name") String name); + @Named("keypair:create") @POST @Path("/os-keypairs") @SelectJson("keypair") @@ -90,6 +94,7 @@ public interface KeyPairAsyncApi { ListenableFuture createWithPublicKey(@PayloadParam("name") String name, @PayloadParam("public_key") String publicKey); + @Named("keypair:delete") @DELETE @Path("/os-keypairs/{name}") @Fallback(FalseOnNotFoundOr404.class) diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/QuotaAsyncApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/QuotaAsyncApi.java index bea833fd4a..e2dc06570c 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/QuotaAsyncApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/QuotaAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.PUT; @@ -57,6 +58,7 @@ public interface QuotaAsyncApi { /** * @see QuotaApi#getDefaultsForTenant(String) */ + @Named("quota:get") @GET @SelectJson("quota_set") @Consumes(MediaType.APPLICATION_JSON) @@ -67,6 +69,7 @@ public interface QuotaAsyncApi { /** * @see QuotaApi#updateQuotaOfTenant */ + @Named("quota:update") @PUT @Path("/{tenant_id}") @Produces(MediaType.APPLICATION_JSON) @@ -77,6 +80,7 @@ public interface QuotaAsyncApi { /** * @see QuotaApi#getDefaultsForTenant(String) */ + @Named("quota:get") @GET @SelectJson("quota_set") @Consumes(MediaType.APPLICATION_JSON) diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/QuotaClassAsyncApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/QuotaClassAsyncApi.java index 35190c0e3d..2d94f07415 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/QuotaClassAsyncApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/QuotaClassAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.PUT; @@ -58,6 +59,7 @@ public interface QuotaClassAsyncApi { /** * @see QuotaClassApi#get */ + @Named("quotaclass:get") @GET @SelectJson("quota_class_set") @Consumes(MediaType.APPLICATION_JSON) @@ -68,6 +70,7 @@ public interface QuotaClassAsyncApi { /** * @see QuotaClassApi#update */ + @Named("quotaclass:update") @PUT @Path("/{id}") @Produces(MediaType.APPLICATION_JSON) diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SecurityGroupAsyncApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SecurityGroupAsyncApi.java index e7f0a56af9..8e8195cc51 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SecurityGroupAsyncApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SecurityGroupAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; +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 SecurityGroupAsyncApi { /** * @see SecurityGroupApi#list */ + @Named("securitygroup:list") @GET @SelectJson("security_groups") @Consumes(MediaType.APPLICATION_JSON) @@ -77,6 +79,7 @@ public interface SecurityGroupAsyncApi { /** * @see SecurityGroupApi#get */ + @Named("securitygroup:get") @GET @Path("/os-security-groups/{id}") @SelectJson("security_group") @@ -87,6 +90,7 @@ public interface SecurityGroupAsyncApi { /** * @see SecurityGroupApi#createWithDescription */ + @Named("securitygroup:create") @POST @Path("/os-security-groups") @SelectJson("security_group") @@ -100,6 +104,7 @@ public interface SecurityGroupAsyncApi { /** * @see SecurityGroupApi#delete */ + @Named("securitygroup:delete") @DELETE @Path("/os-security-groups/{id}") @Fallback(FalseOnNotFoundOr404.class) @@ -109,6 +114,7 @@ public interface SecurityGroupAsyncApi { /** * @see SecurityGroupApi#createRuleAllowingCidrBlock */ + @Named("securitygroup:create") @POST @Path("/os-security-group-rules") @SelectJson("security_group_rule") @@ -123,6 +129,7 @@ public interface SecurityGroupAsyncApi { /** * @see SecurityGroupApi#createRuleOnSecurityGroupToCidrBlock */ + @Named("securitygroup:create") @POST @Path("/os-security-group-rules") @SelectJson("security_group_rule") @@ -137,6 +144,7 @@ public interface SecurityGroupAsyncApi { /** * @see SecurityGroupApi#deleteRule */ + @Named("securitygroup:delete") @DELETE @Path("/os-security-group-rules/{security_group_rule_ID}") @Fallback(FalseOnNotFoundOr404.class) diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerAdminAsyncApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerAdminAsyncApi.java index 52e952b321..a83954e775 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerAdminAsyncApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerAdminAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.POST; import javax.ws.rs.Path; @@ -58,6 +59,7 @@ public interface ServerAdminAsyncApi { /** * @see ServerAdminApi#suspend(String) */ + @Named("serveradmin:suspend") @POST @Produces(MediaType.APPLICATION_JSON) @Payload("{\"suspend\":null}") @@ -67,6 +69,7 @@ public interface ServerAdminAsyncApi { /** * @see ServerAdminApi#resume(String) */ + @Named("serveradmin:resume") @POST @Produces(MediaType.APPLICATION_JSON) @Payload("{\"resume\":null}") @@ -76,6 +79,7 @@ public interface ServerAdminAsyncApi { /** * @see ServerAdminApi#migrate(String) */ + @Named("serveradmin:migrate") @POST @Produces(MediaType.APPLICATION_JSON) @Payload("{\"migrate\":null}") @@ -85,6 +89,7 @@ public interface ServerAdminAsyncApi { /** * @see ServerAdminApi#lock(String) */ + @Named("serveradmin:lock") @POST @Produces(MediaType.APPLICATION_JSON) @Payload("{\"lock\":null}") @@ -94,6 +99,7 @@ public interface ServerAdminAsyncApi { /** * @see ServerAdminApi#unlock(String) */ + @Named("serveradmin:unlock") @POST @Produces(MediaType.APPLICATION_JSON) @Payload("{\"unlock\":null}") @@ -103,6 +109,7 @@ public interface ServerAdminAsyncApi { /** * @see ServerAdminApi#resetNetwork(String) */ + @Named("serveradmin:resetnetwork") @POST @Produces(MediaType.APPLICATION_JSON) @Payload("{\"resetNetwork\":null}") @@ -112,6 +119,7 @@ public interface ServerAdminAsyncApi { /** * @see ServerAdminApi#createBackup */ + @Named("serveradmin:createbackup") @POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @@ -127,6 +135,7 @@ public interface ServerAdminAsyncApi { /** * @see ServerAdminApi#pause(String) */ + @Named("serveradmin:pause") @POST @Produces(MediaType.APPLICATION_JSON) @Payload("{\"pause\":null}") @@ -136,6 +145,7 @@ public interface ServerAdminAsyncApi { /** * @see ServerAdminApi#unpause(String) */ + @Named("serveradmin:unpause") @POST @Produces(MediaType.APPLICATION_JSON) @Payload("{\"unpause\":null}") @@ -145,6 +155,7 @@ public interface ServerAdminAsyncApi { /** * @see ServerAdminApi#injectNetworkInfo(String) */ + @Named("serveradmin:injectnetwork") @POST @Produces(MediaType.APPLICATION_JSON) @Payload("{\"injectNetworkInfo\":null}") @@ -154,6 +165,7 @@ public interface ServerAdminAsyncApi { /** * @see ServerAdminApi#liveMigrate(String) */ + @Named("serveradmin:livemigrate") @POST @Produces(MediaType.APPLICATION_JSON) @Fallback(FalseOnNotFoundOr404.class) diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerWithSecurityGroupsAsyncApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerWithSecurityGroupsAsyncApi.java index c22d0bd5da..01aae70e74 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerWithSecurityGroupsAsyncApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/ServerWithSecurityGroupsAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; @@ -52,6 +53,7 @@ public interface ServerWithSecurityGroupsAsyncApi { /** * @see ServerWithSecurityGroupsApi#get(String) */ + @Named("server:get") @GET @SelectJson("server") @Consumes(MediaType.APPLICATION_JSON) diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageAsyncApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageAsyncApi.java index f7cb37f233..27557f94a4 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageAsyncApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; @@ -56,6 +57,7 @@ public interface SimpleTenantUsageAsyncApi { /** * @see SimpleTenantUsageApi#list() */ + @Named("tenantusage:list") @GET @Path("/os-simple-tenant-usage") @SelectJson("tenant_usages") @@ -66,6 +68,7 @@ public interface SimpleTenantUsageAsyncApi { /** * @see SimpleTenantUsageApi#get(String) */ + @Named("tenantusage:get") @GET @Path("/os-simple-tenant-usage/{id}") @SelectJson("tenant_usage") diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VirtualInterfaceAsyncApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VirtualInterfaceAsyncApi.java index c131caa33a..fba09bb5c9 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VirtualInterfaceAsyncApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VirtualInterfaceAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; @@ -50,6 +51,7 @@ public interface VirtualInterfaceAsyncApi { /** * @see VirtualInterfaceApi#listOnServer(String) */ + @Named("virtualinterface:list") @GET @SelectJson("virtual_interfaces") @Consumes(MediaType.APPLICATION_JSON) diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAsyncApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAsyncApi.java index 4f47b2fc7b..b340b282d6 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAsyncApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; @@ -65,6 +66,7 @@ public interface VolumeAsyncApi { * * @return the list of volumes */ + @Named("volume:list") @GET @Path("/os-volumes") @SelectJson("volumes") @@ -77,6 +79,7 @@ public interface VolumeAsyncApi { * * @return the list of volumes. */ + @Named("volume:list") @GET @Path("/os-volumes/detail") @SelectJson("volumes") @@ -89,6 +92,7 @@ public interface VolumeAsyncApi { * * @return details of a specific volume. */ + @Named("volume:get") @GET @Path("/os-volumes/{id}") @SelectJson("volume") @@ -101,6 +105,7 @@ public interface VolumeAsyncApi { * * @return the new Snapshot */ + @Named("volume:create") @POST @Path("/os-volumes") @SelectJson("volume") @@ -114,6 +119,7 @@ public interface VolumeAsyncApi { * * @return true if successful */ + @Named("volume:delete") @DELETE @Path("/os-volumes/{id}") @Consumes(MediaType.APPLICATION_JSON) @@ -127,6 +133,7 @@ public interface VolumeAsyncApi { * @deprecated To be removed in jclouds 1.7 * @see VolumeAttachmentApi#listAttachmentsOnServer(String) */ + @Named("volume:listattachments") @GET @Path("/servers/{server_id}/os-volume_attachments") @SelectJson("volumeAttachments") @@ -141,6 +148,7 @@ public interface VolumeAsyncApi { * @deprecated To be removed in jclouds 1.7 * @see VolumeAttachmentApi#getAttachmentForVolumeOnServer(String, String) */ + @Named("volume:getattachments") @GET @Path("/servers/{server_id}/os-volume_attachments/{id}") @SelectJson("volumeAttachment") @@ -156,6 +164,7 @@ public interface VolumeAsyncApi { * @deprecated To be removed in jclouds 1.7 * @see VolumeAttachmentApi#attachVolumeToServerAsDevice(String, String, String) */ + @Named("volume:attach") @POST @Path("/servers/{server_id}/os-volume_attachments") @SelectJson("volumeAttachment") @@ -172,6 +181,7 @@ public interface VolumeAsyncApi { * @deprecated To be removed in jclouds 1.7 * @see VolumeAttachmentApi#detachVolumeFromServer(String, String) */ + @Named("volume:detach") @DELETE @Path("/servers/{server_id}/os-volume_attachments/{id}") @Consumes(MediaType.APPLICATION_JSON) @@ -183,6 +193,7 @@ public interface VolumeAsyncApi { * * @return the list of snapshots */ + @Named("volume:listsnapshots") @GET @Path("/os-snapshots") @SelectJson("snapshots") @@ -195,6 +206,7 @@ public interface VolumeAsyncApi { * * @return the list of snapshots */ + @Named("volume:listsnapshot") @GET @Path("/os-snapshots/detail") @SelectJson("snapshots") @@ -207,6 +219,7 @@ public interface VolumeAsyncApi { * * @return details of a specific snapshot. */ + @Named("volume:getsnapshot") @GET @Path("/os-snapshots/{id}") @SelectJson("snapshot") @@ -219,6 +232,7 @@ public interface VolumeAsyncApi { * * @return the new Snapshot */ + @Named("volume:createsnapshot") @POST @Path("/os-snapshots") @SelectJson("snapshot") @@ -232,6 +246,7 @@ public interface VolumeAsyncApi { * * @return true if successful */ + @Named("volume:deletesnapshot") @DELETE @Path("/os-snapshots/{id}") @Consumes(MediaType.APPLICATION_JSON) diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentAsyncApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentAsyncApi.java index 69dc213981..5047840b89 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentAsyncApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.openstack.nova.v2_0.extensions; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; @@ -57,6 +58,7 @@ public interface VolumeAttachmentAsyncApi { /** * @see VolumeAttachmentApi#listAttachmentsOnServer(String) */ + @Named("volumeattachment:list") @GET @Path("/servers/{server_id}/os-volume_attachments") @SelectJson("volumeAttachments") @@ -68,6 +70,7 @@ public interface VolumeAttachmentAsyncApi { /** * @see VolumeAttachmentApi#getAttachmentForVolumeOnServer(String, String) */ + @Named("volumeattachment:get") @GET @Path("/servers/{server_id}/os-volume_attachments/{id}") @SelectJson("volumeAttachment") @@ -80,6 +83,7 @@ public interface VolumeAttachmentAsyncApi { /** * @see VolumeAttachmentApi#attachVolumeToServerAsDevice(String, String, String) */ + @Named("volumeattachment:attach") @POST @Path("/servers/{server_id}/os-volume_attachments") @SelectJson("volumeAttachment") @@ -94,6 +98,7 @@ public interface VolumeAttachmentAsyncApi { /** * @see VolumeAttachmentApi#detachVolumeFromServer(String, String) */ + @Named("volumeattachment:detach") @DELETE @Path("/servers/{server_id}/os-volume_attachments/{id}") @Consumes(MediaType.APPLICATION_JSON) diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeAsyncApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeAsyncApi.java index 5faabc1794..1f81697126 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeAsyncApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeAsyncApi.java @@ -20,6 +20,7 @@ package org.jclouds.openstack.nova.v2_0.extensions; import java.util.Map; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; @@ -69,6 +70,7 @@ public interface VolumeTypeAsyncApi { /** * @see VolumeTypeApi#list */ + @Named("volumetype:list") @GET @SelectJson("volume_types") @Fallback(EmptyFluentIterableOnNotFoundOr404.class) @@ -78,6 +80,7 @@ public interface VolumeTypeAsyncApi { /** * @see VolumeTypeApi#get */ + @Named("volumetype:get") @GET @Path("/{id}") @SelectJson("volume_type") @@ -87,6 +90,7 @@ public interface VolumeTypeAsyncApi { /** * @see VolumeTypeApi#create */ + @Named("volumetype:create") @POST @SelectJson("volume_type") @Produces(MediaType.APPLICATION_JSON) @@ -96,6 +100,7 @@ public interface VolumeTypeAsyncApi { /** * @see VolumeTypeApi#delete */ + @Named("volumetype:delete") @DELETE @Path("/{id}") @Fallback(FalseOnNotFoundOr404.class) @@ -104,6 +109,7 @@ public interface VolumeTypeAsyncApi { /** * @see VolumeTypeApi#getExtraSpecs(String) */ + @Named("volumetype:getextraspecs") @GET @SelectJson("extra_specs") @Path("/{id}/extra_specs") @@ -113,6 +119,7 @@ public interface VolumeTypeAsyncApi { /** * @see VolumeTypeApi#updateExtraSpecs(String, java.util.Map) */ + @Named("volumetype:udpateextraspecs") @POST @Path("/{id}/extra_specs") @Produces(MediaType.APPLICATION_JSON) @@ -123,6 +130,7 @@ public interface VolumeTypeAsyncApi { /** * @see VolumeTypeApi#getExtraSpec(String, String) */ + @Named("volumetype:getextraspec") @GET @Path("/{id}/extra_specs/{key}") @Unwrap @@ -132,6 +140,7 @@ public interface VolumeTypeAsyncApi { /** * @see VolumeTypeApi#updateExtraSpec(String, String, String) */ + @Named("volumetype:updateextraspec") @PUT @Path("/{id}/extra_specs/{key}") @Produces(MediaType.APPLICATION_JSON) @@ -144,6 +153,7 @@ public interface VolumeTypeAsyncApi { /** * @see VolumeTypeApi#deleteExtraSpec(String, String) */ + @Named("volumetype:deleteextraspec") @DELETE @Path("/{id}/extra_specs/{key}") @Fallback(FalseOnNotFoundOr404.class) diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/FlavorAsyncApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/FlavorAsyncApi.java index d294e90d95..ac87968d20 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/FlavorAsyncApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/FlavorAsyncApi.java @@ -18,6 +18,7 @@ */ package org.jclouds.openstack.nova.v2_0.features; +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 FlavorAsyncApi { /** * @see FlavorApi#list() */ + @Named("flavor:list") @GET @Consumes(MediaType.APPLICATION_JSON) @Path("/flavors") @@ -70,6 +72,7 @@ public interface FlavorAsyncApi { ListenableFuture> list(); /** @see FlavorApi#list(PaginationOptions) */ + @Named("flavor:list") @GET @Consumes(MediaType.APPLICATION_JSON) @Path("/flavors") @@ -81,6 +84,7 @@ public interface FlavorAsyncApi { /** * @see FlavorApi#listInDetail() */ + @Named("flavor:list") @GET @Consumes(MediaType.APPLICATION_JSON) @Path("/flavors/detail") @@ -91,6 +95,7 @@ public interface FlavorAsyncApi { ListenableFuture> listInDetail(); /** @see FlavorApi#listInDetail(PaginationOptions) */ + @Named("flavor:list") @GET @Consumes(MediaType.APPLICATION_JSON) @Path("/flavors/detail") @@ -102,6 +107,7 @@ public interface FlavorAsyncApi { /** * @see FlavorApi#get */ + @Named("flavor:get") @GET @SelectJson("flavor") @Consumes(MediaType.APPLICATION_JSON) diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/ImageAsyncApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/ImageAsyncApi.java index 33ecdd72fb..77dd61ec0e 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/ImageAsyncApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/ImageAsyncApi.java @@ -20,6 +20,7 @@ package org.jclouds.openstack.nova.v2_0.features; import java.util.Map; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; @@ -69,6 +70,7 @@ public interface ImageAsyncApi { /** * @see ImageApi#list() */ + @Named("image:list") @GET @Consumes(MediaType.APPLICATION_JSON) @Path("/images") @@ -79,6 +81,7 @@ public interface ImageAsyncApi { ListenableFuture> list(); /** @see ImageApi#list(PaginationOptions) */ + @Named("image:list") @GET @Consumes(MediaType.APPLICATION_JSON) @Path("/images") @@ -90,6 +93,7 @@ public interface ImageAsyncApi { /** * @see ImageApi#listInDetail() */ + @Named("image:list") @GET @Consumes(MediaType.APPLICATION_JSON) @Path("/images/detail") @@ -100,6 +104,7 @@ public interface ImageAsyncApi { ListenableFuture> listInDetail(); /** @see ImageApi#listInDetail(PaginationOptions) */ + @Named("image:list") @GET @Consumes(MediaType.APPLICATION_JSON) @Path("/images/detail") @@ -111,6 +116,7 @@ public interface ImageAsyncApi { /** * @see ImageApi#get */ + @Named("image:get") @GET @SelectJson("image") @Consumes(MediaType.APPLICATION_JSON) @@ -121,6 +127,7 @@ public interface ImageAsyncApi { /** * @see ImageApi#delete */ + @Named("image:delete") @DELETE @Consumes(MediaType.APPLICATION_JSON) @Path("/images/{id}") @@ -130,6 +137,7 @@ public interface ImageAsyncApi { /** * @see ImageApi#getMetadata */ + @Named("image:getmetadata") @GET @SelectJson("metadata") @Path("/images/{id}/metadata") @@ -140,6 +148,7 @@ public interface ImageAsyncApi { /** * @see ImageApi#setMetadata */ + @Named("image:setmetadata") @PUT @SelectJson("metadata") @Path("/images/{id}/metadata") @@ -152,6 +161,7 @@ public interface ImageAsyncApi { /** * @see ImageApi#updateMetadata */ + @Named("image:updatemetadata") @POST @SelectJson("metadata") @Path("/images/{id}/metadata") @@ -164,6 +174,7 @@ public interface ImageAsyncApi { /** * @see ImageApi#getMetadata */ + @Named("image:getmetadata") @GET @Path("/images/{id}/metadata/{key}") @Consumes(MediaType.APPLICATION_JSON) @@ -174,6 +185,7 @@ public interface ImageAsyncApi { /** * @see ImageApi#updateMetadata */ + @Named("image:updatemetadata") @PUT @Path("/images/{id}/metadata/{key}") @Consumes(MediaType.APPLICATION_JSON) @@ -187,6 +199,7 @@ public interface ImageAsyncApi { /** * @see ImageApi#deleteMetadata */ + @Named("image:deletemetadata") @DELETE @Consumes @Path("/images/{id}/metadata/{key}") diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/ServerAsyncApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/ServerAsyncApi.java index 7326bc892c..f2b44b88f4 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/ServerAsyncApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/features/ServerAsyncApi.java @@ -20,6 +20,7 @@ package org.jclouds.openstack.nova.v2_0.features; import java.util.Map; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; @@ -83,6 +84,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#list() */ + @Named("server:list") @GET @Consumes(MediaType.APPLICATION_JSON) @Path("/servers") @@ -93,6 +95,7 @@ public interface ServerAsyncApi { ListenableFuture> list(); /** @see ServerApi#list(PaginationOptions) */ + @Named("server:list") @GET @Consumes(MediaType.APPLICATION_JSON) @Path("/servers") @@ -104,6 +107,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#listInDetail() */ + @Named("server:list") @GET @Consumes(MediaType.APPLICATION_JSON) @Path("/servers/detail") @@ -114,6 +118,7 @@ public interface ServerAsyncApi { ListenableFuture> listInDetail(); /** @see ServerApi#listInDetail(PaginationOptions) */ + @Named("server:list") @GET @Consumes(MediaType.APPLICATION_JSON) @Path("/servers/detail") @@ -125,6 +130,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#get */ + @Named("server:get") @GET @SelectJson("server") @Consumes(MediaType.APPLICATION_JSON) @@ -135,6 +141,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#delete */ + @Named("server:delete") @DELETE @Consumes @Fallback(FalseOnNotFoundOr404.class) @@ -144,6 +151,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#start */ + @Named("server:start") @POST @Path("/servers/{id}/action") @Consumes @@ -154,6 +162,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#stop */ + @Named("server:stop") @POST @Path("/servers/{id}/action") @Consumes @@ -164,6 +173,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#reboot */ + @Named("server:reboot") @POST @Path("/servers/{id}/action") @Consumes @@ -174,6 +184,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#resize */ + @Named("server:resize") @POST @Path("/servers/{id}/action") @Consumes @@ -184,6 +195,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#confirmResize */ + @Named("server:resize") @POST @Path("/servers/{id}/action") @Consumes @@ -194,6 +206,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#revertResize */ + @Named("server:resize") @POST @Path("/servers/{id}/action") @Consumes @@ -204,6 +217,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#create */ + @Named("server:create") @POST @Unwrap @Consumes(MediaType.APPLICATION_JSON) @@ -215,6 +229,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#rebuild */ + @Named("server:rebuild") @POST @Path("/servers/{id}/action") @Consumes @@ -224,6 +239,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#changeAdminPass */ + @Named("server:changeadminpass") @POST @Path("/servers/{id}/action") @Consumes @@ -234,6 +250,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#rename */ + @Named("server:rename") @PUT @Path("/servers/{id}") @Consumes @@ -244,6 +261,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#createImageFromServer */ + @Named("server:create") @POST @Path("/servers/{id}/action") @Consumes(MediaType.APPLICATION_JSON) @@ -256,6 +274,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#getMetadata */ + @Named("server:getmetadata") @GET @SelectJson("metadata") @Path("/servers/{id}/metadata") @@ -266,6 +285,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#setMetadata */ + @Named("server:setmetadata") @PUT @SelectJson("metadata") @Path("/servers/{id}/metadata") @@ -279,6 +299,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#updateMetadata */ + @Named("server:updatemetadata") @POST @SelectJson("metadata") @Path("/servers/{id}/metadata") @@ -292,6 +313,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#getMetadata */ + @Named("server:getmetadata") @GET @Path("/servers/{id}/metadata/{key}") @Consumes(MediaType.APPLICATION_JSON) @@ -302,6 +324,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#updateMetadata */ + @Named("server:updatemetadata") @PUT @Path("/servers/{id}/metadata/{key}") @Consumes(MediaType.APPLICATION_JSON) @@ -314,6 +337,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#deleteMetadata */ + @Named("server:deletemetadata") @DELETE @Consumes @Path("/servers/{id}/metadata/{key}") @@ -324,6 +348,7 @@ public interface ServerAsyncApi { /** * @see ServerApi#getDiagnostics */ + @Named("server:getdiagnostics") @GET @Path("/servers/{id}/diagnostics") @Consumes(MediaType.APPLICATION_JSON) diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftAsyncClient.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftAsyncClient.java index 037b7c2633..73d3b8dd7a 100644 --- a/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftAsyncClient.java +++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftAsyncClient.java @@ -21,6 +21,7 @@ package org.jclouds.openstack.swift; import java.util.Map; import java.util.Set; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; @@ -83,6 +84,7 @@ public interface CommonSwiftAsyncClient { /** * @see CommonSwiftClient#getAccountStatistics */ + @Named("swift:getaccountstats") @HEAD @Path("/") @Consumes(MediaType.WILDCARD) @@ -92,6 +94,7 @@ public interface CommonSwiftAsyncClient { /** * @see CommonSwiftClient#listContainers */ + @Named("swift:listcontainers") @GET @Consumes(MediaType.APPLICATION_JSON) @QueryParams(keys = "format", values = "json") @@ -101,6 +104,7 @@ public interface CommonSwiftAsyncClient { /** * @see CommonSwiftClient#getContainerMetadata */ + @Named("swift:getcontainermetadata") @Beta @HEAD @Path("/{container}") @@ -112,6 +116,7 @@ public interface CommonSwiftAsyncClient { /** * @see CommonSwiftClient#setContainerMetadata */ + @Named("swift:setcontainermetadata") @POST @Path("/{container}") @Fallback(FalseOnContainerNotFound.class) @@ -121,6 +126,7 @@ public interface CommonSwiftAsyncClient { /** * @see CommonSwiftClient#deleteContainerMetadata */ + @Named("swift:deletecontainermetadata") @POST @Path("/{container}") @Fallback(FalseOnContainerNotFound.class) @@ -130,6 +136,7 @@ public interface CommonSwiftAsyncClient { /** * @see CommonSwiftClient#createContainer */ + @Named("swift:createcontainer") @PUT @Path("/{container}") ListenableFuture createContainer(@PathParam("container") String container, @@ -138,6 +145,7 @@ public interface CommonSwiftAsyncClient { /** * @see CommonSwiftClient#setObjectInfo */ + @Named("swift:setobjectinfo") @POST @Path("/{container}/{name}") ListenableFuture setObjectInfo(@PathParam("container") String container, @@ -147,6 +155,7 @@ public interface CommonSwiftAsyncClient { /** * @see CommonSwiftClient#createContainer */ + @Named("swift:createcontainer") @PUT @Path("/{container}") ListenableFuture createContainer(@PathParam("container") String container); @@ -154,6 +163,7 @@ public interface CommonSwiftAsyncClient { /** * @see CommonSwiftClient#deleteContainerIfEmpty */ + @Named("swift:deletecontainerifempty") @DELETE @Fallback(TrueOn404FalseOn409.class) @Path("/{container}") @@ -162,6 +172,7 @@ public interface CommonSwiftAsyncClient { /** * @see CommonSwiftClient#listObjects */ + @Named("swift:listobjects") @GET @QueryParams(keys = "format", values = "json") @ResponseParser(ParseObjectInfoListFromJsonResponse.class) @@ -172,6 +183,7 @@ public interface CommonSwiftAsyncClient { /** * @see CommonSwiftClient#containerExists */ + @Named("swift:containerexists") @HEAD @Path("/{container}") @Consumes(MediaType.WILDCARD) @@ -181,6 +193,7 @@ public interface CommonSwiftAsyncClient { /** * @see CommonSwiftClient#putObject */ + @Named("swift:putobject") @PUT @Path("/{container}/{name}") @ResponseParser(ParseETagHeader.class) @@ -190,6 +203,7 @@ public interface CommonSwiftAsyncClient { /** * @see CommonSwiftClient#copyObject */ + @Named("swift:copyobject") @PUT @Path("/{destinationContainer}/{destinationObject}") @Headers(keys = SwiftHeaders.OBJECT_COPY_FROM, values = "/{sourceContainer}/{sourceObject}") @@ -202,6 +216,7 @@ public interface CommonSwiftAsyncClient { /** * @see CommonSwiftClient#getObject */ + @Named("swift:getobject") @GET @ResponseParser(ParseObjectFromHeadersAndHttpContent.class) @Fallback(NullOnKeyNotFound.class) @@ -213,6 +228,7 @@ public interface CommonSwiftAsyncClient { /** * @see CommonSwiftClient#getObjectInfo */ + @Named("swift:getobjectinfo") @HEAD @ResponseParser(ParseObjectInfoFromHeaders.class) @Fallback(NullOnKeyNotFound.class) @@ -224,6 +240,7 @@ public interface CommonSwiftAsyncClient { /** * @see CommonSwiftClient#objectExists */ + @Named("swift:objectexists") @HEAD @Fallback(FalseOnKeyNotFound.class) @Path("/{container}/{name}") @@ -234,12 +251,14 @@ public interface CommonSwiftAsyncClient { /** * @see CommonSwiftClient#removeObject */ + @Named("swift:removeobject") @DELETE @Fallback(VoidOnNotFoundOr404.class) @Path("/{container}/{name}") ListenableFuture removeObject(@PathParam("container") String container, @PathParam("name") String name); + @Named("swift:putobjectmanifest") @PUT @Path("/{container}/{name}") @ResponseParser(ParseETagHeader.class) diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/extensions/TemporaryUrlKeyAsyncApi.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/extensions/TemporaryUrlKeyAsyncApi.java index 8737680b5d..4c55d16891 100644 --- a/apis/swift/src/main/java/org/jclouds/openstack/swift/extensions/TemporaryUrlKeyAsyncApi.java +++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/extensions/TemporaryUrlKeyAsyncApi.java @@ -27,6 +27,7 @@ import org.jclouds.rest.annotations.Endpoint; import org.jclouds.rest.annotations.RequestFilters; import org.jclouds.rest.annotations.ResponseParser; +import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.HEAD; import javax.ws.rs.HeaderParam; @@ -45,6 +46,7 @@ public interface TemporaryUrlKeyAsyncApi { /** * @see TemporaryUrlKeyApi#getTemporaryUrlKey */ + @Named("tempurlkey:get") @HEAD @Path("/") @Consumes(MediaType.WILDCARD) @@ -54,6 +56,7 @@ public interface TemporaryUrlKeyAsyncApi { /** * @see TemporaryUrlKeyApi#setTemporaryUrlKey */ + @Named("tempurlkey:set") @POST @Path("/") ListenableFuture setTemporaryUrlKey(@HeaderParam(SwiftHeaders.ACCOUNT_TEMPORARY_URL_KEY) String key);