Interface AttachInterfaceApi
@Beta
@Consumes("application/json")
@Path("/servers")
public interface AttachInterfaceApi
Provides access to the OpenStack Compute (Nova) Attach Interfaces API.
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new port interface and associate with the given portboolean
Deletes a port interface for given server, return true if successful, false if server or interface not foundReturns information about a specified port interface for given servercom.google.common.collect.FluentIterable
<InterfaceAttachment> Returns list of port interfaces for given server
-
Method Details
-
list
@Named("attachInterface:list") @GET @Path("/{serverId}/os-interface") com.google.common.collect.FluentIterable<InterfaceAttachment> list(@PathParam("serverId") String serverId) Returns list of port interfaces for given server- Parameters:
serverId
- The Server ID- Returns:
- list of port interfaces for given server
-
get
@Named("attachInterface:get") @GET @Path("/{serverId}/os-interface/{attachmentId}") @Nullable InterfaceAttachment get(@PathParam("serverId") String serverId, @PathParam("attachmentId") String attachmentId) Returns information about a specified port interface for given server- Parameters:
serverId
- The Server IDattachmentId
- The interface ID- Returns:
- information about a specified port interface for given server
-
create
@Named("attachInterface:create") @POST @Path("/{serverId}/os-interface") @Produces("application/json") InterfaceAttachment create(@PathParam("serverId") String serverId, String portId) Creates a new port interface and associate with the given port- Parameters:
portId
- The port ID- Returns:
- newly created port interface
-
delete
@Named("attachInterface:delete") @DELETE @Path("/{serverId}/os-interface/{attachmentId}") boolean delete(@PathParam("serverId") String serverId, @PathParam("attachmentId") String attachmentId) Deletes a port interface for given server, return true if successful, false if server or interface not found- Parameters:
serverId
- The Server IDattachmentId
- The interface ID- Returns:
- true if successful, false if server or interface not found
-