Merge pull request #1067 from rackspace/nova-deprecate

Deprecated nova project in jclouds 1.6, to be removed in jclouds 1.7.
This commit is contained in:
Adrian Cole 2012-12-19 14:50:01 -08:00
commit 784e801d49
3 changed files with 189 additions and 1 deletions

View File

@ -36,30 +36,39 @@ import com.google.inject.Module;
* Implementation of {@link ApiMetadata} for Nova 1.0 API * Implementation of {@link ApiMetadata} for Nova 1.0 API
* *
* @author Adrian Cole * @author Adrian Cole
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.NovaApiMetadata} in openstack-nova.
*/ */
@Deprecated
public class NovaApiMetadata extends BaseRestApiMetadata { public class NovaApiMetadata extends BaseRestApiMetadata {
@Deprecated
public static final TypeToken<RestContext<NovaClient, NovaAsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<NovaClient, NovaAsyncClient>>() { public static final TypeToken<RestContext<NovaClient, NovaAsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<NovaClient, NovaAsyncClient>>() {
}; };
@Override @Override
@Deprecated
public Builder toBuilder() { public Builder toBuilder() {
return new Builder().fromApiMetadata(this); return new Builder().fromApiMetadata(this);
} }
@Deprecated
public NovaApiMetadata() { public NovaApiMetadata() {
this(new Builder()); this(new Builder());
} }
@Deprecated
protected NovaApiMetadata(Builder builder) { protected NovaApiMetadata(Builder builder) {
super(builder); super(builder);
} }
@Deprecated
public static Properties defaultProperties() { public static Properties defaultProperties() {
Properties properties = BaseRestApiMetadata.defaultProperties(); Properties properties = BaseRestApiMetadata.defaultProperties();
return properties; return properties;
} }
@Deprecated
public static class Builder extends BaseRestApiMetadata.Builder { public static class Builder extends BaseRestApiMetadata.Builder {
protected Builder() { protected Builder() {

View File

@ -67,14 +67,19 @@ import com.google.common.util.concurrent.ListenableFuture;
* @author Adrian Cole * @author Adrian Cole
* @see NovaClient * @see NovaClient
* @see <a href="http://wiki.openstack.org/OpenStackAPI_1-1" /> * @see <a href="http://wiki.openstack.org/OpenStackAPI_1-1" />
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See NovaAsyncApi.
*/ */
@SkipEncoding({'/', '='}) @SkipEncoding({'/', '='})
@RequestFilters({AuthenticateRequest.class, AddTimestampQuery.class}) @RequestFilters({AuthenticateRequest.class, AddTimestampQuery.class})
@Endpoint(ServerManagement.class) @Endpoint(ServerManagement.class)
@Deprecated
public interface NovaAsyncClient { public interface NovaAsyncClient {
/** /**
* @see NovaClient#listServers * @see NovaClient#listServers
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerAsyncApi#list()} in openstack-nova.
*/ */
@GET @GET
@Unwrap @Unwrap
@ -82,10 +87,13 @@ public interface NovaAsyncClient {
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@Path("/servers") @Path("/servers")
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
@Deprecated
ListenableFuture<? extends Set<Server>> listServers(ListOptions... options); ListenableFuture<? extends Set<Server>> listServers(ListOptions... options);
/** /**
* @see NovaClient#getServer * @see NovaClient#getServer
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerAsyncApi#get(String)} in openstack-nova.
*/ */
@GET @GET
@Unwrap @Unwrap
@ -93,10 +101,13 @@ public interface NovaAsyncClient {
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@ExceptionParser(ReturnNullOnNotFoundOr404.class) @ExceptionParser(ReturnNullOnNotFoundOr404.class)
@Path("/servers/{id}") @Path("/servers/{id}")
@Deprecated
ListenableFuture<Server> getServer(@PathParam("id") int id); ListenableFuture<Server> getServer(@PathParam("id") int id);
/** /**
* @see NovaClient#getServer * @see NovaClient#getServer
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerAsyncApi#get(String)} in openstack-nova.
*/ */
@GET @GET
@Unwrap @Unwrap
@ -104,28 +115,37 @@ public interface NovaAsyncClient {
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@ExceptionParser(ReturnNullOnNotFoundOr404.class) @ExceptionParser(ReturnNullOnNotFoundOr404.class)
@Path("/servers/{uuid}") @Path("/servers/{uuid}")
@Deprecated
ListenableFuture<Server> getServer(@PathParam("uuid") String uuid); ListenableFuture<Server> getServer(@PathParam("uuid") String uuid);
/** /**
* @see NovaClient#deleteServer * @see NovaClient#deleteServer
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerAsyncApi#delete(String)} in openstack-nova.
*/ */
@DELETE @DELETE
@Consumes @Consumes
@ExceptionParser(ReturnFalseOnNotFoundOr404.class) @ExceptionParser(ReturnFalseOnNotFoundOr404.class)
@Path("/servers/{id}") @Path("/servers/{id}")
@Deprecated
ListenableFuture<Boolean> deleteServer(@PathParam("id") int id); ListenableFuture<Boolean> deleteServer(@PathParam("id") int id);
/** /**
* @see NovaClient#deleteServer * @see NovaClient#deleteServer
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerAsyncApi#delete(String)} in openstack-nova.
*/ */
@DELETE @DELETE
@Consumes @Consumes
@ExceptionParser(ReturnFalseOnNotFoundOr404.class) @ExceptionParser(ReturnFalseOnNotFoundOr404.class)
@Path("/servers/{uuid}") @Path("/servers/{uuid}")
@Deprecated
ListenableFuture<Boolean> deleteServer(@PathParam("uuid") String uuid); ListenableFuture<Boolean> deleteServer(@PathParam("uuid") String uuid);
/** /**
* @see NovaClient#rebootServer * @see NovaClient#rebootServer
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerAsyncApi#reboot(String, RebootType)} in openstack-nova.
*/ */
@POST @POST
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@ -133,10 +153,13 @@ public interface NovaAsyncClient {
@Consumes @Consumes
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Payload("%7B\"reboot\":%7B\"type\":\"{type}\"%7D%7D") @Payload("%7B\"reboot\":%7B\"type\":\"{type}\"%7D%7D")
@Deprecated
ListenableFuture<Void> rebootServer(@PathParam("id") int id, @PayloadParam("type") RebootType rebootType); ListenableFuture<Void> rebootServer(@PathParam("id") int id, @PayloadParam("type") RebootType rebootType);
/** /**
* @see NovaClient#resizeServer * @see NovaClient#resizeServer
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerAsyncApi#resize(String, String)} in openstack-nova.
*/ */
@POST @POST
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@ -144,10 +167,13 @@ public interface NovaAsyncClient {
@Consumes @Consumes
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Payload("%7B\"resize\":%7B\"flavorId\":{flavorId}%7D%7D") @Payload("%7B\"resize\":%7B\"flavorId\":{flavorId}%7D%7D")
@Deprecated
ListenableFuture<Void> resizeServer(@PathParam("id") int id, @PayloadParam("flavorId") int flavorId); ListenableFuture<Void> resizeServer(@PathParam("id") int id, @PayloadParam("flavorId") int flavorId);
/** /**
* @see NovaClient#confirmResizeServer * @see NovaClient#confirmResizeServer
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerAsyncApi#confirmResize(String)} in openstack-nova.
*/ */
@POST @POST
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@ -155,10 +181,13 @@ public interface NovaAsyncClient {
@Consumes @Consumes
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Payload("{\"confirmResize\":null}") @Payload("{\"confirmResize\":null}")
@Deprecated
ListenableFuture<Void> confirmResizeServer(@PathParam("id") int id); ListenableFuture<Void> confirmResizeServer(@PathParam("id") int id);
/** /**
* @see NovaClient#revertResizeServer * @see NovaClient#revertResizeServer
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerAsyncApi#revertResize(String)} in openstack-nova.
*/ */
@POST @POST
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@ -166,10 +195,13 @@ public interface NovaAsyncClient {
@Consumes @Consumes
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Payload("{\"revertResize\":null}") @Payload("{\"revertResize\":null}")
@Deprecated
ListenableFuture<Void> revertResizeServer(@PathParam("id") int id); ListenableFuture<Void> revertResizeServer(@PathParam("id") int id);
/** /**
* @see NovaClient#createServer * @see NovaClient#createServer
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerAsyncApi#create(String, String, String, CreateServerOptions)} in openstack-nova.
*/ */
@POST @POST
@Unwrap @Unwrap
@ -177,42 +209,54 @@ public interface NovaAsyncClient {
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@Path("/servers") @Path("/servers")
@MapBinder(CreateServerOptions.class) @MapBinder(CreateServerOptions.class)
@Deprecated
ListenableFuture<Server> createServer(@PayloadParam("name") String name, @PayloadParam("imageRef") String imageRef, ListenableFuture<Server> createServer(@PayloadParam("name") String name, @PayloadParam("imageRef") String imageRef,
@PayloadParam("flavorRef") String flavorRef, CreateServerOptions... options); @PayloadParam("flavorRef") String flavorRef, CreateServerOptions... options);
/** /**
* @see NovaClient#rebuildServer * @see NovaClient#rebuildServer
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerAsyncApi#rebuild(String, RebuildServerOptions)} in openstack-nova.
*/ */
@POST @POST
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@Path("/servers/{id}/action") @Path("/servers/{id}/action")
@Consumes @Consumes
@MapBinder(RebuildServerOptions.class) @MapBinder(RebuildServerOptions.class)
@Deprecated
ListenableFuture<Void> rebuildServer(@PathParam("id") int id, RebuildServerOptions... options); ListenableFuture<Void> rebuildServer(@PathParam("id") int id, RebuildServerOptions... options);
/** /**
* @see NovaClient#changeAdminPass * @see NovaClient#changeAdminPass
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerAsyncApi#changeAdminPass(String, String)} in openstack-nova.
*/ */
@POST @POST
@Path("/servers/{id}/action") @Path("/servers/{id}/action")
@Consumes @Consumes
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Payload("%7B\"changePassword\":%7B\"adminPass\":\"{adminPass}\"%7D%7D") @Payload("%7B\"changePassword\":%7B\"adminPass\":\"{adminPass}\"%7D%7D")
@Deprecated
ListenableFuture<Void> changeAdminPass(@PathParam("id") int id, @PayloadParam("adminPass") String adminPass); ListenableFuture<Void> changeAdminPass(@PathParam("id") int id, @PayloadParam("adminPass") String adminPass);
/** /**
* @see NovaClient#renameServer * @see NovaClient#renameServer
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerAsyncApi#rename(String, String)} in openstack-nova.
*/ */
@PUT @PUT
@Path("/servers/{id}") @Path("/servers/{id}")
@Consumes @Consumes
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Payload("%7B\"server\":%7B\"name\":\"{name}\"%7D%7D") @Payload("%7B\"server\":%7B\"name\":\"{name}\"%7D%7D")
@Deprecated
ListenableFuture<Void> renameServer(@PathParam("id") int id, @PayloadParam("name") String newName); ListenableFuture<Void> renameServer(@PathParam("id") int id, @PayloadParam("name") String newName);
/** /**
* @see NovaClient#listFlavors * @see NovaClient#listFlavors
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.FlavorAsyncApi#list()} in openstack-nova.
*/ */
@GET @GET
@Unwrap @Unwrap
@ -220,10 +264,13 @@ public interface NovaAsyncClient {
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@Path("/flavors") @Path("/flavors")
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
@Deprecated
ListenableFuture<? extends Set<Flavor>> listFlavors(ListOptions... options); ListenableFuture<? extends Set<Flavor>> listFlavors(ListOptions... options);
/** /**
* @see NovaClient#getFlavor * @see NovaClient#getFlavor
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.FlavorAsyncApi#get(String)} in openstack-nova.
*/ */
@GET @GET
@Unwrap @Unwrap
@ -231,10 +278,13 @@ public interface NovaAsyncClient {
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@Path("/flavors/{id}") @Path("/flavors/{id}")
@ExceptionParser(ReturnNullOnNotFoundOr404.class) @ExceptionParser(ReturnNullOnNotFoundOr404.class)
@Deprecated
ListenableFuture<Flavor> getFlavor(@PathParam("id") int id); ListenableFuture<Flavor> getFlavor(@PathParam("id") int id);
/** /**
* @see NovaClient#getFlavor * @see NovaClient#getFlavor
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.FlavorAsyncApi#get(String)} in openstack-nova.
*/ */
@GET @GET
@Unwrap @Unwrap
@ -242,10 +292,13 @@ public interface NovaAsyncClient {
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@Path("/flavors/{uuid}") @Path("/flavors/{uuid}")
@ExceptionParser(ReturnNullOnNotFoundOr404.class) @ExceptionParser(ReturnNullOnNotFoundOr404.class)
@Deprecated
ListenableFuture<Flavor> getFlavor(@PathParam("uuid") String uuid); ListenableFuture<Flavor> getFlavor(@PathParam("uuid") String uuid);
/** /**
* @see NovaClient#listImages * @see NovaClient#listImages
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ImageAsyncApi#list()} in openstack-nova.
*/ */
@GET @GET
@Unwrap @Unwrap
@ -253,10 +306,13 @@ public interface NovaAsyncClient {
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@Path("/images") @Path("/images")
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
@Deprecated
ListenableFuture<? extends Set<Image>> listImages(ListOptions... options); ListenableFuture<? extends Set<Image>> listImages(ListOptions... options);
/** /**
* @see NovaClient#getImage * @see NovaClient#getImage
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ImageAsyncApi#get(String)} in openstack-nova.
*/ */
@GET @GET
@Unwrap @Unwrap
@ -264,10 +320,13 @@ public interface NovaAsyncClient {
@ExceptionParser(ReturnNullOnNotFoundOr404.class) @ExceptionParser(ReturnNullOnNotFoundOr404.class)
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@Path("/images/{id}") @Path("/images/{id}")
@Deprecated
ListenableFuture<Image> getImage(@PathParam("id") int id); ListenableFuture<Image> getImage(@PathParam("id") int id);
/** /**
* @see NovaClient#getImage * @see NovaClient#getImage
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ImageAsyncApi#get(String)} in openstack-nova.
*/ */
@GET @GET
@Unwrap @Unwrap
@ -275,28 +334,37 @@ public interface NovaAsyncClient {
@ExceptionParser(ReturnNullOnNotFoundOr404.class) @ExceptionParser(ReturnNullOnNotFoundOr404.class)
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@Path("/images/{uuid}") @Path("/images/{uuid}")
@Deprecated
ListenableFuture<Image> getImage(@PathParam("uuid") String uuid); ListenableFuture<Image> getImage(@PathParam("uuid") String uuid);
/** /**
* @see NovaClient#deleteImage * @see NovaClient#deleteImage
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ImageAsyncApi#delete(String)} in openstack-nova.
*/ */
@DELETE @DELETE
@ExceptionParser(ReturnFalseOnNotFoundOr404.class) @ExceptionParser(ReturnFalseOnNotFoundOr404.class)
@Consumes @Consumes
@Path("/images/{id}") @Path("/images/{id}")
@Deprecated
ListenableFuture<Boolean> deleteImage(@PathParam("id") int id); ListenableFuture<Boolean> deleteImage(@PathParam("id") int id);
/** /**
* @see NovaClient#deleteImage * @see NovaClient#deleteImage
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ImageAsyncApi#delete(String)} in openstack-nova.
*/ */
@DELETE @DELETE
@ExceptionParser(ReturnFalseOnNotFoundOr404.class) @ExceptionParser(ReturnFalseOnNotFoundOr404.class)
@Consumes @Consumes
@Path("/images/{id}") @Path("/images/{id}")
@Deprecated
ListenableFuture<Boolean> deleteImage(@PathParam("id") String id); ListenableFuture<Boolean> deleteImage(@PathParam("id") String id);
/** /**
* @see NovaClient#createImageFromServer * @see NovaClient#createImageFromServer
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerAsyncApi#createImageFromServer(String, String)} in openstack-nova.
*/ */
@POST @POST
@Unwrap @Unwrap
@ -305,21 +373,27 @@ public interface NovaAsyncClient {
@Path("/images") @Path("/images")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Payload("%7B\"image\":%7B\"serverId\":{serverId},\"name\":\"{name}\"%7D%7D") @Payload("%7B\"image\":%7B\"serverId\":{serverId},\"name\":\"{name}\"%7D%7D")
@Deprecated
ListenableFuture<Image> createImageFromServer(@PayloadParam("name") String imageName, ListenableFuture<Image> createImageFromServer(@PayloadParam("name") String imageName,
@PayloadParam("serverId") int serverId); @PayloadParam("serverId") int serverId);
/** /**
* @see NovaClient#getAddresses * @see NovaClient#getAddresses
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerAsyncApi#get(String)} in openstack-nova.
*/ */
@GET @GET
@Unwrap @Unwrap
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@Path("/servers/{id}/ips") @Path("/servers/{id}/ips")
@Deprecated
ListenableFuture<Addresses> getAddresses(@PathParam("id") int serverId); ListenableFuture<Addresses> getAddresses(@PathParam("id") int serverId);
/** /**
* @see NovaClient#listPublicAddresses * @see NovaClient#listPublicAddresses
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerAsyncApi#get(String)} in openstack-nova.
*/ */
@GET @GET
@Unwrap @Unwrap
@ -327,10 +401,13 @@ public interface NovaAsyncClient {
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@Path("/servers/{id}/ips/public") @Path("/servers/{id}/ips/public")
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
@Deprecated
ListenableFuture<? extends Set<String>> listPublicAddresses(@PathParam("id") int serverId); ListenableFuture<? extends Set<String>> listPublicAddresses(@PathParam("id") int serverId);
/** /**
* @see NovaClient#listPrivateAddresses * @see NovaClient#listPrivateAddresses
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerAsyncApi#get(String)} in openstack-nova.
*/ */
@GET @GET
@Unwrap @Unwrap
@ -338,45 +415,66 @@ public interface NovaAsyncClient {
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@Path("/servers/{id}/ips/private") @Path("/servers/{id}/ips/private")
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
@Deprecated
ListenableFuture<? extends Set<String>> listPrivateAddresses(@PathParam("id") int serverId); ListenableFuture<? extends Set<String>> listPrivateAddresses(@PathParam("id") int serverId);
/**
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.extensions.FloatingIPAsyncApi#addToServer(String, String)} in openstack-nova.
*/
@POST @POST
@Path("/servers/{id}/action") @Path("/servers/{id}/action")
@Consumes @Consumes
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Payload("%7B\"addFloatingIp\":%7B\"address\":\"{address}\"%7D%7D") @Payload("%7B\"addFloatingIp\":%7B\"address\":\"{address}\"%7D%7D")
@Deprecated
ListenableFuture<Void> addFloatingIP(@PathParam("id") int serverId, @PayloadParam("address") String ip); ListenableFuture<Void> addFloatingIP(@PathParam("id") int serverId, @PayloadParam("address") String ip);
/**
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.extensions.FloatingIPAsyncApi#list()} in openstack-nova.
*/
@GET @GET
@Unwrap @Unwrap
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@Path("/os-floating-ips") @Path("/os-floating-ips")
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
@Deprecated
ListenableFuture<? extends Set<FloatingIP>> listFloatingIPs(); ListenableFuture<? extends Set<FloatingIP>> listFloatingIPs();
/**
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.extensions.FloatingIPAsyncApi#get(String)} in openstack-nova.
*/
@GET @GET
@Unwrap @Unwrap
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@Path("/os-floating-ips/{id}") @Path("/os-floating-ips/{id}")
@ExceptionParser(ReturnNullOnNotFoundOr404.class) @ExceptionParser(ReturnNullOnNotFoundOr404.class)
@Deprecated
ListenableFuture<FloatingIP> getFloatingIP(@PathParam("id") int id); ListenableFuture<FloatingIP> getFloatingIP(@PathParam("id") int id);
/**
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.extensions.SecurityGroupAsyncApi#list()} in openstack-nova.
*/
@GET @GET
@Unwrap @Unwrap
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@Path("/os-security-groups") @Path("/os-security-groups")
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class) @ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
@Deprecated
ListenableFuture<? extends Set<SecurityGroup>> listSecurityGroups(); ListenableFuture<? extends Set<SecurityGroup>> listSecurityGroups();
/**
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.extensions.SecurityGroupAsyncApi#get(String)} in openstack-nova.
*/
@GET @GET
@Unwrap @Unwrap
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@QueryParams(keys = "format", values = "json") @QueryParams(keys = "format", values = "json")
@Path("/os-security-groups/{id}") @Path("/os-security-groups/{id}")
@ExceptionParser(ReturnNullOnNotFoundOr404.class) @ExceptionParser(ReturnNullOnNotFoundOr404.class)
@Deprecated
ListenableFuture<SecurityGroup> getSecurityGroup(@PathParam("id") int id); ListenableFuture<SecurityGroup> getSecurityGroup(@PathParam("id") int id);
} }

View File

@ -43,8 +43,11 @@ import org.jclouds.openstack.nova.options.RebuildServerOptions;
* @see NovaAsyncClient * @see NovaAsyncClient
* @see <a href="http://wiki.openstack.org/OpenStackAPI_1-1" /> * @see <a href="http://wiki.openstack.org/OpenStackAPI_1-1" />
* @author Adrian Cole * @author Adrian Cole
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerApi} in openstack-nova.
*/ */
@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS) @Timeout(duration = 60, timeUnit = TimeUnit.SECONDS)
@Deprecated
public interface NovaClient { public interface NovaClient {
/** /**
@ -56,7 +59,10 @@ public interface NovaClient {
* <p/> * <p/>
* in order to retrieve all details, pass the option {@link ListOptions#withDetails() * in order to retrieve all details, pass the option {@link ListOptions#withDetails()
* withDetails()} * withDetails()}
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerApi#list()} in openstack-nova.
*/ */
@Deprecated
Set<Server> listServers(ListOptions... options); Set<Server> listServers(ListOptions... options);
/** /**
@ -65,8 +71,12 @@ public interface NovaClient {
* *
* @return null, if the server is not found * @return null, if the server is not found
* @see Server * @see Server
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerApi#get(String)} in openstack-nova.
*/ */
@Deprecated
Server getServer(int id); Server getServer(int id);
@Deprecated
Server getServer(String uuid); Server getServer(String uuid);
/** /**
@ -77,8 +87,12 @@ public interface NovaClient {
* *
* @return false if the server is not found * @return false if the server is not found
* @see Server * @see Server
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerApi#delete(String)} in openstack-nova.
*/ */
@Deprecated
boolean deleteServer(int id); boolean deleteServer(int id);
@Deprecated
boolean deleteServer(String id); boolean deleteServer(String id);
/** /**
@ -94,7 +108,10 @@ public interface NovaClient {
* With a soft reboot, the operating system is signaled to restart, which allows for a * With a soft reboot, the operating system is signaled to restart, which allows for a
* graceful shutdown of all processes. A hard reboot is the equivalent of power cycling * graceful shutdown of all processes. A hard reboot is the equivalent of power cycling
* the server. * the server.
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerApi#reboot(String, RebootType)} in openstack-nova.
*/ */
@Deprecated
void rebootServer(int id, RebootType rebootType); void rebootServer(int id, RebootType rebootType);
/** /**
@ -109,7 +126,10 @@ public interface NovaClient {
* ACTIVE - QUEUE_RESIZE - PREP_RESIZE - VERIFY_RESIZE * ACTIVE - QUEUE_RESIZE - PREP_RESIZE - VERIFY_RESIZE
* <p/> * <p/>
* ACTIVE - QUEUE_RESIZE - ACTIVE (on error) * ACTIVE - QUEUE_RESIZE - ACTIVE (on error)
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerApi#resize(String, String)} in openstack-nova.
*/ */
@Deprecated
void resizeServer(int id, int flavorId); void resizeServer(int id, int flavorId);
/** /**
@ -122,7 +142,10 @@ public interface NovaClient {
* Status Transition: * Status Transition:
* <p/> * <p/>
* VERIFY_RESIZE - ACTIVE * VERIFY_RESIZE - ACTIVE
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerApi#confirmResize(String)} in openstack-nova.
*/ */
@Deprecated
void confirmResizeServer(int id); void confirmResizeServer(int id);
/** /**
@ -135,7 +158,10 @@ public interface NovaClient {
* Status Transition: * Status Transition:
* <p/> * <p/>
* VERIFY_RESIZE - ACTIVE * VERIFY_RESIZE - ACTIVE
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerApi#revertResize(String)} in openstack-nova.
*/ */
@Deprecated
void revertResizeServer(int id); void revertResizeServer(int id);
/** /**
@ -148,7 +174,10 @@ public interface NovaClient {
* *
* @param options * @param options
* - used to specify extra files, metadata, or ip parameters during server creation. * - used to specify extra files, metadata, or ip parameters during server creation.
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerApi#create(String, String, String, CreateServerOptions)} in openstack-nova.
*/ */
@Deprecated
Server createServer(String name, String imageRef, String flavorRef, CreateServerOptions... options); Server createServer(String name, String imageRef, String flavorRef, CreateServerOptions... options);
/** /**
@ -165,7 +194,10 @@ public interface NovaClient {
* @param options * @param options
* - imageId is an optional argument. If it is not specified, the server is rebuilt * - imageId is an optional argument. If it is not specified, the server is rebuilt
* with the original imageId. * with the original imageId.
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerApi#rebuild(String, RebuildServerOptions)} in openstack-nova.
*/ */
@Deprecated
void rebuildServer(int id, RebuildServerOptions... options); void rebuildServer(int id, RebuildServerOptions... options);
/** /**
@ -173,7 +205,9 @@ public interface NovaClient {
* <p/> * <p/>
* Status Transition: ACTIVE - PASSWORD - ACTIVE * Status Transition: ACTIVE - PASSWORD - ACTIVE
* *
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerApi#changeAdminPass(String, String)} in openstack-nova.
*/ */
@Deprecated
void changeAdminPass(int id, String adminPass); void changeAdminPass(int id, String adminPass);
/** /**
@ -182,7 +216,9 @@ public interface NovaClient {
* <p/> * <p/>
* Status Transition: ACTIVE - PASSWORD - ACTIVE * Status Transition: ACTIVE - PASSWORD - ACTIVE
* *
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerApi#rename(String, String)} in openstack-nova.
*/ */
@Deprecated
void renameServer(int id, String newName); void renameServer(int id, String newName);
/** /**
@ -191,7 +227,10 @@ public interface NovaClient {
* *
* in order to retrieve all details, pass the option {@link ListOptions#withDetails() * in order to retrieve all details, pass the option {@link ListOptions#withDetails()
* withDetails()} * withDetails()}
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.FlavorApi#list()} in openstack-nova.
*/ */
@Deprecated
Set<Flavor> listFlavors(ListOptions... options); Set<Flavor> listFlavors(ListOptions... options);
/** /**
@ -200,8 +239,12 @@ public interface NovaClient {
* *
* @return null, if the flavor is not found * @return null, if the flavor is not found
* @see Flavor * @see Flavor
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.FlavorApi#get(String)} in openstack-nova.
*/ */
@Deprecated
Flavor getFlavor(int id); Flavor getFlavor(int id);
@Deprecated
Flavor getFlavor(String uuid); Flavor getFlavor(String uuid);
/** /**
@ -210,7 +253,10 @@ public interface NovaClient {
* *
* in order to retrieve all details, pass the option {@link ListOptions#withDetails() * in order to retrieve all details, pass the option {@link ListOptions#withDetails()
* withDetails()} * withDetails()}
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ImageApi#list()} in openstack-nova.
*/ */
@Deprecated
Set<Image> listImages(ListOptions... options); Set<Image> listImages(ListOptions... options);
/** /**
@ -220,8 +266,12 @@ public interface NovaClient {
* @return null, if the image is not found * @return null, if the image is not found
* *
* @see Image * @see Image
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ImageApi#get(String)} in openstack-nova.
*/ */
@Deprecated
Image getImage(int id); Image getImage(int id);
@Deprecated
Image getImage(String id); Image getImage(String id);
/** /**
@ -233,8 +283,12 @@ public interface NovaClient {
* *
* @return false if the image is not found * @return false if the image is not found
* @see Image * @see Image
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ImageApi#delete(String)} in openstack-nova.
*/ */
@Deprecated
boolean deleteImage(int id); boolean deleteImage(int id);
@Deprecated
boolean deleteImage(String id); boolean deleteImage(String id);
/** /**
@ -256,28 +310,40 @@ public interface NovaClient {
* @throws ResourceNotFoundException * @throws ResourceNotFoundException
* if the server is not found * if the server is not found
* @see Image * @see Image
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerApi#createImageFromServer(String, String)} in openstack-nova.
*/ */
@Deprecated
Image createImageFromServer(String imageName, int serverId); Image createImageFromServer(String imageName, int serverId);
/** /**
* List all server addresses * List all server addresses
* *
* returns empty set if the server doesn't exist * returns empty set if the server doesn't exist
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerApi#get(String)} in openstack-nova.
*/ */
@Deprecated
Addresses getAddresses(int serverId); Addresses getAddresses(int serverId);
/** /**
* List all public server addresses * List all public server addresses
* *
* returns empty set if the server doesn't exist * returns empty set if the server doesn't exist
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerApi#get(String)} in openstack-nova.
*/ */
@Deprecated
Set<String> listPublicAddresses(int serverId); Set<String> listPublicAddresses(int serverId);
/** /**
* List all private server addresses * List all private server addresses
* *
* returns empty set if the server doesn't exist * returns empty set if the server doesn't exist
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.features.ServerApi#get(String)} in openstack-nova.
*/ */
@Deprecated
Set<String> listPrivateAddresses(int serverId); Set<String> listPrivateAddresses(int serverId);
/** /**
@ -290,7 +356,10 @@ public interface NovaClient {
* @since 2011.3 "Diablo" release, OpenStack API 1.1 * @since 2011.3 "Diablo" release, OpenStack API 1.1
* @param serverId * @param serverId
* @param ip * @param ip
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.extensions.FloatingIPApi#addToServer(String, String)} in openstack-nova.
*/ */
@Deprecated
void addFloatingIP(int serverId, String ip); void addFloatingIP(int serverId, String ip);
/** /**
@ -299,7 +368,10 @@ public interface NovaClient {
* @see <a href="http://wiki.openstack.org/os_api_floating_ip">http://wiki.openstack.org/os_api_floating_ip</a> * @see <a href="http://wiki.openstack.org/os_api_floating_ip">http://wiki.openstack.org/os_api_floating_ip</a>
* @since 2011.3 "Diablo" release, OpenStack API 1.1 * @since 2011.3 "Diablo" release, OpenStack API 1.1
* @return all the available floating IP for the current tenant * @return all the available floating IP for the current tenant
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.extensions.FloatingIPApi#list()} in openstack-nova.
*/ */
@Deprecated
Set<FloatingIP> listFloatingIPs(); Set<FloatingIP> listFloatingIPs();
/** /**
@ -309,7 +381,10 @@ public interface NovaClient {
* @since 2011.3 "Diablo" release, OpenStack API 1.1 * @since 2011.3 "Diablo" release, OpenStack API 1.1
* @param id the floating IP id * @param id the floating IP id
* @return the floating IP or null if not found * @return the floating IP or null if not found
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.extensions.FloatingIPApi#get(String)} in openstack-nova.
*/ */
@Deprecated
FloatingIP getFloatingIP(int id); FloatingIP getFloatingIP(int id);
/** /**
@ -318,7 +393,10 @@ public interface NovaClient {
* @see <a href="http://wiki.openstack.org/os-security-groups">http://wiki.openstack.org/os-security-groups</a> * @see <a href="http://wiki.openstack.org/os-security-groups">http://wiki.openstack.org/os-security-groups</a>
* @since OpenStack API v1.1 * @since OpenStack API v1.1
* @return all the security groups for the current tenant * @return all the security groups for the current tenant
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.extensions.SecurityGroupApi#list()} in openstack-nova.
*/ */
@Deprecated
Set<SecurityGroup> listSecurityGroups(); Set<SecurityGroup> listSecurityGroups();
/** /**
@ -328,7 +406,10 @@ public interface NovaClient {
* @since OpenStack API v1.1 * @since OpenStack API v1.1
* @param id the ID of the security group to get details from * @param id the ID of the security group to get details from
* @return the security group or null if not found * @return the security group or null if not found
*
* @deprecated Deprecated in jclouds 1.6, to be removed in jclouds 1.7. See {@link org.jclouds.openstack.nova.v2_0.extensions.SecurityGroupApi#get(String)} in openstack-nova.
*/ */
@Deprecated
SecurityGroup getSecurityGroup(int id); SecurityGroup getSecurityGroup(int id);
} }