jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds] adding attache detach interface to nova api (#697)
Date Mon, 02 Mar 2015 14:38:43 GMT
> +import javax.ws.rs.core.MediaType;
> +
> +/**
> + * interface api for nova
> + */
> +@RequestFilters(AuthenticateRequest.class)
> +@Consumes(MediaType.APPLICATION_JSON)
> +@Path("/servers")
> +public interface InterfaceApi {
> +
> +   @POST
> +   @Consumes(MediaType.APPLICATION_JSON)
> +   @SelectJson("interfaceAttachment")
> +   @Path("/{server_id}/os-interface")
> +   @RequestFilters(AuthenticateRequest.class)
> +   InterfaceAttachment attachInterface(@PathParam("server_id") String serverId, AttachInterfaceOptions...
options);

Add the corresponding `@Named` annotation to this method.

Don't use a varargs parameter to express that a parameter is Optional. Overload the method
to have two: one without the parameter and one with the parameter (since you don't want more
than one options object being passed).

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/697/files#r25602019
Mime
View raw message